Factor line box code from RenderText to a class
https://bugs.webkit.org/show_bug.cgi?id=122694

Reviewed by Andreas Kling.

Create RenderTextLineBoxes and move some line box specific code there.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace bounds checking ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=120893

Patch by Jessica Pease <jessica_n_pease@apple.com> on 2013-09-06
Reviewed by Darin Adler.

Source/WebCore:

* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBKeyPathLexer::lex):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyIDForJSCSSPropertyName):
* css/CSSFontSelector.cpp:
(WebCore::compareFontFaces):
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiers):
* html/HTMLCollection.cpp:
(WebCore::traverseMatchingElementsForwardToOffset):
(WebCore::LiveNodeListBase::traverseChildNodeListForwardToOffset):
(WebCore::HTMLCollection::traverseForwardToOffset):
* html/HTMLFontElement.cpp:
(WebCore::parseFontSize):
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLIntegerInternal):
(WebCore::parseHTMLNonNegativeIntegerInternal):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration):
* platform/graphics/StringTruncator.cpp:
(WebCore::centerTruncateToBuffer):
(WebCore::rightTruncateToBuffer):
(WebCore::truncateString):
* platform/graphics/TextRun.h:
(WebCore::TextRun::subRun):
* platform/text/BidiRunList.h:
(WebCore::::reverseRuns):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):
(WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
* rendering/svg/SVGTextChunkBuilder.cpp:
(WebCore::SVGTextChunkBuilder::buildTextChunks):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
* svg/SVGPathByteStreamSource.h:
(WebCore::SVGPathByteStreamSource::readType):

Source/WebKit2:

* Shared/Plugins/PluginQuirks.h:
(WebKit::PluginQuirks::add):

Source/WTF:

* wtf/BumpPointerAllocator.h:
(WTF::BumpPointerPool::ensureCapacity):
(WTF::BumpPointerPool::alloc):
(WTF::BumpPointerPool::ensureCapacityCrossPool):
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::increaseSize):
* wtf/dtoa/utils.h:
(WTF::double_conversion::BufferReference::SubBufferReference):
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace static cast ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=120803

Patch by Jessica Pease <jessica_n_pease@apple.com> on 2013-09-27
Reviewed by Andreas Kling.

No new tests because we're just changing assertions.

Source/WebCore:

* accessibility/AccessibilityMockObject.h:
(WebCore::toAccessibilityMockObject):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
* dom/Element.cpp:
(WebCore::Element::elementRareData):
(WebCore::Element::synchronizeAttribute):
* dom/FocusEvent.h:
(WebCore::toFocusEvent):
* dom/MouseEvent.h:
(WebCore::toMouseEvent):
* dom/Node.cpp:
(WebCore::Node::rareData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::ensureMutableInlineStyle):
* dom/TouchEvent.h:
(WebCore::toTouchEvent):
* editing/CompositeEditCommand.h:
(WebCore::toCompositeEditCommand):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
* html/track/AudioTrack.h:
(WebCore::toAudioTrack):
* html/track/TextTrack.h:
(WebCore::toTextTrack):
* html/track/VideoTrack.h:
(WebCore::toVideoTrack):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
* loader/cache/CachedResourceClientWalker.h:
(WebCore::CachedResourceClientWalker::next):
* page/FrameView.h:
(WebCore::toFrameView):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::root):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::createLineBoxesFromBidiRuns):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromEllipseElement):
(WebCore::updatePathFromLineElement):
(WebCore::updatePathFromPolygonElement):
(WebCore::updatePathFromPolylineElement):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::document):

Source/WebKit2:

* Shared/Plugins/NPObjectProxy.h:
(WebKit::NPObjectProxy::toNPObjectProxy):
* WebProcess/Plugins/Netscape/NPJSObject.h:
(WebKit::NPJSObject::toNPJSObject):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generate tighter isFooElement() functions for HTML elements.
<https://webkit.org/b/122696>

Reviewed by Antti Koivisto.

Specialize HTML element type checking helpers to only compare the
localName and not the fully qualified tag name.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a feature define for SubtleCrypto
https://bugs.webkit.org/show_bug.cgi?id=122683

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move more code to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122697

Reviewed by Andreas Kling.

* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::boundingBox):
(WebCore::RenderTextLineBoxes::visualOverflowBoundingBox):
(WebCore::RenderTextLineBoxes::hasRenderedText):
(WebCore::RenderTextLineBoxes::caretMinOffset):
(WebCore::RenderTextLineBoxes::caretMaxOffset):
        
    Moved these.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157345 268f45cc-cd09-0410-ab3c-d52691b4dbfc