ChangeLog-2014-10-07   [plain text]


2014-10-07  Andreas Kling  <akling@apple.com>

        Use more Ref and PassRef for Gradient.
        <https://webkit.org/b/137490>

        Codify the fact that CanvasGradient always has an internal WebCore::Gradient
        and make GraphicsContext gradient setters take PassRef, exposing some
        unnecessary null checks.

        Reviewed by Christophe Dumez.

        * WebCore.exp.in:
        * html/canvas/CanvasGradient.h:
        (WebCore::CanvasGradient::gradient):
        * platform/graphics/Gradient.h:
        (WebCore::Gradient::create):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::setStrokeGradient):
        (WebCore::GraphicsContext::setFillGradient):
        * platform/graphics/GraphicsContext.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::paintProgressBar):
        * rendering/svg/RenderSVGPath.cpp:
        (WebCore::useStrokeStyleToFill):
        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::RenderSVGResourceGradient::applyResource):

2014-10-07  Martin Hock  <mhock@apple.com>

        Defer resolution of viewport size.
        https://bugs.webkit.org/show_bug.cgi?id=137376
        rdar://problem/18558094

        Reviewed by Benjamin Poulain.

        ViewportConfiguration should resolve the viewport size on configuration update.

        * dom/Document.cpp:
        (WebCore::Document::processViewport): Defer resolution of viewport size.
        * dom/ViewportArguments.cpp:
        (WebCore::finalizeViewportArguments): Deleted.
        * dom/ViewportArguments.h:
        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::updateConfiguration): Resolve viewport size.
        (WebCore::ViewportConfiguration::viewportArgumentsLength): Resolves width or height based on viewport arguments.
        * page/ViewportConfiguration.h:

2014-10-07  Pratik Solanki  <psolanki@apple.com>

        [iOS] WebKit1 clients crash in DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse()
        https://bugs.webkit.org/show_bug.cgi?id=137495
        <rdar://problem/18495034>

        Reviewed by Andreas Kling.

        Retain/release the CFCachedURLResponseRef object otherwise we could access a deleted object
        and crash on the web thread.

        * loader/cocoa/DiskCacheMonitorCocoa.mm:
        (WebCore::DiskCacheMonitor::DiskCacheMonitor):

2014-10-07  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for RenderText / RenderTextFragment
        https://bugs.webkit.org/show_bug.cgi?id=137476

        Reviewed by Darin Adler.

        Use is<>() / downcast<>() for RenderText / RenderTextFragment, and
        clean up the surrounding code.

        No new tests, no behavior change.

        * WebCore.exp.in:
        Export symbol for RenderInline::linesBoundingBox() as it is used by
        RenderInline::orderBoundingBox() which is inlined and now called in
        WebRenderNode.mm.

        * WebCore.xcodeproj/project.pbxproj:
        Make RenderInline.h header as Private so that it can be included by
        WebRenderNode.mm, similarly to RenderText.h.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::textUnderElement):
        (WebCore::AccessibilityRenderObject::boundingBoxRect):
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
        (WebCore::AccessibilityRenderObject::passwordFieldValue):
        * accessibility/atk/AccessibilityObjectAtk.cpp:
        (WebCore::AccessibilityObject::getLengthForTextRange):
        * bindings/objc/DOMUIKitExtensions.mm:
        (-[DOMNode textHeight]):
        (-[DOMNode findExplodedTextNodeAtPoint:]):
        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::getUpperLeftCorner):
        (WebCore::ContainerNode::getLowerRightCorner):
        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::addMarker):
        * dom/Position.cpp:
        (WebCore::hasInlineBoxWrapper):
        (WebCore::Position::upstream):
        (WebCore::Position::downstream):
        (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
        (WebCore::Position::isCandidate):
        (WebCore::Position::rendersInDifferentPosition):
        (WebCore::searchAheadForBetterMatch):
        (WebCore::Position::getInlineBoxAndOffset):
        * dom/PositionIterator.cpp:
        (WebCore::PositionIterator::isCandidate):
        * dom/Range.cpp:
        (WebCore::Range::textRects):
        (WebCore::Range::textQuads):
        (WebCore::Range::getBorderAndTextQuads):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::debugRenderer):
        * editing/TextIterator.cpp:
        (WebCore::hasVisibleTextNode):
        (WebCore::TextIterator::handleTextNode):
        (WebCore::maxOffsetIncludingCollapsedSpaces):
        (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter):
        * editing/VisibleUnits.cpp:
        (WebCore::startOfParagraph):
        (WebCore::endOfParagraph):
        * page/FrameView.cpp:
        (WebCore::countRenderedCharactersInRenderObjectWithThreshold):
        * rendering/BidiRun.cpp:
        (WebCore::BidiRun::BidiRun):
        * rendering/InlineIterator.cpp:
        (WebCore::InlineIterator::surrogateTextDirection):
        * rendering/InlineIterator.h:
        (WebCore::InlineIterator::atTextParagraphSeparator):
        (WebCore::InlineIterator::atParagraphSeparator):
        (WebCore::isEmptyInline):
        (WebCore::InlineIterator::fastIncrementInTextNode):
        (WebCore::InlineIterator::increment):
        (WebCore::InlineIterator::characterAt):
        (WebCore::InlineIterator::direction):
        * rendering/InlineTextBox.h:
        (WebCore::InlineTextBox::renderer):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::updateFirstLetterStyle):
        (WebCore::RenderBlock::updateFirstLetter):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
        (WebCore::isVisibleRenderText):
        (WebCore::RenderBlockFlow::adjustComputedFontSizes):
        (WebCore::stripTrailingSpace):
        (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::createInlineBoxForRenderer):
        (WebCore::dirtyLineBoxesForRenderer):
        (WebCore::reachedEndOfTextRenderer):
        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
        (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
        (WebCore::RenderBlockFlow::handleTrailingSpaces):
        (WebCore::RenderBlockFlow::determineStartPosition):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::moveChildrenTo):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::hasImmediateNonWhitespaceTextChildOrBorderOrOutline):
        (WebCore::RenderElement::addChild):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::generateCulledLineBoxRects):
        (WebCore::RenderInline::culledInlineFirstLineBox):
        (WebCore::RenderInline::culledInlineLastLineBox):
        (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
        (WebCore::RenderInline::dirtyLineBoxes):
        * rendering/RenderInline.h:
        Make borderBoundingBox() public so that call sites (here
        WebRenderNode.mm) can use tighter typing and benefit from the virtual
        function being final.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLineBoxList.cpp:
        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
        * rendering/RenderNamedFlowThread.cpp:
        (WebCore::RenderNamedFlowThread::getRanges):
        * rendering/RenderRubyRun.cpp:
        (WebCore::RenderRubyRun::getOverhang):
        * rendering/RenderSelectionInfo.cpp:
        (WebCore::RenderSelectionInfo::RenderSelectionInfo):
        * rendering/RenderText.cpp:
        (WebCore::isInlineFlowOrEmptyText):
        (WebCore::RenderText::previousCharacter):
        * rendering/RenderText.h:
        (WebCore::Text::renderer):
        * rendering/RenderTextFragment.h:
        (isType):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        (WebCore::write):
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseFor):
        (WebCore::SimpleLineLayout::create):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::paintFlow):
        (WebCore::SimpleLineLayout::hitTestFlow):
        * rendering/SimpleLineLayoutResolver.h:
        (WebCore::SimpleLineLayout::RunResolver::RunResolver):
        * rendering/TextAutoSizing.cpp:
        (WebCore::TextAutoSizingValue::addNode):
        * rendering/TextAutosizer.cpp:
        (WebCore::TextAutosizer::containerIsRowOfLinks):
        (WebCore::TextAutosizer::measureDescendantTextWidth):
        * rendering/line/BreakingContextInlineHeaders.h:
        (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
        (WebCore::shouldAddBorderPaddingMargin):
        (WebCore::shouldSkipWhitespaceAfterStartObject):
        (WebCore::BreakingContext::handleText):
        (WebCore::textBeginsWithBreakablePosition):
        (WebCore::BreakingContext::canBreakAtThisPosition):

2014-10-07  Jer Noble  <jer.noble@apple.com>

        [Media] Expose AudioTracks in the "captions" menu.
        https://bugs.webkit.org/show_bug.cgi?id=137472

        Reviewed by Brent Fulgham.

        Test: media/video-controls-audiotracks-trackmenu.html

        If more than one AudioTrack is present in the video element, add those tracks to the
        captions menu:
        * English.lproj/mediaControlsLocalizedStrings.js:
        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.addVideoListeners):
        (Controller.prototype.removeVideoListeners):
        (Controller.prototype.handleAudioTrackChange):
        (Controller.prototype.handleAudioTrackAdd):
        (Controller.prototype.handleAudioTrackRemove):
        (Controller.prototype.updateCaptionButton):
        (Controller.prototype.buildCaptionMenu):
        (Controller.prototype.handleCaptionItemKeyUp):
        (Controller.prototype.audioTrackItemSelected):
        (Controller.prototype.focusSiblingAudioTrackItem):
        (Controller.prototype.handleAudioTrackItemKeyUp):

        Add support to MediaControlHost for retrieving the sorted audio track list, and the
        localized names for every audio track:
        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::sortedTrackListForMenu):
        (WebCore::MediaControlsHost::displayNameForTrack):
        * Modules/mediacontrols/MediaControlsHost.h:
        * Modules/mediacontrols/MediaControlsHost.idl:
        * page/CaptionUserPreferences.cpp:
        (WebCore::trackDisplayName):
        (WebCore::CaptionUserPreferences::displayNameForTrack):
        (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
        * page/CaptionUserPreferences.h:
        * platform/LocalizedStrings.cpp:
        (WebCore::audioTrackNoLabelText):
        * platform/LocalizedStrings.h:
        * platform/efl/LocalizedStringsEfl.cpp:
        (WebCore::audioTrackNoLabelText):
        * platform/gtk/LocalizedStringsGtk.cpp:
        (WebCore::audioTrackNoLabelText):

        Drive-by fix; do not recurse into AudioTrackPrivate->setEnabled() when the enabled
        state changes.
        * html/track/AudioTrack.cpp:
        (WebCore::AudioTrack::enabledChanged):

        Fix possible out-of-bounds Vector access when adding tracks to a track list by
        sorting the list at insert time, rather than inserting into the track's reported
        position in the Vector:
        * html/track/AudioTrackList.cpp:
        (AudioTrackList::append):
        * html/track/VideoTrackList.cpp:
        (VideoTrackList::append):

        Correctly report the trackIndex of audio and video tracks from AVFoundation:
        * platform/graphics/avfoundation/AudioTrackPrivateAVF.h:
        (WebCore::AudioTrackPrivateAVF::trackIndex):
        (WebCore::AudioTrackPrivateAVF::setTrackIndex):
        (WebCore::AudioTrackPrivateAVF::AudioTrackPrivateAVF):
        * platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
        (WebCore::VideoTrackPrivateAVF::trackIndex):
        (WebCore::VideoTrackPrivateAVF::setTrackIndex):
        (WebCore::VideoTrackPrivateAVF::VideoTrackPrivateAVF):
        * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
        (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
        * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
        (WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack):

2014-10-07  Christophe Dumez  <cdumez@apple.com>

        [WK2] Use is<>() / downcast<>() for DrawingAreaProxy subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137477

        Reviewed by Andreas Kling.

        Include TypeCastsCF.h now that the header was renamed.

        No new tests, no behavior change.

        * platform/cf/SharedBufferCF.cpp:

2014-10-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] TLS errors should take precedence over HTTP authentication
        https://bugs.webkit.org/show_bug.cgi?id=137300

        Reviewed by Sergio Villar Senin.

        Handle TLS errors in got-headers callback to make sure it happens
        before starting the authentication process.

        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::handleUnignoredTLSErrors): Refactored to receive the
        soup message.
        (WebCore::gotHeadersCallback): Return early and cancel the request in case of TLS errors.
        (WebCore::sendRequestCallback): Do not handle TLS errors here, the request should have already been
        cancelled at this point in case of TLS errors.

2014-10-07  Andy Estes  <aestes@apple.com>

        Fix a warning when passing an NSInteger to abs().
        https://bugs.webkit.org/show_bug.cgi?id=137480

        Reviewed by Mark Rowe.

        Use std::abs() instead, which is overloaded for both long (a.k.a. NSInteger) and int.

        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
        (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
        (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):

2014-10-06  Darin Adler  <darin@apple.com>

        Make StringView check the lifetime of the StringImpl it's created from
        https://bugs.webkit.org/show_bug.cgi?id=137202

        Reviewed by Anders Carlsson.

        * platform/graphics/TextRun.cpp: Update since TextRun's definition now
        uses a StringView.

2014-10-06  Andy Estes  <aestes@apple.com>

        [iOS] Fix remaining misuses of abs() and fabsf()
        https://bugs.webkit.org/show_bug.cgi?id=130947

        Reviewed by Simon Fraser.

        Fixed issues found when compiling with -Wabsolute-value.

        * platform/ios/ScrollAnimatorIOS.mm:
        (WebCore::ScrollAnimatorIOS::handleTouchEvent): Called abs() instead of fabsf for integral types. Explicitly
        cast the divisor to float in the call to atanf().
        * platform/ios/wak/WKView.mm:
        (_WKViewAutoresizeCoord): Explicitly cast origMarginsTotal to an int before calling abs(). Added a FIXME
        indicating the strange behavior when origMarginsTotal is in the range (0, 1) (as pointed out by Darin).

2014-10-06  Andreas Kling  <akling@apple.com>

        CanvasPattern always has an internal WebCore::Pattern.
        <https://webkit.org/b/137456>

        Use more Ref & PassRef for CanvasPattern and Pattern.

        Removed some impossible null checks in GraphicsContext that
        got exposed as compile errors with these changes.

        Reviewed by Anders Carlsson.

        * html/canvas/CanvasPattern.h:
        (WebCore::CanvasPattern::pattern):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::setStrokePattern):
        (WebCore::GraphicsContext::setFillPattern):
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/Pattern.cpp:
        (WebCore::Pattern::create):
        * platform/graphics/Pattern.h:
        * platform/graphics/filters/FETile.cpp:
        (WebCore::FETile::platformApplySoftware):
        * rendering/svg/RenderSVGPath.cpp:
        (WebCore::useStrokeStyleToFill):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::applyResource):

2014-10-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL] Restore previous scroll position using restoreViewState()
        https://bugs.webkit.org/show_bug.cgi?id=136999

        Reviewed by Benjamin Poulain.

        There are duplicating code paths to restore previous scroll position and scale factor in
        HistoryController::restoreScrollPositionAndViewState. EFL port has processed the two code paths.
        It causes wrong rendering update or scroll position change when previous page's scroll position
        is restored. Thus EFL port begins to use restoreViewState() to restore scroll position and scale factor.
        This patch is first step to support it.

        Additionally EFL port has supported to use ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate()
        since r173785. So EFL port can use the requestScrollPositionUpdate() to restore scroll position on previous page
        instead of delegatedScrollRequested(). However setScrollPosition() can't be used there for now, because iOS port
        should call it when delegatesScrolling is disabled. On the other hand, EFL port supports it only when delegatesScrolling
        is enabled.

        Test covered by WKViewRestoreZoomAndScrollBackForward API test.

        * loader/HistoryController.cpp:
        (WebCore::HistoryController::restoreScrollPositionAndViewState):
        EFL port only calls restoreViewState() to restore previous page's view state.

        * page/Page.cpp:
        (WebCore::Page::setPageScaleFactor):

2014-10-06  Benjamin Poulain  <bpoulain@apple.com>

        Web Inspector: Highlighted selectors in Rules sidebar break with selectors that contain nested selector lists
        https://bugs.webkit.org/show_bug.cgi?id=137378

        Reviewed by Joseph Pecoraro.

        We should not update the parser's selectorRange when matching a nested selector list.

        To implement this with low risk of unbalanced start+end and good error recovery,
        I have wrapped the parsing of selector_list between a start/end function at the grammar
        level. Whenever the parser enter a nested selector list, m_nestedSelectorLevel goes up
        by one. Any time the parsing is currently in a nested selector list, we never update
        the selector ranges.

        * css/CSSGrammar.y.in:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::CSSParser):
        (WebCore::CSSParser::markSelectorStart):
        (WebCore::CSSParser::markSelectorEnd):
        * css/CSSParser.h:
        (WebCore::CSSParser::startNestedSelectorList):
        (WebCore::CSSParser::endNestedSelectorList):

2014-10-06  Roger Fong  <roger_fong@apple.com>

        [Windows] Build fix for EWS bots.

        * WebCore.vcxproj/WebCoreGenerated.make: Make sure we always regenerate WebCore derived sources.

2014-10-06  Christophe Dumez  <cdumez@apple.com>

        Add is<>() / downcast<>() support for RenderObject subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137424

        Reviewed by Benjamin Poulain.

        Add is<>() / downcast<>() support for RenderObject subclasses, and
        get rid of IsRendererOfType traits struct as we can now rely on the
        TypeCastsTraits instead.

        toRender*() is still supported for most render objects because I did
        not want to remove all usages in this patch, to keep the size small.
        For now, only the MathML render objects were ported over to using
        is<>() / downcast<>(). Other render objects will be taken care of in
        follow-up patches and I will drop support for toRender*()
        incrementally.

        No new tests, no behavior change.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isMathFenceOperator):
        (WebCore::AccessibilityRenderObject::isMathSeparatorOperator):
        (WebCore::AccessibilityRenderObject::mathLineThickness):
        * dom/make_names.pl:
        (printTypeHelpers):
        * mathml/MathMLInlineContainerElement.cpp:
        (WebCore::MathMLInlineContainerElement::childrenChanged):
        * mathml/MathMLTextElement.cpp:
        (WebCore::MathMLTextElement::didAttachRenderers):
        (WebCore::MathMLTextElement::childrenChanged):
        * rendering/RenderAncestorIterator.h:
        (WebCore::lineageOfType):
        * rendering/RenderBlock.h:
        * rendering/RenderBlockFlow.h:
        * rendering/RenderBox.h:
        * rendering/RenderBoxModelObject.h:
        * rendering/RenderButton.h:
        * rendering/RenderCombineText.h:
        * rendering/RenderCounter.h:
        * rendering/RenderDetailsMarker.h:
        * rendering/RenderElement.h:
        * rendering/RenderEmbeddedObject.h:
        * rendering/RenderFieldset.h:
        * rendering/RenderFileUploadControl.h:
        * rendering/RenderFlexibleBox.h:
        * rendering/RenderFlowThread.h:
        * rendering/RenderFrame.h:
        * rendering/RenderFrameSet.h:
        * rendering/RenderFullScreen.h:
        * rendering/RenderGrid.h:
        * rendering/RenderHTMLCanvas.h:
        * rendering/RenderIFrame.h:
        * rendering/RenderImage.h:
        * rendering/RenderInline.h:
        * rendering/RenderIterator.h:
        (WebCore::isRendererOfType):
        (WebCore::RenderTraversal::firstChild):
        (WebCore::RenderTraversal::lastChild):
        (WebCore::RenderTraversal::nextSibling):
        (WebCore::RenderTraversal::previousSibling):
        (WebCore::RenderTraversal::findAncestorOfType):
        * rendering/RenderLayerModelObject.h:
        * rendering/RenderLineBreak.h:
        * rendering/RenderListBox.h:
        * rendering/RenderListItem.h:
        * rendering/RenderListMarker.h:
        * rendering/RenderMedia.h:
        * rendering/RenderMenuList.h:
        * rendering/RenderMeter.h:
        * rendering/RenderMultiColumnFlowThread.h:
        * rendering/RenderMultiColumnSet.h:
        * rendering/RenderMultiColumnSpannerPlaceholder.h:
        * rendering/RenderNamedFlowFragment.h:
        * rendering/RenderNamedFlowThread.h:
        * rendering/RenderObject.h:
        (WebCore::RenderObject>): Deleted.
        * rendering/RenderProgress.h:
        * rendering/RenderQuote.h:
        * rendering/RenderRegion.h:
        * rendering/RenderReplaced.h:
        * rendering/RenderRubyRun.h:
        * rendering/RenderScrollbarPart.h:
        * rendering/RenderSearchField.h:
        * rendering/RenderSlider.h:
        * rendering/RenderSnapshottedPlugIn.h:
        * rendering/RenderTable.h:
        * rendering/RenderTableCaption.h:
        * rendering/RenderTableCell.h:
        * rendering/RenderTableCol.h:
        * rendering/RenderTableRow.h:
        * rendering/RenderTableSection.h:
        * rendering/RenderText.h:
        * rendering/RenderTextControl.h:
        * rendering/RenderTextControlMultiLine.h:
        * rendering/RenderTextControlSingleLine.h:
        * rendering/RenderTextFragment.h:
        * rendering/RenderVideo.h:
        * rendering/RenderView.h:
        * rendering/RenderWidget.h:
        * rendering/mathml/RenderMathMLBlock.h:
        * rendering/mathml/RenderMathMLFenced.cpp:
        (WebCore::RenderMathMLFenced::updateFromElement):
        * rendering/mathml/RenderMathMLFraction.cpp:
        (WebCore::RenderMathMLFraction::unembellishedOperator):
        * rendering/mathml/RenderMathMLFraction.h:
        * rendering/mathml/RenderMathMLOperator.h:
        * rendering/mathml/RenderMathMLRadicalOperator.h:
        * rendering/mathml/RenderMathMLRoot.cpp:
        (WebCore::RenderMathMLRoot::baseWrapper):
        (WebCore::RenderMathMLRoot::radicalWrapper):
        (WebCore::RenderMathMLRoot::indexWrapper):
        (WebCore::RenderMathMLRoot::radicalOperator):
        (WebCore::RenderMathMLRootWrapper::removeChild):
        * rendering/mathml/RenderMathMLRoot.h:
        * rendering/mathml/RenderMathMLRow.cpp:
        (WebCore::RenderMathMLRow::updateOperatorProperties):
        (WebCore::RenderMathMLRow::layout):
        * rendering/mathml/RenderMathMLRow.h:
        * rendering/mathml/RenderMathMLScripts.cpp:
        (WebCore::RenderMathMLScripts::addChildInternal):
        (WebCore::RenderMathMLScripts::removeChildInternal):
        (WebCore::RenderMathMLScripts::unembellishedOperator):
        (WebCore::RenderMathMLScripts::layout):
        (WebCore::RenderMathMLScriptsWrapper::addChildInternal):
        (WebCore::RenderMathMLScriptsWrapper::addChild):
        (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
        (WebCore::RenderMathMLScriptsWrapper::removeChild):
        * rendering/mathml/RenderMathMLScripts.h:
        * rendering/mathml/RenderMathMLSpace.h:
        * rendering/mathml/RenderMathMLSquareRoot.h:
        * rendering/mathml/RenderMathMLToken.h:
        * rendering/mathml/RenderMathMLUnderOver.cpp:
        (WebCore::RenderMathMLUnderOver::unembellishedOperator):
        * rendering/svg/RenderSVGContainer.h:
        * rendering/svg/RenderSVGGradientStop.h:
        * rendering/svg/RenderSVGImage.h:
        * rendering/svg/RenderSVGInlineText.h:
        * rendering/svg/RenderSVGModelObject.h:
        * rendering/svg/RenderSVGPath.h:
        * rendering/svg/RenderSVGResourceContainer.h:
        * rendering/svg/RenderSVGResourceFilter.h:
        * rendering/svg/RenderSVGRoot.h:
        * rendering/svg/RenderSVGShape.h:
        * rendering/svg/RenderSVGText.h:
        * rendering/svg/RenderSVGTextPath.h:
        * rendering/svg/RenderSVGViewportContainer.h:

2014-10-06  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for ScrollingTreeNode subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137451

        Reviewed by Tim Horton.

        Use is<>() / downcast<>() for ScrollingTreeNode subclasses.

        No new tests, no behavior change.

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
        (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:
        * page/scrolling/ScrollingTreeNode.h:
        * page/scrolling/ScrollingTreeOverflowScrollingNode.h:
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/mac/ScrollingTreeFixedNode.h:
        * page/scrolling/mac/ScrollingTreeStickyNode.h:
        * page/scrolling/mac/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):

2014-10-06  Myles C. Maxfield  <mmaxfield@apple.com>

        Addressing post-review comment on r174297.
        https://bugs.webkit.org/show_bug.cgi?id=137355

        Unreviewed.

        * rendering/RenderText.cpp:
        (WebCore::RenderText::stringView):

2014-10-06  Myles C. Maxfield  <mmaxfield@apple.com>

        Unreviewed merge fix for r174279.
        https://bugs.webkit.org/show_bug.cgi?id=137097

        * svg/SVGToOTFFontConversion.cpp:
        (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont):

2014-10-06  David Hyatt  <hyatt@apple.com>

        REGRESSION (Simple Line Layout): Inline block baselines computed incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=137461

        Reviewed by Simon Fraser.

        Added fast/inline-block/simple-line-layout.html

        * rendering/SimpleLineLayoutFunctions.h:
        (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
        (WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
        Fix the baseline computation functions in simple line layout to
        use lineCount rather than runCount.

2014-10-06  Ada Chan  <adachan@apple.com>

        Add ChromeClient::isPlayingAudioDidChange().
        https://bugs.webkit.org/show_bug.cgi?id=137220

        Reviewed by Jer Noble.

        This is called when the Page's m_isPlayingAudio changes.

        No new tests, no behavior change.

        * page/ChromeClient.h:
        (WebCore::ChromeClient::isPlayingAudioDidChange):
        * page/Page.cpp:
        (WebCore::Page::updateIsPlayingAudio):

2014-10-06  Benjamin Poulain  <benjamin@webkit.org>

        Unreviewed, rolling out r174336.

        Mozilla's Dromaeo still relies on the deprecated function.

        Reverted changeset:

        "Add a deprecation warning for Element.webkitMatchesSelector"
        https://bugs.webkit.org/show_bug.cgi?id=137417
        http://trac.webkit.org/changeset/174336

2014-10-06  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CryptoKey subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137436

        Reviewed by Ryosuke Niwa.

        Use is<>() / downcast<>() for CryptoKey subclasses.

        No new tests, no behavior change.

        * bindings/js/JSCryptoKeySerializationJWK.cpp:
        (WebCore::addJWKAlgorithmToJSON):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::write):
        * crypto/CryptoKey.h:
        * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
        (WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches):
        (WebCore::CryptoAlgorithmAES_CBC::encrypt):
        (WebCore::CryptoAlgorithmAES_CBC::decrypt):
        * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
        (WebCore::CryptoAlgorithmAES_KW::keyAlgorithmMatches):
        (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
        (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
        * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
        (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches):
        (WebCore::CryptoAlgorithmHMAC::sign):
        (WebCore::CryptoAlgorithmHMAC::verify):
        * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
        * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches):
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
        * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
        (WebCore::CryptoAlgorithmRSA_OAEP::keyAlgorithmMatches):
        (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
        (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
        * crypto/keys/CryptoKeyAES.h:
        (WebCore::isCryptoKeyAES): Deleted.
        * crypto/keys/CryptoKeyHMAC.h:
        (WebCore::isCryptoKeyHMAC): Deleted.
        * crypto/keys/CryptoKeyRSA.h:
        (WebCore::isCryptoKeyRSA): Deleted.

2014-10-06  Simon Fraser  <simon.fraser@apple.com>

        Some compositing logic cleanup
        https://bugs.webkit.org/show_bug.cgi?id=133060

        Reviewed by Zalan Bujtas.

        Move compositing-related code from RenderLayer::styleChanged() to
        RenderLayerCompositor::layerStyleChanged(). Combine various tests
        (many clip-related) for changes that require layer rebuilding into 
        styleChangeRequiresLayerRebuild().
        
        Remove code that calls setBackingNeedsRepaint() after filters change
        between being composited or not; I verified that existing "repaint after
        style change" code takes care those repaints.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        (WebCore::RenderLayer::checkIfDescendantClippingContextNeedsUpdate): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::checkIfDescendantClippingContextNeedsUpdate):
        (WebCore::styleChangeRequiresLayerRebuild):
        (WebCore::RenderLayerCompositor::layerStyleChanged):
        * rendering/RenderLayerCompositor.h:

2014-10-06  Ada Chan  <adachan@apple.com>

        Fix the iOS build after https://trac.webkit.org/changeset/174353.

        * platform/audio/ios/AudioDestinationIOS.h:

2014-10-06  Ada Chan  <adachan@apple.com>

        Implement Page::isPlayingAudio().
        https://bugs.webkit.org/show_bug.cgi?id=137218

        Reviewed by Eric Carlson.

        - Add a hasMediaCharacteristics() method to MediaSession. There are three characteristics:
        audible, visual, and legible. MediaSession gets the media characteristics information from
        its MediaSessionClient.
        - Add a mediaStateDidChange() method to MediaSessionClient that MediaSession can call when its
        state changes.
        - Each Document keeps a set of MediaSessions it contains. When that set changes, or when a MediaSession
        changes state, or when its characteristics change, Document::updateIsPlayingAudio() is called. That method
        iterates through all its MediaSessions to check if the overall isPlayingAudio state has changed in the Document.
        - Each Page caches its overall isPlayingAudio state. Whenever a Document's isPlayingAudio state changes,
        it calls Page::updateIsPlayingAudio() which iterates through its frames' documents to calculate its
        overall isPlayingAudio state.

        No new tests, no behavior change.

        * dom/Document.cpp:
        (WebCore::Document::Document):
        Initialize m_isPlayingAudio.
        (WebCore::Document::registerMediaSession):
        Add the MediaSession to m_mediaSessions. Call updateIsPlayingAudio().
        (WebCore::Document::unregisterMediaSession):
        Remove the MediaSession from m_mediaSessions. Call updateIsPlayingAudio().
        (WebCore::Document::updateIsPlayingAudio):
        Go through all the MediaSessions in this Document and check if any has the Audible characteristic
        and is playing. If the overall isPlayingAudio state changes, call Page::updateIsPlayingAudio().
        * dom/Document.h:
        (WebCore::Document::isPlayingAudio):

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::registerWithDocument):
        Call Document::registerMediaSession().
        (WebCore::HTMLMediaElement::unregisterWithDocument):
        Call Document::unregisterMediaSession().
        (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
        Call Document::updateIsPlayingAudio().
        (WebCore::HTMLMediaElement::stop):
        Call MediaSession::clientWillPausePlayback() so the MediaSession's state can be set back to Paused.
        (WebCore::HTMLMediaElement::hasMediaCharacteristics):
        Call hasAudio() to check if the HTMLMediaElement has the Audible characteristic. Call hasVideo()
        to check if it has the Visual characteristic. Call hasClosedCaptions() to check if it has the
        Legible characteristic.
        (WebCore::HTMLMediaElement::mediaStateDidChange):
        Call Document::updateIsPlayingAudio().
        * html/HTMLMediaElement.h:

        * page/Page.cpp:
        (WebCore::Page::Page):
        Initialize m_isPlayingAudio.
        (WebCore::Page::updateIsPlayingAudio):
        Iterate through all its frames' documents to check if any has audio playing. If the overall isPlayingAudio
        state has changed, update m_isPlayingAudio.
        * page/Page.h:
        (WebCore::Page::isPlayingAudio):

        * platform/audio/MediaSession.cpp:
        (WebCore::MediaSession::setState):
        If the MediaSession's state has changed, call Document::updateIsPlayingAudio().
        (WebCore::MediaSession::hasMediaCharacteristics):
        Call MediaSessionClient::hasMediaCharacteristics().
        * platform/audio/MediaSession.h:
        (WebCore::MediaSessionClient::mediaStateDidChange):

        * platform/audio/mac/AudioDestinationMac.h:
        AudioDestination only has the Audible characteristic.

2014-10-06  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for ScrollingTree subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137449

        Reviewed by Ryosuke Niwa.

        Use is<>() / downcast<>() for ScrollingTree subclasses.

        No new tests, no behavior change.

        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/ios/ScrollingTreeIOS.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
        (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
        (WebCore::ScrollingCoordinatorMac::commitTreeState):

2014-10-06  Brent Fulgham  <bfulgham@apple.com>

        [Win] Build fix aftr r174347.

        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Use correct build
        macro to prevent build break when ENCRYPTED_MEDIA_V2 is not enabled.

2014-10-06  Brent Fulgham  <bfulgham@apple.com>

        [Win] Project file gardening.

        * WebCore.vcxproj/WebCore.vcxproj.filters: Move EditorWin.cpp and
          MediatTimeAVFoundation to proper folder locations in project.

2014-10-06  Brent Fulgham  <bfulgham@apple.com>

        [Win] Extend AVFoundationCF Media Implementation
        https://bugs.webkit.org/show_bug.cgi?id=137409

        Reviewed by Eric Carlson.

        This code is not yet being built and tested by our system. Appropriate
        tests will be activated when we enable the build.

        Most of this patch involves correcting some misuse of the AVFoundationCF API.
        1. It is never appropriate in AVCF to pass a null CFErrorRef; instead you must
           pass a CFErrorRef with error type kCFURLErrorUnknown.
        2. Because of the asynchronous way we handle the request/response, it is possible
           for AVCF to make two AVCF requests while negotiating the key exchange.

        * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
        missing declaration.
        * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
        (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): Tighten up scope
        of 'underlyingError'.
        (WebCore::CDMSessionAVFoundationCF::update): Add call to complete the
        loading process.
        * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
        (WebCore::InbandTextTrackPrivateAVCF::label): Handle null titles CFArray
        found during testing.
        (WebCore::InbandTextTrackPrivateAVCF::language): Ditto for a null locale.
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): Add support
        for the new 'supportsKeySystem' method.
        (WebCore::MediaPlayerPrivateAVFoundationCF::createContextVideoRenderer): Add
        assertion for mainThread.
        (WebCore::MediaPlayerPrivateAVFoundationCF::destroyContextVideoRenderer): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::createVideoLayer): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::destroyVideoLayer): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayerItem): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformLayer): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem): Added.
        (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): Add assertion that this
        is being called on the main thread.
        (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions): Handle
        the allows empty media selection properly based on test behavior.
        (WebCore::AVFWrapper::AVFWrapper): Initialize resource loader callback structure
        when building with AVFOUNDATION_LOADER_DELEGATE.
        (WebCore::AVFWrapper::createAssetForURL): Use AVFWrapper's loader callback struct,
        rather than passing the address of a temporary value.
        (WebCore::AVFWrapper::processNotification): Stop using the deprecated 
        'dispatch_get_current_queue' function.
        (WebCore::AVFWrapper::processCue): Ditto.
        (WebCore::AVFWrapper::legibleOutputCallback): Ditto.
        (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource): Pass a valid CFError
        object; nullptr is not allowed as an argument to the "...FinishedLoadingWithError"
        method.
        (WebCore::AVFWrapper::shouldWaitForLoadingOfResource): Add support for multiple
        in-flight requests.
        (WebCore::AVFWrapper::platformLayer): Assert we are on the main thread.
        (WebCore::AVFWrapper::setRequestForKey): Add support for multiple in-flight requests.
        (WebCore::AVFWrapper::takeRequestForKeyURI): Ditto.
        (WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Ditto.
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
        * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Make sure we pass
        valid CFError objects, rather than nullptr.

2014-10-06  Chris Fleizach  <cfleizach@apple.com>

        AX: Performance: Certain Web site causes Safari to hang completely while entering form data
        https://bugs.webkit.org/show_bug.cgi?id=137420

        Reviewed by Mario Sanchez Prada.

        If a website has multiple nested tables that are not "accessibility" tables, the performance of accessibility slows to a crawl because:
          1) We are re-computing accessibilityIsIgnored many times.
               As a solution, we can enable the isIgnoredCache when updating children.
          2) When asking if an object isTableCell, we'd go up the parent chain, asking each of those parents the same question, which exploded into calling this many times.
              As a solution, I've changed our determination of isTableCell to instead check if the parent is an accessibiltyTable which should be much faster.

        No new functionality. Existing tests cover changes.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::updateChildrenIfNecessary):
        (WebCore::AccessibilityObject::accessibilityIsIgnored):
        * accessibility/AccessibilityTableCell.cpp:
        (WebCore::AccessibilityTableCell::parentTable):
        (WebCore::AccessibilityTableCell::isTableCell):

2014-10-06  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed, touch testing/Internals.idl to try to fix Windows EWS after r174315.

        * testing/Internals.idl: Remove unnecessary whitespaces.

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137440

        Reviewed by Ryosuke Niwa.

        Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses.

        No new tests, no behavior change.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
        (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
        (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
        (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
        (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.h:
        * page/scrolling/ScrollingStateFixedNode.h:
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingStateNode.h:
        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
        * page/scrolling/ScrollingStateScrollingNode.h:
        * page/scrolling/ScrollingStateStickyNode.h:
        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
        (WebCore::ScrollingTreeScrollingNode::updateAfterChildren):
        * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
        (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren):
        (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren):
        * page/scrolling/mac/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren):
        * page/scrolling/mac/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CachedRawResource
        https://bugs.webkit.org/show_bug.cgi?id=137439

        Reviewed by Ryosuke Niwa.

        Use is<>() / downcast<>() for CachedRawResource.

        No new tests, no behavior change.

        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
        * loader/cache/CachedRawResource.cpp:
        (WebCore::CachedRawResource::switchClientsToRevalidatedResource):
        * loader/cache/CachedRawResource.h:
        (isType):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestRawResource):
        (WebCore::CachedResourceLoader::requestMainResource):

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for TextTrack subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137438

        Reviewed by Ryosuke Niwa.

        Use is<>() / downcast<>() for TextTrack subclasses.

        No new tests, no behavior change.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
        * html/track/InbandTextTrack.h:
        (isType):
        * html/track/LoadableTextTrack.h:
        (isType):
        * html/track/TextTrackList.cpp:
        (TextTrackList::getTrackIndex):
        (TextTrackList::append): Deleted.

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CryptoKeyData subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137437

        Reviewed by Ryosuke Niwa.

        Use is<>() / downcast<>() for CryptoKeyData subclasses.

        No new tests, no behavior change.

        * bindings/js/JSCryptoKeySerializationJWK.cpp:
        (WebCore::JSCryptoKeySerializationJWK::serialize):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::write):
        * crypto/CryptoKeyData.h:
        * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
        (WebCore::CryptoAlgorithmAES_CBC::importKey):
        * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
        (WebCore::CryptoAlgorithmAES_KW::importKey):
        * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
        (WebCore::CryptoAlgorithmHMAC::importKey):
        * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
        * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
        * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
        (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
        * crypto/keys/CryptoKeyDataOctetSequence.h:
        (WebCore::isCryptoKeyDataOctetSequence): Deleted.
        * crypto/keys/CryptoKeyDataRSAComponents.h:
        (WebCore::isCryptoKeyDataRSAComponents): Deleted.
        * crypto/keys/CryptoKeySerializationRaw.cpp:
        (WebCore::CryptoKeySerializationRaw::serialize):

2014-10-05  Benjamin Poulain  <bpoulain@apple.com>

        Add a deprecation warning for Element.webkitMatchesSelector
        https://bugs.webkit.org/show_bug.cgi?id=137417

        Reviewed by Christophe Dumez.

        Many scripts have assumed that the unprefixed version of ElementwebkitMatchesSelector
        would be Element.matchesSelector. Feature detection scripts too often test
        for Element.matchesSelector instead of Element.matches before calling Element.webkitMatchesSelector.

        This patch add a deprecation warning for Element.webkitMatchesSelector with the hope
        that it will push the adoption of the unprefixed version.

        * dom/Element.cpp:
        (WebCore::Element::webkitMatchesSelector):
        * dom/Element.h:
        * dom/Element.idl:

2014-10-05  Benjamin Poulain  <benjamin@webkit.org>

        Element.matches()'s argument is not supposed to be optional
        https://bugs.webkit.org/show_bug.cgi?id=137427

        Reviewed by Christophe Dumez.

        The argument was marked as optional, it is not supposed to:
        https://dom.spec.whatwg.org/#interface-element

        Also update the webkit-prefixed version: webkitMatchesSelector().

        Tests: fast/dom/SelectorAPI/closest-definition.html
               fast/dom/SelectorAPI/closest-null-undefined.html
               fast/dom/SelectorAPI/matches-definition.html
               fast/dom/SelectorAPI/matches-null-undefined.html

        * dom/Element.idl:

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CachedResource subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137431

        Reviewed by Benjamin Poulain.

        Use is<>() / downcast<>() for CachedResource subclasses.

        No new tests, no behavior change.

        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::cachedResourceContent):
        * loader/cache/CachedCSSStyleSheet.h:
        * loader/cache/CachedFont.h:
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::switchClientsToRevalidatedResource):
        * loader/cache/CachedImage.h:
        * loader/cache/CachedResource.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestImage):
        (WebCore::CachedResourceLoader::requestFont):
        (WebCore::CachedResourceLoader::requestTextTrack):
        (WebCore::CachedResourceLoader::requestCSSStyleSheet):
        (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
        (WebCore::CachedResourceLoader::requestScript):
        (WebCore::CachedResourceLoader::requestXSLStyleSheet):
        (WebCore::CachedResourceLoader::requestSVGDocument):
        (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
        * loader/cache/CachedSVGDocument.h:
        * loader/cache/CachedScript.h:
        * loader/cache/CachedTextTrack.h:
        * loader/cache/CachedXSLStyleSheet.h:
        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::removeImageFromCache):

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for StyleSheet subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137429

        Reviewed by Benjamin Poulain.

        Use is<>() / downcast<>() for StyleSheet subclasses.

        No new tests, no behavior change.

        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * css/CSSStyleSheet.h:
        (isType):
        * css/StyleSheet.h:
        * dom/Document.cpp:
        (WebCore::Document::applyXSLTransform):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::filterEnabledNonemptyCSSStyleSheets):
        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::parseStyleSheet):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getAllStyleSheets):
        * xml/XSLStyleSheet.h:
        (isType):

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137432

        Reviewed by Benjamin Poulain.

        Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses.

        No new tests, no behavior change.

        * bindings/js/JSCryptoKeySerializationJWK.cpp:
        (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
        * crypto/CryptoAlgorithmParameters.h:
        * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
        (WebCore::CryptoAlgorithmAES_CBC::encrypt):
        (WebCore::CryptoAlgorithmAES_CBC::decrypt):
        (WebCore::CryptoAlgorithmAES_CBC::generateKey):
        * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
        (WebCore::CryptoAlgorithmAES_KW::generateKey):
        * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
        (WebCore::CryptoAlgorithmHMAC::sign):
        (WebCore::CryptoAlgorithmHMAC::verify):
        (WebCore::CryptoAlgorithmHMAC::generateKey):
        (WebCore::CryptoAlgorithmHMAC::importKey):
        * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
        * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
        * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
        (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
        (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
        (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
        (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
        * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
        * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
        * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
        * crypto/parameters/CryptoAlgorithmHmacParams.h:
        * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
        * crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h:
        * crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
        * crypto/parameters/CryptoAlgorithmRsaSsaParams.h:

2014-10-05  Chris Fleizach  <cfleizach@apple.com>

        AX: iOS8: Crash at -[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]
        https://bugs.webkit.org/show_bug.cgi?id=137289

        Reviewed by Mario Sanchez Prada.

        Casting a NSInteger to an unsigned can bypass the check we were hoping to achieve, 
        because size_t is not the same as unsigned.

        Test: platform/ios-sim/accessibility/out-of-bounds-child-access.html

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):

2014-10-05  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for ElementData subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137430

        Reviewed by Benjamin Poulain.

        Use is<>() / downcast<>() for ElementData subclasses.

        No new tests, no behavior change.

        * dom/Element.cpp:
        (WebCore::Element::cloneAttributesFromElement):
        (WebCore::Element::createUniqueElementData):
        * dom/ElementData.cpp:
        (WebCore::ElementData::destroy):
        * dom/ElementData.h:
        (WebCore::ElementData::length):
        (WebCore::ElementData::attributeBase):
        (WebCore::ElementData::presentationAttributeStyle):
        (WebCore::ElementData::attributesIterator):
        (WebCore::ElementData::findAttributeByName):
        (isType):

2014-10-05  Lorenzo Tilve  <ltilve@igalia.com>

        [GTK] Fix build when DRAG_SUPPORT is disabled
        https://bugs.webkit.org/show_bug.cgi?id=137361

        Reviewed by Carlos Garcia Campos.

        Flag out unbuildable code without DRAG_SUPPORT.

        * platform/gtk/GtkDragAndDropHelper.cpp:
        * platform/gtk/GtkDragAndDropHelper.h:

2014-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Do not generate a symlink in derived sources for every header in WebCore/bindings/gobject
        https://bugs.webkit.org/show_bug.cgi?id=137389

        Reviewed by Martin Robinson.

        We only need a symlink for static sources that are included in
        public generated headers, because they are added with as
        <webkitdom/WebKitDOMFoo.h> so they need to be inside a webkitdom
        directory. Also use proper targets and commands to create the
        symlinks only when needed instead of for every build.

        * PlatformGTK.cmake:

2014-10-04  Myles C. Maxfield  <mmaxfield@apple.com>

        [SVG -> OTF Converter] Arabic forms are not substituted correctly
        https://bugs.webkit.org/show_bug.cgi?id=137092

        Reviewed by Darin Adler.

        Tests: svg/W3C-SVG-1.1/fonts-glyph-02-t.svg
               svg/custom/glyph-selection-arabic-forms.svg

        * svg/SVGToOTFFontConversion.cpp:
        (WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable): Invoked for each of the three
        Arabic form substitutions.
        (WebCore::SVGToOTFFontConverter::appendGSUBTable): OpenType "Advanced Typographic Table":
        "Glyph substitution data"
        (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Re-order the m_codepointsToIndicesMap
        to prefer isolated forms of glyphs.
        (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Append the GSUB table.
        (WebCore::calculateChecksum): Deleted.

2014-10-04  Dhi Aurrahman  <diorahman@rockybars.com>

        Implement Element.closest() API
        https://bugs.webkit.org/show_bug.cgi?id=137418

        Reviewed by Benjamin Poulain.

        Implement Element.closest() API as specified in [1].

        [1]: https://dom.spec.whatwg.org/#dom-element-closest

        Tests: fast/selectors/closest-general.html
               fast/selectors/closest-scope.html

        * dom/Element.cpp:
        (WebCore::Element::closest):
        * dom/Element.h:
        * dom/Element.idl:
        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::selectorClosest):
        (WebCore::SelectorDataList::closest):
        * dom/SelectorQuery.h:
        (WebCore::SelectorQuery::closest):

2014-10-04  Brian J. Burg  <burg@cs.washington.edu>

        Unreviewed, rolling out r174319.

        Causes assertions in fast/profiler tests. Needs nontrivial
        investigation, will take offline.

        Reverted changeset:

        "Web Inspector: timelines should not count time elapsed while
        paused in the debugger"
        https://bugs.webkit.org/show_bug.cgi?id=136351
        http://trac.webkit.org/changeset/174319

2014-10-04  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: timelines should not count time elapsed while paused in the debugger
        https://bugs.webkit.org/show_bug.cgi?id=136351

        Reviewed by Timothy Hatcher.

        To avoid counting time elapsed while the debugger is paused, timeline records should
        keep track of time elapsed since the start of timeline capturing, rather than wall clock
        timestamps. We can easily compute elapsed time by sharing Stopwatch instance among
        all timeline record-generating code. The stopwatch is paused while the debugger is paused,
        so subsequent time measurements will not include time elapsed while the debugger is paused.

        Agents use the shared stopwatch to generate timestamps if the timeline agent is active
        (i.e., a timeline recording is being captured). If not, use a zero timestamp since the timing data is only revealed through the Timeline interface.

        This refactoring is safe because start and end times are only used to graph records; the
        timestamp's actual value is irrelevant and is not displayed in the user interface. Date
        timestamps are still included with network-related records as part of their header data.

        No new tests, because we cannot reliably test timing changes induced by debugger pauses.
        It is possible for records to accrue time before the debugger pauses or after it resumes.

        * inspector/InspectorCSSAgent.cpp: Remove unused include.
        * inspector/InspectorPageAgent.cpp: Use timestamps from the shared stopwatch.
        (WebCore::InspectorPageAgent::timestamp):
        (WebCore::InspectorPageAgent::domContentEventFired):
        (WebCore::InspectorPageAgent::loadEventFired):
        * inspector/InspectorPageAgent.h:
        * inspector/InspectorResourceAgent.cpp: Use timestamps from the shared stopwatch.
        (WebCore::InspectorResourceAgent::timestamp):
        (WebCore::InspectorResourceAgent::willSendRequest):
        (WebCore::InspectorResourceAgent::didReceiveResponse):
        (WebCore::InspectorResourceAgent::didReceiveData):
        (WebCore::InspectorResourceAgent::didFinishLoading):
        (WebCore::InspectorResourceAgent::didFailLoading):
        (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
        (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
        (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
        (WebCore::InspectorResourceAgent::didCloseWebSocket):
        (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
        (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
        (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
        * inspector/InspectorResourceAgent.h:
        * inspector/InspectorTimelineAgent.cpp: Add calls to reset, start, and stop the stopwatch.
        (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorTimelineAgent::internalStart):
        (WebCore::InspectorTimelineAgent::internalStop):
        (WebCore::startProfiling):
        (WebCore::InspectorTimelineAgent::startFromConsole):
        (WebCore::InspectorTimelineAgent::willCallFunction):
        (WebCore::InspectorTimelineAgent::willEvaluateScript):
        (WebCore::InspectorTimelineAgent::didPause):
        (WebCore::InspectorTimelineAgent::didContinue):
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
        (WebCore::InspectorTimelineAgent::timestamp):
        (WebCore::TimelineTimeConverter::reset): Deleted.
        * inspector/InspectorTimelineAgent.h: Make timestamp() public, and remove old timepieces.
        (WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
        (WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
        (WebCore::InspectorTimelineAgent::timeConverter): Deleted.
        * inspector/TimelineRecordFactory.cpp:

2014-10-04  Tim Horton  <timothy_horton@apple.com>

        Make it possible to test page overlays
        https://bugs.webkit.org/show_bug.cgi?id=137339

        Reviewed by Dan Bernstein.

        Tests: pageoverlay/overlay-installation.html
               pageoverlay/overlay-large-document-scrolled.html
               pageoverlay/overlay-large-document.html

        Do some initial work to make page overlays testable.
        There are many more tests to be written, but this lays the groundwork.

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
        * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
        * CMakeLists.txt:
        Add MockPageOverlayClient.

        * platform/graphics/GraphicsLayer.h:
        * page/PageOverlayController.h:
        * page/PageOverlayController.cpp:
        (WebCore::PageOverlayController::shouldSkipLayerInDump):
        Don't skip PageOverlayController-owned layers in the layer tree dump if the
        layerTreeAsText behavior says that we should include them.

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::dumpChildren):
        
        * platform/graphics/GraphicsLayerClient.h:
        (WebCore::GraphicsLayerClient::shouldSkipLayerInDump):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::shouldSkipLayerInDump):
        * rendering/RenderLayerBacking.h:
        Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump.

        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        Uninstall all page overlays when resetting to a consistent state.

        (WebCore::Internals::installMockPageOverlay):
        (WebCore::Internals::pageOverlayLayerTreeAsText):
        Expose two new internals functions.
        installMockPageOverlay takes "view" or "document", allowing script
        to choose the appropriate overlay type.
        pageOverlayLayerTreeAsText dumps both view and document-relative
        overlays, from each overlay container layer.

        * testing/Internals.h:
        * testing/Internals.idl:
        Fix some typos.

        * testing/MockPageOverlayClient.cpp: Added.
        (WebCore::MockPageOverlayClient::shared):
        (WebCore::MockPageOverlayClient::MockPageOverlayClient):
        (WebCore::MockPageOverlayClient::installOverlay):
        (WebCore::MockPageOverlayClient::uninstallAllOverlays):
        (WebCore::MockPageOverlayClient::layerTreeAsText):
        (WebCore::MockPageOverlayClient::pageOverlayDestroyed):
        (WebCore::MockPageOverlayClient::willMoveToPage):
        (WebCore::MockPageOverlayClient::didMoveToPage):
        When the overlay is parented, mark it as needing repaint.
        Future tests might want to test overlays without content,
        but for now this is a reasonable default behavior.

        (WebCore::MockPageOverlayClient::drawRect):
        Paint the overlay rects as described in the LayoutTests ChangeLog.

        (WebCore::MockPageOverlayClient::mouseEvent):
        (WebCore::MockPageOverlayClient::didScrollFrame):
        (WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint):
        (WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint):
        (WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames):

        * testing/MockPageOverlayClient.h: Added.

2014-10-04  Carlos Garcia Campos  <cgarcia@igalia.com>

        Move DragController::createFragmentFromDragData implementation to the editor
        https://bugs.webkit.org/show_bug.cgi?id=136819

        Reviewed by Darin Adler.

        Make Editor::webContentFromPasteboard() common to all ports and
        add a implementation for every port.

        * PlatformWin.cmake: Add new files to compilation.
        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
        * editing/Editor.cpp:
        (WebCore::Editor::pasteWithPasteboard): Move to EditorWin.cpp
        since this is only used by windows port.
        * editing/Editor.h:
        * editing/efl/EditorEfl.cpp:
        (WebCore::Editor::webContentFromPasteboard):
        * editing/gtk/EditorGtk.cpp:
        (WebCore::Editor::webContentFromPasteboard):
        * editing/win/EditorWin.cpp: Added.
        (WebCore::Editor::pasteWithPasteboard):
        (WebCore::Editor::webContentFromPasteboard):
        * page/DragController.cpp:
        (WebCore::documentFragmentFromDragData): Use the editor instead of
        createFragmentFromDragData() that has been removed. Also made this
        method a static funtion again.
        * page/DragController.h:
        * page/efl/DragControllerEfl.cpp: Remove createFragmentFromDragData().
        * page/gtk/DragControllerGtk.cpp: Ditto.
        * page/mac/DragControllerMac.mm: Ditto.
        * page/win/DragControllerWin.cpp: Ditto.
        * platform/Pasteboard.h:
        (WebCore::Pasteboard::dragDataMap): Add a getter for m_dragDataMap
        as required by Editor::webContentFromPasteboard for windows.

2014-10-04  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CSS StyleProperties
        https://bugs.webkit.org/show_bug.cgi?id=137398

        Reviewed by Benjamin Poulain.

        Use is<>() / downcast<>() for CSS StyleProperties subclasses.

        No new tests, no behavior change.

        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::immutableCopyIfNeeded):
        (WebCore::MutableStyleProperties::MutableStyleProperties):
        (WebCore::StyleProperties::hasCSSOMWrapper):
        * css/StyleProperties.h:
        (WebCore::StyleProperties::PropertyReference::propertyMetadata):
        (WebCore::StyleProperties::PropertyReference::propertyValue):
        (WebCore::StyleProperties::propertyCount):
        (WebCore::StyleProperties::deref):
        (WebCore::StyleProperties::findPropertyIndex):
        (isType):
        (WebCore::toMutableStyleProperties): Deleted.
        (WebCore::toImmutableStyleProperties): Deleted.
        * css/StyleRule.cpp:
        (WebCore::StyleRule::mutableProperties):
        (WebCore::StyleRulePage::mutableProperties):
        (WebCore::StyleRuleFontFace::mutableProperties):
        * css/WebKitCSSKeyframeRule.cpp:
        (WebCore::StyleKeyframe::mutableProperties):
        * dom/StyledElement.cpp:
        (WebCore::StyledElement::ensureMutableInlineStyle):
        (WebCore::StyledElement::setInlineStyleFromString):

2014-10-04  Zan Dobersek  <zdobersek@igalia.com>

        [TexMap] Clean up GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded()
        https://bugs.webkit.org/show_bug.cgi?id=137263

        Reviewed by Darin Adler.

        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded): Clean up
        the method a bit. When the backing store will not be in use the change mask
        should only get updated if there was a backing store present beforehand.

2014-10-04  Zan Dobersek  <zdobersek@igalia.com>

        [TexMap] Remove QDoc comments in GraphicsLayerTextureMapper
        https://bugs.webkit.org/show_bug.cgi?id=137264

        Reviewed by Andreas Kling.

        Remove all the QDoc comments in the class that were
        left over by the Qt port.

        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):

2014-10-03  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CSSValue subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137381

        Reviewed by Benjamin Poulain.

        Use is<>() / downcast<>() for CSSValue subclasses.

        No new tests, no behavior change.

        * css/CSSAspectRatioValue.h:
        * css/CSSBorderImageSliceValue.h:
        * css/CSSCalculationValue.cpp:
        (WebCore::CSSCalcExpressionNodeParser::parseValue):
        * css/CSSCalculationValue.h:
        * css/CSSCanvasValue.h:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::getBorderRadiusShorthandValue):
        (WebCore::ComputedStyleExtractor::propertyMatches):
        * css/CSSCrossfadeValue.cpp:
        (WebCore::subimageKnownToBeOpaque):
        * css/CSSCrossfadeValue.h:
        * css/CSSCursorImageValue.cpp:
        (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
        (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
        (WebCore::CSSCursorImageValue::cachedImage):
        (WebCore::CSSCursorImageValue::cachedOrPendingImage):
        (WebCore::CSSCursorImageValue::isSVGCursor):
        * css/CSSCursorImageValue.h:
        * css/CSSFilterImageValue.h:
        * css/CSSFontFaceSrcValue.h:
        * css/CSSFontFeatureValue.h:
        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::addFontFaceRule):
        * css/CSSFontValue.h:
        * css/CSSFunctionValue.h:
        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::image):
        (WebCore::CSSGradientValue::gradientWithStylesResolved):
        * css/CSSGradientValue.h:
        * css/CSSGridLineNamesValue.h:
        * css/CSSGridTemplateAreasValue.h:
        * css/CSSImageGeneratorValue.cpp:
        (WebCore::CSSImageGeneratorValue::image):
        (WebCore::CSSImageGeneratorValue::isFixedSize):
        (WebCore::CSSImageGeneratorValue::fixedSize):
        (WebCore::CSSImageGeneratorValue::isPending):
        (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
        (WebCore::CSSImageGeneratorValue::loadSubimages):
        (WebCore::CSSImageGeneratorValue::subimageIsPending):
        (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
        * css/CSSImageGeneratorValue.h:
        * css/CSSImageSetValue.cpp:
        (WebCore::CSSImageSetValue::fillImageSet):
        * css/CSSImageSetValue.h:
        * css/CSSImageValue.h:
        * css/CSSInheritedValue.h:
        * css/CSSInitialValue.h:
        * css/CSSLineBoxContainValue.h:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseColor):
        (WebCore::CSSParser::addFillValue):
        (WebCore::CSSParser::addAnimationValue):
        (WebCore::CSSParser::parse3ValuesFillPosition):
        (WebCore::CSSParser::parseFillPosition):
        (WebCore::CSSParser::parseFillRepeat):
        (WebCore::gridMissingGridPositionValue):
        (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
        (WebCore::CSSParser::parseBasicShapeCircle):
        (WebCore::CSSParser::parseBasicShapeEllipse):
        (WebCore::CSSParser::parseDeprecatedGradient):
        (WebCore::CSSParser::parseDeprecatedRadialGradient):
        (WebCore::CSSParser::parseRadialGradient):
        (WebCore::CSSParser::createFontFaceRule):
        * css/CSSPrimitiveValue.h:
        * css/CSSReflectValue.h:
        * css/CSSShadowValue.h:
        * css/CSSTimingFunctionValue.h:
        * css/CSSToStyleMap.cpp:
        (WebCore::CSSToStyleMap::mapFillAttachment):
        (WebCore::CSSToStyleMap::mapFillClip):
        (WebCore::CSSToStyleMap::mapFillComposite):
        (WebCore::CSSToStyleMap::mapFillBlendMode):
        (WebCore::CSSToStyleMap::mapFillOrigin):
        (WebCore::CSSToStyleMap::mapFillRepeatX):
        (WebCore::CSSToStyleMap::mapFillRepeatY):
        (WebCore::CSSToStyleMap::mapFillSize):
        (WebCore::CSSToStyleMap::mapFillXPosition):
        (WebCore::CSSToStyleMap::mapFillYPosition):
        (WebCore::CSSToStyleMap::mapFillMaskSourceType):
        (WebCore::CSSToStyleMap::mapAnimationDelay):
        (WebCore::CSSToStyleMap::mapAnimationDirection):
        (WebCore::CSSToStyleMap::mapAnimationDuration):
        (WebCore::CSSToStyleMap::mapAnimationFillMode):
        (WebCore::CSSToStyleMap::mapAnimationIterationCount):
        (WebCore::CSSToStyleMap::mapAnimationName):
        (WebCore::CSSToStyleMap::mapAnimationPlayState):
        (WebCore::CSSToStyleMap::mapAnimationProperty):
        (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
        (WebCore::CSSToStyleMap::mapNinePieceImage):
        (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
        (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
        (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
        * css/CSSUnicodeRangeValue.h:
        * css/CSSValue.cpp:
        (WebCore::CSSValue::isImplicitInitialValue):
        (WebCore::CSSValue::addSubresourceStyleURLs):
        (WebCore::CSSValue::hasFailedOrCanceledSubresources):
        (WebCore::CSSValue::equals):
        (WebCore::CSSValue::cssText):
        (WebCore::CSSValue::destroy):
        (WebCore::CSSValue::cloneForCSSOM):
        * css/CSSValue.h:
        * css/CSSValueList.h:
        (WebCore::CSSValueListInspector::CSSValueListInspector):
        * css/DeprecatedStyleBuilder.cpp:
        (WebCore::ApplyPropertyDefault::applyValue):
        (WebCore::ApplyPropertyNumber::applyValue):
        (WebCore::ApplyPropertyAuto::applyValue):
        (WebCore::ApplyPropertyClip::applyValue):
        (WebCore::ApplyPropertyColor::applyValue):
        (WebCore::ApplyPropertyLength::applyValue):
        (WebCore::ApplyPropertyString::applyValue):
        (WebCore::ApplyPropertyBorderRadius::applyValue):
        (WebCore::ApplyPropertyFillLayer::applyValue):
        (WebCore::ApplyPropertyComputeLength::applyValue):
        (WebCore::ApplyPropertyFont::applyValue):
        (WebCore::ApplyPropertyFontFamily::applyValue):
        (WebCore::ApplyPropertyFontSize::applyValue):
        (WebCore::ApplyPropertyFontWeight::applyValue):
        (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
        (WebCore::ApplyPropertyCounter::applyValue):
        (WebCore::ApplyPropertyCursor::applyValue):
        (WebCore::ApplyPropertyTextAlign::applyValue):
        (WebCore::ApplyPropertyTextDecoration::applyValue):
        (WebCore::ApplyPropertyTextDecorationSkip::applyValue):
        (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
        (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
        (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
        (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
        (WebCore::ApplyPropertyLineHeight::applyValue):
        (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
        (WebCore::ApplyPropertyWordSpacing::applyValue):
        (WebCore::ApplyPropertyPageSize::applyValue):
        (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
        (WebCore::ApplyPropertyTextEmphasisPosition::applyValue):
        (WebCore::ApplyPropertyResize::applyValue):
        (WebCore::ApplyPropertyVerticalAlign::applyValue):
        (WebCore::ApplyPropertyAspectRatio::applyValue):
        (WebCore::ApplyPropertyZoom::applyValue):
        (WebCore::ApplyPropertyDisplay::applyValue):
        (WebCore::ApplyPropertyClipPath::applyValue):
        (WebCore::ApplyPropertyShape::applyValue):
        (WebCore::ApplyPropertyImageResolution::applyValue):
        (WebCore::ApplyPropertyTextIndent::applyValue):
        * css/MediaList.cpp:
        (WebCore::reportMediaQueryWarningIfNeeded):
        * css/MediaQueryEvaluator.cpp:
        (WebCore::compareAspectRatioValue):
        (WebCore::numberValue):
        (WebCore::orientationMediaFeatureEval):
        (WebCore::evalResolution):
        (WebCore::device_pixel_ratioMediaFeatureEval):
        (WebCore::resolutionMediaFeatureEval):
        (WebCore::computeLength):
        (WebCore::view_modeMediaFeatureEval):
        (WebCore::pointerMediaFeatureEval):
        * css/SVGCSSComputedStyleDeclaration.cpp:
        (WebCore::strokeDashArrayToCSSValueList):
        (WebCore::ComputedStyleExtractor::svgPropertyValue):
        * css/SVGCSSStyleSelector.cpp:
        (WebCore::StyleResolver::applySVGProperty):
        * css/SourceSizeList.cpp:
        (WebCore::computeLength):
        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getLayeredShorthandValue):
        * css/StyleResolver.cpp:
        (WebCore::extractDirectionAndWritingMode):
        (WebCore::createGridTrackSize):
        (WebCore::createGridTrackList):
        (WebCore::createGridPosition):
        (WebCore::StyleResolver::parseSnapCoordinate):
        (WebCore::StyleResolver::parseSnapPoints):
        (WebCore::StyleResolver::applyProperty):
        (WebCore::StyleResolver::styleImage):
        (WebCore::StyleResolver::generatedOrPendingFromValue):
        (WebCore::StyleResolver::createFilterOperations):
        * css/TransformFunctions.cpp:
        (WebCore::transformsForValue):
        * css/ViewportStyleResolver.cpp:
        (WebCore::ViewportStyleResolver::getViewportArgumentValue):
        * css/WebKitCSSFilterValue.h:
        * css/WebKitCSSMatrix.cpp:
        (WebCore::WebKitCSSMatrix::setMatrixValue):
        * css/WebKitCSSTransformValue.h:
        (WebCore::toWebKitCSSTransformValue): Deleted.
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::computedFontSize):
        * editing/EditingStyle.cpp:
        (WebCore::identifierForStyleProperty):
        (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
        (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
        (WebCore::cssValueToRGBA):
        (WebCore::EditingStyle::extractFontSizeDelta):
        (WebCore::EditingStyle::textDirection):
        (WebCore::EditingStyle::prepareToApplyAt):
        (WebCore::EditingStyle::mergeStyle):
        (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
        (WebCore::EditingStyle::legacyFontSize):
        (WebCore::EditingStyle::textDirectionForSelection):
        (WebCore::StyleChange::extractTextStyles):
        (WebCore::diffTextDecorations):
        (WebCore::fontWeightIsBold):
        (WebCore::isTransparentColorValue):
        * editing/EditorCommand.cpp:
        (WebCore::executeToggleStyleInList):
        * editing/cocoa/HTMLConverter.mm:
        (stringFromCSSValue):
        (HTMLConverterCaches::floatPropertyValueForNode):
        (HTMLConverterCaches::colorPropertyValueForNode):
        * editing/markup.cpp:
        (WebCore::propertyMissingOrEqualToNone):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::retrieveResourcesForProperties):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::adjustInnerTextStyle):
        * rendering/style/StylePendingImage.h:
        (WebCore::StylePendingImage::cssImageValue):
        (WebCore::StylePendingImage::cssCursorImageValue):
        (WebCore::StylePendingImage::cssImageSetValue):
        * svg/SVGColor.h:
        * svg/SVGFontFaceElement.cpp:
        (WebCore::SVGFontFaceElement::rebuildFontFace):
        * svg/SVGPaint.h:

2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Clean up interface to Font::expansionOpportunityCount()
        https://bugs.webkit.org/show_bug.cgi?id=137355

        Reviewed by Dean Jackson.

        There are two overloads of Font::expansionOpportunityCount() which perform the same
        operation. One overload takes a UChar*, the other takes an LChar*, and they both
        take a length. This is the abstraction that StringView was designed to be. Instead
        of forcing each caller to take a different overload based on if their data is
        8 bit or not, allow the caller to construct a StringView and pass that into
        Font::expansionOpportunityCount() instead of a raw pointer/length.

        No new tests because there is no behavior change.

        * platform/graphics/Font.cpp:
        (WebCore::Font::expansionOpportunityCountInternal): Original two functions,
        renamed.
        (WebCore::Font::expansionOpportunityCount): Takes a StringView, calls 
        expansionOpportunityCountInternal().
        * platform/graphics/Font.h: Update signatures.
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::WidthIterator): Use new signature to
        Font::expansionOpportunityCount().
        * platform/graphics/mac/ComplexTextController.cpp:
        (WebCore::ComplexTextController::ComplexTextController): Ditto.
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Ditto.
        * rendering/RenderText.cpp:
        (WebCore::RenderText::stringView): Accessor to encapsulate character pointer
        and length.
        * rendering/RenderText.h: Signature of new accessor.

2014-10-03  Brent Fulgham  <bfulgham@apple.com>

        [Win] Unreviewed build fix for MSVC 2013 SP 3.

        The std::array initializer is not fully implemented in SP3 and causes a
        build error.

        * platform/graphics/transforms/AffineTransform.cpp: Use old style assignment
        initialization for MSVC builds until this bug is fixed.

2014-10-03  Tim Horton  <timothy_horton@apple.com>

        WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
        https://bugs.webkit.org/show_bug.cgi?id=137383
        <rdar://problem/18535439>

        Reviewed by Sam Weinig.

        * rendering/RenderView.cpp:
        (WebCore::RenderView::paintBoxDecorations):
        Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.

2014-10-03  Dean Jackson  <dino@apple.com>

        webkit-appearance: default-button styling does not set the button font color to white
        https://bugs.webkit.org/show_bug.cgi?id=137399
        rdar://problem/17788616

        Reviewed by Dave Hyatt.

        When a button is styled with -webkit-appearance: default-button, it should
        use the CSSValueActivebuttontext value for its text color when the window
        is active, and the normal value when the window is inactive.

        Since activating (focus/blur) windows doesn't cause a style recalculation, this
        is applied as a paint-time operation. However, the render tree children that
        paint the text don't know that they are contained within a RenderButton
        and that the button is a default type. So I added an inherited flag, similar
        to what we use for visited links, to remember if we're in a button. And then
        computeTextPaintStyle chooses the correct value.

        We can't test this because our LayoutTest system doesn't have
        an active window, and thus the default button renders like a normal
        button. This should cause no regressions though. Also, the appearance is
        protected behind an SPI (or Setting), so this is not exposed to the Web.

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle): Set the flag if we're inside a default button.
        * rendering/TextPaintStyle.cpp:
        (WebCore::computeTextPaintStyle): If we're in a default button inside an active window,
        use the CSSValueActivebuttontext color.
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::RenderStyle): Add and expose the new inherited flag: ._insideDefaultButton.
        (WebCore::RenderStyle::changeRequiresRepaint): Ditto.
        * rendering/style/RenderStyle.h: Ditto.

2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>

        [SVG -> OTF Converter] Support non-BMP codepoints
        https://bugs.webkit.org/show_bug.cgi?id=137097

        Reviewed by Darin Adler.

        This patch has two pieces:

        1) Moves write16(), overwrite32() and overwrite16() inside SVGToOTFFontConverter. This
        is so that we don't have to keep passing around references to m_result everywhere. Instead,
        put the output vector inside the class as an instance member variable. In addition, rename
        write32() and write16() to append32() and append16(), and provide a copy of append32 inside
        SVGToOTFFontConverter.

        2) Change the "Codepoint" typedef to be a String, and rename it to Codepoints. This is so that
        we can implement ligatures later on. Update all the places that use this variable to work with
        a String of multiple codepoints.

        This patch updates the CMAP table to use format 12 instead of format 4. It currently only maps
        single codepoints to glyph IDs and skips all multi-codepoint glyphs. We will implement
        ligatures in another patch.

        Test: svg/custom/glyph-selection-non-bmp.svg

        * svg/SVGToOTFFontConversion.cpp:
        (WebCore::append32): Append a result to a given vector. This is for the path transcoder.
        (WebCore::SVGToOTFFontConverter::releaseResult): WTF::move()'s the result.
        (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Update to take Codepoints instead of Codepoint.
        (WebCore::SVGToOTFFontConverter::append32): Piece 1 above.
        (WebCore::SVGToOTFFontConverter::append16): Ditto.
        (WebCore::SVGToOTFFontConverter::append4ByteCode): Convenience function.
        (WebCore::SVGToOTFFontConverter::overwrite32): Piece 1 above.
        (WebCore::SVGToOTFFontConverter::overwrite16): Ditto.
        (WebCore::SVGToOTFFontConverter::appendCMAPTable): Update to format 12.
        (WebCore::SVGToOTFFontConverter::appendHEADTable): Passing in a result vector is no longer necessary.
        (WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto.
        (WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto.
        (WebCore::isValidStringForCFF): Ditto.
        (WebCore::SVGToOTFFontConverter::appendCFFValidString): Ditto.
        (WebCore::SVGToOTFFontConverter::appendCFFTable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendVHEATable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendVMTXTable): Ditto.
        (WebCore::SVGToOTFFontConverter::addCodepointRanges): Update for Codepoints.
        (WebCore::SVGToOTFFontConverter::addCodepoints): Ditto.
        (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
        (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendKERNTable): Ditto.
        (WebCore::writeCFFEncodedNumber): Passing in a result vector is no longer necessary.
        (WebCore::SVGToOTFFontConverter::appendGlyphData): Update for Codepoints.
        (WebCore::SVGToOTFFontConverter::processGlyphElement): Update for Codepoints.
        (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically): Comparing Codepoints
        (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Update for Codepoints.
        (WebCore::SVGToOTFFontConverter::calculateChecksum): Passing in a result vector is no longer necessary.
        (WebCore::SVGToOTFFontConverter::appendTable): Ditto.
        (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto.
        (WebCore::convertSVGToOTFFont): Move out of the result vector.
        (WebCore::write32): Deleted.
        (WebCore::write16): Deleted.
        (WebCore::overwrite32): Deleted.
        (WebCore::appendCFFValidString): Deleted.
        (WebCore::transcodeGlyphPaths): Deleted.
        (WebCore::calculateChecksum): Deleted.

2014-10-03  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r174270.
        https://bugs.webkit.org/show_bug.cgi?id=137397

        crashes on the bots (Requested by dethbakin on #webkit).

        Reverted changeset:

        "EventSender dispatches should be per-Document"
        https://bugs.webkit.org/show_bug.cgi?id=136051
        http://trac.webkit.org/changeset/174270

2014-10-03  Jer Noble  <jer.noble@apple.com>

        [iOS] Back-to-back fullscreen videos result in incorrectly sized videos
        https://bugs.webkit.org/show_bug.cgi?id=137380

        Reviewed by Eric Carlson.

        During a normal workflow, a <video> element will create an AVPlayerLayer, then it will get a
        fullscreen (hosted) parent layer, then it will be told an explicit fullscreen size. But when
        a <video> element creates an AVPlayerLayer after the <video> element is already in
        fullscreen mode, it sets that AVPlayerLayer's frame using the size of the hosted parent
        layer, rather than the explicit fullscreen size. Instead, use the (already set) explicit
        fullscreen size after creating the AVPlayerLayer.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):

2014-10-03 Bear Travis <betravis@adobe.com>

        REGRESSION (r173531): Use after free in WebCore::RenderStyle::fontMetrics /
        WebCore::CSSPrimitiveValue::computeLengthDouble
        https://bugs.webkit.org/show_bug.cgi?id=136864

        Reviewed by Andreas Kling.

        FontLoader previously called updateDocumentStyleIfNeeded,
        which would reset styles currently in use as part of
        the tabIndex calculation. The FontLoader should instead
        wait for pending stylesheets to load.

        Tests: fast/css/fontloader-tab-index.html

        * css/FontLoader.cpp:
        (WebCore::FontLoader::notifyWhenFontsReady): Do not immediately
        call loadingDone().
        (WebCore::FontLoader::loadingDone): Wait for stylesheets to
        finish loading rather than updating document styles.
        * css/FontLoader.h:
        (WebCore::FontLoader::loading): Include JS font loads when testing
        for the loading state.

2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Unreviewed build fix.

        Fixing the Windows build after r174269.

        * platform/graphics/win/UniscribeController.cpp:
        (WebCore::UniscribeController::shapeAndPlaceItem):

2014-10-01  Brian J. Burg  <burg@cs.washington.edu>

        EventSender dispatches should be per-Document
        https://bugs.webkit.org/show_bug.cgi?id=136051

        Reviewed by Andreas Kling.

        EventSender uses a Timer to asynchronously dispatch the same event to multiple
        elements of the same type on a future run loop. However, we previously dispatched events
        to elements from any Document rather than the one that requested the event send.

        This patch changes EventSender to be associated with a single Document. EventSenders
        for each Document are lazily allocated. Further per-Document or global optimizations
        are possible.

        This change also lays the groundwork for making EventSender-related DOM events
        deterministic during web replay, tracked at <https://webkit.org/b/137090>.

        No new tests, covered by fast/text/svg-font-trigger-load-event.html.

        * CMakeLists.txt:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/DOMAllInOne.cpp:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::implicitClose):
        Dispatch pending events for this document only. Rename local variable f to frame.

        * dom/Document.h:
        (WebCore::Document::sharedEventSenders):
        * dom/EventSender.h:
        (WebCore::EventSender::EventSender):
        (WebCore::EventSender::hasPendingEvents):
        (WebCore::EventSender<T>::dispatchEventSoon):
        (WebCore::EventSender<T>::cancelEvent):
        (WebCore::EventSender<T>::dispatchPendingEvents):
        (WebCore::EventSender<T>::EventSender): Deleted. The type argument was not necessary.
        * dom/SharedEventSenders.cpp: Added. Lazily creates event senders as they are requested.
        (WebCore::SharedEventSenders::linkLoadEventSender):
        (WebCore::SharedEventSenders::styleLoadEventSender):
        (WebCore::SharedEventSenders::imageBeforeloadEventSender):
        (WebCore::SharedEventSenders::imageLoadEventSender):
        (WebCore::SharedEventSenders::imageErrorEventSender):
        * dom/SharedEventSenders.h: Added.
        (WebCore::SharedEventSenders::SharedEventSenders):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::~HTMLLinkElement):
        (WebCore::HTMLLinkElement::dispatchPendingEvent):
        (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
        (WebCore::linkLoadEventSender): Deleted.
        (WebCore::HTMLLinkElement::dispatchPendingLoadEvents): Deleted.
        * html/HTMLLinkElement.h:
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::~HTMLStyleElement):
        (WebCore::HTMLStyleElement::dispatchPendingEvent):
        (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
        (WebCore::styleLoadEventSender): Deleted.
        (WebCore::HTMLStyleElement::dispatchPendingLoadEvents): Deleted.
        * html/HTMLStyleElement.h:
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::beforeLoadEventSender):
        (WebCore::ImageLoader::loadEventSender):
        (WebCore::ImageLoader::errorEventSender):
        (WebCore::ImageLoader::dispatchPendingEvent):
        (WebCore::beforeLoadEventSender): Deleted.
        (WebCore::loadEventSender): Deleted.
        (WebCore::errorEventSender): Deleted.
        (WebCore::ImageLoader::dispatchPendingBeforeLoadEvents): Deleted.
        (WebCore::ImageLoader::dispatchPendingLoadEvents): Deleted.
        (WebCore::ImageLoader::dispatchPendingErrorEvents): Deleted.
        * loader/ImageLoader.h:
        * xml/parser/XMLDocumentParser.cpp:
        (WebCore::XMLDocumentParser::append): Remove an early call to the EventSender for image
        beforeload events. This was a performance optimization, but is no longer safe since the
        document (and thus the event sender) may not be available in a synchronous document write.

2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>

        TextRun::length() should return an unsigned
        https://bugs.webkit.org/show_bug.cgi?id=137354

        Reviewed by Antti Koivisto.

        Currently, the m_len instance variable that backs the TextRun::length() function is
        an unsigned, but the length() function implicitly casts that to an int when
        returning it. This patch makes the function return an unsigned, and makes the
        do any casting if necessary.

        No new tests because there is no behavior change.

        * platform/graphics/Font.cpp:
        (WebCore::Font::drawText): Cast result to int.
        (WebCore::Font::drawEmphasisMarks): Ditto.
        (WebCore::Font::adjustSelectionRectForText): Ditto.
        (WebCore::computeUnderlineType): Update internal type to be unsigned.
        * platform/graphics/GlyphBuffer.h:
        (WebCore::GlyphBuffer::add): Update sentinel value to be unsigned.
        (WebCore::GlyphBuffer::saveOffsetsInString): Ditto.
        * platform/graphics/GraphicsContext.cpp: Update internal type to be unsigned.
        * platform/graphics/TextRun.h:
        (WebCore::TextRun::length): Update return type.
        (WebCore::TextRun::charactersLength): Ditto.
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::advanceInternal): Cast result to int.
        * rendering/svg/SVGTextMetricsBuilder.cpp:
        (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair): Remove
        unnecessary casts.
        (WebCore::SVGTextMetricsBuilder::advance): Ditto.
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection): Cast result to int.

2014-10-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL] Fix build break since r174231 and r174256
        https://bugs.webkit.org/show_bug.cgi?id=137384

        Unreviewed, EFL build fix.

        r174231 and r174256 didn't consider EFL port and CoordinatedGraphics area.

        * css/WebKitCSSViewportRule.cpp:
        (WebCore::WebKitCSSViewportRule::WebKitCSSViewportRule):
        * css/WebKitCSSViewportRule.h:

2014-10-03  Yusuke Suzuki  <utatane.tea@gmail.com>

        CSS Selectors Level 4: Add parsing for :matches
        https://bugs.webkit.org/show_bug.cgi?id=137348

        Reviewed by Benjamin Poulain.

        Add initial parsing functionality of :matches pseudo class in Selectors Level 4.
        It accepts selector list as a parameter. It can contain pseudo elements.
        And now at the parsing phase, multiple pseudo elements are allowed.
        Currently :not doesn't accept any functional pseudo classes, :not(:matches(...)) is rejected.
        And currently, :matches(:visited, :link) is allowed in the parsing phase.

        * css/CSSGrammar.y.in:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::detectFunctionTypeToken):
        * css/CSSSelector.cpp:
        (WebCore::appendSelectorList):
        (WebCore::CSSSelector::selectorText):
        * css/CSSSelector.h:
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * css/SelectorPseudoClassAndCompatibilityElementMap.in:
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):

2014-10-02  Andreas Kling  <akling@apple.com>

        CSSOM rule wrappers always have a corresponding internal style object.
        <https://webkit.org/b/137379>

        Make the CSSOM rule wrapper classes use references & Ref instead of
        raw pointers and RefPtr for pointing to the internal style rule.

        Also changed the signature of reattach() to take a StyleRuleBase&
        since it's never called with a null pointer.

        Finally marked the rule classes final.

        Reviewed by Geoffrey Garen.

        * css/CSSCharsetRule.h:
        * css/CSSFontFaceRule.cpp:
        (WebCore::CSSFontFaceRule::CSSFontFaceRule):
        (WebCore::CSSFontFaceRule::reattach):
        * css/CSSFontFaceRule.h:
        (WebCore::CSSFontFaceRule::create): Deleted.
        * css/CSSGroupingRule.cpp:
        (WebCore::CSSGroupingRule::CSSGroupingRule):
        (WebCore::CSSGroupingRule::reattach):
        * css/CSSGroupingRule.h:
        * css/CSSImportRule.cpp:
        (WebCore::CSSImportRule::CSSImportRule):
        (WebCore::CSSImportRule::href):
        (WebCore::CSSImportRule::media):
        (WebCore::CSSImportRule::cssText):
        (WebCore::CSSImportRule::styleSheet):
        (WebCore::CSSImportRule::reattach):
        * css/CSSImportRule.h:
        (WebCore::CSSImportRule::create): Deleted.
        * css/CSSMediaRule.cpp:
        (WebCore::CSSMediaRule::CSSMediaRule):
        (WebCore::CSSMediaRule::mediaQueries):
        (WebCore::CSSMediaRule::reattach):
        * css/CSSMediaRule.h:
        (WebCore::CSSMediaRule::create): Deleted.
        * css/CSSPageRule.cpp:
        (WebCore::CSSPageRule::CSSPageRule):
        (WebCore::CSSPageRule::reattach):
        * css/CSSPageRule.h:
        (WebCore::CSSPageRule::create): Deleted.
        * css/CSSRule.h:
        * css/CSSStyleRule.cpp:
        (WebCore::CSSStyleRule::CSSStyleRule):
        (WebCore::CSSStyleRule::reattach):
        * css/CSSStyleRule.h:
        (WebCore::CSSStyleRule::create): Deleted.
        (WebCore::CSSStyleRule::styleRule): Deleted.
        * css/CSSStyleSheet.cpp:
        (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
        * css/CSSSupportsRule.cpp:
        (WebCore::CSSSupportsRule::CSSSupportsRule):
        (WebCore::CSSSupportsRule::conditionText):
        * css/CSSSupportsRule.h:
        (WebCore::CSSSupportsRule::create):
        * css/CSSUnknownRule.h:
        * css/StyleRule.cpp:
        (WebCore::StyleRuleBase::createCSSOMWrapper):
        * css/StyleRuleImport.h:
        (WebCore::StyleRuleImport::mediaQueries):
        * css/WebKitCSSKeyframeRule.cpp:
        (WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
        (WebCore::WebKitCSSKeyframeRule::reattach):
        * css/WebKitCSSKeyframeRule.h:
        * css/WebKitCSSKeyframesRule.cpp:
        (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
        (WebCore::WebKitCSSKeyframesRule::item):
        (WebCore::WebKitCSSKeyframesRule::reattach):
        * css/WebKitCSSKeyframesRule.h:
        (WebCore::WebKitCSSKeyframesRule::create):
        * css/WebKitCSSRegionRule.cpp:
        (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
        (WebCore::WebKitCSSRegionRule::cssText):
        * css/WebKitCSSRegionRule.h:
        (WebCore::WebKitCSSRegionRule::create):
        * css/WebKitCSSViewportRule.cpp:
        (WebCore::WebKitCSSViewportRule::reattach):
        * css/WebKitCSSViewportRule.h:

2014-10-02  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CSSRule subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137364

        Reviewed by Benjamin Poulain.

        Use is<>() / downcast<>() functions for CSSRule subclasses.

        No new tests, no behavior change.

        * css/CSSFontFaceRule.h:
        * css/CSSImportRule.h:
        * css/CSSMediaRule.h:
        * css/CSSRule.h:
        * css/CSSStyleRule.h:
        * css/CSSSupportsRule.h:
        * css/InspectorCSSOMWrappers.cpp:
        (WebCore::InspectorCSSOMWrappers::collect):
        * css/WebKitCSSKeyframesRule.h:
        * css/WebKitCSSRegionRule.h:
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::asCSSStyleRule):
        (WebCore::InspectorCSSAgent::collectStyleSheets):
        (WebCore::InspectorCSSAgent::buildArrayForRuleList):
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::asCSSRuleList):
        (WebCore::fillMediaListChain):
        (WebCore::InspectorStyleSheet::addRule):
        (WebCore::InspectorStyleSheet::collectFlatRules):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeCSSStyleSheet):

2014-10-02  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/18531395> REGRESSION (r173272): Crash in ResourceResponse::platformSuggestedFilename() when called on the null response
        https://bugs.webkit.org/show_bug.cgi?id=137239

        Reviewed by Pratik Solanki.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::platformSuggestedFilename): Return the null String if
        m_cfResponse is null.

2014-10-02  Andy Estes  <aestes@apple.com>

        [iOS] Create an SPI wrapper for _UIHighlightView and use it in WKContentView
        https://bugs.webkit.org/show_bug.cgi?id=137370

        Reviewed by Tim Horton.

        Added _UIHighlightViewSPI.h. When building against the internal SDK it imports <UIKit/_UIHighlightView.h>. Otherwise, it redeclares the SPI we use in WebKit2.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/spi/ios/_UIHighlightViewSPI.h: Added.

2014-10-02  Benjamin Poulain  <benjamin@webkit.org>

        CSS JIT: add the initial implementation of :nth-child(An+B of selector)
        https://bugs.webkit.org/show_bug.cgi?id=137285

        Reviewed by Andreas Kling.

        This patch adds the baseline support for JIT compiling :nth-child(An+B of selector).

        The simple optimizations from the classic :nth-child() are carried over to :nth-child(An+B of selector),
        but the new code generation is pretty much left completely unoptimized.

        The main challenge introduced with the new functional pseudo classes is the possibility of backtracking
        while already inside a backtracking chain.

        For example:
            :nth-child(odd of a+a+a~a)+b+b~b
        has to backtrack the chain a+a+a while already in the backtracking chain b+b+b.

        The easiest way to solve this would have been to have each subselector generate a new function.
        The generator for :nth-child() would simply call the function call for each sibling.

        In the example, we would have:
            functionA(): a+a+a~a
            selectorChecker(): :nth-child(odd of functionA())+b+b~b

        I decided against explicit functions because I believe the would be counterproductive for the common cases.
        I expect most use of :nth-child(of) to be done with a light filter without combinators, things like:
            :nth-child(odd of .class)
            :nth-child(odd of type.class)
            :nth-child(odd of type[attribute=value])
            etc.

        For simple cases, inlining the internal filter will greatly simplify the generated code.

        In this particular patch, the selector checkers are inlined, but we do not attempt to have good code generation.
        The optimizations will come later.

        To implement backtracking in the subselectors, the backtracking implementation was abstracted into the structure
        BacktrackingLevel. Every time the code generator starts a new subselector, a new BacktrackingLevel is pushed onto
        the multilevel backtracking stack. The code generation always use the latest BacktrackingLevel for code generation
        until the subselector is finished, and code generation can continue with the existing state.

        Tests: fast/selectors/nth-child-of-backtracking-adjacent-2.html
               fast/selectors/nth-child-of-backtracking-adjacent-optimized.html
               fast/selectors/nth-child-of-backtracking-adjacent.html
               fast/selectors/nth-child-of-boundaries-1.html
               fast/selectors/nth-child-of-boundaries-2.html
               fast/selectors/nth-child-of-boundaries-3.html
               fast/selectors/nth-child-of-chained-2.html
               fast/selectors/nth-child-of-has-parent.html
               fast/selectors/nth-child-of-never-matching-selector.html
               fast/selectors/nth-child-of-with-invalid-An+B.html

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
        (WebCore::SelectorCompiler::minimumRegisterRequirements):
        (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
        Previously, we only needed stack space for the adjacent backtracking entry.

        Now we can have several backtracking level active at the same time. We compute how much stack we need
        initially and each backtracking level take stack references as needed.

        (WebCore::SelectorCompiler::computeBacktrackingInformation):
        The entire backtracking infrastructure already works great for multilevel backtracking. It is actually
        amazing how everything fits nicely together :)

        The only addition here is logging facility in case we run into a bug.

        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
        generateSelectorChecker() has handling for pseudo elements, which should not be used
        for :nth-child(of). The core generator was moved to generateSelectorCheckerExcludingPseudoElements()
        to be used for code generation of subselectors.

        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
        The two main changes are:
        1) Adopt the BacktrackingLevel to handle multilevel generation.
        2) Descendant backtracking can use the stack if we have multi level descendant backtracking.
           In that case, we just use the stack like for adjacent backtracking.

        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
        This is very similar to generateElementIsNthChild(). The main difference is we cannot use
        the cache in this case.

        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
        (WebCore::SelectorCompiler::nthFilterIsAlwaysSatisified):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):

2014-10-02  Pratik Solanki  <psolanki@apple.com>

        [iOS] Networking process stops loading web pages while running Alexa test with random URL list
        https://bugs.webkit.org/show_bug.cgi?id=137362
        <rdar://problem/18507382>

        Reviewed by Alexey Proskuryakov.

        ResourceHandleCFURLConnectionDelegateWithOperationQueue needs to signal threads waiting on
        its semaphore when the handle is being destroyed. Otherwise, we can leave dispatch threads
        hanging around waiting for a response. This can happen when the Web Content process dies.
        Any thread/queue waiting on a response from that web process will leak and stay around
        forever. If we reach the dispatch queue limit of 64, then all networking will cease to
        happen in the Networking process. Fix this by signalling waiting threads and clearing out
        our state in much the same way that -[WebCoreResourceHandleAsOperationQueueDelegate
        detachHandle] does for Mac.

        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::releaseHandle):
        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:

2014-10-02  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for CSSBasicShape objects
        https://bugs.webkit.org/show_bug.cgi?id=137331

        Reviewed by Andreas Kling.

        Use is<>() / downcast<>() for CSSBasicShape objects.

        No new tests, no behavior change.

        * css/BasicShapeFunctions.cpp:
        (WebCore::basicShapeForValue):
        * css/CSSBasicShapes.cpp:
        (WebCore::CSSBasicShapeCircle::equals):
        (WebCore::CSSBasicShapeEllipse::equals):
        (WebCore::CSSBasicShapePolygon::equals):
        (WebCore::CSSBasicShapeInset::equals):
        * css/CSSBasicShapes.h:

2014-10-02  Chris Dumez  <cdumez@apple.com>

        XMLHttpRequestProgressEventThrottle shouldn't throttle / defer progress events if there are no listeners
        https://bugs.webkit.org/show_bug.cgi?id=137346

        Reviewed by Alexey Proskuryakov.

        Previously XMLHttpRequestProgressEventThrottle would throttle / defer
        progress events, which involves queueing events and starting timers,
        even if there were no listeners for those events (which is fairly
        common case).

        This patch updates XMLHttpRequestProgressEventThrottle to make sure
        there are actual progress event listeners *before* attempting to
        throttle and do extra processing, to avoid doing unnecessary work.

        This patch also makes XMLHttpRequestProgressEventThrottle::dispatchEvent()
        private as this method is only called from other dispatch methods of
        the class and never from the outside.

        No new tests, no behavior change.

        * xml/XMLHttpRequestProgressEventThrottle.cpp:
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEvent):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchProgressEvent):

2014-10-01  Myles C. Maxfield  <mmaxfield@apple.com>

        [Subpixel] Use floats instead of ints for text justification expansion
        https://bugs.webkit.org/show_bug.cgi?id=137327

        Reviewed by Zalan Bujtas.

        Use a float instead of an int for the expansion variable in InlineBox. The int was inside an inner class
        that held a collection of bitfields, and this patch removes that inner-inner variable.

        No new tests because there is plenty of existing coverage and existing tests are rebaselined.

        * rendering/InlineBox.cpp: Update static_assert for the size of InlineBox.
        * rendering/InlineBox.h: Use a float for the justification expansion amount instead of an int bitfield.
        (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields): Remove int bitfield.
        (WebCore::InlineBox::InlineBox): Initialize float expansion.
        (WebCore::InlineBox::expansion): Return a float.
        (WebCore::InlineBox::setExpansion): Take a float.
        (WebCore::InlineBox::InlineBoxBitfields::expansion): Deleted. Moved to InlineBox.
        (WebCore::InlineBox::InlineBoxBitfields::setExpansion): Deleted. Ditto.
        * rendering/InlineTextBox.h:
        (WebCore::InlineTextBox::setExpansion): Take a float.

2014-10-02  Tim Horton  <timothy_horton@apple.com>

        Move PageOverlay[Controller] to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=137164
        <rdar://problem/18508258>

        Reviewed by Anders Carlsson.

        * CMakeLists.txt:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        Make the appropriate build system changes.

        * WebCore.exp.in:
        Export the new PageOverlay[Controller] symbols from WebCore.

        * loader/EmptyClients.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::documentOverlayLayerForFrame): Deleted.
        Add attachViewOverlayGraphicsLayer, which allows PageOverlayController
        to push view-relative page overlay root layers down to WebKit to be
        installed just inside the view.

        Remove documentOverlayLayerForFrame because RenderLayerCompositor can now
        talk directly to PageOverlayController.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::mouseMoved):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        When the mouse is moved, pressed, or released, give PageOverlayController
        the first shot at handling the event.

        * page/FrameView.cpp:
        (WebCore::FrameView::setFrameRect):
        Inform PageOverlayController that the main FrameView's size changed,
        so it can update the size of view-relative overlays.

        (WebCore::FrameView::setContentsSize):
        Inform PageOverlayController that the main FrameView's contents size changed,
        so it can update the size of document-relative overlays.

        (WebCore::FrameView::setFixedVisibleContentRect):
        (WebCore::FrameView::didChangeScrollOffset):
        (WebCore::FrameView::scrollTo):
        (WebCore::FrameView::wheelEvent):
        Inform PageOverlayController that something scrolled.

        (WebCore::FrameView::setExposedRect):
        Inform PageOverlayController that the exposed rect changed, so it can push
        the new exposed rect down to the overlays.

        * page/FrameView.h:
        Add didChangeScrollOffset.

        * page/MainFrame.cpp:
        (WebCore::MainFrame::MainFrame):
        * page/MainFrame.h:
        Keep one PageOverlayController per MainFrame.

        * page/Page.cpp:
        (WebCore::Page::setDeviceScaleFactor):
        Inform PageOverlayController that the device scale factor changed.

        (WebCore::Page::setSessionID):
        Remove a blank line.

        * page/PageOverlay.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp.
        Move PageOverlay from WebKit2 to WebCore.
        A few overarching changes that I won't detail in each place:
            - references instead of pointers in many places
            - WebCore types instead of WebKit2 types everywhere

        (WebCore::PageOverlay::bounds):
        It is possible to install an overlay before we have a FrameView.
        We will eventually get a view/contents size changed notification and try again.

        (WebCore::PageOverlay::copyAccessibilityAttributeStringValueForPoint):
        (WebCore::PageOverlay::copyAccessibilityAttributeBoolValueForPoint):
        (WebCore::PageOverlay::copyAccessibilityAttributeNames):
        Split copyAccessibilityAttribute into "StringValueForPoint" and "BoolValueForPoint"
        variants, because we don't have anything like WKTypeRef here.

        * page/PageOverlay.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.h.
        Make PageOverlay a normal RefCounted object instead of a WebKit2 API object.
        Leave a comment noting that we should move the PageOverlay's GraphicsLayer
        to PageOverlay instead of a map on PageOverlayController.

        * page/PageOverlayController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp.
        Move PageOverlayController from WebKit2 to WebCore.
        A few overarching changes that I won't detail in each place:
            - references instead of pointers in many places
            - WebCore types instead of WebKit2 types everywhere

        Leave a FIXME that didChangeSettings is not currently called when settings change.
        This is not a problem for normal use of overlays, only for dynamically changing
        layer border/repaint counter settings.

        (WebCore::PageOverlayController::PageOverlayController):
        (WebCore::PageOverlayController::createRootLayersIfNeeded):
        We will now lazily initialize the root layers when we first try to use them,
        because otherwise we try to create them before the ChromeClient's GraphicsLayerFactory
        is hooked up, in some cases, and that can cause us to create the wrong kind of GraphicsLayers.

        (WebCore::PageOverlayController::installPageOverlay):
        Enter compositing mode when installing a PageOverlay.
        Avoid pushing the Page to the PageOverlay until after we've set up
        its root layer, so that the installation process can make use of that layer;
        clients may, for example, expect to be able to setNeedsDisplay() in the
        didMoveToPage callback.
        Avoid updateOverlayGeometry until the layer is created and we've pushed
        the Page down, so that e.g. bounds() will use the right Page.

        (WebCore::PageOverlayController::didChangeSettings):
        Leave a FIXME about a future improvement to didChangeSettings.

        (WebCore::PageOverlayController::deviceScaleFactor):
        (WebCore::PageOverlayController::notifyFlushRequired):
        Null-check Page; these can get called when tearing down the Frame.

        * page/PageOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.h.

        * platform/graphics/GraphicsLayerClient.h:
        Add wtf/Forward.h, because GraphicsLayerClient.h uses String.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollTo):
        Inform PageOverlayController that something scrolled.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers):
        Make hasAnyAdditionalCompositedLayers return true if there are any page overlays,
        because we need to avoid falling out of compositing mode if we still have
        page overlays.

        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        Enter compositing mode if we have page overlays.

        (WebCore::RenderLayerCompositor::appendOverlayLayers): Deleted.
        (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
        Rename appendOverlayLayers -> appendDocumentOverlayLayers.

        (WebCore::RenderLayerCompositor::attachRootLayer):
        (WebCore::RenderLayerCompositor::detachRootLayer):
        Attach/detach the view overlay root layer when attaching/detaching the
        normal compositing root layer.

        (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
        * rendering/RenderLayerCompositor.h:

2014-10-02  Myles C. Maxfield  <mmaxfield@apple.com>

        Back TextRun with a StringView
        https://bugs.webkit.org/show_bug.cgi?id=137352

        Reviewed by Antti Koivisto.

        TextRun contains a union of a UChar* and an LChar* as well as a length, which is the abstraction
        that StringView is intended to be. This patch cleans up TextRun by replacing the union and length
        with a StringView instance member.

        No new tests because there is no behavior change.

        * platform/graphics/TextRun.h:
        (WebCore::TextRun::TextRun):
        (WebCore::TextRun::subRun):
        (WebCore::TextRun::operator[]):
        (WebCore::TextRun::data8):
        (WebCore::TextRun::data16):
        (WebCore::TextRun::characters8):
        (WebCore::TextRun::characters16):
        (WebCore::TextRun::is8Bit):
        (WebCore::TextRun::length):
        (WebCore::TextRun::string):
        (WebCore::TextRun::setText):
        (WebCore::TextRun::stringView):

2014-10-01  Christophe Dumez  <cdumez@apple.com>

        Have is<>(T*) function do a null check on the pointer argument
        https://bugs.webkit.org/show_bug.cgi?id=137333

        Reviewed by Gavin Barraclough.

        Have is<>(T*) function do a null check on the argument instead of a
        simple assertion. This makes sense for 2 reasons:
        1. It is more consistent with downcast<>(T*), which will succeed even
           if the argument is a nullptr.
        2. It simplifies the code a bit as it gets rid of a lot of explicit
           null checks.

        No new tests, no behavior change.

        * Modules/indexeddb/IDBFactory.cpp:
        * Modules/webaudio/OfflineAudioContext.cpp:
        (WebCore::OfflineAudioContext::create):
        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::create):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::clientHandshakeMessage):
        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::createFromRenderer):
        (WebCore::AXObjectCache::getOrCreate):
        (WebCore::AXObjectCache::handleLiveRegionCreated):
        (WebCore::AXObjectCache::handleAttributeChanged):
        (WebCore::AXObjectCache::labelChanged):
        (WebCore::AXObjectCache::rootAXEditableElement):
        (WebCore::isNodeAriaVisible):
        * accessibility/AccessibilityListBoxOption.cpp:
        (WebCore::AccessibilityListBoxOption::isEnabled):
        (WebCore::AccessibilityListBoxOption::isSelected):
        (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
        (WebCore::AccessibilityListBoxOption::stringValue):
        (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
        * accessibility/AccessibilityMediaControls.cpp:
        (WebCore::AccessibilityMediaTimeline::valueDescription):
        * accessibility/AccessibilityMenuListPopup.cpp:
        (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
        (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
        (WebCore::AccessibilityNodeObject::isNativeTextControl):
        (WebCore::AccessibilityNodeObject::isNativeImage):
        (WebCore::AccessibilityNodeObject::isInputImage):
        (WebCore::AccessibilityNodeObject::isEnabled):
        (WebCore::AccessibilityNodeObject::isPressed):
        (WebCore::AccessibilityNodeObject::isHovered):
        (WebCore::AccessibilityNodeObject::isReadOnly):
        (WebCore::AccessibilityNodeObject::isRequired):
        (WebCore::AccessibilityNodeObject::valueForRange):
        (WebCore::AccessibilityNodeObject::maxValueForRange):
        (WebCore::AccessibilityNodeObject::minValueForRange):
        (WebCore::AccessibilityNodeObject::isControl):
        (WebCore::AccessibilityNodeObject::anchorElement):
        (WebCore::isNodeActionElement):
        (WebCore::AccessibilityNodeObject::mouseButtonListener):
        (WebCore::AccessibilityNodeObject::labelForElement):
        (WebCore::AccessibilityNodeObject::titleElementText):
        (WebCore::AccessibilityNodeObject::alternativeText):
        (WebCore::AccessibilityNodeObject::visibleText):
        (WebCore::AccessibilityNodeObject::accessibilityDescription):
        (WebCore::AccessibilityNodeObject::helpText):
        (WebCore::AccessibilityNodeObject::hierarchicalLevel):
        (WebCore::AccessibilityNodeObject::textUnderElement):
        (WebCore::AccessibilityNodeObject::title):
        (WebCore::AccessibilityNodeObject::colorValue):
        (WebCore::accessibleNameForNode):
        (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::press):
        (WebCore::AccessibilityObject::hasTagName):
        (WebCore::AccessibilityObject::hasAttribute):
        (WebCore::AccessibilityObject::element):
        (WebCore::AccessibilityObject::classList):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isFileUploadButton):
        (WebCore::AccessibilityRenderObject::anchorElement):
        (WebCore::AccessibilityRenderObject::helpText):
        (WebCore::AccessibilityRenderObject::labelElementContainer):
        (WebCore::AccessibilityRenderObject::internalLinkElement):
        (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
        (WebCore::AccessibilityRenderObject::titleUIElement):
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
        (WebCore::AccessibilityRenderObject::accessKey):
        (WebCore::AccessibilityRenderObject::url):
        (WebCore::AccessibilityRenderObject::setElementAttributeValue):
        (WebCore::AccessibilityRenderObject::setFocused):
        (WebCore::AccessibilityRenderObject::setValue):
        (WebCore::AccessibilityRenderObject::getDocumentLinks):
        (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
        (WebCore::AccessibilityRenderObject::accessibilityHitTest):
        (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
        (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
        (WebCore::AccessibilityRenderObject::addTextFieldChildren):
        (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
        (WebCore::AccessibilityRenderObject::setAccessibleName):
        (WebCore::AccessibilityRenderObject::stringValueForMSAA):
        (WebCore::AccessibilityRenderObject::isLinked):
        (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
        (WebCore::AccessibilityRenderObject::isMathElement):
        * accessibility/AccessibilitySearchFieldButtons.cpp:
        (WebCore::AccessibilitySearchFieldCancelButton::press):
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::tableElement):
        (WebCore::AccessibilityTable::isDataTable):
        (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
        (WebCore::AccessibilityTable::title):
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::notifyChildrenSelectionChange):
        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
        (webkitAccessibleTableGetCaption):
        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleGetName):
        (webkitAccessibleGetDescription):
        (webkitAccessibleGetAttributes):
        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * bindings/js/JSAudioContextCustom.cpp:
        (WebCore::constructJSAudioContext):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::toJSDOMGlobalObject):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::namedItemGetter):
        (WebCore::JSDOMWindow::getOwnPropertySlot):
        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSErrorHandler.cpp:
        (WebCore::JSErrorHandler::handleEvent):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::JSHTMLDocument::nameGetter):
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::initializeJSFunction):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::isReachableFromDOM):
        (WebCore::createWrapperInline):
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute):
        * bindings/js/ScriptState.cpp:
        (WebCore::frameFromExecState):
        * bindings/objc/DOM.mm:
        (kitClass):
        * css/CSSCursorImageValue.cpp:
        (WebCore::resourceReferencedByCursorElement):
        * css/CSSStyleSheet.cpp:
        (WebCore::isAcceptableCSSStyleSheetParent):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isAutofilled):
        (WebCore::isDisabled):
        (WebCore::isEnabled):
        (WebCore::isChecked):
        (WebCore::matchesLangPseudoClass):
        (WebCore::matchesFutureCuePseudoClass):
        (WebCore::matchesPastCuePseudoClass):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::State::initElement):
        (WebCore::StyleResolver::locateCousinList):
        (WebCore::elementHasDirectionAuto):
        (WebCore::StyleResolver::canShareStyleWithElement):
        (WebCore::StyleResolver::findSiblingForStyleSharing):
        (WebCore::StyleResolver::adjustRenderStyle):
        (WebCore::StyleResolver::useSVGZoomRulesForLength):
        * css/StyleSheetList.cpp:
        (WebCore::StyleSheetList::getNamedItem):
        * dom/Attr.cpp:
        (WebCore::Attr::style):
        * dom/CharacterData.cpp:
        (WebCore::CharacterData::parserAppendData):
        (WebCore::CharacterData::setDataAndUpdate):
        * dom/ContainerNode.cpp:
        (WebCore::checkAcceptChild):
        (WebCore::ContainerNode::notifyChildRemoved):
        * dom/ContainerNodeAlgorithms.cpp:
        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
        (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
        * dom/CurrentScriptIncrementer.h:
        (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::setDragImage):
        * dom/Document.cpp:
        (WebCore::Document::elementFromPoint):
        (WebCore::Document::setTitle):
        (WebCore::Document::iconURLs):
        (WebCore::eventTargetElementForDocument):
        (WebCore::Document::updateHoverActiveState):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/Element.cpp:
        (WebCore::Element::computeInheritedLanguage):
        * dom/Element.h:
        (WebCore::Node::parentElement):
        * dom/ElementTraversal.h:
        (WebCore::Traversal<Element>::nextTemplate):
        (WebCore::ElementTraversal::previousIncludingPseudo):
        (WebCore::ElementTraversal::nextIncludingPseudo):
        (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
        (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
        * dom/EventDispatcher.cpp:
        (WebCore::WindowEventContext::WindowEventContext):
        (WebCore::EventDispatcher::dispatchEvent):
        (WebCore::nodeOrHostIfPseudoElement):
        (WebCore::EventPath::EventPath):
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::fireEventListeners):
        * dom/KeyboardEvent.cpp:
        (WebCore::findKeyboardEvent):
        * dom/LiveNodeList.cpp:
        (WebCore::LiveNodeList::namedItem):
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::dispatchMessages):
        * dom/MouseEvent.cpp:
        (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
        * dom/NamedNodeMap.cpp:
        (WebCore::NamedNodeMap::setNamedItem):
        * dom/Node.cpp:
        (WebCore::Node::dumpStatistics):
        (WebCore::Node::pseudoAwarePreviousSibling):
        (WebCore::Node::pseudoAwareNextSibling):
        (WebCore::Node::computedStyle):
        (WebCore::Node::parentOrShadowHostElement):
        (WebCore::Node::rootEditableElement):
        (WebCore::Node::ancestorElement):
        (WebCore::Node::compareDocumentPosition):
        (WebCore::appendAttributeDesc):
        (WebCore::Node::showNodePathForThis):
        (WebCore::Node::enclosingLinkEventParentOrSelf):
        (WebCore::Node::dispatchEvent):
        (WebCore::Node::defaultEventHandler):
        * dom/NodeRenderingTraversal.cpp:
        (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
        (WebCore::NodeRenderingTraversal::traverseParent):
        * dom/NodeTraversal.cpp:
        (WebCore::NodeTraversal::previousIncludingPseudo):
        (WebCore::NodeTraversal::nextIncludingPseudo):
        (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
        * dom/Position.cpp:
        (WebCore::Position::element):
        (WebCore::endsOfNodeAreVisuallyDistinctPositions):
        (WebCore::Position::isRenderedCharacter):
        (WebCore::Position::leadingWhitespacePosition):
        * dom/Range.cpp:
        (WebCore::Range::insertNode):
        (WebCore::Range::getBorderAndTextQuads):
        * dom/ScriptElement.cpp:
        (WebCore::toScriptElementIfPossible):
        * dom/ShadowRoot.h:
        (WebCore::Node::parentOrShadowHostNode):
        * dom/Text.cpp:
        (WebCore::earliestLogicallyAdjacentTextNode):
        (WebCore::latestLogicallyAdjacentTextNode):
        (WebCore::isSVGShadowText):
        * dom/TextNodeTraversal.cpp:
        (WebCore::TextNodeTraversal::contentsAsString):
        * dom/TextNodeTraversal.h:
        (WebCore::TextNodeTraversal::firstTextChildTemplate):
        (WebCore::TextNodeTraversal::firstTextWithinTemplate):
        (WebCore::TextNodeTraversal::traverseNextTextTemplate):
        (WebCore::TextNodeTraversal::nextSibling):
        * dom/TreeScopeAdopter.cpp:
        (WebCore::TreeScopeAdopter::moveTreeToNewScope):
        (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
        * editing/ApplyBlockElementCommand.cpp:
        (WebCore::isNewLineAtPosition):
        (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::isLegacyAppleStyleSpan):
        (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
        (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
        (WebCore::isEmptyFontTag):
        (WebCore::ApplyStyleCommand::applyBlockStyle):
        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
        (WebCore::dummySpanAncestorForNode):
        (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
        (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
        (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
        (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
        (WebCore::ApplyStyleCommand::splitTextAtEnd):
        (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
        (WebCore::ApplyStyleCommand::shouldSplitTextElement):
        (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
        (WebCore::ApplyStyleCommand::applyInlineStyleChange):
        (WebCore::ApplyStyleCommand::joinChildTextNodes):
        * editing/BreakBlockquoteCommand.cpp:
        (WebCore::BreakBlockquoteCommand::doApply):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::isRemovableBlock):
        (WebCore::CompositeEditCommand::insertNodeAt):
        (WebCore::CompositeEditCommand::canRebalance):
        (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
        (WebCore::CompositeEditCommand::deleteInsignificantText):
        (WebCore::CompositeEditCommand::removePlaceholderAt):
        (WebCore::CompositeEditCommand::cleanupAfterDeletion):
        (WebCore::CompositeEditCommand::moveParagraphs):
        * editing/DeleteButtonController.cpp:
        (WebCore::enclosingDeletableElement):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        (WebCore::DeleteSelectionCommand::fixupWhitespace):
        (WebCore::DeleteSelectionCommand::doApply):
        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::wrappingStyleForSerialization):
        * editing/Editor.cpp:
        (WebCore::imageElementFromImageDocument):
        (WebCore::Editor::shouldInsertFragment):
        (WebCore::Editor::setBaseWritingDirection):
        (WebCore::Editor::setComposition):
        (WebCore::Editor::isSpellCheckingEnabledFor):
        (WebCore::Editor::applyEditingStyleToElement):
        * editing/FormatBlockCommand.cpp:
        (WebCore::isElementForFormatBlock):
        * editing/FrameSelection.cpp:
        (WebCore::removingNodeRemovesPosition):
        (WebCore::CaretBase::paintCaret):
        (WebCore::FrameSelection::debugRenderer):
        (WebCore::FrameSelection::selectAll):
        (WebCore::scanForForm):
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply):
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::mergeWithNeighboringLists):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::insertTab):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::haveSameTagName):
        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
        (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
        (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
        (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
        (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
        (WebCore::ReplaceSelectionCommand::insertAsListItems):
        (WebCore::ReplaceSelectionCommand::performTrivialReplace):
        * editing/SpellChecker.cpp:
        (WebCore::SpellChecker::isCheckable):
        * editing/SplitTextNodeContainingElementCommand.cpp:
        (WebCore::SplitTextNodeContainingElementCommand::doApply):
        * editing/TextIterator.cpp:
        (WebCore::isRendererReplacedElement):
        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::isInPasswordField):
        * editing/VisibleUnits.cpp:
        (WebCore::startPositionForLine):
        (WebCore::endPositionForLine):
        (WebCore::startOfParagraph):
        (WebCore::endOfParagraph):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::aggregatedAttributesForAncestors):
        (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
        (WebCore::editingAttributedStringFromRange):
        * editing/htmlediting.cpp:
        (WebCore::enclosingBlock):
        (WebCore::enclosingElementWithTag):
        (WebCore::enclosingAnchorElement):
        (WebCore::enclosingList):
        (WebCore::lineBreakExistsAtPosition):
        (WebCore::areIdenticalElements):
        (WebCore::isNonTableCellHTMLBlockElement):
        (WebCore::deprecatedEnclosingBlockFlowElement):
        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::appendText):
        (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
        (WebCore::isPlainTextMarkup):
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::readAsArrayBuffer):
        (WebCore::FileReader::readAsBinaryString):
        (WebCore::FileReader::readAsText):
        (WebCore::FileReader::readAsDataURL):
        * html/BaseChooserOnlyDateAndTimeInputType.cpp:
        (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
        * html/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::findAssociatedForm):
        * html/HTMLAnchorElement.cpp:
        (WebCore::appendServerMapMousePosition):
        (WebCore::HTMLAnchorElement::defaultEventHandler):
        (WebCore::HTMLAnchorElement::eventType):
        (WebCore::isEnterKeyKeydownEvent):
        (WebCore::isLinkClick):
        * html/HTMLAreaElement.cpp:
        (WebCore::HTMLAreaElement::imageElement):
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::insertedInto):
        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::defaultEventHandler):
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::namedItem):
        (WebCore::HTMLCollection::updateNamedElementCache):
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::bgColor):
        (WebCore::HTMLDocument::setBgColor):
        (WebCore::HTMLDocument::fgColor):
        (WebCore::HTMLDocument::setFgColor):
        (WebCore::HTMLDocument::alinkColor):
        (WebCore::HTMLDocument::setAlinkColor):
        (WebCore::HTMLDocument::linkColor):
        (WebCore::HTMLDocument::setLinkColor):
        (WebCore::HTMLDocument::vlinkColor):
        (WebCore::HTMLDocument::setVlinkColor):
        (WebCore::HTMLDocument::isFrameSet):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::matchesReadWritePseudoClass):
        (WebCore::mergeWithNextTextNode):
        (WebCore::HTMLElement::setOuterHTML):
        (WebCore::HTMLElement::setOuterText):
        (WebCore::HTMLElement::insertAdjacentElement):
        (WebCore::contextElementForInsertion):
        (WebCore::HTMLElement::directionality):
        (WebCore::HTMLElement::dirAttributeChanged):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::rendererIsNeeded):
        * html/HTMLFieldSetElement.cpp:
        (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
        (WebCore::HTMLFieldSetElement::disabledStateChanged):
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
        (WebCore::shouldAutofocus):
        (WebCore::HTMLFormControlElement::enclosingFormControlElement):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::rendererIsNeeded):
        (WebCore::HTMLFormElement::submitImplicitly):
        (WebCore::submitElementFromEvent):
        (WebCore::HTMLFormElement::validateInteractively):
        (WebCore::HTMLFormElement::submit):
        (WebCore::HTMLFormElement::reset):
        (WebCore::HTMLFormElement::defaultButton):
        (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::getSVGDocument):
        * html/HTMLFrameSetElement.cpp:
        (WebCore::HTMLFrameSetElement::defaultEventHandler):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::defaultEventHandler):
        (WebCore::HTMLInputElement::dataList):
        * html/HTMLLabelElement.cpp:
        (WebCore::nodeAsSupportedLabelableElement):
        * html/HTMLLegendElement.cpp:
        (WebCore::HTMLLegendElement::virtualForm):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::hasFallbackContent):
        (WebCore::HTMLObjectElement::updateDocNamedItem):
        * html/HTMLOptGroupElement.cpp:
        (WebCore::HTMLOptGroupElement::recalcSelectOptions):
        (WebCore::HTMLOptGroupElement::ownerSelectElement):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::setText):
        (WebCore::HTMLOptionElement::index):
        (WebCore::HTMLOptionElement::ownerDataListElement):
        (WebCore::HTMLOptionElement::ownerSelectElement):
        (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
        (WebCore::HTMLOptionElement::isDisabledFormControl):
        (WebCore::HTMLOptionElement::collectOptionInnerText):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
        (WebCore::HTMLPlugInImageElement::defaultEventHandler):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::setText):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::nextValidIndex):
        (WebCore::HTMLSelectElement::saveLastSelection):
        (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
        (WebCore::HTMLSelectElement::updateListBoxSelection):
        (WebCore::HTMLSelectElement::listBoxOnChange):
        (WebCore::HTMLSelectElement::recalcListItems):
        (WebCore::HTMLSelectElement::selectedIndex):
        (WebCore::HTMLSelectElement::selectOption):
        (WebCore::HTMLSelectElement::optionToListIndex):
        (WebCore::HTMLSelectElement::listToOptionIndex):
        (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
        (WebCore::HTMLSelectElement::saveFormControlState):
        (WebCore::HTMLSelectElement::searchOptionsForValue):
        (WebCore::HTMLSelectElement::restoreFormControlState):
        (WebCore::HTMLSelectElement::appendFormData):
        (WebCore::HTMLSelectElement::reset):
        (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
        (WebCore::HTMLSelectElement::updateSelectedState):
        (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
        (WebCore::HTMLSelectElement::defaultEventHandler):
        (WebCore::HTMLSelectElement::lastSelectedListIndex):
        (WebCore::HTMLSelectElement::optionAtIndex):
        (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
        (WebCore::HTMLSelectElement::length):
        * html/HTMLSourceElement.cpp:
        (WebCore::HTMLSourceElement::insertedInto):
        (WebCore::HTMLSourceElement::removedFrom):
        * html/HTMLSummaryElement.cpp:
        (WebCore::isClickableControl):
        (WebCore::HTMLSummaryElement::defaultEventHandler):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::caption):
        * html/HTMLTablePartElement.cpp:
        (WebCore::HTMLTablePartElement::findParentTable):
        * html/HTMLTableRowElement.cpp:
        (WebCore::HTMLTableRowElement::rowIndex):
        * html/HTMLTableRowsCollection.cpp:
        (WebCore::HTMLTableRowsCollection::rowAfter):
        (WebCore::HTMLTableRowsCollection::lastRow):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::defaultEventHandler):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::innerTextValue):
        (WebCore::positionForIndex):
        (WebCore::HTMLTextFormControlElement::indexForPosition):
        (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
        * html/HTMLTitleElement.cpp:
        (WebCore::HTMLTitleElement::setText):
        * html/HTMLTrackElement.cpp:
        (WebCore::HTMLTrackElement::mediaElement):
        * html/ImageDocument.cpp:
        (WebCore::ImageEventListener::handleEvent):
        * html/InputType.cpp:
        (WebCore::InputType::shouldSubmitImplicitly):
        * html/MediaDocument.cpp:
        (WebCore::ancestorVideoElement):
        (WebCore::MediaDocument::defaultEventHandler):
        * html/RadioInputType.cpp:
        (WebCore::RadioInputType::handleKeydownEvent):
        (WebCore::RadioInputType::isKeyboardFocusable):
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::shouldSubmitImplicitly):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::hasImpliedEndTag):
        (WebCore::HTMLConstructionSite::attachLater):
        (WebCore::HTMLConstructionSite::insertHTMLFormElement):
        (WebCore::HTMLConstructionSite::insertTextNode):
        (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
        (WebCore::HTMLConstructionSite::findFosterSite):
        * html/parser/HTMLElementStack.cpp:
        (WebCore::HTMLNames::isScopeMarker):
        (WebCore::HTMLNames::isTableScopeMarker):
        (WebCore::HTMLNames::isSelectScopeMarker):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
        (WebCore::HTMLTreeBuilder::processStartTag):
        (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
        (WebCore::HTMLTreeBuilder::processEndTag):
        (WebCore::HTMLTreeBuilder::processCharacterBuffer):
        * html/shadow/InsertionPoint.h:
        (WebCore::isActiveInsertionPoint):
        (WebCore::parentNodeForDistribution):
        (WebCore::parentElementForDistribution):
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::parentMediaElement):
        (WebCore::mediaControlElementType):
        (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlPanelElement::defaultEventHandler):
        (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
        (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
        (WebCore::MediaControlTimelineElement::defaultEventHandler):
        * html/shadow/MediaControls.cpp:
        (WebCore::MediaControls::containsRelatedTarget):
        * html/shadow/MediaControlsApple.cpp:
        (WebCore::MediaControlsAppleEventListener::handleEvent):
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::defaultEventHandler):
        * html/shadow/SpinButtonElement.cpp:
        (WebCore::SpinButtonElement::defaultEventHandler):
        (WebCore::SpinButtonElement::forwardEvent):
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
        (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
        (WebCore::VTTCue::markFutureAndPastNodes):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::elementForId):
        (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::unbind):
        (WebCore::InspectorDOMAgent::assertDocument):
        (WebCore::InspectorDOMAgent::assertElement):
        (WebCore::InspectorDOMAgent::querySelector):
        (WebCore::InspectorDOMAgent::querySelectorAll):
        (WebCore::InspectorDOMAgent::setNodeName):
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
        (WebCore::InspectorDOMAgent::innerParentNode):
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::frameForScriptExecutionContext):
        (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
        * inspector/InspectorNodeFinder.cpp:
        (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
        (WebCore::InspectorNodeFinder::searchUsingXPath):
        (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
        * inspector/InspectorOverlay.cpp:
        (WebCore::buildObjectForElementInfo):
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyleSheet::inlineStyleSheetText):
        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::create):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::handleFallbackContent):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::loadPlugin):
        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoader::create):
        (WebCore::ThreadableLoader::loadResourceSynchronously):
        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::removeRequestFromCache):
        (WebCore::MemoryCache::removeRequestFromSessionCaches):
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::attributeChanged):
        * mathml/MathMLSelectElement.cpp:
        (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
        * page/Chrome.cpp:
        (WebCore::Chrome::setToolTip):
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::maybeCreateContextMenu):
        (WebCore::ContextMenuController::populate):
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::install):
        (WebCore::DOMTimer::fired):
        * page/DragController.cpp:
        (WebCore::elementUnderMouse):
        (WebCore::DragController::operationForLoad):
        (WebCore::DragController::canProcessDrag):
        (WebCore::DragController::draggableElement):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::isSubmitImage):
        (WebCore::targetIsFrame):
        (WebCore::findDropZone):
        (WebCore::EventHandler::updateDragAndDrop):
        (WebCore::EventHandler::updateMouseEventTargetNode):
        (WebCore::EventHandler::handleTextInputEvent):
        * page/FocusController.cpp:
        (WebCore::FocusNavigationScope::owner):
        (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
        (WebCore::FocusController::findFocusableElementAcrossFocusScope):
        (WebCore::FocusController::findElementWithExactTabIndex):
        (WebCore::nextElementWithGreaterTabIndex):
        (WebCore::previousElementWithLowerTabIndex):
        (WebCore::FocusController::nextFocusableElement):
        (WebCore::FocusController::previousFocusableElement):
        (WebCore::clearSelectionIfNeeded):
        (WebCore::FocusController::advanceFocusDirectionally):
        * page/Frame.cpp:
        (WebCore::Frame::searchForLabelsBeforeElement):
        (WebCore::Frame::setPageAndTextZoomFactors):
        * page/FrameView.cpp:
        (WebCore::FrameView::init):
        (WebCore::FrameView::scrollToAnchor):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeFrame):
        * page/SpatialNavigation.cpp:
        (WebCore::FocusCandidate::FocusCandidate):
        (WebCore::scrollInDirection):
        (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
        (WebCore::canScrollInDirection):
        (WebCore::nodeRectInAbsoluteCoordinates):
        (WebCore::areElementsOnSameLine):
        * page/ios/FrameIOS.mm:
        (WebCore::ancestorRespondingToClickEvents):
        * platform/network/FormData.cpp:
        (WebCore::FormData::appendKeyValuePairItems):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::setInnerNode):
        (WebCore::HitTestResult::setInnerNonSharedNode):
        (WebCore::HitTestResult::title):
        (WebCore::HitTestResult::innerTextIfTruncated):
        (WebCore::HitTestResult::mediaSupportsFullscreen):
        (WebCore::HitTestResult::enterFullscreenForVideo):
        (WebCore::HitTestResult::mediaIsVideo):
        (WebCore::HitTestResult::innerElement):
        (WebCore::HitTestResult::innerNonSharedElement):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::resizeTextPermitted):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::sizesLogicalWidthToFitContent):
        * rendering/RenderCounter.cpp:
        (WebCore::planCounter):
        * rendering/RenderDetailsMarker.cpp:
        (WebCore::RenderDetailsMarker::isOpen):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::uploadButton):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintAreaElementFocusRing):
        (WebCore::RenderImage::paintIntoRect):
        (WebCore::RenderImage::imageMap):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):
        (WebCore::RenderLayer::resize):
        (WebCore::RenderLayer::updateSnapOffsets):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::isRestartedPlugin):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::updateFromElement):
        (WebCore::RenderListBox::addFocusRingRects):
        (WebCore::RenderListBox::paintItemForeground):
        (WebCore::RenderListBox::paintItemBackground):
        * rendering/RenderMarquee.cpp:
        (WebCore::RenderMarquee::marqueeSpeed):
        * rendering/RenderMenuList.cpp:
        (WebCore::selectedOptionCount):
        (RenderMenuList::updateOptionsWidth):
        (RenderMenuList::setTextFromOption):
        (RenderMenuList::itemText):
        (RenderMenuList::itemIsEnabled):
        (RenderMenuList::itemIsLabel):
        (RenderMenuList::itemIsSelected):
        * rendering/RenderMeter.cpp:
        (WebCore::RenderMeter::meterElement):
        * rendering/RenderNamedFlowThread.cpp:
        (WebCore::RenderNamedFlowThread::isChildAllowed):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::addPDFURLRect):
        (WebCore::RenderObject::shouldRespectImageOrientation):
        (WebCore::RenderObject::updateDragState):
        (WebCore::RenderObject::getUncachedPseudoStyle):
        (WebCore::RenderObject::getTextDecorationColors):
        * rendering/RenderProgress.cpp:
        (WebCore::RenderProgress::progressElement):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::handleEvent):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
        (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::parseColSpanFromDOM):
        (WebCore::RenderTableCell::parseRowSpanFromDOM):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::isEnabled):
        (WebCore::RenderTheme::isFocused):
        (WebCore::RenderTheme::isPressed):
        (WebCore::RenderTheme::isSpinUpButtonPartPressed):
        (WebCore::RenderTheme::isReadOnlyControl):
        (WebCore::RenderTheme::isHovered):
        (WebCore::RenderTheme::isSpinUpButtonPartHovered):
        (WebCore::RenderTheme::paintSliderTicks):
        * rendering/RenderThemeGtk.cpp:
        (WebCore::getMediaElementFromRenderObject):
        (WebCore::nodeHasClass):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::updatePressedState):
        (WebCore::RenderThemeMac::paintSliderThumb):
        (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
        (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::isEmptyOrUnstyledAppleStyleSpan):
        (WebCore::RenderTreeAsText::writeRenderObject):
        * rendering/TextAutosizer.cpp:
        (WebCore::TextAutosizer::isAutosizingContainer):
        (WebCore::TextAutosizer::containerContainsOneOfTags):
        * rendering/mathml/RenderMathMLBlock.cpp:
        (WebCore::RenderMathMLBlock::isChildAllowed):
        * rendering/svg/RenderSVGGradientStop.cpp:
        (WebCore::RenderSVGGradientStop::gradientElement):
        * rendering/svg/RenderSVGTransformableContainer.cpp:
        (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
        * style/StyleResolveTree.cpp:
        (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
        (WebCore::Style::attachChildren):
        (WebCore::Style::attachDistributedChildren):
        (WebCore::Style::detachDistributedChildren):
        (WebCore::Style::detachChildren):
        (WebCore::Style::resolveShadowTree):
        (WebCore::Style::resolveTree):
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):
        * svg/SVGAltGlyphElement.cpp:
        (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
        * svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
        * svg/SVGDocument.cpp:
        (WebCore::SVGDocument::rootElement):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::isOutermostSVGSVGElement):
        (WebCore::SVGElement::ownerSVGElement):
        (WebCore::SVGElement::viewportElement):
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontFaceElement.cpp:
        (WebCore::SVGFontFaceElement::associatedFontElement):
        (WebCore::SVGFontFaceElement::rebuildFontFace):
        * svg/SVGFontFaceSrcElement.cpp:
        (WebCore::SVGFontFaceSrcElement::childrenChanged):
        * svg/SVGGlyphElement.cpp:
        (WebCore::SVGGlyphElement::invalidateGlyphCache):
        * svg/SVGHKernElement.cpp:
        (WebCore::SVGHKernElement::insertedInto):
        (WebCore::SVGHKernElement::removedFrom):
        * svg/SVGLengthContext.cpp:
        (WebCore::SVGLengthContext::determineViewport):
        * svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
        * svg/SVGLocatable.cpp:
        (WebCore::isViewportElement):
        (WebCore::SVGLocatable::getTransformToElement):
        * svg/SVGMPathElement.cpp:
        (WebCore::SVGMPathElement::pathElement):
        (WebCore::SVGMPathElement::notifyParentOfPathChange):
        * svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::invalidateMPathDependencies):
        * svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::collectPatternAttributes):
        * svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::setupInitialView):
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::elementFromRenderer):
        * svg/SVGUseElement.cpp:
        (WebCore::dumpInstanceTree):
        (WebCore::SVGUseElement::toClipPath):
        (WebCore::SVGUseElement::expandUseElementsInShadowTree):
        (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
        * svg/SVGVKernElement.cpp:
        (WebCore::SVGVKernElement::insertedInto):
        (WebCore::SVGVKernElement::removedFrom):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::buildPendingResource):
        * svg/graphics/SVGImageCache.cpp:
        (WebCore::SVGImageCache::imageForRenderer):
        * testing/Internals.cpp:
        (WebCore::Internals::shadowRootType):
        (WebCore::Internals::visiblePlaceholder):
        (WebCore::Internals::selectColorInColorChooser):
        (WebCore::Internals::wasLastChangeUserEdit):
        (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
        (WebCore::Internals::isSelectPopupVisible):
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::injectInternalsObject):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::open):
        * xml/XPathFunctions.cpp:
        (WebCore::XPath::expandedNameLocalPart):
        (WebCore::XPath::FunLang::evaluate):
        * xml/XPathNodeSet.cpp:
        (WebCore::XPath::sortBlock):
        (WebCore::XPath::NodeSet::sort):
        (WebCore::XPath::findRootNode):
        (WebCore::XPath::NodeSet::traversalSort):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::XMLDocumentParser):

2014-10-02  Rik Cabanier  <cabanier@adobe.com>

        Clean up loops in CSSGradientValue.cpp
        https://bugs.webkit.org/show_bug.cgi?id=137332

        Reviewed by Andreas Kling.

        This patch cleans up a couple of for loops by using C++11 syntax and
        fixes some grammar in a comment.

        No new tests, no behavior change.

        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::gradientWithStylesResolved): Move for loops to C++11.
        (WebCore::CSSGradientValue::addStops): Update grammar in comment for gradient midpoints.

2014-10-02  Krzysztof Czech  <k.czech@samsung.com>

        AX: Default orientation for aria scrollbars should be vertical
        https://bugs.webkit.org/show_bug.cgi?id=137341

        Reviewed by Chris Fleizach.

        Default orientation for aria scrollbars regarding w3c spec should be vertical

        No new tests, covering by existing one.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::orientation):

2014-10-02  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        Fix minimal build warnings
        https://bugs.webkit.org/show_bug.cgi?id=137066

        Reviewed by Daniel Bates.

        No new tests, no behavior change.

        * css/CSSParser.cpp:
        (WebCore::isValidKeywordPropertyAndValue):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
        * page/Page.cpp:
        (WebCore::Page::setPageScaleFactor):
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::glyphDataForCharacter):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):

2014-10-01  Benjamin Poulain  <bpoulain@apple.com>

        Click events offset in webkit-overflow-scrolling iframes
        https://bugs.webkit.org/show_bug.cgi?id=134596

        Reviewed by Sam Weinig.

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::visibleContentRectInternal):
        When converting coordinates from the main frame to a subframe's document, the position
        is first converted to the subframe's FrameView coordinate system, then offset by the scroll
        offset of the subframe itself.

        The bug in this case was that the scroll offset used was the global scroll offset of the frame
        in the view instead of the scroll offset of the document in its own frameview.

        The regression was introduced by the refactoring r162663. On iOS WebKit1, the coordinate system
        is different depending on VisibleContentRectIncludesScrollbars. In r162663, the value was set
        such that the rect returned is always in absolute coordinate.

        The ideal solution would be to refactor ScrollView::platformVisibleContentRect() to always return
        the offsets in scroll view coordinates and verify and update all the call sites to use explicit
        conversion to the top frame. In this patch I only reverted the coordinate change of r162663 to avoid
        large scale impact.

2014-10-01  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for File
        https://bugs.webkit.org/show_bug.cgi?id=137318

        Reviewed by Gyuyoung Kim.

        Use is<>() / downcast<>() for File instead of isFile() / toFile().

        No new tests, no behavior change.

        * fileapi/Blob.h:
        * fileapi/File.h:
        (isType):
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::readAsArrayBuffer):
        (WebCore::FileReader::readAsBinaryString):
        (WebCore::FileReader::readAsText):
        (WebCore::FileReader::readAsDataURL):
        * platform/network/FormData.cpp:
        (WebCore::FormData::appendKeyValuePairItems):

2014-10-01  Rik Cabanier  <cabanier@adobe.com>

        Add support for midpoint to CSS gradients
        https://bugs.webkit.org/show_bug.cgi?id=137171

        Reviewed by Darin Adler.

        This patch adds support for gradient midpoints. It also updates the 
        gradient tests so they use the feature.
        Spec: http://dev.w3.org/csswg/css-images-4/#color-interpolation-hint

        Tests: fast/gradients/unprefixed-color-stops2.html
               fast/gradients/unprefixed-gradient-parsing.html
               fast/gradients/unprefixed-linear-angle-gradients2.html
               fast/gradients/unprefixed-radial-gradients.html
               fast/gradients/unprefixed-radial-gradients2.html
               fast/gradients/unprefixed-repeating-linear-gradient.html
               fast/gradients/unprefixed-repeating-radial-gradients.html

        * css/CSSGradientValue.cpp:
        (WebCore::GradientStop::GradientStop): constructor initializes the midpoint variable
        (WebCore::CSSGradientValue::gradientWithStylesResolved): this function checks for midpoint color stops
        (WebCore::CSSGradientValue::addStops): this function processes midpoints and converts them to regular color stops
        (WebCore::CSSLinearGradientValue::customCSSText): this routine was updated to do correct parsing for midpoints
        (WebCore::CSSRadialGradientValue::customCSSText):
        * css/CSSGradientValue.h:
        (WebCore::CSSGradientColorStop::CSSGradientColorStop): this function stores if a stop is a midpoint
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseGradientColorStops): this function now allows color stops with no color

2014-10-01  Chris Dumez  <cdumez@apple.com>

        Add basic caching for Document.cookie API
        https://bugs.webkit.org/show_bug.cgi?id=137225

        Reviewed by Alexey Proskuryakov.

        While profiling the load of nytimes.com, I noticed that the site is
        accessing ~250 times document.cookie, just during page load. Accessing
        document.cookie is currently slow because we:
        - Call WebPlatformStrategies::cookiesForDOM() virtual function
        - Send a sync IPC message to the Network process to retrieve the
          cookies
            - The Network process gets the list of cookies from CFNetwork then
              serializes the result to send it back to the WebProcess
        - We unserialize the cookies into an NSList of cookies
        - We filter-out the cookies that are 'httpOnly' and construct a new
          NSList of cookies
        - We create a WTF String out of the cookies NSList

        In the case of nytimes.com, it turns out that up to 100 calls to
        document.cookie() are made in the same event loop iteration. This patch
        thus caches / freezes the cookies until we return to the event
        loop so that consecutive calls to document.cookie() are extremely fast.
        Doing so seems to be sufficient to achieve a ~87% cache hit for
        nytimes.com page load.

        The cookies cache is invalidated whenever:
        - document.cookie is set
        - we return to the event loop
        - a network resource is loaded synchronously as it may cause cookies to
          be set before we return to the event loop

        Test: http/tests/cookies/sync-xhr-set-cookie-invalidates-cache.html

        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::open):
        (WebCore::Document::cookie):
        (WebCore::Document::setCookie):
        (WebCore::Document::setCookieURL):
        (WebCore::Document::initSecurityContext):
        (WebCore::Document::setDOMCookieCache):
        (WebCore::Document::invalidateDOMCookieCache):
        (WebCore::Document::domCookieCacheExpiryTimerFired):
        (WebCore::Document::didLoadResourceSynchronously):
        * dom/Document.h:
        (WebCore::Document::domCookieCache):
        (WebCore::Document::isDOMCookieCacheValid):
        (WebCore::Document::setCookieURL): Deleted.
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
        * dom/ScriptExecutionContext.h:
        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoader::loadResourceSynchronously):

2014-10-01  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for Event classes
        https://bugs.webkit.org/show_bug.cgi?id=137284

        Reviewed by Andreas Kling.

        Use is<>() / downcast<>() for Event classes.

        No new tests, no behavior change.

        * bindings/js/JSErrorHandler.cpp:
        (WebCore::JSErrorHandler::handleEvent):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * dom/BeforeTextInsertedEvent.h:
        * dom/BeforeUnloadEvent.h:
        * dom/ErrorEvent.h:
        * dom/Event.h:
        * dom/EventContext.cpp:
        (WebCore::MouseOrFocusEventContext::handleLocalEvents):
        * dom/FocusEvent.h:
        * dom/KeyboardEvent.cpp:
        (WebCore::findKeyboardEvent):
        * dom/KeyboardEvent.h:
        * dom/MouseEvent.cpp:
        (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
        * dom/MouseEvent.h:
        * dom/Node.cpp:
        (WebCore::Node::defaultEventHandler):
        * dom/TextEvent.h:
        * dom/UIEvent.h:
        * dom/WheelEvent.h:
        * html/HTMLAnchorElement.cpp:
        (WebCore::appendServerMapMousePosition):
        (WebCore::HTMLAnchorElement::defaultEventHandler):
        (WebCore::HTMLAnchorElement::eventType):
        (WebCore::isEnterKeyKeydownEvent):
        (WebCore::isLinkClick):
        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::defaultEventHandler):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submitImplicitly):
        * html/HTMLFormElement.h:
        * html/HTMLFrameSetElement.cpp:
        (WebCore::HTMLFrameSetElement::defaultEventHandler):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::willDispatchEvent):
        (WebCore::HTMLInputElement::defaultEventHandler):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::defaultEventHandler):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
        (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
        (WebCore::HTMLSelectElement::defaultEventHandler):
        * html/HTMLSummaryElement.cpp:
        (WebCore::HTMLSummaryElement::defaultEventHandler):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::defaultEventHandler):
        * html/ImageDocument.cpp:
        (WebCore::ImageEventListener::handleEvent):
        * html/ImageInputType.cpp:
        (WebCore::ImageInputType::handleDOMActivateEvent):
        * html/InputType.cpp:
        (WebCore::InputType::shouldSubmitImplicitly):
        * html/InputType.h:
        * html/MediaDocument.cpp:
        (WebCore::MediaDocument::defaultEventHandler):
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::shouldSubmitImplicitly):
        * html/TextFieldInputType.h:
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlPanelElement::defaultEventHandler):
        (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
        (WebCore::MediaControlTimelineElement::defaultEventHandler):
        * html/shadow/MediaControls.cpp:
        (WebCore::MediaControls::containsRelatedTarget):
        * html/shadow/MediaControlsApple.cpp:
        (WebCore::MediaControlsAppleEventListener::handleEvent):
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::defaultEventHandler):
        * html/shadow/SpinButtonElement.cpp:
        (WebCore::SpinButtonElement::defaultEventHandler):
        (WebCore::SpinButtonElement::forwardEvent):
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
        (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::maybeCreateContextMenu):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleTextInputEvent):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
        (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
        * rendering/RenderEmbeddedObject.h:
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::handleEvent):

2014-10-01  Zan Dobersek  <zdobersek@igalia.com>

        [TexMap] Sprinkle range-based for-loops in GraphicsLayerTextureMapper, TextureMapperLayer
        https://bugs.webkit.org/show_bug.cgi?id=137271

        Reviewed by Sergio Villar Senin.

        Switch to using C++11 range-based for-loops in the
        GraphicsLayerTextureMapper and TextureMapperLayer classes.

        The for loops that remained unchanged either do further computation
        with the loop index or must iterate over the container in reverse.

        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::toTextureMapperLayerVector):
        (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
        * platform/graphics/texmap/TextureMapperLayer.cpp:
        (WebCore::TextureMapperLayer::computeTransformsRecursive):
        (WebCore::TextureMapperLayer::paintSelfAndChildren):
        (WebCore::TextureMapperLayer::computeOverlapRegions):
        (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
        (WebCore::TextureMapperLayer::~TextureMapperLayer):
        (WebCore::TextureMapperLayer::setChildren):
        (WebCore::TextureMapperLayer::descendantsOrSelfHaveRunningAnimations):
        (WebCore::TextureMapperLayer::applyAnimationsRecursively):

2014-10-01  Dan Bernstein  <mitz@apple.com>

        Windows build fix.

        * platform/network/cf/ResourceResponseCFNet.cpp:

2014-10-01  Dan Bernstein  <mitz@apple.com>

        REGRESSION (r173423): [iOS] Sites with EV certificates appear as normal HTTPS sites
        https://bugs.webkit.org/show_bug.cgi?id=137262

        Reviewed by Antti Koivisto.

        No new tests, because the API test harness doesn’t run an HTTP server to test against.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::platformCertificateInfo): Return a CertificateInfo initialized
        with the certificate array from the response.

2014-09-30  Yusuke Suzuki  <utatane.tea@gmail.com>

        CSS JIT: Enable multiple stack references allocation by allocateUninitialized
        https://bugs.webkit.org/show_bug.cgi?id=135293

        Reviewed by Benjamin Poulain.

        * cssjit/StackAllocator.h:
        (WebCore::StackAllocator::stackTop):
            Add stackTop method to check references are allocated easily.
        (WebCore::StackAllocator::allocateUninitialized):

2014-09-30  Chris Dumez  <cdumez@apple.com>

        Drop getPtr() overload taking a Document reference in argument
        https://bugs.webkit.org/show_bug.cgi?id=137280

        Reviewed by Daniel Bates.

        Drop getPtr() overload taking a Document reference in argument. This is
        no longer needed as the generic getPtr() function converts references
        into pointers just fine after r173765.

        No new tests, no behavior change.

        * dom/Document.h:
        (WTF::getPtr): Deleted.

2014-09-30  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: ErrorString should be passed by reference
        https://bugs.webkit.org/show_bug.cgi?id=137257

        Reviewed by Joseph Pecoraro.

        Pass the leading ErrorString argument by reference, since it is always an out parameter.
        Clean up callsites where the error message is written.

        No new tests, no behavior changed.

        * inspector/CommandLineAPIHost.cpp:
        (WebCore::CommandLineAPIHost::clearConsoleMessages):
        * inspector/DOMEditor.cpp:
        (WebCore::populateErrorString):
        (WebCore::DOMEditor::insertBefore):
        (WebCore::DOMEditor::removeChild):
        (WebCore::DOMEditor::setAttribute):
        (WebCore::DOMEditor::removeAttribute):
        (WebCore::DOMEditor::setOuterHTML):
        (WebCore::DOMEditor::replaceWholeText):
        * inspector/DOMEditor.h:
        * inspector/InspectorApplicationCacheAgent.cpp:
        (WebCore::InspectorApplicationCacheAgent::enable):
        (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
        (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
        (WebCore::InspectorApplicationCacheAgent::getManifestForFrame):
        (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
        * inspector/InspectorApplicationCacheAgent.h:
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::enable):
        (WebCore::InspectorCSSAgent::disable):
        (WebCore::InspectorCSSAgent::didCreateNamedFlow):
        (WebCore::InspectorCSSAgent::regionOversetChanged):
        (WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement):
        (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
        (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
        (WebCore::InspectorCSSAgent::getInlineStylesForNode):
        (WebCore::InspectorCSSAgent::getComputedStyleForNode):
        (WebCore::InspectorCSSAgent::getAllStyleSheets):
        (WebCore::InspectorCSSAgent::getStyleSheet):
        (WebCore::InspectorCSSAgent::getStyleSheetText):
        (WebCore::InspectorCSSAgent::setStyleSheetText):
        (WebCore::InspectorCSSAgent::setStyleText):
        (WebCore::InspectorCSSAgent::setPropertyText):
        (WebCore::InspectorCSSAgent::toggleProperty):
        (WebCore::InspectorCSSAgent::setRuleSelector):
        (WebCore::InspectorCSSAgent::addRule):
        (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
        (WebCore::InspectorCSSAgent::forcePseudoState):
        (WebCore::InspectorCSSAgent::getNamedFlowCollection):
        (WebCore::InspectorCSSAgent::elementForId):
        (WebCore::InspectorCSSAgent::assertStyleSheetForId):
        (WebCore::InspectorCSSAgent::buildArrayForRegions):
        (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
        * inspector/InspectorCSSAgent.h:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::hideHighlight):
        (WebCore::InspectorController::setProfilerEnabled):
        (WebCore::InspectorController::resume):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorDOMAgent::assertNode):
        (WebCore::InspectorDOMAgent::assertDocument):
        (WebCore::InspectorDOMAgent::assertElement):
        (WebCore::InspectorDOMAgent::assertEditableNode):
        (WebCore::InspectorDOMAgent::assertEditableElement):
        (WebCore::InspectorDOMAgent::getDocument):
        (WebCore::InspectorDOMAgent::pushNodeToFrontend):
        (WebCore::InspectorDOMAgent::requestChildNodes):
        (WebCore::InspectorDOMAgent::querySelector):
        (WebCore::InspectorDOMAgent::querySelectorAll):
        (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
        (WebCore::InspectorDOMAgent::setAttributeValue):
        (WebCore::InspectorDOMAgent::setAttributesAsText):
        (WebCore::InspectorDOMAgent::removeAttribute):
        (WebCore::InspectorDOMAgent::removeNode):
        (WebCore::InspectorDOMAgent::setNodeName):
        (WebCore::InspectorDOMAgent::getOuterHTML):
        (WebCore::InspectorDOMAgent::setOuterHTML):
        (WebCore::InspectorDOMAgent::setNodeValue):
        (WebCore::InspectorDOMAgent::getEventListenersForNode):
        (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
        (WebCore::InspectorDOMAgent::performSearch):
        (WebCore::InspectorDOMAgent::getSearchResults):
        (WebCore::InspectorDOMAgent::discardSearchResults):
        (WebCore::InspectorDOMAgent::inspect):
        (WebCore::InspectorDOMAgent::setSearchingForNode):
        (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
        (WebCore::InspectorDOMAgent::setInspectModeEnabled):
        (WebCore::InspectorDOMAgent::highlightRect):
        (WebCore::InspectorDOMAgent::highlightQuad):
        (WebCore::InspectorDOMAgent::highlightNode):
        (WebCore::InspectorDOMAgent::highlightFrame):
        (WebCore::InspectorDOMAgent::hideHighlight):
        (WebCore::InspectorDOMAgent::moveTo):
        (WebCore::InspectorDOMAgent::undo):
        (WebCore::InspectorDOMAgent::redo):
        (WebCore::InspectorDOMAgent::markUndoableState):
        (WebCore::InspectorDOMAgent::focus):
        (WebCore::InspectorDOMAgent::resolveNode):
        (WebCore::InspectorDOMAgent::getAttributes):
        (WebCore::InspectorDOMAgent::requestNode):
        (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
        (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend):
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
        (WebCore::domTypeForName):
        (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
        * inspector/InspectorDOMDebuggerAgent.h:
        * inspector/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorDOMStorageAgent::enable):
        (WebCore::InspectorDOMStorageAgent::disable):
        (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
        (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
        (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
        (WebCore::InspectorDOMStorageAgent::findStorageArea):
        * inspector/InspectorDOMStorageAgent.h:
        * inspector/InspectorDatabaseAgent.cpp:
        (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorDatabaseAgent::enable):
        (WebCore::InspectorDatabaseAgent::disable):
        (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
        (WebCore::InspectorDatabaseAgent::executeSQL):
        * inspector/InspectorDatabaseAgent.h:
        * inspector/InspectorIndexedDBAgent.cpp:
        (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorIndexedDBAgent::enable):
        (WebCore::InspectorIndexedDBAgent::disable):
        (WebCore::assertDocument):
        (WebCore::assertIDBFactory):
        (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
        (WebCore::InspectorIndexedDBAgent::requestDatabase):
        (WebCore::InspectorIndexedDBAgent::requestData):
        (WebCore::InspectorIndexedDBAgent::clearObjectStore):
        * inspector/InspectorIndexedDBAgent.h:
        * inspector/InspectorLayerTreeAgent.cpp:
        (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorLayerTreeAgent::enable):
        (WebCore::InspectorLayerTreeAgent::disable):
        (WebCore::InspectorLayerTreeAgent::layersForNode):
        (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
        (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
        (WebCore::InspectorLayerTreeAgent::idForNode):
        (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
        * inspector/InspectorLayerTreeAgent.h:
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::cachedResourceContent):
        (WebCore::InspectorPageAgent::resourceContent):
        (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorPageAgent::enable):
        (WebCore::InspectorPageAgent::disable):
        (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
        (WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad):
        (WebCore::InspectorPageAgent::reload):
        (WebCore::InspectorPageAgent::navigate):
        (WebCore::InspectorPageAgent::getCookies):
        (WebCore::InspectorPageAgent::deleteCookie):
        (WebCore::InspectorPageAgent::getResourceTree):
        (WebCore::InspectorPageAgent::getResourceContent):
        (WebCore::InspectorPageAgent::searchInResource):
        (WebCore::InspectorPageAgent::searchInResources):
        (WebCore::InspectorPageAgent::setDocumentContent):
        (WebCore::InspectorPageAgent::setShowPaintRects):
        (WebCore::InspectorPageAgent::canShowDebugBorders):
        (WebCore::InspectorPageAgent::setShowDebugBorders):
        (WebCore::InspectorPageAgent::canShowFPSCounter):
        (WebCore::InspectorPageAgent::setShowFPSCounter):
        (WebCore::InspectorPageAgent::canContinuouslyPaint):
        (WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
        (WebCore::InspectorPageAgent::getScriptExecutionStatus):
        (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
        (WebCore::InspectorPageAgent::assertFrame):
        (WebCore::InspectorPageAgent::assertDocumentLoader):
        (WebCore::InspectorPageAgent::setTouchEmulationEnabled):
        (WebCore::InspectorPageAgent::setEmulatedMedia):
        (WebCore::InspectorPageAgent::getCompositingBordersVisible):
        (WebCore::InspectorPageAgent::setCompositingBordersVisible):
        (WebCore::InspectorPageAgent::snapshotNode):
        (WebCore::InspectorPageAgent::snapshotRect):
        (WebCore::InspectorPageAgent::handleJavaScriptDialog):
        (WebCore::InspectorPageAgent::archive):
        * inspector/InspectorPageAgent.h:
        * inspector/InspectorReplayAgent.cpp:
        (WebCore::InspectorReplayAgent::startCapturing):
        (WebCore::InspectorReplayAgent::stopCapturing):
        (WebCore::InspectorReplayAgent::replayToPosition):
        (WebCore::InspectorReplayAgent::replayToCompletion):
        (WebCore::InspectorReplayAgent::pausePlayback):
        (WebCore::InspectorReplayAgent::cancelPlayback):
        (WebCore::InspectorReplayAgent::switchSession):
        (WebCore::InspectorReplayAgent::insertSessionSegment):
        (WebCore::InspectorReplayAgent::removeSessionSegment):
        (WebCore::InspectorReplayAgent::findSession):
        (WebCore::InspectorReplayAgent::findSegment):
        (WebCore::InspectorReplayAgent::currentReplayState):
        (WebCore::InspectorReplayAgent::getAvailableSessions):
        (WebCore::InspectorReplayAgent::getSessionData):
        (WebCore::InspectorReplayAgent::getSegmentData):
        * inspector/InspectorReplayAgent.h:
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
        (WebCore::InspectorResourceAgent::enable):
        (WebCore::InspectorResourceAgent::disable):
        (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
        (WebCore::InspectorResourceAgent::getResponseBody):
        (WebCore::InspectorResourceAgent::replayXHR):
        (WebCore::InspectorResourceAgent::canClearBrowserCache):
        (WebCore::InspectorResourceAgent::clearBrowserCache):
        (WebCore::InspectorResourceAgent::canClearBrowserCookies):
        (WebCore::InspectorResourceAgent::clearBrowserCookies):
        (WebCore::InspectorResourceAgent::setCacheDisabled):
        (WebCore::InspectorResourceAgent::loadResource):
        * inspector/InspectorResourceAgent.h:
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyleSheet::resourceStyleSheetText):
        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorTimelineAgent::start):
        (WebCore::InspectorTimelineAgent::stop):
        * inspector/InspectorTimelineAgent.h:
        * inspector/InspectorWorkerAgent.cpp:
        (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorWorkerAgent::enable):
        (WebCore::InspectorWorkerAgent::disable):
        (WebCore::InspectorWorkerAgent::canInspectWorkers):
        (WebCore::InspectorWorkerAgent::connectToWorker):
        (WebCore::InspectorWorkerAgent::disconnectFromWorker):
        (WebCore::InspectorWorkerAgent::sendMessageToWorker):
        (WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
        * inspector/InspectorWorkerAgent.h:
        * inspector/PageConsoleAgent.cpp:
        (WebCore::PageConsoleAgent::clearMessages):
        (WebCore::PageConsoleAgent::addInspectedNode):
        * inspector/PageConsoleAgent.h:
        * inspector/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::injectedScriptForEval):
        (WebCore::PageDebuggerAgent::setOverlayMessage):
        * inspector/PageDebuggerAgent.h:
        * inspector/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
        (WebCore::PageRuntimeAgent::enable):
        (WebCore::PageRuntimeAgent::disable):
        (WebCore::PageRuntimeAgent::injectedScriptForEval):
        * inspector/PageRuntimeAgent.h:
        * inspector/WebConsoleAgent.cpp:
        (WebCore::WebConsoleAgent::setMonitoringXHREnabled):
        * inspector/WebConsoleAgent.h:
        * inspector/WorkerConsoleAgent.cpp:
        (WebCore::WorkerConsoleAgent::addInspectedNode):
        * inspector/WorkerConsoleAgent.h:
        * inspector/WorkerDebuggerAgent.cpp:
        (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
        * inspector/WorkerDebuggerAgent.h:
        * inspector/WorkerInspectorController.cpp:
        (WebCore::WorkerInspectorController::resume):
        * inspector/WorkerRuntimeAgent.cpp:
        (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
        (WebCore::WorkerRuntimeAgent::run):
        * inspector/WorkerRuntimeAgent.h:

2014-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Stack overflow with enormous SVG filter
        https://bugs.webkit.org/show_bug.cgi?id=63290

        Prevent building an SVG filter if it has more than 200 FilterEffect nodes in its map 
        regardless whether they will be connected to its lastEffect or not. Also discard any
        filter which has more 100 contributing FilterEffect nodes in its tree.

        Reviewed by Dean Jackson.

        Tests: svg/filters/svg-deeply-nested-crash.html

        * platform/graphics/filters/FilterEffect.cpp:
        (WebCore::collectEffects):
        (WebCore::FilterEffect::totalNumberOfEffectInputs):
        * platform/graphics/filters/FilterEffect.h:
        -- Add a method to return the total number of input FilterEffect's contributing to a FilterEffect.
        * rendering/svg/RenderSVGResourceFilter.cpp:
        (WebCore::RenderSVGResourceFilter::buildPrimitives):
        -- Do not build a filter if it has more than 200 FilterEffects in its map.
        (WebCore::RenderSVGResourceFilter::applyResource):
        -- Discard a filter after it was built if it has more than 100 FilterEffects in its tree.

2014-09-30  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for ContainerNode
        https://bugs.webkit.org/show_bug.cgi?id=137270

        Reviewed by Andreas Kling.

        Use is<>() / downcast<>() for ContainerNode instead of isContainerNode()
        / toContainerNode(). Also kill the NODE_TYPE_CASTS() macro as this was
        its last user.

        No new tests, no behavior change.

        * dom/ContainerNode.cpp:
        (WebCore::collectChildrenAndRemoveFromOldParent):
        (WebCore::ContainerNode::willRemoveChild):
        (WebCore::cloneChildNodesAvoidingDeleteButton):
        * dom/ContainerNode.h:
        (WebCore::Node::countChildNodes):
        (WebCore::Node::traverseToChildAt):
        (WebCore::Node::firstChild):
        (WebCore::Node::lastChild):
        (isType):
        (WebCore::isContainerNode): Deleted.
        * dom/ContainerNodeAlgorithms.cpp:
        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
        (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
        * dom/ContainerNodeAlgorithms.h:
        (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
        (WebCore::ChildNodeInsertionNotifier::notify):
        (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
        (WebCore::ChildNodeRemovalNotifier::notify):
        * dom/Node.cpp:
        (WebCore::Node::childNodes):
        (WebCore::Node::insertBefore):
        (WebCore::Node::replaceChild):
        (WebCore::Node::removeChild):
        (WebCore::Node::appendChild):
        (WebCore::Node::setTextContent):
        * dom/Node.h:
        * dom/Range.cpp:
        (WebCore::Range::surroundContents):
        * dom/TextNodeTraversal.cpp:
        (WebCore::TextNodeTraversal::contentsAsString):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::insertNodeAt):
        * editing/Editor.cpp:
        (WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocument::defaultEventHandler):
        * html/parser/HTMLConstructionSite.h:
        (WebCore::HTMLConstructionSiteTask::oldParent):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::querySelector):
        (WebCore::InspectorDOMAgent::querySelectorAll):
        * inspector/InspectorNodeFinder.cpp:
        (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):

2014-09-30  Roger Fong  <roger_fong@apple.com>

        [Windows] Remove an errant WTFLogAlways that makes test output hard to read and generates stderr output.

        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):

2014-09-30  David Hyatt  <hyatt@apple.com>

        Remove a multicolumn ASSERT and replace with a guard.
        https://bugs.webkit.org/show_bug.cgi?id=137272
        
        Reviewed by Alexey Proskuryakov.

        * rendering/RenderMultiColumnFlowThread.cpp:
        (WebCore::isValidColumnSpanner):
        For now remove the assert that is tripping and replace it with a guard
        until we can figure out why it's getting hit.

2014-09-30  Christophe Dumez  <cdumez@apple.com>

        Generalize is<>() / downcast<>() support to all types
        https://bugs.webkit.org/show_bug.cgi?id=137243

        Reviewed by Benjamin Poulain.

        Generalize is<>() / downcast<>() support to all types, not just Nodes.
        To achieve this, the following changes were made:
        - Move is<> / downcast<>() and NodeTypeCastTraits from Node.h to a new
          wtf/TypeCasts.h header. Also move them to WTF namespace instead of
          WebCore namespace as they can be used for classes in other namespaces
          (e.g. WebKit namespace).
        - Rename NodeTypeCastsTraits to TypeCastTraits as it can be specialized
          for non-Nodes.
        - Since C++ does not allow template specializations in different
          namespaces, I had to move all the SPECIALIZE_TYPE_TRAITS_*() uses to
          the global scope and use the WebCore:: namespace explicitly in those.
          This is a bit unfortunate but I couldn't find a better way.

        This patch also takes care of supporting is<>() / downcast<>() for
        the WorkerGlobalScope class, which does not derive from Node.

        No new tests, no behavior change.

        * Modules/indexeddb/IDBFactory.cpp:
        * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
        (WebCore::WorkerGlobalScopeIndexedDatabase::from):
        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::create):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::toJSDOMGlobalObject):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute):
        * dom/Attr.h:
        (isType):
        (WebCore::isAttr): Deleted.
        * dom/CDATASection.h:
        (isType):
        (WebCore::isCDATASection): Deleted.
        * dom/CharacterData.h:
        (isType):
        (WebCore::isCharacterData): Deleted.
        * dom/Comment.h:
        (isType):
        (WebCore::isComment): Deleted.
        * dom/Document.h:
        (isType):
        (WebCore::isDocument): Deleted.
        * dom/DocumentFragment.h:
        (isType):
        (WebCore::isDocumentFragment): Deleted.
        * dom/DocumentType.h:
        (isType):
        (WebCore::isDocumentType): Deleted.
        * dom/Element.h:
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::dispatchMessages):
        * dom/Node.h:
        (WebCore::is): Deleted.
        (WebCore::downcast): Deleted.
        * dom/ProcessingInstruction.h:
        (isType):
        (WebCore::isProcessingInstruction): Deleted.
        * dom/PseudoElement.h:
        (isType):
        (WebCore::isPseudoElement): Deleted.
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::createdMessagePort):
        (WebCore::ScriptExecutionContext::destroyedMessagePort):
        (WebCore::ScriptExecutionContext::vm):
        * dom/ScriptExecutionContext.h:
        * dom/ShadowRoot.h:
        (isType):
        (WebCore::isShadowRoot): Deleted.
        * dom/StyledElement.h:
        (isType):
        (WebCore::isStyledElement): Deleted.
        * dom/Text.h:
        (isType):
        (WebCore::isText): Deleted.
        * dom/make_names.pl:
        (printTypeHelpers):
        (printTypeHelpersHeaderFile):
        * html/HTMLDocument.h:
        (isType):
        (WebCore::isHTMLDocument): Deleted.
        * html/HTMLElement.h:
        (isType):
        (WebCore::isHTMLElement): Deleted.
        * html/HTMLFormControlElement.h:
        (isType):
        (WebCore::isHTMLFormControlElement): Deleted.
        * html/HTMLFrameElementBase.h:
        (isType):
        (WebCore::isHTMLFrameElementBase): Deleted.
        * html/HTMLFrameOwnerElement.h:
        (isType):
        (WebCore::isHTMLFrameOwnerElement): Deleted.
        * html/HTMLMediaElement.h:
        (isType):
        (WebCore::isHTMLMediaElement): Deleted.
        * html/HTMLPlugInElement.h:
        (isType):
        (WebCore::isHTMLPlugInElement): Deleted.
        * html/HTMLPlugInImageElement.h:
        (isType):
        (WebCore::isHTMLPlugInImageElement): Deleted.
        * html/HTMLTableCellElement.h:
        (isType):
        (WebCore::isHTMLTableCellElement): Deleted.
        * html/HTMLTableSectionElement.h:
        (isType):
        (WebCore::isHTMLTableSectionElement): Deleted.
        * html/HTMLTextFormControlElement.h:
        (isType):
        (WebCore::isHTMLTextFormControlElement): Deleted.
        * html/ImageDocument.h:
        (isType):
        (WebCore::isImageDocument): Deleted.
        * html/LabelableElement.h:
        (isType):
        (WebCore::isLabelableElement): Deleted.
        * html/MediaDocument.h:
        (isType):
        (WebCore::isMediaDocument): Deleted.
        * html/PluginDocument.h:
        (isType):
        (WebCore::isPluginDocument): Deleted.
        * html/shadow/InsertionPoint.h:
        (isType):
        (WebCore::isInsertionPoint): Deleted.
        * html/shadow/TextControlInnerElements.h:
        (isType):
        (WebCore::isTextControlInnerTextElement): Deleted.
        * html/track/WebVTTElement.h:
        (isType):
        (WebCore::isWebVTTElement): Deleted.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoader::create):
        (WebCore::ThreadableLoader::loadResourceSynchronously):
        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::removeRequestFromCache):
        (WebCore::MemoryCache::removeRequestFromSessionCaches):
        * mathml/MathMLElement.h:
        (isType):
        (WebCore::isMathMLElement): Deleted.
        * svg/SVGAnimateElementBase.h:
        (isType):
        (WebCore::isSVGAnimateElementBase): Deleted.
        * svg/SVGDocument.h:
        (isType):
        (WebCore::isSVGDocument): Deleted.
        * svg/SVGElement.h:
        (isType):
        (WebCore::isSVGElement): Deleted.
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        (isType):
        (WebCore::isSVGFilterPrimitiveStandardAttributes): Deleted.
        * svg/SVGGradientElement.h:
        (isType):
        (WebCore::isSVGGradientElement): Deleted.
        * svg/SVGGraphicsElement.h:
        (isType):
        (WebCore::isSVGGraphicsElement): Deleted.
        * svg/SVGPolyElement.h:
        (isType):
        (WebCore::isSVGPolyElement): Deleted.
        * svg/SVGTextContentElement.h:
        (isType):
        (WebCore::isSVGTextContentElement): Deleted.
        * svg/animation/SVGSMILElement.h:
        (isType):
        (WebCore::isSVGSMILElement): Deleted.
        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::close):
        * workers/WorkerGlobalScope.h:
        (isType):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
        (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
        (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
        (WebCore::WorkerMessagingProxy::connectToInspector):
        (WebCore::WorkerMessagingProxy::disconnectFromInspector):
        (WebCore::WorkerMessagingProxy::sendMessageToInspector):
        * workers/WorkerScriptLoader.cpp:
        (WebCore::WorkerScriptLoader::loadSynchronously):
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::stop):

2014-09-30  Chris Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for Element
        https://bugs.webkit.org/show_bug.cgi?id=137241

        Reviewed by Andreas Kling.

        Use is<>() / downcast<>() for Element instead of isElementNode() /
        toElement().

        No new tests, no behavior change.

        * accessibility/AXObjectCache.cpp:
        (WebCore::nodeHasRole):
        (WebCore::createFromRenderer):
        (WebCore::AXObjectCache::handleLiveRegionCreated):
        (WebCore::AXObjectCache::handleMenuItemSelected):
        (WebCore::AXObjectCache::rootAXEditableElement):
        (WebCore::isNodeAriaVisible):
        * accessibility/AccessibilityMenuList.cpp:
        (WebCore::AccessibilityMenuList::canSetFocusAttribute):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
        (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
        (WebCore::AccessibilityNodeObject::isEnabled):
        (WebCore::AccessibilityNodeObject::isPressed):
        (WebCore::AccessibilityNodeObject::isHovered):
        (WebCore::AccessibilityNodeObject::anchorElement):
        (WebCore::nativeActionElement):
        (WebCore::AccessibilityNodeObject::actionElement):
        (WebCore::AccessibilityNodeObject::mouseButtonListener):
        (WebCore::AccessibilityNodeObject::titleElementText):
        (WebCore::AccessibilityNodeObject::helpText):
        (WebCore::AccessibilityNodeObject::hierarchicalLevel):
        (WebCore::AccessibilityNodeObject::title):
        (WebCore::AccessibilityNodeObject::text):
        (WebCore::accessibleNameForNode):
        (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::press):
        (WebCore::AccessibilityObject::hasTagName):
        (WebCore::AccessibilityObject::hasAttribute):
        (WebCore::AccessibilityObject::element):
        (WebCore::AccessibilityObject::classList):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::anchorElement):
        (WebCore::AccessibilityRenderObject::helpText):
        (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
        (WebCore::AccessibilityRenderObject::titleUIElement):
        (WebCore::AccessibilityRenderObject::accessKey):
        (WebCore::AccessibilityRenderObject::setElementAttributeValue):
        (WebCore::AccessibilityRenderObject::setFocused):
        (WebCore::AccessibilityRenderObject::setValue):
        (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
        (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
        (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
        (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
        (WebCore::AccessibilityRenderObject::setAccessibleName):
        (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
        * accessibility/AccessibilitySearchFieldButtons.cpp:
        (WebCore::AccessibilitySearchFieldCancelButton::press):
        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleGetAttributes):
        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::isReachableFromDOM):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::styledNode):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::locateCousinList):
        * dom/ContainerNode.cpp:
        (WebCore::destroyRenderTreeIfNeeded):
        (WebCore::ContainerNode::notifyChildRemoved):
        * dom/ContainerNodeAlgorithms.cpp:
        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
        (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
        (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
        (WebCore::assertConnectedSubrameCountIsConsistent):
        * dom/Document.cpp:
        (WebCore::Document::importNode):
        (WebCore::Document::elementFromPoint):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/Element.cpp:
        (WebCore::Element::computeInheritedLanguage):
        * dom/Element.h:
        (WebCore::isElement):
        (WebCore::Node::hasAttributes):
        (WebCore::Node::attributes):
        (WebCore::Node::parentElement):
        * dom/ElementTraversal.h:
        (WebCore::Traversal<Element>::nextTemplate):
        (WebCore::ElementTraversal::previousIncludingPseudo):
        (WebCore::ElementTraversal::nextIncludingPseudo):
        (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
        (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
        * dom/LiveNodeList.cpp:
        (WebCore::LiveNodeList::namedItem):
        * dom/Node.cpp:
        (WebCore::Node::dumpStatistics):
        (WebCore::Node::normalize):
        (WebCore::Node::pseudoAwareFirstChild):
        (WebCore::Node::pseudoAwareLastChild):
        (WebCore::Node::computedStyle):
        (WebCore::Node::parentOrShadowHostElement):
        (WebCore::Node::rootEditableElement):
        (WebCore::Node::isEqualNode):
        (WebCore::Node::isDefaultNamespace):
        (WebCore::Node::lookupNamespacePrefix):
        (WebCore::Node::ancestorElement):
        (WebCore::appendAttributeDesc):
        (WebCore::Node::showNodePathForThis):
        (WebCore::Node::enclosingLinkEventParentOrSelf):
        (WebCore::Node::handleLocalEvents):
        (WebCore::Node::willRespondToMouseMoveEvents):
        (WebCore::Node::willRespondToMouseClickEvents):
        * dom/NodeRenderingTraversal.cpp:
        (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
        * dom/Position.cpp:
        (WebCore::Position::element):
        * dom/Range.cpp:
        (WebCore::Range::getBorderAndTextQuads):
        * dom/ShadowRoot.h:
        (WebCore::Node::shadowRoot):
        * dom/StaticNodeList.cpp:
        (WebCore::StaticNodeList::namedItem):
        * dom/TreeScopeAdopter.cpp:
        (WebCore::TreeScopeAdopter::moveTreeToNewScope):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::dummySpanAncestorForNode):
        (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
        (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
        (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
        (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
        (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
        * editing/BreakBlockquoteCommand.cpp:
        (WebCore::BreakBlockquoteCommand::doApply):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::isRemovableBlock):
        (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
        (WebCore::CompositeEditCommand::moveParagraphs):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
        * editing/Editor.cpp:
        (WebCore::Editor::isSpellCheckingEnabledFor):
        (WebCore::Editor::applyEditingStyleToBodyElement):
        * editing/FormatBlockCommand.cpp:
        (WebCore::isElementForFormatBlock):
        (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
        * editing/FrameSelection.cpp:
        (WebCore::removingNodeRemovesPosition):
        (WebCore::CaretBase::paintCaret):
        (WebCore::FrameSelection::debugRenderer):
        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::outdentParagraph):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
        (WebCore::MarkupAccumulator::appendStartMarkup):
        * editing/MarkupAccumulator.h:
        (WebCore::MarkupAccumulator::appendEndTag):
        * editing/ModifySelectionListLevel.cpp:
        (WebCore::IncreaseSelectionListLevelCommand::doApply):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::isMailPasteAsQuotationNode):
        (WebCore::haveSameTagName):
        (WebCore::handleStyleSpansBeforeInsertion):
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/SpellChecker.cpp:
        (WebCore::SpellChecker::isCheckable):
        * editing/SplitTextNodeContainingElementCommand.cpp:
        (WebCore::SplitTextNodeContainingElementCommand::doApply):
        * editing/TextIterator.cpp:
        (WebCore::isRendererReplacedElement):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverterCaches::propertyValueForNode):
        (HTMLConverterCaches::floatPropertyValueForNode):
        (HTMLConverterCaches::colorPropertyValueForNode):
        (HTMLConverter::aggregatedAttributesForAncestors):
        (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
        (HTMLConverter::_traverseNode):
        (WebCore::editingAttributedStringFromRange):
        * editing/htmlediting.cpp:
        (WebCore::unsplittableElementForPosition):
        (WebCore::enclosingBlock):
        (WebCore::enclosingElementWithTag):
        (WebCore::enclosingTableCell):
        (WebCore::enclosingAnchorElement):
        (WebCore::areIdenticalElements):
        (WebCore::isNonTableCellHTMLBlockElement):
        (WebCore::deprecatedEnclosingBlockFlowElement):
        (WebCore::rendererForCaretPainting):
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::wrapWithNode):
        (WebCore::createMarkupInternal):
        (WebCore::createFragmentFromText):
        * html/HTMLDetailsElement.cpp:
        (WebCore::DetailsSummaryElement::fallbackSummary):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::insertAdjacentElement):
        (WebCore::contextElementForInsertion):
        (WebCore::HTMLElement::directionality):
        * html/HTMLFormControlElement.h:
        (WebCore::isHTMLFormControlElement):
        * html/HTMLMediaElement.h:
        (WebCore::isHTMLMediaElement):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::updateDocNamedItem):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::collectOptionInnerText):
        * html/HTMLSourceElement.cpp:
        (WebCore::HTMLSourceElement::removedFrom):
        * html/HTMLSummaryElement.cpp:
        (WebCore::isClickableControl):
        * html/HTMLTextFormControlElement.h:
        (WebCore::isHTMLTextFormControlElement):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::HTMLConstructionSite::attachLater):
        * html/parser/HTMLElementStack.cpp:
        (WebCore::HTMLElementStack::htmlElement):
        * html/parser/HTMLStackItem.h:
        (WebCore::HTMLStackItem::element):
        * html/shadow/InsertionPoint.h:
        (WebCore::parentElementForDistribution):
        (WebCore::shadowRootOfParentForDistribution):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::markFutureAndPastNodes):
        * inspector/DOMPatchSupport.cpp:
        (WebCore::DOMPatchSupport::innerPatchNode):
        (WebCore::DOMPatchSupport::createDigest):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::elementForId):
        (WebCore::InspectorCSSAgent::buildArrayForRegions):
        (WebCore::InspectorCSSAgent::resetPseudoStates):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::unbind):
        (WebCore::InspectorDOMAgent::assertElement):
        (WebCore::InspectorDOMAgent::setAttributesAsText):
        (WebCore::InspectorDOMAgent::setNodeName):
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
        (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
        * inspector/InspectorNodeFinder.cpp:
        (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
        * inspector/InspectorOverlay.cpp:
        (WebCore::buildObjectForElementInfo):
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyleSheet::inlineStyleSheetText):
        * page/DragController.cpp:
        (WebCore::elementUnderMouse):
        * page/EventHandler.cpp:
        (WebCore::findDropZone):
        (WebCore::EventHandler::updateDragAndDrop):
        (WebCore::EventHandler::updateMouseEventTargetNode):
        * page/FocusController.cpp:
        (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
        (WebCore::isFocusableShadowHost):
        (WebCore::adjustedTabIndex):
        (WebCore::FocusController::findFocusableElementAcrossFocusScope):
        (WebCore::FocusController::findElementWithExactTabIndex):
        (WebCore::nextElementWithGreaterTabIndex):
        (WebCore::previousElementWithLowerTabIndex):
        (WebCore::FocusController::nextFocusableElement):
        (WebCore::FocusController::previousFocusableElement):
        (WebCore::FocusController::advanceFocusDirectionallyInContainer):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeFrame):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::title):
        (WebCore::HitTestResult::innerTextIfTruncated):
        (WebCore::HitTestResult::absoluteImageURL):
        (WebCore::HitTestResult::innerElement):
        (WebCore::HitTestResult::innerNonSharedElement):
        * rendering/RenderDeprecatedFlexibleBox.h:
        * rendering/RenderDetailsMarker.cpp:
        (WebCore::RenderDetailsMarker::isOpen):
        * rendering/RenderElement.h:
        (WebCore::RenderElement::element):
        (WebCore::RenderElement::nonPseudoElement):
        (WebCore::RenderElement::generatingElement):
        * rendering/RenderGrid.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::isRestartedPlugin):
        * rendering/RenderListItem.h:
        * rendering/RenderNamedFlowThread.cpp:
        (WebCore::RenderNamedFlowThread::isChildAllowed):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::addPDFURLRect):
        (WebCore::RenderObject::updateDragState):
        (WebCore::RenderObject::getUncachedPseudoStyle):
        * rendering/RenderRuby.h:
        * rendering/RenderRubyText.h:
        * rendering/RenderTableCaption.h:
        * rendering/RenderTableCol.h:
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::isEnabled):
        (WebCore::RenderTheme::isFocused):
        (WebCore::RenderTheme::isPressed):
        (WebCore::RenderTheme::isSpinUpButtonPartPressed):
        (WebCore::RenderTheme::isReadOnlyControl):
        (WebCore::RenderTheme::isHovered):
        (WebCore::RenderTheme::isSpinUpButtonPartHovered):
        * rendering/RenderThemeGtk.cpp:
        (WebCore::nodeHasClass):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::updatePressedState):
        (WebCore::RenderThemeMac::paintSliderThumb):
        (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        * rendering/TextAutosizer.cpp:
        (WebCore::TextAutosizer::isAutosizingContainer):
        (WebCore::TextAutosizer::containerContainsOneOfTags):
        * rendering/mathml/RenderMathMLBlock.cpp:
        (WebCore::RenderMathMLBlock::isChildAllowed):
        * style/StyleResolveTree.cpp:
        (WebCore::Style::attachChildren):
        (WebCore::Style::attachDistributedChildren):
        (WebCore::Style::detachDistributedChildren):
        (WebCore::Style::detachChildren):
        (WebCore::Style::resolveShadowTree):
        (WebCore::Style::resolveTree):
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::buildPendingResource):
        * xml/XPathFunctions.cpp:
        (WebCore::XPath::FunLang::evaluate):
        * xml/XPathNodeSet.cpp:
        (WebCore::XPath::NodeSet::traversalSort):
        * xml/XPathStep.cpp:
        (WebCore::XPath::nodeMatchesBasicTest):
        (WebCore::XPath::Step::nodesInAxis):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::XMLDocumentParser):
        (WebCore::XMLDocumentParser::endElementNs):

2014-09-30  Brian J. Burg  <burg@cs.washington.edu>

        Web Replay: use static Strings instead of AtomicStrings for replay input type tags
        https://bugs.webkit.org/show_bug.cgi?id=137086

        Reviewed by Joseph Pecoraro.

        This pattern doesn't work when we want to define some inputs in WebKit2,
        since the ReplayInputTypes class is generated from WebCore inputs only.

        Replace tag-checking uses of ReplayInputTypes with InputTraits<T>::type().
        Remove thread-local input types, and switch to using a plain const String instead
        of const AtomicString.

        No new tests, no behavior changed.

        * CMakeLists.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * inspector/InspectorReplayAgent.cpp:
        (WebCore::SerializeInputToJSONFunctor::operator()):
        * platform/ThreadGlobalData.cpp:
        (WebCore::ThreadGlobalData::ThreadGlobalData):
        (WebCore::ThreadGlobalData::destroy):
        * platform/ThreadGlobalData.h:
        (WebCore::ThreadGlobalData::inputTypes): Deleted.
        * replay/AllReplayInputs.h:
        * replay/EventLoopInput.h:
        * replay/EventLoopInputDispatcher.cpp:
        (WebCore::EventLoopInputDispatcher::dispatchInput):
        * replay/MemoizedDOMResult.cpp:
        (WebCore::MemoizedDOMResultBase::type):
        (JSC::InputTraits<MemoizedDOMResultBase>::type):
        * replay/MemoizedDOMResult.h:
        * replay/ReplayInputTypes.cpp: Removed.
        * replay/ReplayInputTypes.h: Removed.
        * replay/ReplayingInputCursor.cpp:
        (WebCore::ReplayingInputCursor::loadInput):
        * replay/SegmentedInputStorage.cpp:
        (WebCore::SegmentedInputStorage::load):
        (WebCore::SegmentedInputStorage::store):
        * replay/SerializationMethods.cpp:
        (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
        (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):

2014-09-30  Eric Carlson  <eric.carlson@apple.com>

        [Mac] MediaPlayerPrivateQTKit should not use FrameView
        https://bugs.webkit.org/show_bug.cgi?id=137119

        Reviewed by Carlos Garcia Campos.

        Remove obsolete QTKit code that would fall back to rendering into an NSView.
        Aside from being dead code, it was only used when accelerated compositing
        was not enabled and tha hasn't been possible for a long time, it required a
        layering violation to get the FrameView.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::currentRenderingMode):
        (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
        (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
        (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
        (WebCore::MediaPlayerPrivateQTKit::hasSetUpVideoRendering):
        (WebCore::MediaPlayerPrivateQTKit::setSize):
        (WebCore::MediaPlayerPrivateQTKit::paint):
        (WebCore::mainThreadSetNeedsDisplay): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): Deleted.
        (-[WebCoreMovieObserver menuForEventDelegate:]): Deleted.
        (-[WebCoreMovieObserver setView:]): Deleted.

2014-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
        https://bugs.webkit.org/show_bug.cgi?id=137193

        Reviewed by Gustavo Noronha Silva.

        Remove GtkPopupMenu from platform.

        * PlatformGTK.cmake:
        * platform/gtk/GtkPopupMenu.cpp: Removed.
        * platform/gtk/GtkPopupMenu.h: Removed.

2014-09-30  Zan Dobersek  <zdobersek@igalia.com>

        Avoid copying the iterated-over items in range-based for-loops in RenderGrid
        https://bugs.webkit.org/show_bug.cgi?id=137246

        Reviewed by Sergio Villar Senin.

        Adjust the range-based for-loops in RenderGrid to avoid the unnecessary copying
        of the items that are being iterated.

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeNormalizedFractionBreadth):
        (WebCore::RenderGrid::insertItemIntoGrid):
        (WebCore::RenderGrid::gridAreaBreadthForChild):

2014-09-29  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Use modern for-loops in RenderGrid
        https://bugs.webkit.org/show_bug.cgi?id=137214

        Reviewed by Darin Adler.

        New code is already using modern range based for loops. We had some
        "old" code pending to be migrated.

        No new tests as there is no change in functionality.

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
        (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
        (WebCore::RenderGrid::computeNormalizedFractionBreadth):
        (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
        (WebCore::RenderGrid::layoutGridItems):

2014-08-01  Sergio Villar Senin  <svillar@igalia.com>

        Caret not shown at the end of line in overtype mode
        https://bugs.webkit.org/show_bug.cgi?id=135508

        Reviewed by Ryosuke Niwa.

        When overtype mode is enabled we usually replace the 'normal'
        blinking caret shown in contenteditable elements by a block cursor
        that covers the next character to be replaced. The exception is the
        end of line where we fallback to the blinking caret even in overtype
        mode (as there is no next character to replace).

        We were not showing anything at the end of lines in overtype mode
        because the detection of the end of line was incorrect and not very
        understandable. Replaced the old code with a proper and clean end of
        line detection mechanism compatible with bidi text.

        Tests: editing/selection/block-cursor-overtype-mode-end-of-line-rtl.html
               editing/selection/block-cursor-overtype-mode-end-of-line.html

        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::updateAppearance):
        * editing/VisibleUnits.cpp:
        (WebCore::isLogicalEndOfLine):
        * editing/VisibleUnits.h:

2014-09-29  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: InjectedScripts should not be profiled or displayed in Timeline
        https://bugs.webkit.org/show_bug.cgi?id=136806

        Reviewed by Timothy Hatcher.

        Instead of creating timeline records for injected scripts, suspend profiling
        of the current page before and after calling injected script functions.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::willCallInjectedScriptFunction):
        (WebCore::InspectorController::didCallInjectedScriptFunction):

2014-09-29  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: InspectorValues should use references for out parameters
        https://bugs.webkit.org/show_bug.cgi?id=137190

        Reviewed by Joseph Pecoraro.

        Clean up some call sites to explicitly check for cast success, and simplify
        some exceptional control flows.

        No new tests, no behavior changed.

        * inspector/CommandLineAPIHost.cpp:
        (WebCore::CommandLineAPIHost::inspectImpl):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::computePseudoClassMask):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::parseColor):
        (WebCore::parseConfigColor):
        (WebCore::parseQuad):
        (WebCore::InspectorDOMAgent::performSearch):
        (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
        (WebCore::InspectorDOMAgent::innerHighlightQuad):
        (WebCore::InspectorDOMAgent::highlightFrame):
        * inspector/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::findStorageArea):
        * inspector/InspectorIndexedDBAgent.cpp: Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
        * inspector/InspectorReplayAgent.cpp:
        (WebCore::InspectorReplayAgent::replayToPosition):
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::willSendRequest):
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyle::styleWithProperties):
        * inspector/InspectorStyleSheet.h:
        (WebCore::InspectorCSSId::InspectorCSSId):
        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::startFromConsole):
        (WebCore::InspectorTimelineAgent::stopFromConsole):
        * inspector/InspectorWorkerAgent.cpp:

2014-09-29  Christophe Dumez  <cdumez@apple.com>

        Use is<>() / downcast<>() for Document
        https://bugs.webkit.org/show_bug.cgi?id=137221

        Reviewed by Andreas Kling.

        Use is<>() / downcast<>() for Document instead of isDocumentNode() /
        toDocument().

        No new tests, no behavior change.

        * Modules/geolocation/Geolocation.cpp:
        (WebCore::Geolocation::document):
        (WebCore::Geolocation::frame):
        (WebCore::Geolocation::page):
        * Modules/indexeddb/IDBFactory.cpp:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::document):
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::RTCPeerConnection):
        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::Notification):
        (WebCore::Notification::show):
        (WebCore::Notification::permission):
        (WebCore::Notification::requestPermission):
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::document):
        * Modules/webaudio/OfflineAudioContext.cpp:
        (WebCore::OfflineAudioContext::create):
        * Modules/webdatabase/DatabaseContext.cpp:
        (WebCore::DatabaseContext::allowDatabaseAccess):
        (WebCore::DatabaseContext::databaseExceededQuota):
        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::create):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::clientHandshakeMessage):
        (WebCore::WebSocketHandshake::clientHandshakeRequest):
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * bindings/js/DOMConstructorWithDocument.h:
        (WebCore::DOMConstructorWithDocument::document):
        * bindings/js/DOMRequestState.h:
        (WebCore::DOMRequestState::DOMRequestState):
        (WebCore::DOMRequestState::clear):
        * bindings/js/JSAudioContextCustom.cpp:
        (WebCore::constructJSAudioContext):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::toJSDOMGlobalObject):
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::initializeJSFunction):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute):
        * bindings/js/ScriptState.cpp:
        (WebCore::frameFromExecState):
        * crypto/SubtleCrypto.cpp:
        (WebCore::SubtleCrypto::document):
        * dom/Comment.cpp:
        (WebCore::Comment::create):
        * dom/ContainerNode.cpp:
        (WebCore::checkAcceptChild):
        * dom/ContainerNodeAlgorithms.cpp:
        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
        * dom/Document.h:
        (WebCore::isDocument):
        * dom/DocumentFragment.cpp:
        (WebCore::DocumentFragment::create):
        * dom/Element.cpp:
        (WebCore::Element::computeInheritedLanguage):
        * dom/EventDispatcher.cpp:
        (WebCore::WindowEventContext::WindowEventContext):
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::fireEventListeners):
        * dom/NamedFlowCollection.cpp:
        (WebCore::NamedFlowCollection::document):
        * dom/Node.cpp:
        (WebCore::Node::isDefaultNamespace):
        (WebCore::Node::lookupPrefix):
        (WebCore::Node::lookupNamespaceURI):
        (WebCore::Node::removedLastRef):
        * dom/Range.cpp:
        (WebCore::Range::create):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::dispatchErrorEvent):
        * dom/Text.cpp:
        (WebCore::Text::create):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::appendStartMarkup):
        * html/HTMLDocument.h:
        (WebCore::isHTMLDocument):
        * html/HTMLNameCollection.h:
        (WebCore::HTMLNameCollection::document):
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::insertedInto):
        * html/ImageDocument.h:
        (WebCore::isImageDocument):
        * html/MediaDocument.h:
        (WebCore::isMediaDocument):
        * html/PluginDocument.h:
        (WebCore::isPluginDocument):
        * html/track/TextTrackCue.h:
        (WebCore::TextTrackCue::ownerDocument):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::initialize):
        * html/track/VTTRegion.h:
        (WebCore::VTTRegion::ownerDocument):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::assertDocument):
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        (WebCore::InspectorDOMAgent::innerParentNode):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::frameForScriptExecutionContext):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
        (WebCore::TextTrackLoader::notifyFinished):
        (WebCore::TextTrackLoader::load):
        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoader::create):
        (WebCore::ThreadableLoader::loadResourceSynchronously):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
        * page/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::reportViolation):
        * page/Crypto.cpp:
        (WebCore::Crypto::document):
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::install):
        (WebCore::DOMTimer::fired):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::focus):
        (WebCore::DOMWindow::close):
        (WebCore::DOMWindow::document):
        (WebCore::DOMWindow::styleMedia):
        (WebCore::DOMWindow::getComputedStyle):
        * page/DragController.cpp:
        (WebCore::DragController::dragExited):
        (WebCore::DragController::dragEnteredOrUpdated):
        * page/EventSource.cpp:
        (WebCore::EventSource::create):
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocusDirectionally):
        * page/History.cpp:
        (WebCore::History::go):
        * page/SpatialNavigation.cpp:
        (WebCore::scrollInDirection):
        (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
        (WebCore::canScrollInDirection):
        (WebCore::nodeRectInAbsoluteCoordinates):
        * svg/SVGDocument.h:
        (WebCore::isSVGDocument):
        * testing/Internals.cpp:
        (WebCore::Internals::contextDocument):
        (WebCore::Internals::frame):
        (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::injectInternalsObject):
        (WebCoreTestSupport::resetInternalsObject):
        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::SharedWorkerProxy::addToWorkerDocuments):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::document):
        (WebCore::XMLHttpRequest::open):

2014-09-29  David Hyatt  <hyatt@apple.com>

        REGRESSION (r168046): Confused column spans when combined with dynamic animations
        https://bugs.webkit.org/show_bug.cgi?id=134048.

        Reviewed by Dean Jackson.

        Added fast/multicol/multicol-fieldset-span-changes.html

        * rendering/RenderMultiColumnFlowThread.cpp:
        (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
        Refactor handling of insertions into the multicolumn flow thread into
        a helper function, processPossibleSpannerDescendant. This makes it easier
        to call the code from more than one place.

        (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
        Modify the nested columns span shifting code to avoid problems. The
        new code suppresses notifications and does the move of the spanner back
        into the original spot *before* removing the placeholder. This ensures that
        the placeholder parent still exists.
        
        The stale placeholder is then removed and destroyed after the spanner has been put back
        into place.

        (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
        (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
        Refactor the removal notifications for spanners into a helper function so that it can
        be called to do cleanup from the code that cleans up stale placeholders on a shift.

        * rendering/RenderMultiColumnFlowThread.h:
        Modified to add the new helpers.

2014-09-29  Christophe Dumez  <cdumez@apple.com>

        Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement
        https://bugs.webkit.org/show_bug.cgi?id=137222

        Reviewed by Ryosuke Niwa.

        Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement instead of
        NODE_TYPE_CASTS() + NodeTypeCastTraits template specialization.

        No new tests, no behavior change.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::accessibilityDescription):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isMathElement):
        * css/CSSDefaultStyleSheets.cpp:
        (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::attributeChanged):
        * mathml/MathMLElement.h:
        (WebCore::isMathMLElement):
        * mathml/MathMLSelectElement.cpp:
        (WebCore::MathMLSelectElement::getSelectedSemanticsChild):

2014-09-29  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Remove MediaPlayerPrivateQTKit frame rate code
        https://bugs.webkit.org/show_bug.cgi?id=137217

        Reviewed by Carlos Garcia Campos.

        No new tests, this removes obsolete code.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
        (WebCore::MediaPlayerPrivateQTKit::play):
        (WebCore::MediaPlayerPrivateQTKit::pause):
        (WebCore::MediaPlayerPrivateQTKit::didEnd):
        (WebCore::MediaPlayerPrivateQTKit::repaint):
        (WebCore::MediaPlayerPrivateQTKit::paint):

2014-09-29  Chris Fleizach  <cfleizach@apple.com>

        AX: in an aria-labelledby computation, do not traverse into elements whose nameFrom value does not include 'contents'
        https://bugs.webkit.org/show_bug.cgi?id=136714

        Reviewed by Darin Adler.

        There are certain ARIA elements that tell us we should not query their children when determining the name of the object.
        Those ones have the "nameFrom" property set to "author" instead of "contents." WebKit needs to honor that status.

        Test: accessibility/aria-namefrom-author.html
              Modified: accessibility/aria-labelledby-with-descendants.html

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::shouldUseAccessiblityObjectInnerText):
        (WebCore::shouldAddSpaceBeforeAppendingNextElement):
        (WebCore::appendNameToStringBuilder):
        (WebCore::AccessibilityNodeObject::textUnderElement):
        (WebCore::accessibleNameForNode):
        (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
        (WebCore::initializeRoleMap):
        * accessibility/AccessibilityObject.h:

2014-09-29  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Optimize media controls AirPlay discovery
        https://bugs.webkit.org/show_bug.cgi?id=137180

        Reviewed by Darin Adler.
        
        AirPlay discovery mode uses increases power consumption, so don't enable it when there
        is no chance an AirPlay target picker will be useful.

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS): Initialize isListeningForPlaybackTargetAvailabilityEvent.
        (ControllerIOS.prototype.addVideoListeners): Don't enable register wireless playback event
            listeners, it isn't possible to show the target picker until there is an inline controller.
        (ControllerIOS.prototype.removeVideoListeners): Call setShouldListenForPlaybackTargetAvailabilityEvent.
        (ControllerIOS.prototype.setControlsType): Add wireless event listers on when not showing 
            the one button controller.
        (ControllerIOS.prototype.updateStatusDisplay): Unregister wireless event listeners when the
            media element is in an error state.
        (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): New, add or
            remove event listeners. 

2014-09-29  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Remove obsolete playbackTargetAvailabilityChanged methods
        https://bugs.webkit.org/show_bug.cgi?id=137179

        Reviewed by Darin Adler.

        No new tests, this just removes unused code.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.
        * html/HTMLMediaElement.h:

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::playbackTargetAvailabilityChanged): Deleted.
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.

2014-09-29  Christophe Dumez  <cdumez@apple.com>

        Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
        https://bugs.webkit.org/show_bug.cgi?id=137199

        Reviewed by Darin Adler.

        Use the new is<>() / downcast<>() for ShadowRoot and StyledElement and
        move towards getting rid of the NODE_TYPE_CASTS() macro.

        No new tests, no behavior change.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchAllRules):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::State::initElement):
        (WebCore::StyleResolver::State::initForStyleResolve):
        (WebCore::StyleResolver::locateCousinList):
        (WebCore::StyleResolver::findSiblingForStyleSharing):
        * dom/Attr.cpp:
        (WebCore::Attr::style):
        * dom/Element.cpp:
        (WebCore::Element::removeAttribute):
        * dom/EventDispatcher.cpp:
        (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
        (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
        (WebCore::eventTargetRespectingTargetRules):
        (WebCore::EventPath::EventPath):
        * dom/Node.cpp:
        (WebCore::Node::containingShadowRoot):
        (WebCore::Node::parentOrShadowHostElement):
        (WebCore::Node::showNodePathForThis):
        * dom/NodeRenderingTraversal.cpp:
        (WebCore::NodeRenderingTraversal::traverseParent):
        * dom/ShadowRoot.h:
        (WebCore::isShadowRoot):
        (WebCore::Node::shadowRoot):
        (WebCore::Node::parentOrShadowHostNode):
        * dom/StyledElement.h:
        (WebCore::StyledElement::presentationAttributeStyle):
        (WebCore::isStyledElement):
        * dom/Text.cpp:
        (WebCore::isSVGShadowText):
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::focusedElement):
        * dom/TreeScopeAdopter.cpp:
        (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
        (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::wrappingStyleForSerialization):
        * editing/Editor.cpp:
        (WebCore::Editor::applyEditingStyleToElement):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverterCaches::inlineStylePropertyForElement):
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::appendElement):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
        * inspector/InspectorOverlay.cpp:
        (WebCore::buildObjectForElementInfo):
        * page/DragController.cpp:
        (WebCore::asFileInput):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        * page/FocusController.cpp:
        (WebCore::FocusNavigationScope::owner):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeFrame):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::resize):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::title):
        * testing/Internals.cpp:
        (WebCore::Internals::shadowRoot):
        (WebCore::Internals::shadowRootType):
        (WebCore::Internals::includerFor):

2014-09-29  Christophe Dumez  <cdumez@apple.com>

        Use the new is<>() / downcast<>() for Text Nodes
        https://bugs.webkit.org/show_bug.cgi?id=137188

        Reviewed by Darin Adler.

        Use the new is<>() / downcast<>() functions for Text Nodes instead of
        isText() / toText().

        No new tests, no behavior change.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::textUnderElement):
        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * dom/CharacterData.cpp:
        (WebCore::CharacterData::parserAppendData):
        (WebCore::CharacterData::setDataAndUpdate):
        * dom/ContainerNode.cpp:
        (WebCore::destroyRenderTreeIfNeeded):
        * dom/Node.cpp:
        (WebCore::Node::normalize):
        * dom/Position.cpp:
        (WebCore::Position::containerNode):
        (WebCore::Position::containerText):
        (WebCore::Position::isRenderedCharacter):
        (WebCore::Position::leadingWhitespacePosition):
        * dom/Range.cpp:
        (WebCore::Range::insertNode):
        (WebCore::Range::getBorderAndTextQuads):
        * dom/Text.cpp:
        (WebCore::earliestLogicallyAdjacentTextNode):
        (WebCore::latestLogicallyAdjacentTextNode):
        * dom/Text.h:
        (WebCore::isText):
        * dom/TextNodeTraversal.cpp:
        (WebCore::TextNodeTraversal::contentsAsString):
        * dom/TextNodeTraversal.h:
        (WebCore::TextNodeTraversal::firstTextChildTemplate):
        (WebCore::TextNodeTraversal::firstTextWithinTemplate):
        (WebCore::TextNodeTraversal::traverseNextTextTemplate):
        (WebCore::TextNodeTraversal::nextSibling):
        * editing/ApplyBlockElementCommand.cpp:
        (WebCore::isNewLineAtPosition):
        (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::splitTextAtEnd):
        (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
        (WebCore::ApplyStyleCommand::joinChildTextNodes):
        * editing/BreakBlockquoteCommand.cpp:
        (WebCore::BreakBlockquoteCommand::doApply):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::insertNodeAt):
        (WebCore::CompositeEditCommand::positionOutsideTabSpan):
        (WebCore::CompositeEditCommand::canRebalance):
        (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
        (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
        (WebCore::CompositeEditCommand::deleteInsignificantText):
        (WebCore::CompositeEditCommand::removePlaceholderAt):
        (WebCore::CompositeEditCommand::cleanupAfterDeletion):
        (WebCore::CompositeEditCommand::moveParagraphs):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        (WebCore::DeleteSelectionCommand::fixupWhitespace):
        (WebCore::DeleteSelectionCommand::doApply):
        * editing/Editor.cpp:
        (WebCore::Editor::setComposition):
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::insertTab):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::appendStartMarkup):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
        (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
        (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
        (WebCore::ReplaceSelectionCommand::insertAsListItems):
        (WebCore::ReplaceSelectionCommand::performTrivialReplace):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::handleTextBox):
        (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
        * editing/VisibleUnits.cpp:
        (WebCore::startPositionForLine):
        (WebCore::endPositionForLine):
        (WebCore::startOfParagraph):
        (WebCore::endOfParagraph):
        * editing/htmlediting.cpp:
        (WebCore::lineBreakExistsAtPosition):
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::renderedText):
        (WebCore::replaceChildrenWithFragment):
        (WebCore::replaceChildrenWithText):
        * html/HTMLElement.cpp:
        (WebCore::mergeWithNextTextNode):
        (WebCore::HTMLElement::setOuterHTML):
        (WebCore::HTMLElement::setOuterText):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::hasFallbackContent):
        (WebCore::HTMLObjectElement::updateDocNamedItem):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::setText):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::setText):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::innerTextValue):
        (WebCore::positionForIndex):
        (WebCore::HTMLTextFormControlElement::indexForPosition):
        (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
        * html/HTMLTitleElement.cpp:
        (WebCore::HTMLTitleElement::setText):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::HTMLConstructionSite::insertTextNode):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::setNodeValue):
        * rendering/RenderCombineText.h:
        * rendering/RenderNamedFlowThread.cpp:
        (WebCore::RenderNamedFlowThread::getRanges):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::textNode):
        * rendering/svg/RenderSVGInlineText.h:
        * style/StyleResolveTree.cpp:
        (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
        (WebCore::Style::attachChildren):
        (WebCore::Style::attachDistributedChildren):
        (WebCore::Style::detachDistributedChildren):
        (WebCore::Style::detachChildren):
        (WebCore::Style::resolveShadowTree):
        (WebCore::Style::resolveTree):

2014-09-29  Christophe Dumez  <cdumez@apple.com>

        Remove remaining uses of NODE_TYPE_CASTS() from html/
        https://bugs.webkit.org/show_bug.cgi?id=137172

        Reviewed by Darin Adler.

        Remove remaining uses of NODE_TYPE_CASTS() from html/ and use the new
        SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
        works for those types.

        No new tests, no behavior change.

        * css/SelectorCheckerTestFunctions.h:
        (WebCore::matchesLangPseudoClass):
        (WebCore::matchesFutureCuePseudoClass):
        (WebCore::matchesPastCuePseudoClass):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::canShareStyleWithElement):
        The new casting function found a bad cast from a StyledElement to VTTElement.
        Those two types are unrelated as VTTElement inherits directly from Element.
        Knowing that |element| in this method cannot be a VTTElement simplifies the
        logic a bit.

        * dom/NodeRenderingTraversal.cpp:
        (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints):
        (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints):
        (WebCore::NodeRenderingTraversal::traverseParent):
        * html/HTMLLabelElement.cpp:
        (WebCore::nodeAsSupportedLabelableElement):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::innerTextElement):
        * html/LabelableElement.h:
        (WebCore::isLabelableElement):
        * html/shadow/ContentDistributor.cpp:
        (WebCore::ContentDistributor::ensureInsertionPointList):
        * html/shadow/InsertionPoint.h:
        (WebCore::isInsertionPoint):
        (WebCore::isActiveInsertionPoint):
        (WebCore::parentNodeForDistribution):
        * html/shadow/TextControlInnerElements.h:
        (WebCore::isTextControlInnerTextElement):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
        (WebCore::VTTCue::markFutureAndPastNodes):
        * html/track/WebVTTElement.h:
        (WebCore::isWebVTTElement):
        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
        * style/StyleResolveTree.cpp:
        (WebCore::Style::attachRenderTree):
        (WebCore::Style::detachChildren):

2014-09-29  Christophe Dumez  <cdumez@apple.com>

        Make is<>() / downcast<>() work for HTMLDocument and its subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137169

        Reviewed by Darin Adler.

        Make is<>() / downcast<>() work for HTMLDocument and its subclasses by
        using the SPECIALIZE_TYPE_TRAITS_*() macro. Drop the DOCUMENT_TYPE_CASTS()
        macro as it is no longer needed.

        No new tests, no behavior change.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::namedItemGetter):
        (WebCore::JSDOMWindow::getOwnPropertySlot):
        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
        * dom/Document.cpp:
        (WebCore::Document::prepareForDestruction):
        (WebCore::Document::processHttpEquiv):
        (WebCore::eventTargetElementForDocument):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::Element::insertedInto):
        (WebCore::Element::removedFrom):
        (WebCore::Element::updateName):
        (WebCore::Element::updateId):
        * html/HTMLDocument.h:
        (WebCore::isHTMLDocument):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::matchesReadWritePseudoClass):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::updateWidget):
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseAttribute):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::updateDocNamedItem):
        * html/ImageDocument.cpp:
        (WebCore::ImageDocumentParser::document):
        * html/ImageDocument.h:
        (WebCore::isImageDocument):
        * html/MediaDocument.h:
        (WebCore::isMediaDocument):
        * html/PluginDocument.cpp:
        (WebCore::PluginDocumentParser::createDocumentStructure):
        * html/PluginDocument.h:
        (WebCore::isPluginDocument):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::loadPlugin):
        * page/DragController.cpp:
        (WebCore::DragController::operationForLoad):
        * page/FrameView.cpp:
        (WebCore::determineLayerFlushThrottleState):

2014-09-29  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>

        Revert "Support for :enabled selector on Anchor & Area elements"
        https://bugs.webkit.org/show_bug.cgi?id=134826

        Reviewed by Darin Adler.

        HTML spec has been modified [1] to disable support for :enabled CSS
        selector on Anchor, Area & Link elements, after discussion on W3C
        Bugzilla [2].

        This reverts r171671.

        [1] https://html5.org/r/8818
        [2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26622

        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isEnabled):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::parseAttribute):

2014-09-29  Darin Adler  <darin@apple.com>

        Tweak and tighten SVG font converter
        https://bugs.webkit.org/show_bug.cgi?id=136956

        Reviewed by Myles Maxfield.

        * svg/SVGToOTFFontConversion.cpp: Fixed copyright date.
        (WebCore::overwrite32): Changed to use normal subscripting for clarity.
        (WebCore::overwrite16): Added.
        (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Added a move
        to make constructing each GlyphData less expensive.
        (WebCore::SVGToOTFFontConverter::KerningData): Removed the < operator
        since it the struct contains more than what we want to sort it by, so it's
        not elegant to build the sorting rule into the struct.
        (WebCore::SVGToOTFFontConverter): Removed "k" prefix from some constants.
        Replaced many function templates with non-template functions. Changed
        key type for m_codepointToIndexMap to UChar32.
        (WebCore::integralLog2): Tweaked formatting.
        (WebCore::SVGToOTFFontConverter::appendCMAPTable): Removed a stray
        cast that doesn't have any effect. Use the Glyph type to index m_glyphs.
        (WebCore::SVGToOTFFontConverter::appendHEADTable): Append the magic
        number in a more straightforward way.
        (WebCore::clampTo): Tweak formatting of the template function.
        (WebCore::SVGToOTFFontConverter::appendHHEATable): Made some minor
        style changes and improved some comments.
        (WebCore::SVGToOTFFontConverter::appendOS2Table): Made some minor
        style changes and tightened up code that did parsing a bit, removing the
        dynamically allocated array for the fixed length Panose number.
        Also use first and last instead of hand-coded versions of those.
        (WebCore::appendValidCFFString): Renamed.
        (WebCore::SVGToOTFFontConverter::appendCFFTable): Made various tweaks,
        including more specific of null for the "no weight" value instead of
        either empty or null.
        (WebCore::SVGToOTFFontConverter::appendVORGTable): Simplified some of
        the numeric parsing, since toInt is guaranteed to return 0 when it also
        would return "false" for ok. Also got rid of a local vector and instead
        just fixed up the size of the table afterward.
        (WebCore::SVGToOTFFontConverter::appendVHEATable): Tweaked comment.
        (WebCore::SVGToOTFFontConverter::addCodepointRanges): Use isValidKey
        instead of a local hardcoded rule to check hash table key validity.
        Check for zero in the result of get rather than using find on the HashMap.
        (WebCore::SVGToOTFFontConverter::addCodepointRanges): Ditto.
        (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
        (WebCore::SVGToOTFFontConverter::addKerningPair): Added. Factored out from
        appendKERNSubtable to reduce template bloat and improve clarity.
        (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Tweaked formatting.
        Moved the bulk of the function into non-template function.
        (WebCore::SVGToOTFFontConverter::finishAppendingKERNSubtable): Added.
        Non-template part of appendKERNSubtable. Also changed std::sort to supply
        custom comparison function rather than trying to use the < operator directly
        on KerningData.
        (WebCore::writeCFFEncodedNumber): Don't use powf just to multiply by
        2^16. It's pretty easy to do that with plain old multiplication.
        (WebCore::CFFBuilder::CFFBuilder): Renamed m_firstPoint to
        m_hasBoundingBox.
        (WebCore::CFFBuilder::boundingBox): Made this public and const and made
        the rest of the class private.
        (WebCore::CFFBuilder::updateBoundingBox): Used early return and revised
        to use m_hasBoundingBox.
        (WebCore::CFFBuilder::writePoint): Added. Used to keep the other
        functions below smaller.
        (WebCore::CFFBuilder::moveTo): Marked virtual and simplified using writePoint.
        Might find a way to simplify even further by teaching writePoint about
        the PathCoordinateMode.
        (WebCore::CFFBuilder::lineTo): Ditto.
        (WebCore::CFFBuilder::curveToCubic): Ditto. Also removed comment that said
        the function could be faster. Not sure that's important to state like this.
        (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths): Changed into a
        non-template function. Tweaked logic and formatting a bit.
        (WebCore::SVGToOTFFontConverter::processGlyphElement): Changed into a
        non-template function. Moved the code from appendGlyphData in here.
        Use WTF::move so we don't copy the glyph paths when creating a GlyphData.
        (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Updated a bit for
        function changes above. Changed code to use isValidKey to check if we can
        add to m_codepointToIndexMap. Parse font-style rather than parsing
        font-weight twice. Round weights instead of truncating them. Change rule
        to "first wins" instead of "last wins" when there are multiple segments.
        Removed one vague and non-helpful comment.
        (WebCore::isFourByteAligned): Fixed minor formatting issue by making the
        function non-abstract. No reason not to hard-code the number 3 when the
        number four appears in the function name.
        (WebCore::calculateChecksum): Removed unneeded comment about why the
        checksum is little-endian; since this came from Windows documentation there
        is no doubt that little-endian is correct, so we don't need a comment creating
        fear, uncertainty, and doubt. If the checksum computation is wrong, it should
        become obvious that we have a bad checksum. Also changed the for loop to use
        its own loop variable instead of changing startingOffset, which is not logical.
        (WebCore::SVGToOTFFontConverter::appendTable): Updated for name changes.
        (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto. Also streamlined
        the checksum code a little. The comment still is a little peculiar; I was
        tempted to take it out.

2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove MainFrameScrollbarGtk.cpp
        https://bugs.webkit.org/show_bug.cgi?id=137211

        Reviewed by Philippe Normand.

        This was only used by WebKit1.

        * PlatformGTK.cmake:
        * platform/gtk/MainFrameScrollbarGtk.cpp: Removed.
        * platform/gtk/MainFrameScrollbarGtk.h: Removed.

2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove IntPointGtk.cpp and IntRectGtk.cpp
        https://bugs.webkit.org/show_bug.cgi?id=137209

        Reviewed by Philippe Normand.

        IntPointGtk is unused and IntRectGtk is only required by GTK+2 and
        only used when building with GTK+2 in GtkInputMethodFilter.cpp
        that can be easily replaced.

        * PlatformGTK.cmake:
        * platform/graphics/IntPoint.h:
        * platform/graphics/IntRect.h:
        * platform/graphics/gtk/IntPointGtk.cpp: Removed.
        * platform/graphics/gtk/IntRectGtk.cpp: Removed.
        * platform/gtk/GtkInputMethodFilter.cpp:
        (WebCore::GtkInputMethodFilter::setCursorRect):

2014-09-02  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Handle percentages of indefinite sizes in minmax() and grid-auto-*
        https://bugs.webkit.org/show_bug.cgi?id=136453

        Reviewed by Darin Adler.

        After r165048 percentages of indefinite sizes were correctly
        computed to "auto". The problem is that we were not doing it when
        the percentage was inside the minmax() function. In those cases it
        should compute to min-content for the min track sizing function or
        to max-content for the max track sizing function.

        We were not doing it also for the track sizes specified in
        grid-auto-{column|row} properties. Fixed as well as the code is
        the same.

        Tests: fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
               fast/css-grid-layout/percent-of-indefinite-track-size-in-minmax-crash.html
               fast/css-grid-layout/percent-of-indefinite-track-size.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::gridTrackSize):
        * rendering/RenderGrid.h:
        * rendering/style/GridLength.h:
        (WebCore::GridLength::isPercentage):
        * rendering/style/GridTrackSize.h:
        (WebCore::GridTrackSize::GridTrackSize):

2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Move sources not using GTK+ from WebCorePlatformGTK_SOURCES to WebCore_SOURCES.

        * PlatformGTK.cmake:

2014-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Use std::unique_ptr instead of PassOwnPtr|OwnPtr for NamedNodeMap
        https://bugs.webkit.org/show_bug.cgi?id=137201

        Reviewed by Darin Adler.

        No new tests, just refactoring patch.

        * dom/ElementRareData.h: Use std::unique_ptr instead of OwnPtr.
        (WebCore::ElementRareData::setAttributeMap): Use std::unique_ptr. 
        * dom/NamedNodeMap.h:
        (WebCore::NamedNodeMap::create): ditto.

2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>

        Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
        https://bugs.webkit.org/show_bug.cgi?id=137197

        Reviewed by Alexey Proskuryakov.

        No new tests because there is no behavior change.

        * WebCore.exp.in:
        * WebCore.order:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
        (WebCore::GlyphPage::fill): Use SPI call instead of WKSI call
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        * platform/spi/cocoa/CGFontUnicodeSupport.h: Added for SPI call.

2014-09-28  Christophe Dumez  <cdumez@apple.com>

        Automatically generate template specializations for most Elements
        https://bugs.webkit.org/show_bug.cgi?id=137174

        Reviewed by Darin Adler.

        Previously, the template specializations to make is<>() / downcast<>()
        work for HTML/SVG/MathML elements were only generated if
        "generateTypeHelpers" parameter was explicitly specified for the
        corresponding tag name in the *Tags.in file.

        We are however able to generate the template specializations for most
        types so this patch drops the "generateTypeHelpers" parameter and
        generates those template specializations by default.

        One case we cannot generate the specialization ifor is when a class is
        associated to several tag names but this patch updates the
        make_names.pl script to detect this and skip those classes.

        No new tests, no behavior change.

        * CMakeLists.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/make_names.pl:
        (defaultTagPropertyHash):
        (printTypeHelpers):
        * html/HTMLTagNames.in:
        * mathml/mathtags.in:
        * svg/SVGAllInOne.cpp:
        * svg/SVGAnimateColorElement.cpp:
        (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
        (WebCore::SVGAnimateColorElement::determinePropertyValueTypes):
        * svg/SVGAnimateColorElement.h:
        * svg/SVGAnimateElement.cpp:
        (WebCore::SVGAnimateElement::SVGAnimateElement):
        (WebCore::SVGAnimateElement::~SVGAnimateElement): Deleted.
        (WebCore::SVGAnimateElement::hasValidAttributeType): Deleted.
        (WebCore::SVGAnimateElement::determineAnimatedPropertyType): Deleted.
        (WebCore::SVGAnimateElement::calculateAnimatedValue): Deleted.
        (WebCore::SVGAnimateElement::calculateToAtEndOfDurationValue): Deleted.
        (WebCore::SVGAnimateElement::calculateFromAndToValues): Deleted.
        (WebCore::SVGAnimateElement::calculateFromAndByValues): Deleted.
        (WebCore::propertyTypesAreConsistent): Deleted.
        (WebCore::SVGAnimateElement::resetAnimatedType): Deleted.
        (WebCore::applyCSSPropertyToTarget): Deleted.
        (WebCore::removeCSSPropertyFromTarget): Deleted.
        (WebCore::applyCSSPropertyToTargetAndInstances): Deleted.
        (WebCore::removeCSSPropertyFromTargetAndInstances): Deleted.
        (WebCore::notifyTargetAboutAnimValChange): Deleted.
        (WebCore::notifyTargetAndInstancesAboutAnimValChange): Deleted.
        (WebCore::SVGAnimateElement::clearAnimatedType): Deleted.
        (WebCore::SVGAnimateElement::applyResultsToTarget): Deleted.
        (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition): Deleted.
        (WebCore::SVGAnimateElement::isAdditive): Deleted.
        (WebCore::SVGAnimateElement::calculateDistance): Deleted.
        (WebCore::SVGAnimateElement::setTargetElement): Deleted.
        (WebCore::SVGAnimateElement::setAttributeName): Deleted.
        (WebCore::SVGAnimateElement::resetAnimatedPropertyType): Deleted.
        (WebCore::SVGAnimateElement::ensureAnimator): Deleted.
        * svg/SVGAnimateElement.h:
        (WebCore::isSVGAnimateElement): Deleted.
        * svg/SVGAnimateElementBase.cpp: Copied from Source/WebCore/svg/SVGAnimateElement.cpp.
        (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
        (WebCore::SVGAnimateElementBase::~SVGAnimateElementBase):
        (WebCore::SVGAnimateElementBase::hasValidAttributeType):
        (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType):
        (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
        (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
        (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
        (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
        (WebCore::propertyTypesAreConsistent):
        (WebCore::SVGAnimateElementBase::resetAnimatedType):
        (WebCore::applyCSSPropertyToTarget):
        (WebCore::removeCSSPropertyFromTarget):
        (WebCore::applyCSSPropertyToTargetAndInstances):
        (WebCore::removeCSSPropertyFromTargetAndInstances):
        (WebCore::notifyTargetAboutAnimValChange):
        (WebCore::notifyTargetAndInstancesAboutAnimValChange):
        (WebCore::SVGAnimateElementBase::clearAnimatedType):
        (WebCore::SVGAnimateElementBase::applyResultsToTarget):
        (WebCore::SVGAnimateElementBase::animatedPropertyTypeSupportsAddition):
        (WebCore::SVGAnimateElementBase::isAdditive):
        (WebCore::SVGAnimateElementBase::calculateDistance):
        (WebCore::SVGAnimateElementBase::setTargetElement):
        (WebCore::SVGAnimateElementBase::setAttributeName):
        (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType):
        (WebCore::SVGAnimateElementBase::ensureAnimator):
        * svg/SVGAnimateElementBase.h: Copied from Source/WebCore/svg/SVGAnimateElement.h.
        (WebCore::isSVGAnimateElementBase):
        * svg/SVGAnimateTransformElement.cpp:
        (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
        (WebCore::SVGAnimateTransformElement::parseAttribute):
        * svg/SVGAnimateTransformElement.h:
        * svg/SVGAnimatedAngle.cpp:
        * svg/SVGAnimatedBoolean.cpp:
        * svg/SVGAnimatedColor.cpp:
        * svg/SVGAnimatedInteger.cpp:
        * svg/SVGAnimatedIntegerOptionalInteger.cpp:
        * svg/SVGAnimatedLength.cpp:
        * svg/SVGAnimatedLengthList.cpp:
        * svg/SVGAnimatedNumber.cpp:
        * svg/SVGAnimatedNumberList.cpp:
        * svg/SVGAnimatedNumberOptionalNumber.cpp:
        * svg/SVGAnimatedPath.cpp:
        * svg/SVGAnimatedPointList.cpp:
        * svg/SVGAnimatedPreserveAspectRatio.cpp:
        * svg/SVGAnimatedRect.cpp:
        * svg/SVGAnimatedString.cpp:
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
        * svg/SVGSetElement.cpp:
        (WebCore::SVGSetElement::SVGSetElement):
        * svg/SVGSetElement.h:
        * svg/svgtags.in:

2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Use std::unique_ptr for ContextMenuController
        https://bugs.webkit.org/show_bug.cgi?id=137178

        Reviewed by Darin Adler.

        Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
        for ContextMenuController class. Inherited class is changed by this use as well.

        No new tests, no behavior changes.

        * loader/EmptyClients.cpp:
        (WebCore::EmptyContextMenuClient::customizeMenu):
        * loader/EmptyClients.h:
        * page/ContextMenuClient.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::clearContextMenu):
        (WebCore::ContextMenuController::maybeCreateContextMenu):
        (WebCore::ContextMenuController::showContextMenu):
        * page/ContextMenuController.h:

2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Move ColorInputType class to std::unique_ptr
        https://bugs.webkit.org/show_bug.cgi?id=137173

        Reviewed by Darin Adler.

        Replace uses of PassOwnPtr in code under ColorInputType class with std::unique_ptr.
        Child classes follow this change as well.

        No new tests, no behavior changes.

        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::didEndChooser):
        * html/ColorInputType.h:
        * loader/EmptyClients.cpp:
        (WebCore::EmptyChromeClient::createColorChooser):
        * loader/EmptyClients.h:
        * page/Chrome.cpp:
        (WebCore::Chrome::createColorChooser):
        * page/Chrome.h:
        * page/ChromeClient.h:

2014-09-28  Sungmann Cho  <sungmann.cho@navercorp.com>

        Fix some minor typos: psuedo -> pseudo
        https://bugs.webkit.org/show_bug.cgi?id=137192

        Reviewed by Alexey Proskuryakov.

        No new tests, no behavior change.

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::specificityForOneSelector):

2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Move RenderThemeGtk.h from platform/gtk to rendering.

        I forgot to move this file in r173111.

        * rendering/RenderThemeGtk.h: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.h.

2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ATK] WebKitAccessibleWrapperAtk should not depend on GTK
        https://bugs.webkit.org/show_bug.cgi?id=137177

        Reviewed by Martin Robinson.

        It's used to get the web view widget, but there's no GtkWidget in
        the web process and platformPageClient is always NULL.

        * PlatformGTK.cmake: Move accessibility sources to the WebCore
        sources list.
        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (atkParentOfRootObject): Remove code to get view GtkWidget.
        * editing/atk/FrameSelectionAtk.cpp: Remove unneeded header include.

2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove unused GtkPluginWidget
        https://bugs.webkit.org/show_bug.cgi?id=137176

        Reviewed by Csaba Osztrogonác.

        It was only used by WebKit1.

        * PlatformGTK.cmake:
        * platform/gtk/GtkPluginWidget.cpp: Removed.
        * platform/gtk/GtkPluginWidget.h: Removed.

2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [cairo] GraphicsContext should not depend on GTK+
        https://bugs.webkit.org/show_bug.cgi?id=137175

        Reviewed by Martin Robinson.

        Remove the unused methods depending on GDK and simplify
        GraphicsContext::drawFocusRing() using only cairo API.

        * PlatformGTK.cmake: Move GraphicsContextCairo.cpp to the webcore sources.
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::drawFocusRing): Iterate the rectangles
        instead of creating a region for the rectangles and call gdk_cairo_region().
        (WebCore::GraphicsContext::setGdkExposeEvent): Deleted.
        (WebCore::GraphicsContext::gdkExposeEvent): Deleted.
        (WebCore::GraphicsContext::gdkWindow): Deleted.
        * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):

2014-09-27  Chris Dumez  <cdumez@apple.com>

        HTMLPlugInElement::isUserObservable() is causing layout
        https://bugs.webkit.org/show_bug.cgi?id=137156

        Reviewed by Ryosuke Niwa.

        While profiling the page load of nytimes.com, I noticed that we were
        spending ~4-5% of cpu time in HTMLPlugInElement::isUserObservable().
        The reason is that the function calls pluginWidget(), which causes a
        layout update in HTMLObjectElement::renderWidgetForJSBindings(), to
        make sure the plugin is loaded and its renderer is created.

        HTMLPlugInElement::isUserObservable() shouldn't need to do a layout.
        This patch does the following to address the problem:
        - Rename renderWidgetForJSBindings() to renderWidgetLoadingPlugin()
          because this function is not always called from the JS Bindings
          nowadays. The new name makes it clearer that this will load the
          plugin if needed (to make sure the renderer is created, and by
          doing a layout).
        - Add a PluginLoadingPolicy argument to
          HTMLPlugInElement::pluginWidget() to let the caller control if the
          plugin should be loaded or not.
        - Update the call to pluginWidget() in isUserObservable() so that
          we do not attempt to load the plugin (thus not causing a layout).

        No new tests, no behavior change.

        * WebCore.exp.in:
        * WebCore.order:
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::renderWidgetLoadingPlugin):
        (WebCore::HTMLAppletElement::renderWidgetForJSBindings): Deleted.
        * html/HTMLAppletElement.h:
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
        (WebCore::HTMLEmbedElement::renderWidgetForJSBindings): Deleted.
        * html/HTMLEmbedElement.h:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::renderWidgetLoadingPlugin):
        (WebCore::HTMLObjectElement::renderWidgetForJSBindings): Deleted.
        * html/HTMLObjectElement.h:
        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::pluginWidget):
        (WebCore::HTMLPlugInElement::isUserObservable):
        * html/HTMLPlugInElement.h:

2014-09-27  Christophe Dumez  <cdumez@apple.com>

        Use the new is<>() / downcast<>() for more Node subclasses
        https://bugs.webkit.org/show_bug.cgi?id=137184

        Reviewed by Ryosuke Niwa.

        Use the new is<>() / downcast<>() for more Node subclasses:
        CDATASection, CharacterData, Comment, DocumentType,
        ProcessingInstruction, and PseudoElement.

        No new tests, no behavior change.

        * dom/CDATASection.h:
        (WebCore::isCDATASection):
        * dom/CharacterData.cpp:
        (WebCore::CharacterData::setDataAndUpdate):
        * dom/CharacterData.h:
        (WebCore::isCharacterData):
        * dom/Comment.h:
        (WebCore::isComment):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/DocumentType.h:
        (WebCore::isDocumentType):
        * dom/EventDispatcher.cpp:
        (WebCore::eventTargetRespectingTargetRules):
        (WebCore::nodeOrHostIfPseudoElement):
        * dom/Node.cpp:
        (WebCore::markAncestorsWithChildNeedsStyleRecalc):
        (WebCore::Node::pseudoAwarePreviousSibling):
        (WebCore::Node::pseudoAwareNextSibling):
        * dom/NodeTraversal.cpp:
        (WebCore::NodeTraversal::previousIncludingPseudo):
        (WebCore::NodeTraversal::nextIncludingPseudo):
        (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
        * dom/ProcessingInstruction.h:
        (WebCore::isProcessingInstruction):
        * dom/PseudoElement.h:
        (WebCore::isPseudoElement):
        * dom/Range.cpp:
        (WebCore::lengthOfContentsInNode):
        (WebCore::Range::processContentsBetweenOffsets):
        (WebCore::Range::checkNodeWOffset):
        * editing/Editor.cpp:
        (WebCore::Editor::shouldInsertFragment):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::appendStartMarkup):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::_traverseNode):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        * inspector/InspectorLayerTreeAgent.cpp:
        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::setInnerNode):
        (WebCore::HitTestResult::setInnerNonSharedNode):
        * rendering/RenderListItem.cpp:
        (WebCore::enclosingList):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::generatingPseudoHostElement):
        * xml/XPathFunctions.cpp:
        (WebCore::XPath::expandedNameLocalPart):

2014-09-27  Christophe Dumez  <cdumez@apple.com>

        Use the new is<>() / downcast<>() for Attr Nodes
        https://bugs.webkit.org/show_bug.cgi?id=137183

        Reviewed by Ryosuke Niwa.

        Use the new is<>() / downcast<>() for Attr Nodes instead of isAttr() /
        toAttr().

        No new tests, no behavior change.

        * dom/Attr.h:
        (WebCore::isAttr):
        * dom/Document.cpp:
        (WebCore::Document::importNode):
        (WebCore::Document::adoptNode):
        * dom/NamedNodeMap.cpp:
        (WebCore::NamedNodeMap::setNamedItem):
        * dom/Node.cpp:
        (WebCore::Node::compareDocumentPosition):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        * inspector/InspectorNodeFinder.cpp:
        (WebCore::InspectorNodeFinder::searchUsingXPath):
        * xml/XPathNodeSet.cpp:
        (WebCore::XPath::sortBlock):
        (WebCore::XPath::NodeSet::sort):
        (WebCore::XPath::findRootNode):

2014-09-27  Brian J. Burg  <burg@cs.washington.edu>

        Web Replay: Playback position updates should be sent before the next event loop input is dispatched
        https://bugs.webkit.org/show_bug.cgi?id=137162

        Reviewed by Timothy Hatcher.

        To drive playback position updates in the Inspector UI, we send playbackHitPosition protocol
        messages as the replay backend dispatches inputs. However, right now the semantics of that
        message are muddy. The update is sent *after* the input at the offset is dispatched. This leads
        to unexpected results if the debugger pauses while the input is being dispatched: the frontend
        will only know about the previous (stale) playback position when the debugger pauses.

        With this patch, the backend sends the playbackHitPosition(segmentOffset=n, inputOffset=m)
        message when backend is about to dispatch input m, but has not yet begun to do so. Thus, any
        subsequent page execution events (profiling, debugger pauses, etc) until the next
        playbackHitPosition are caused by input m's being dispatched.

        * inspector/protocol/Replay.json: Clarify the message's semantics.
        * replay/ReplayController.cpp:
        (WebCore::ReplayController::willDispatchInput):
        (WebCore::ReplayController::didDispatchInput):

2014-09-27  Benjamin Poulain  <bpoulain@apple.com>

        Chaining multiple :nth-child() does not work properly
        https://bugs.webkit.org/show_bug.cgi?id=137032

        Reviewed by Gavin Barraclough.

        When multiple :nth-child() are chained, the evaluation of each "An+B" could depend on
        the execution of the previous "An+B". The reason is that the register holding the position
        of the current element could be modified by the evaluation of "An+B".

        There are two cases in which the register was used as the destination of an operation:
        1) When A and B are positive, the counter would be the destination of "counter - B".
        2) When A is not 1 or 2, the modulo operation was not preserving the input register.

        For (1), we a copy of the counter in that case of generateElementIsNthChild().

        For (2), we also preserve a copy of the input if it is used by the operation. In this case,
        if the input register is one of the argument we need for idiv, we preserve it on the stack
        or in a register depending on what is available.

        This increases the register requirements by 2 in the worst case on x86. The extra registers
        can push generateElementIsNthChild() above the 4 available registers. To accomodate for that,
        minimumRegisterRequirements() reserve more registers on x86.

        The extra register pressure has strictly no effect on performance, x86_64 has 9 registers
        available without pushing anything. The extra allocation is only necessary for debugging.

        Tests: fast/selectors/nth-child-basics.html
               fast/selectors/nth-child-chained.html
               fast/selectors/nth-child-of-basics-2.html
               fast/selectors/nth-child-of-chained.html

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::minimumRegisterRequirements):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):

2014-09-26  Christophe Dumez  <cdumez@apple.com>

        Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements
        https://bugs.webkit.org/show_bug.cgi?id=137137

        Reviewed by Benjamin Poulain.

        Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements and use the
        new SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() /
        downcast<>() works for those types.

        No new tests, no behavior change.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::labelForElement):
        (WebCore::AccessibilityNodeObject::text):
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::isDataTable):
        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleGetName):
        (webkitAccessibleGetDescription):
        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * bindings/js/JSPluginElementFunctions.cpp:
        (WebCore::pluginInstance):
        (WebCore::pluginScriptObjectFromPluginViewBase):
        (WebCore::pluginScriptObject):
        (WebCore::pluginElementCustomPut):
        (WebCore::isPluginElement): Deleted.
        * bindings/objc/DOM.mm:
        (kitClass):
        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchAllRules):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::locateCousinList):
        (WebCore::elementHasDirectionAuto):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::isPlaceholderShown):
        * dom/ContainerNodeAlgorithms.cpp:
        (WebCore::assertConnectedSubrameCountIsConsistent):
        (WebCore::collectFrameOwners):
        (WebCore::disconnectSubframes):
        * dom/Document.cpp:
        (WebCore::Document::adoptNode):
        (WebCore::Document::setBody):
        (WebCore::Document::iconURLs):
        (WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
        (WebCore::Document::updateHoverActiveState):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/Range.cpp:
        (WebCore::Range::createContextualFragment):
        * dom/make_names.pl:
        (printTypeHelpers):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::isLegacyAppleStyleSpan):
        (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
        (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
        (WebCore::isEmptyFontTag):
        (WebCore::ApplyStyleCommand::applyBlockStyle):
        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
        (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
        (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
        (WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
        (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
        (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
        (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
        (WebCore::ApplyStyleCommand::removeInlineStyle):
        (WebCore::ApplyStyleCommand::shouldSplitTextElement):
        (WebCore::ApplyStyleCommand::applyInlineStyleChange):
        * editing/DeleteButtonController.cpp:
        (WebCore::enclosingDeletableElement):
        * editing/Editor.cpp:
        (WebCore::Editor::selectionForCommand):
        (WebCore::Editor::setBaseWritingDirection):
        (WebCore::findFirstMarkable):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::selectAll):
        (WebCore::scanForForm):
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::mergeWithNeighboringLists):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::elementCannotHaveEndTag):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
        (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
        (WebCore::ReplaceSelectionCommand::handleStyleSpans):
        (WebCore::ReplaceSelectionCommand::doApply):
        (WebCore::ReplaceSelectionCommand::insertAsListItems):
        * editing/TextIterator.cpp:
        (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
        (WebCore::shouldEmitExtraNewlineForNode):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::_addTableCellForElement):
        (HTMLConverter::_processElement):
        * editing/htmlediting.cpp:
        (WebCore::enclosingList):
        (WebCore::embeddedSublist):
        (WebCore::appendedSublist):
        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
        * editing/mac/EditorMac.mm:
        (WebCore::maybeCopyNodeAttributesToFragment):
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::appendElement):
        * html/BaseChooserOnlyDateAndTimeInputType.cpp:
        (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::shadowColorSwatch):
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::insertedInto):
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::namedItem):
        (WebCore::HTMLCollection::updateNamedElementCache):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::matchesReadWritePseudoClass):
        (WebCore::HTMLElement::setOuterHTML):
        (WebCore::elementAffectsDirectionality):
        (WebCore::HTMLElement::directionality):
        (WebCore::HTMLElement::dirAttributeChanged):
        * html/HTMLElement.h:
        (WebCore::isHTMLElement):
        (WebCore::Node::hasTagName):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::getNamedElements):
        * html/HTMLFrameElementBase.h:
        (WebCore::isHTMLFrameElementBase):
        * html/HTMLFrameOwnerElement.h:
        (WebCore::isHTMLFrameOwnerElement):
        * html/HTMLMediaElement.h:
        (WebCore::isHTMLMediaElement):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::isDisabledFormControl):
        * html/HTMLPlugInElement.h:
        (WebCore::isHTMLPlugInElement):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
        * html/HTMLPlugInImageElement.h:
        (WebCore::isHTMLPlugInImageElement):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::setOption):
        (WebCore::HTMLSelectElement::setLength):
        (WebCore::HTMLSelectElement::recalcListItems):
        * html/HTMLSourceElement.cpp:
        (WebCore::HTMLSourceElement::insertedInto):
        (WebCore::HTMLSourceElement::removedFrom):
        * html/HTMLTableCellElement.cpp:
        (WebCore::HTMLTableCellElement::cellAbove):
        * html/HTMLTableCellElement.h:
        (WebCore::isHTMLTableCellElement):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::tHead):
        (WebCore::HTMLTableElement::tFoot):
        (WebCore::HTMLTableElement::lastBody):
        * html/HTMLTableRowElement.cpp:
        (WebCore::HTMLTableRowElement::rowIndex):
        * html/HTMLTableRowsCollection.cpp:
        (WebCore::isInSection):
        * html/HTMLTableSectionElement.h:
        (WebCore::isHTMLTableSectionElement):
        * html/HTMLTagNames.in:
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::enclosingTextFormControl):
        * html/HTMLTextFormControlElement.h:
        (WebCore::isHTMLTextFormControlElement):
        * html/HTMLTrackElement.cpp:
        (WebCore::HTMLTrackElement::removedFrom):
        (WebCore::HTMLTrackElement::mediaElement):
        * html/LabelableElement.h:
        (WebCore::isLabelableElement):
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::sliderTrackElement):
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::parentMediaElement):
        (WebCore::mediaControlElementType):
        * html/shadow/TextControlInnerElements.h:
        (WebCore::isTextControlInnerTextElement):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        * inspector/InspectorNodeFinder.cpp:
        (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::loadSubframe):
        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::create):
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::isPhrasingContent):
        (WebCore::MathMLElement::isFlowContent):
        (WebCore::MathMLElement::childShouldCreateRenderer):
        * mathml/mathtags.in:
        * page/DragController.cpp:
        (WebCore::DragController::canProcessDrag):
        * page/EventHandler.cpp:
        (WebCore::targetIsFrame):
        * page/FocusController.cpp:
        (WebCore::hasCustomFocusLogic):
        (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
        (WebCore::FocusController::advanceFocusInDocumentOrder):
        * page/Frame.cpp:
        (WebCore::Frame::searchForLabelsBeforeElement):
        * page/FrameView.cpp:
        (WebCore::FrameView::init):
        (WebCore::FrameView::addEmbeddedObjectToUpdate):
        (WebCore::FrameView::updateEmbeddedObject):
        * page/PageSerializer.cpp:
        (WebCore::isCharsetSpecifyingNode):
        (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
        * page/SpatialNavigation.cpp:
        (WebCore::frameOwnerElement):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::absolutePDFURL):
        (WebCore::HitTestResult::mediaElement):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::resizeTextPermitted):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintContents):
        (WebCore::RenderEmbeddedObject::layout):
        (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):
        (WebCore::RenderLayer::updateSnapOffsets):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration):
        (WebCore::isRestartedPlugin):
        * rendering/RenderMedia.h:
        (WebCore::RenderMedia::mediaElement):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::offsetParent):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::parseColSpanFromDOM):
        (WebCore::RenderTableCell::parseRowSpanFromDOM):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::textFormControlElement):
        * rendering/RenderThemeGtk.cpp:
        (WebCore::getMediaElementFromRenderObject):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
        (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::isEmptyOrUnstyledAppleStyleSpan):
        * rendering/RenderWidget.h:
        (WebCore::RenderWidget::frameOwnerElement):
        * testing/Internals.cpp:
        (WebCore::Internals::visiblePlaceholder):
        (WebCore::Internals::simulateAudioInterruption):
        (WebCore::Internals::isPluginSnapshotted):
        * xml/XPathStep.cpp:
        (WebCore::XPath::nodeMatchesBasicTest):

2014-09-26  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Automatic Inspection should continue once all breakpoints are loaded
        https://bugs.webkit.org/show_bug.cgi?id=137038

        Reviewed by Timothy Hatcher.

        Handle frontend initialization messages even though pages cannot
        be automatically inspected yet.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::connectFrontend):
        (WebCore::InspectorController::disconnectFrontend):
        (WebCore::InspectorController::frontendInitialized):
        * inspector/InspectorController.h:
        * inspector/WorkerInspectorController.h:
        * page/Page.h:
        (WebCore::Page::inspectorDebuggable):

2014-09-26  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r173988): Fix unused variable warning in PDFDocumentImage.cpp

        Fixes the following build failure in release builds:

            WebCore/platform/graphics/cg/PDFDocumentImage.cpp:230:12: error: unused variable 'pageCount' [-Werror,-Wunused-variable]

        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::computeBoundsForCurrentPage): Change
        ASSERT() to call pageCount().

2014-09-26  Brian J. Burg  <burg@cs.washington.edu>

        StorageTracker::deleteOrigin being called off the main thread (ASSERTs in inspector/test-harness-trivially-works.html test)
        https://bugs.webkit.org/show_bug.cgi?id=129642

        Apply post-review comments from Alexey Proskuryakov.

        * storage/StorageAreaSync.cpp:
        (WebCore::StorageAreaSync::deleteEmptyDatabase): Make a thread-safe isolated copy of the string.

2014-09-26  Myles C. Maxfield  <mmaxfield@apple.com>

        SVG -> OTF converter bug gardening
        https://bugs.webkit.org/show_bug.cgi?id=137088

        Reviewed by Darin Adler.

        This test fixes some (but not all) of the svg/ layout tests that never worked with the
        SVG -> OTF font converter. The actual list of tests this fixes is shown below. I will be
        filing bugs for the remaining issues along with the relevant tests that those issues
        cause to fail.

        Tests: svg/W3C-SVG-1.1/fonts-elem-05-t.svg
               svg/W3C-SVG-1.1/fonts-kern-01-t.svg
               svg/custom/glyph-setting-d-attribute.svg
               svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html
               svg/custom/skip-underline-missing-glyph.html
               svg/custom/svg-fonts-fallback.xhtml
               svg/custom/svg-fonts-in-text-controls.html

        * svg/SVGToOTFFontConversion.cpp:
        (WebCore::SVGToOTFFontConverter::appendHEADTable): We use the font's minimum and maximum
        bounding box information to size <textarea>s and <input>s.
        (WebCore::SVGToOTFFontConverter::addCodepointRanges): Codepoint ranges are closed.
        (WebCore::SVGToOTFFontConverter::computeKerningData): Typo in appending glyphs to the
        wrong set.
        (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths): Use the font's horizontal
        origin if the glyph doesn't have one.
        (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): r173852 implemented vhea, vmtx,
        and kern.
        (WebCore::transcodeGlyphPaths): Moved inside SVGToOTFFontConverter.

2014-09-26  Dan Bernstein  <mitz@apple.com>

        iOS build fix following r173989.

        * page/ios/FrameIOS.mm:
        (WebCore::ancestorRespondingToClickEvents):

2014-09-26  Javier Fernandez  <jfernandez@igalia.com>

        [CSS Grid Layout] Empty string case already covered by containesOnlyWhiteSpace.
        https://bugs.webkit.org/show_bug.cgi?id=137146

        Reviewed by Sergio Villar Senin.

        When checking out for white-space only strings in the grid-template-areas
        property values, it's not neccessary to check out for empty strings as
        such case is already covered.

        No new tests, already covered by fast/css-grid-layout/grid-template-areas-empty-string-crash.html.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseGridTemplateAreasRow):

2014-09-23  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Fix the handling of infinity in track growth limits
        https://bugs.webkit.org/show_bug.cgi?id=137019

        Reviewed by Darin Adler.

        The growth limit of content sized tracks is initialized to
        infinity which is internally represented as -1. We were not
        specialcasing this situation, and thus, -1 was used in the
        computations as any other value. This change makes the code aware
        of the existence of infinites (like when sorting tracks by growth
        potential or when initializing the track growth limits).

        There was another bug related to infinities. The code that was
        replacing a infinite growth limit by a finite one was not using
        the proper indexes so the tracks that were being updated were the
        wrong ones.

        Test: fast/css-grid-layout/grid-content-sized-columns-resolution.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
        (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
        (WebCore::sortByGridTrackGrowthPotential):
        (WebCore::RenderGrid::distributeSpaceToTracks):

2014-09-26  Lorenzo Tilve  <ltilve@igalia.com>

        [GTK] Fix support for the initial-letter CSS property to first-letter
        https://bugs.webkit.org/show_bug.cgi?id=137108

        Reviewed by Alejandro G. Castro.

        Add support for cap-height to the font system.

        * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
        (WebCore::SimpleFontData::platformInit):

2014-09-25  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: FunctionCall timeline records omit profile data if the debugger has paused
        https://bugs.webkit.org/show_bug.cgi?id=136805

        Reviewed by Timothy Hatcher.

        TimelineAgent was mismanaging its call stack depth counter, which caused nested FunctionCall
        records to steal the parent FunctionCall's captured profile in the child's didCallFunction().
        Thus, the top FunctionCall node had no profile data and nested FunctionCall nodes each had
        their own profiles. The frontend expected just one profile, so it didn't show anything when
        it couldn't be found.

        Test: inspector/timeline/debugger-paused-while-recording.html

        * inspector/InspectorTimelineAgent.cpp: Rename m_recordingProfileDepth to m_callStackDepth.
        (WebCore::InspectorTimelineAgent::willCallFunction): Fix the call stack depth management.
        (WebCore::InspectorTimelineAgent::didCallFunction):
        (WebCore::InspectorTimelineAgent::willEvaluateScript):
        (WebCore::InspectorTimelineAgent::didEvaluateScript):
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
        * inspector/InspectorTimelineAgent.h:

2014-09-25  Brian J. Burg  <burg@cs.washington.edu>

        StorageTracker::deleteOrigin being called off the main thread (ASSERTs in inspector/test-harness-trivially-works.html test)
        https://bugs.webkit.org/show_bug.cgi?id=129642

        Reviewed by Brady Eidson.

        When tearing down the inspector frontend's page, we trigger a threading violation
        in StorageAreaSync's final sync code underneath StorageAreaSync::deleteEmptyDatabase().

        No new tests. Regression is covered by inspector/test-harness-trivially-works.html.

        * storage/StorageAreaSync.cpp:
        (WebCore::StorageAreaSync::deleteEmptyDatabase): add a missing callOnMainThread() when
        calling StorageTracker::deleteOriginWithIdentifier().

2014-09-25  Sungmann Cho  <sungmann.cho@navercorp.com>

        Unprefix CSS cursor values zoom-in and zoom-out.
        https://bugs.webkit.org/show_bug.cgi?id=137061

        Reviewed by Benjamin Poulain.

        This patch unprefixes CSS cursor values zoom-in and zoom-out.
        -webkit-zoom-in and -webkit-zoom-out are kept as aliases.
        ECursor members use InterCaps with an initial capital letter for now.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator ECursor):
        * css/CSSValueKeywords.in:
        * css/DeprecatedStyleBuilder.cpp:
        (WebCore::ApplyPropertyCursor::applyValue):
        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::resizeImageToFit):
        (WebCore::ImageDocument::restoreImageSize):
        (WebCore::ImageDocument::windowSizeChanged):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectCursor):
        * rendering/style/RenderStyle.h:
        * rendering/style/RenderStyleConstants.h:

2014-09-25  Brent Fulgham  <bfulgham@apple.com>

        [Win] Debug builds of TestWebKitAPI are crashing.
        https://bugs.webkit.org/show_bug.cgi?id=133553

        Reviewed by Dean Jackson.

        Avoid crash on shutdown due to invalid mutex state in the
        HashMap debug implementation during a static destruction operation.

        * dom/Node.cpp:
        (WebCore::ignoreSet): Convert static value into a NeverDestroyed.
        (WebCore::Node::trackForDebugging): Use new NeverDestroyed call.
        (WebCore::Node::~Node): Ditto.

2014-09-25  Christophe Dumez  <cdumez@apple.com>

        Add support for is<SVGDocument>() / downcast<SVGDocument>()
        https://bugs.webkit.org/show_bug.cgi?id=137128

        Reviewed by Ryosuke Niwa.

        Add support for is<SVGDocument>() / downcast<SVGDocument>() by using
        the SPECIALIZE_TYPE_TRAITS_*() macro, instead of the
        DOCUMENT_TYPE_CASTS() one.

        No new tests, no behavior change.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::getSVGDocument):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        * page/Frame.cpp:
        (WebCore::Frame::setPageAndTextZoomFactors):
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollToAnchor):
        * svg/SVGDocument.h:
        (WebCore::isSVGDocument):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::hasSingleSecurityOrigin):
        (WebCore::SVGImage::setContainerSize):
        (WebCore::SVGImage::containerSize):
        (WebCore::SVGImage::embeddedContentBox):
        (WebCore::SVGImage::hasRelativeWidth):
        (WebCore::SVGImage::hasRelativeHeight):
        (WebCore::SVGImage::computeIntrinsicDimensions):
        (WebCore::SVGImage::startAnimation):
        (WebCore::SVGImage::stopAnimation):

2014-09-25  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Rename CSSKeyframesRule insertRule to appendRule (57910)
        https://bugs.webkit.org/show_bug.cgi?id=57910

        Reviewed by Dean Jackson.

        Tests: animations/change-keyframes.html

        * css/WebKitCSSKeyframesRule.h:
        (WebCore::WebKitCSSKeyframesRule::appendRule):
        -- Make WebKitCSSKeyframesRule::appendRule to be an alias of WebKitCSSKeyframesRule::insertRule()
           to conform with CSS specs
        * css/WebKitCSSKeyframesRule.idl:
        -- Add the new method WebKitCSSKeyframesRule::appendRule() but keep the original method
           WebKitCSSKeyframesRule::appendRule() to not break exiting customers' pages.

2014-09-25  Tim Horton  <timothy_horton@apple.com>

        Null deref in setStateScrollingNodeSnapOffsetsAsFloat
        https://bugs.webkit.org/show_bug.cgi?id=137133
        <rdar://problem/18447820>

        Reviewed by Beth Dakin.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
        (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
        Get the deviceScaleFactor from m_page instead of various other places,
        because scrolledContentsLayer can be null in the case of non-composited
        overflow scroll.

2014-09-25  Christophe Dumez  <cdumez@apple.com>

        Use is<HTML*Element>() instead of isHTML*Element() - Part 2
        https://bugs.webkit.org/show_bug.cgi?id=137103

        Reviewed by Benjamin Poulain.

        Use is<HTML*Element>() instead of isHTML*Element() and drop support for
        the generated isHTML*Element() macros.

        No new tests, no behavior change.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::getOrCreate):
        (WebCore::AXObjectCache::handleAttributeChanged):
        (WebCore::AXObjectCache::labelChanged):
        * accessibility/AccessibilityListBoxOption.cpp:
        (WebCore::AccessibilityListBoxOption::isEnabled):
        (WebCore::AccessibilityListBoxOption::stringValue):
        (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
        (WebCore::AccessibilityNodeObject::isNativeImage):
        (WebCore::AccessibilityNodeObject::anchorElement):
        (WebCore::AccessibilityNodeObject::alternativeText):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::anchorElement):
        (WebCore::AccessibilityRenderObject::labelElementContainer):
        (WebCore::AccessibilityRenderObject::internalLinkElement):
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
        (WebCore::AccessibilityRenderObject::url):
        (WebCore::AccessibilityRenderObject::getDocumentLinks):
        (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
        (WebCore::AccessibilityRenderObject::accessibilityHitTest):
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        (WebCore::AccessibilityRenderObject::stringValueForMSAA):
        (WebCore::AccessibilityRenderObject::isLinked):
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::tableElement):
        (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
        (WebCore::AccessibilityTable::title):
        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
        (webkitAccessibleTableGetCaption):
        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::JSHTMLDocument::nameGetter):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::isReachableFromDOM):
        * css/CSSDefaultStyleSheets.cpp:
        (WebCore::elementCanUseSimpleDefaultStyle):
        (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
        * css/CSSStyleSheet.cpp:
        (WebCore::isAcceptableCSSStyleSheetParent):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyle):
        * css/StyleSheetList.cpp:
        (WebCore::StyleSheetList::getNamedItem):
        * dom/CurrentScriptIncrementer.h:
        (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::setDragImage):
        * dom/DocumentOrderedMap.cpp:
        (WebCore::keyMatchesMapName):
        (WebCore::keyMatchesLowercasedMapName):
        (WebCore::keyMatchesLowercasedUsemap):
        (WebCore::keyMatchesLabelForAttribute):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/Node.cpp:
        (WebCore::Node::enclosingLinkEventParentOrSelf):
        * dom/Position.cpp:
        (WebCore::endsOfNodeAreVisuallyDistinctPositions):
        * dom/ScriptElement.cpp:
        (WebCore::toScriptElementIfPossible):
        * dom/VisitedLinkState.cpp:
        (WebCore::linkHashForElement):
        (WebCore::VisitedLinkState::determineLinkStateSlowCase):
        * dom/make_names.pl:
        (printTypeHelpers):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        * editing/Editor.cpp:
        (WebCore::imageElementFromImageDocument):
        * editing/FrameSelection.cpp:
        (WebCore::scanForForm):
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::removeHeadContents):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::_processElement):
        * editing/htmlediting.cpp:
        (WebCore::isNonTableCellHTMLBlockElement):
        * editing/markup.cpp:
        (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
        (WebCore::collectElementsToRemoveFromFragment):
        * html/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::findAssociatedForm):
        * html/HTMLAnchorElement.cpp:
        (WebCore::appendServerMapMousePosition):
        * html/HTMLAreaElement.cpp:
        (WebCore::HTMLAreaElement::imageElement):
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::bgColor):
        (WebCore::HTMLDocument::setBgColor):
        (WebCore::HTMLDocument::fgColor):
        (WebCore::HTMLDocument::setFgColor):
        (WebCore::HTMLDocument::alinkColor):
        (WebCore::HTMLDocument::setAlinkColor):
        (WebCore::HTMLDocument::linkColor):
        (WebCore::HTMLDocument::setLinkColor):
        (WebCore::HTMLDocument::vlinkColor):
        (WebCore::HTMLDocument::setVlinkColor):
        (WebCore::HTMLDocument::isFrameSet):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::setInnerHTML):
        * html/HTMLFieldSetElement.cpp:
        (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
        (WebCore::HTMLFieldSetElement::disabledStateChanged):
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
        * html/HTMLFormControlsCollection.cpp:
        (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
        (WebCore::HTMLFormControlsCollection::formControlElements):
        (WebCore::HTMLFormControlsCollection::formImageElements):
        (WebCore::HTMLFormControlsCollection::namedItem):
        (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::rendererIsNeeded):
        * html/HTMLFrameElementBase.h:
        (WebCore::isHTMLFrameElementBase):
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::dispatchLoadEvent):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::dataList):
        * html/HTMLLegendElement.cpp:
        (WebCore::HTMLLegendElement::virtualForm):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
        * html/HTMLNameCollection.cpp:
        (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatches):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::ownerDataListElement):
        (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
        (WebCore::HTMLOptionElement::isDisabledFormControl):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::recalcListItems):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::caption):
        * html/HTMLTablePartElement.cpp:
        (WebCore::HTMLTablePartElement::findParentTable):
        * html/HTMLTableRowElement.cpp:
        (WebCore::HTMLTableRowElement::rowIndex):
        * html/HTMLTableRowsCollection.cpp:
        (WebCore::HTMLTableRowsCollection::rowAfter):
        (WebCore::HTMLTableRowsCollection::lastRow):
        * html/HTMLTagNames.in:
        * html/LabelsNodeList.cpp:
        (WebCore::LabelsNodeList::elementMatches):
        * html/MediaDocument.cpp:
        (WebCore::descendentVideoElement):
        (WebCore::ancestorVideoElement):
        * html/RadioInputType.cpp:
        (WebCore::RadioInputType::handleKeydownEvent):
        * html/RadioNodeList.cpp:
        (WebCore::RadioNodeList::RadioNodeList):
        (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::hasImpliedEndTag):
        (WebCore::insert):
        (WebCore::HTMLConstructionSite::insertHTMLFormElement):
        (WebCore::HTMLConstructionSite::insertTextNode):
        (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
        * html/parser/HTMLElementStack.cpp:
        (WebCore::HTMLNames::isScopeMarker):
        (WebCore::HTMLNames::isTableScopeMarker):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
        (WebCore::HTMLTreeBuilder::processStartTag):
        (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
        (WebCore::HTMLTreeBuilder::processEndTag):
        (WebCore::HTMLTreeBuilder::processCharacterBuffer):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyleSheet::inlineStyleSheetText):
        * page/DragController.cpp:
        (WebCore::DragController::draggableElement):
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocusDirectionally):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeFrame):
        * page/SpatialNavigation.cpp:
        (WebCore::FocusCandidate::FocusCandidate):
        (WebCore::areElementsOnSameLine):
        * page/ios/FrameIOS.mm:
        (WebCore::ancestorRespondingToClickEvents):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::altDisplayString):
        (WebCore::HitTestResult::mediaSupportsFullscreen):
        (WebCore::HitTestResult::mediaElement):
        (WebCore::HitTestResult::enterFullscreenForVideo):
        (WebCore::HitTestResult::mediaIsVideo):
        (WebCore::HitTestResult::isLiveLink):
        * rendering/RenderCounter.cpp:
        (WebCore::planCounter):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::RenderImage):
        (WebCore::RenderImage::paintAreaElementFocusRing):
        (WebCore::RenderImage::paintIntoRect):
        (WebCore::RenderImage::imageMap):
        (WebCore::RenderImage::updateAltText):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::updateFromElement):
        (WebCore::RenderListBox::paintItemForeground):
        * rendering/RenderMarquee.cpp:
        (WebCore::RenderMarquee::marqueeSpeed):
        * rendering/RenderMenuList.cpp:
        (RenderMenuList::itemText):
        (RenderMenuList::itemIsEnabled):
        (RenderMenuList::itemIsLabel):
        * rendering/RenderMeter.cpp:
        (WebCore::RenderMeter::meterElement):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::shouldRespectImageOrientation):
        (WebCore::RenderObject::getTextDecorationColors):
        (WebCore::RenderObject::offsetParent):
        * rendering/RenderProgress.cpp:
        (WebCore::RenderProgress::progressElement):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
        (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
        * svg/graphics/SVGImageCache.cpp:
        (WebCore::SVGImageCache::imageForRenderer):
        * testing/Internals.cpp:
        (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::startElementNs):

2014-09-25  Brian J. Burg  <burg@cs.washington.edu>

        Web Replay: Check event loop input extents during replay too
        https://bugs.webkit.org/show_bug.cgi?id=136316

        Reviewed by Timothy Hatcher.

        Sometimes we see different nondeterminism during capture and replay
        executions, so we should support determinism checks during replay too.

        Move the withinEventLoopInputExtent flag to the base class.

        No new tests, no behavior changed.

        * replay/CapturingInputCursor.cpp:
        (WebCore::CapturingInputCursor::CapturingInputCursor):
        (WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Deleted.
        * replay/CapturingInputCursor.h:
        * replay/EventLoopInput.cpp:
        (WebCore::EventLoopInputExtent::EventLoopInputExtent):
        (WebCore::EventLoopInputExtent::~EventLoopInputExtent):
        Make m_cursor a pointer and add a new constructor so we can conditionally
        enter event loop input extents. This is useful in some network replay situations.

        * replay/EventLoopInput.h:
        * replay/ReplayController.cpp:
        (WebCore::ReplayController::willDispatchEvent): Expand the assertion to include replaying.

2014-09-25  Jeremy Jones  <jeremyj@apple.com>

        Race in ref pointer for WebVideoFullscreenInterfaceAVKit.
        https://bugs.webkit.org/show_bug.cgi?id=137123

        Reviewed by Eric Carlson.

        Add WebThreadRun to prevent race with RefPtr of WebVideoFullscreenInterfaceAVKit.

        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (-[WebVideoFullscreenController didSetupFullscreen]): add WebThreadRun
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setDuration): ditto
        (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
        (WebVideoFullscreenInterfaceAVKit::setRate): ditto
        (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
        (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
        (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
        (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
        (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto
        (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
        (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
        (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto

2014-09-25  Chris Dumez  <cdumez@apple.com>

        Unreviewed iOS build fix after r173944.

        Add a missing header include.
        See <rdar://problem/18454708> for more details.

        * html/parser/HTMLTreeBuilder.cpp:

2014-09-25  Christophe Dumez  <cdumez@apple.com>

        Stop using legacy NODE_TYPE_CASTS() macro in svg/
        https://bugs.webkit.org/show_bug.cgi?id=137106

        Reviewed by Ryosuke Niwa.

        Stop using legacy NODE_TYPE_CASTS() in svg/ and use the new
        SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
        can be used for those types.

        No new tests, no behavior change.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        * dom/Element.h:
        * dom/Node.h:
        (WebCore::is):
        * dom/make_names.pl:
        (printTypeHelpers):
        * html/HTMLElement.h:
        * html/HTMLMediaElement.h:
        * html/HTMLPlugInImageElement.h:
        * html/LabelableElement.h:
        * mathml/MathMLElement.h:
        Rename NodeTypeCastTraits::is() to NodeTypeCastTraits::isType() to
        avoid naming conflict with the global is<>() function. This was an
        issue when is<>() was called from one of the template specializations.

        * rendering/svg/RenderSVGBlock.h:
        (WebCore::RenderSVGBlock::graphicsElement):
        * rendering/svg/RenderSVGGradientStop.cpp:
        (WebCore::RenderSVGGradientStop::gradientElement):
        * rendering/svg/RenderSVGInline.h:
        (WebCore::RenderSVGInline::graphicsElement):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
        * rendering/svg/RenderSVGShape.h:
        (WebCore::RenderSVGShape::graphicsElement):
        * rendering/svg/RenderSVGTransformableContainer.h:
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::operator<<):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
        * rendering/svg/SVGResources.cpp:
        (WebCore::targetReferenceFromResource):
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):
        * svg/SVGAnimateElement.cpp:
        (WebCore::SVGAnimateElement::calculateAnimatedValue):
        (WebCore::isSVGAnimateElement): Deleted.
        Use is<>() / downcast<>() where appropriate.

        * svg/SVGAnimateElement.h:
        (WebCore::isSVGAnimateElement):
        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
        overload for isSVGAnimateElement() taking an SVGElement in argument to
        bypass the is<SVGElement>() check when the input type is an SVGElement.

        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::getBoundingBox):
        Use is<>() / downcast<>() where appropriate.

        * svg/SVGElement.h:
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
        the pre-existing NodeTypeCastTraits template specialization as it is
        now generated by the macro.

        * svg/SVGGradientElement.cpp:
        (WebCore::isSVGGradientElement): Deleted.
        * svg/SVGGradientElement.h:
        (WebCore::isSVGGradientElement):
        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
        overload for isSVGAnimateElement() taking an SVGElement in argument to
        bypass the is<SVGElement>() check when the input type is an SVGElement.

        * svg/SVGGraphicsElement.h:
        (WebCore::isSVGGraphicsElement):
        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().

        * svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
        * svg/SVGLocatable.cpp:
        (WebCore::SVGLocatable::getTransformToElement):
        * svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::synchronizePoints):
        (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
        (WebCore::isSVGPolyElement): Deleted.
        Use is<>() / downcast<>() where appropriate.

        * svg/SVGPolyElement.h:
        (WebCore::isSVGPolyElement):
        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
        overload for isPolyElement() taking an SVGElement in argument to
        bypass the is<SVGElement>() check when the input type is an SVGElement.

        * svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::synchronizeTextLength):
        (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
        (WebCore::SVGTextContentElement::elementFromRenderer):
        Use is<>() / downcast<>() where appropriate.

        * svg/SVGTextContentElement.h:
        WebCore::isSVGTextContentElement):
        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().

        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::toClipPath):
        Use is<>() / downcast<>() where appropriate. Also use tighter typing
        for value returned by shadowTreeElement().

        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::buildPendingResource):
        (WebCore::SVGSMILElement::connectConditions):
        (WebCore::SVGSMILElement::disconnectConditions):
        Use is<>() / downcast<>() where appropriate.

        * svg/animation/SVGSMILElement.h:
        (WebCore::isSVGSMILElement):
        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
        the pre-existing NodeTypeCastTraits template specialization as it is
        now generated by the macro.

2014-09-25  Brent Fulgham  <bfulgham@apple.com>

        Minor refactoring to mediaType/presentationType
        https://bugs.webkit.org/show_bug.cgi?id=137085

        Reviewed by Eric Carlson.

        Add overloads for presentationType for the audio and video
        HTML elements so that we don't have to explicity check the
        tag name (via string comparison) to identify the type of
        element.

        No new tests. Should create no change in behavior.

        * html/HTMLAudioElement.h: Overload presentationType to always
        indicate audio type.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaType): Use the presentationType
        method implementation, rather than duplicating that code.
        * html/HTMLVideoElement.h: Overload presentationType to always
        return video type.

2014-09-25  Javier Fernandez  <jfernandez@igalia.com>

        ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow
        https://bugs.webkit.org/show_bug.cgi?id=136945

        Reviewed by Sergio Villar Senin.

        Checking out whether the grid-template-areas value contains a white-space only
        string, which is not valid as it does not produce a cell token.

        Test: fast/css-grid-layout/grid-template-areas-empty-string-crash.html

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseGridTemplateAreasRow):

2014-09-25  Csaba Osztrogonác  <ossy@webkit.org>

        Remove WinCE port from trunk
        https://bugs.webkit.org/show_bug.cgi?id=136951

        Reviewed by Alex Christensen.

        * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
        * PlatformWinCE.cmake: Removed.
        * accessibility/AXObjectCache.cpp:
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::modifyMovingRight):
        * loader/icon/wince/IconDatabaseWinCE.cpp: Removed.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::sendContextMenuEventForKey):
        * page/Settings.cpp:
        * page/win/EventHandlerWin.cpp:
        (WebCore::EventHandler::createDraggingDataTransfer):
        * platform/ContextMenu.h:
        * platform/DragImage.cpp:
        * platform/FileSystem.h:
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::mayFillWithSolidColor):
        * platform/graphics/FontGlyphs.cpp:
        (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
        * platform/graphics/FontPlatformData.h:
        * platform/graphics/ImageBufferData.h:
        * platform/graphics/MediaPlayer.cpp:
        * platform/graphics/SimpleFontData.h:
        * platform/graphics/opentype/OpenTypeUtilities.cpp:
        (WebCore::renameAndActivateFont):
        * platform/graphics/opentype/OpenTypeUtilities.h:
        * platform/graphics/win/DIBPixelData.cpp:
        (WebCore::DIBPixelData::setRGBABitmapAlpha):
        * platform/graphics/win/GDIExtras.cpp: Removed.
        * platform/graphics/win/GDIExtras.h:
        (WebCore::hasAlphaBlendSupport):
        (WebCore::alphaBlendIfSupported):
        * platform/graphics/win/IconWin.cpp:
        (WebCore::Icon::createIconForFiles):
        (WebCore::Icon::paint):
        * platform/graphics/win/SimpleFontDataWin.cpp:
        (WebCore::SimpleFontData::initGDIFont):
        (WebCore::SimpleFontData::platformDestroy):
        (WebCore::SimpleFontData::boundsForGDIGlyph):
        (WebCore::SimpleFontData::widthForGDIGlyph):
        (WebCore::SimpleFontData::scriptFontProperties):
        * platform/graphics/wince/FontCacheWinCE.cpp: Removed.
        * platform/graphics/wince/FontCustomPlatformData.cpp: Removed.
        * platform/graphics/wince/FontCustomPlatformData.h: Removed.
        * platform/graphics/wince/FontPlatformData.cpp: Removed.
        * platform/graphics/wince/FontPlatformData.h: Removed.
        * platform/graphics/wince/FontWinCE.cpp: Removed.
        * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp: Removed.
        * platform/graphics/wince/GradientWinCE.cpp: Removed.
        * platform/graphics/wince/GraphicsContextWinCE.cpp: Removed.
        * platform/graphics/wince/ImageBufferDataWince.h: Removed.
        * platform/graphics/wince/ImageBufferWinCE.cpp: Removed.
        * platform/graphics/wince/ImageWinCE.cpp: Removed.
        * platform/graphics/wince/MediaPlayerPrivateWinCE.h: Removed.
        * platform/graphics/wince/MediaPlayerProxy.cpp: Removed.
        * platform/graphics/wince/MediaPlayerProxy.h: Removed.
        * platform/graphics/wince/PathWinCE.cpp: Removed.
        * platform/graphics/wince/PlatformPathWinCE.cpp: Removed.
        * platform/graphics/wince/PlatformPathWinCE.h: Removed.
        * platform/graphics/wince/SharedBitmap.cpp: Removed.
        * platform/graphics/wince/SharedBitmap.h: Removed.
        * platform/graphics/wince/SimpleFontDataWinCE.cpp: Removed.
        * platform/graphics/wince/WinCEGraphicsExtras.h: Removed.
        * platform/image-decoders/jpeg/JPEGImageDecoder.h:
        * platform/network/win/NetworkStateNotifierWin.cpp:
        (WebCore::NetworkStateNotifier::NetworkStateNotifier):
        * platform/win/COMPtr.h:
        * platform/win/ClipboardUtilitiesWin.cpp:
        * platform/win/ContextMenuItemWin.cpp:
        * platform/win/ContextMenuWin.cpp:
        (WebCore::ContextMenu::getContextMenuItems):
        (WebCore::ContextMenu::createPlatformContextMenuFromItems):
        * platform/win/DragImageWin.cpp:
        (WebCore::dragLabelFont):
        * platform/win/FileSystemWin.cpp:
        (WebCore::pathByAppendingComponent):
        (WebCore::pathGetFileName):
        (WebCore::storageDirectory):
        * platform/win/LoggingWin.cpp:
        (WebCore::logLevelString):
        * platform/win/PasteboardWin.cpp:
        (WebCore::PasteboardOwnerWndProc):
        (WebCore::Pasteboard::createForCopyAndPaste):
        (WebCore::pathRemoveBadFSCharacters):
        (WebCore::filesystemPathFromUrlOrTitle):
        (WebCore::createGlobalHDropContent):
        * platform/win/PlatformMouseEventWin.cpp:
        (WebCore::messageToEventType):
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/win/PlatformScreenWin.cpp:
        (WebCore::deviceInfoForWidget):
        (WebCore::screenIsMonochrome):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenuWin::show):
        (WebCore::PopupMenuWin::paint):
        (WebCore::PopupMenuWin::registerClass):
        (WebCore::PopupMenuWin::wndProc):
        * platform/win/ScrollbarThemeWin.cpp:
        (WebCore::ScrollbarThemeWin::paintButton):
        * platform/win/SharedBufferWin.cpp:
        * platform/win/SharedTimerWin.cpp:
        (WebCore::TimerWindowWndProc):
        (WebCore::initializeOffScreenTimerWindow):
        (WebCore::queueTimerProc):
        (WebCore::setSharedTimerFireInterval):
        (WebCore::stopSharedTimer):
        * platform/win/SoftLinking.h:
        * platform/win/SystemInfo.cpp:
        (WebCore::windowsVersion):
        (WebCore::processorArchitecture):
        (WebCore::architectureTokenForUAString):
        * platform/win/WCDataObject.cpp:
        (WebCore::WCDataObject::CopyMedium):
        * plugins/PluginDatabase.cpp:
        * plugins/PluginView.cpp:
        (WebCore::PluginView::stop):
        * plugins/PluginViewNone.cpp:
        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::addWindowsMediaPlayerPluginDirectory):
        (WebCore::addMacromediaPluginDirectories):
        * plugins/win/PluginPackageWin.cpp:
        (WebCore::PluginPackage::load):
        * plugins/win/PluginViewWin.cpp:
        (WebCore::setUpOffscreenPaintingHooks):
        (WebCore::registerPluginView):
        (WebCore::PluginView::wndProc):
        (WebCore::PluginView::updatePluginWidget):
        (WebCore::PluginView::paintIntoTransformedContext):
        (WebCore::PluginView::paint):
        (WebCore::PluginView::handleMouseEvent):
        (WebCore::PluginView::setParent):
        (WebCore::PluginView::setNPWindowRect):
        (WebCore::PluginView::platformStart):
        * rendering/RenderThemeWinCE.cpp: Removed.
        * rendering/RenderThemeWinCE.h: Removed.
        * storage/wince/DatabaseThreadWinCE.cpp: Removed.
        * storage/wince/DatabaseThreadWinCE.h: Removed.
        * storage/wince/StorageThreadWinCE.cpp: Removed.
        * storage/wince/StorageThreadWinCE.h: Removed.

2014-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r173944.

        * page/ContextMenuController.cpp: Add missing include.

2014-09-24  Christophe Dumez  <cdumez@apple.com>

        Use tighter typing for render objects in RenderGeometryMap
        https://bugs.webkit.org/show_bug.cgi?id=137102

        Reviewed by Ryosuke Niwa.

        Use tighter typing for render objects in RenderGeometryMap for clarity
        and efficiency.

        In particular, using RenderElement type instead of RenderObject
        in canMapBetweenRenderers() allows us to call the faster
        RenderElement::style() instead of RenderObject::style().

        No new tests, no behavior change.

        * rendering/RenderGeometryMap.cpp:
        (WebCore::canMapBetweenRenderers):
        (WebCore::RenderGeometryMap::pushMappingsToAncestor):

2014-09-24  Christophe Dumez  <cdumez@apple.com>

        Add initial is<>() / downcast<>() support for any type of Nodes
        https://bugs.webkit.org/show_bug.cgi?id=137056

        Reviewed by Benjamin Poulain.

        Add initial is<>() / downcast<>() support for any type of Nodes, not
        just Elements by:
        - Moving the is<>() / downcast<>() declarations from Element.h to
          Node.h
        - Introducing a SPECIALIZE_TYPE_TRAITS_*() macro that generates the
          needed template specializations for is<>() / downcast<>() to work.
          This macro will replace NODE_TYPE_CASTS() entirely once the code base
          is fully ported.

        This patch makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
        HTMLFormControlElement, that is an HTMLElement for which the template
        specializations cannot be automatically generated because it requires
        special handling.

        This patch also makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
        DocumentFragment to show that it can be used for non-Element Nodes.

        No new tests, no behavior change.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::isReadOnly):
        (WebCore::AccessibilityNodeObject::isRequired):
        (WebCore::AccessibilityNodeObject::isControl):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isAutofilled):
        (WebCore::isDisabled):
        (WebCore::isEnabled):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::canShareStyleWithElement):
        (WebCore::StyleResolver::adjustRenderStyle):
        * dom/Document.cpp:
        (WebCore::Document::importNode):
        (WebCore::Document::setFocusedElement):
        * dom/DocumentFragment.h:
        (WebCore::isDocumentFragment):
        * dom/Element.cpp:
        (WebCore::Element::focus):
        * dom/Element.h:
        (WebCore::is): Deleted.
        (WebCore::downcast): Deleted.
        * dom/Node.h:
        (WebCore::is):
        (WebCore::downcast):
        * dom/make_names.pl:
        (printTypeHelpers):
        * editing/FrameSelection.cpp:
        (WebCore::scanForForm):
        * editing/TextIterator.cpp:
        (WebCore::isRendererReplacedElement):
        * html/FormAssociatedElement.h:
        * html/HTMLElement.h:
        * html/HTMLFieldSetElement.cpp:
        (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
        (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::enclosingFormControlElement):
        * html/HTMLFormControlElement.h:
        (WebCore::isHTMLFormControlElement):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submitImplicitly):
        (WebCore::submitElementFromEvent):
        (WebCore::HTMLFormElement::validateInteractively):
        (WebCore::HTMLFormElement::submit):
        (WebCore::HTMLFormElement::reset):
        (WebCore::HTMLFormElement::formElementIndex):
        (WebCore::HTMLFormElement::defaultButton):
        (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
        (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
        * html/HTMLMediaElement.h:
        * html/HTMLPlugInImageElement.h:
        * html/HTMLSummaryElement.cpp:
        (WebCore::isClickableControl):
        * html/LabelableElement.h:
        * html/RadioNodeList.cpp:
        (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
        (WebCore::RadioNodeList::elementMatches):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::HTMLConstructionSite::findFosterSite):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::disallowTelephoneNumberParsing):
        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::create):
        * mathml/MathMLElement.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::populate):
        * page/Frame.cpp:
        (WebCore::Frame::searchForLabelsBeforeElement):
        * rendering/RenderButton.cpp:
        (WebCore::RenderButton::formControlElement):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::resize):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::isReadOnlyControl):
        * svg/SVGElement.h:
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        * svg/animation/SVGSMILElement.h:

2014-09-24  Darin Adler  <darin@apple.com>

        Old Turkic characters behave as left-to-right instead of right-to-left, because they are encoded as surrogate pairs.
        https://bugs.webkit.org/show_bug.cgi?id=70029

        Reviewed by Dan Bernstein.

        Test: fast/text/international/old-turkic-direction.html

        * CMakeLists.txt: Added InlineIterator.cpp.
        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * rendering/RenderingAllInOne.cpp: Ditto.

        * rendering/InlineIterator.cpp: Added.
        (WebCore::InlineIterator::surrogateTextDirection): New function used to compute the direction
        when a surrogate pair is involved.
        * rendering/InlineIterator.h: Made the characterAt function private.
        (WebCore::InlineIterator::previousInSameNode): Took out unneeded range check. A zero will underflow
        and become a large number and the characterAt function will return 0 in that case.
        (WebCore::InlineIterator::direction): Added code to check U16_IS_SINGLE before calling
        u_charDirection, and call surrogateTextDirection instead.

2014-09-24  Christophe Dumez  <cdumez@apple.com>

        Unreviewed build fix after r173941.

        Rename shadow to m_shadow.

        * rendering/TextPainter.h:
        (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):

2014-09-22  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION: Text with a zero offset, zero blur shadow vanishes
        https://bugs.webkit.org/show_bug.cgi?id=136801

        Reviewed by Darin Adler.

        This patch performs some cleanup regarding TextPainter's shadow logic and handles an
        additional case of empty shadows. Previously, there was tight coupling between
        applyShadowToGraphicalContext() and paintTextWithShadows(), as they both used a
        collection of variables to determine how shadows are to be drawn. This complexity has
        been moved into a helper class, ShadowApplier, which performs what
        applyShadowToGraphicsContext() used to do, and cleans up correctly in its destructor.
        This removes the tight coupling mentioned earlier.

        Test: fast/text/empty-shadow.html

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::applyShadowToGraphicsContext): Moved to ShadowApplier.
        * rendering/InlineTextBox.h: Deleted applyShadowToGraphicsContext signature.
        * rendering/TextPainter.cpp:
        (WebCore::ShadowApplier::ShadowApplier): Perform the contents of applyShadowToGraphicsContext()
        (WebCore::ShadowApplier::~ShadowApplier): Undo the work done previously
        (WebCore::paintTextWithShadows): Create a ShadowApplier to do the relevant shadow work. In addition,
        refactor some boolean flags to more meaningful ones with relation to the computation at hand.
        (WebCore::isEmptyShadow): Moved to TextPainter.h, named shadowIsCompletelyCoveredByText()
        * rendering/TextPainter.h:
        (WebCore::ShadowApplier::ShadowApplier): Moved from InlineTextBox::applyShadowToGraphicsContext().
        (WebCore::ShadowApplier::extraOffset): Getter.
        (WebCore::ShadowApplier::~ShadowApplier): Moved from TextPainter::paintTextWithShadows().
        (WebCore::isLastShadowIteration): Helper function.
        (WebCore::shadowIsCompletelyCoveredByText): Determines whether or not we should not draw the shadow.
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::paintTextWithShadows): Update to use ShadowApplier.

2014-09-24  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: subtract elapsed time while debugger is paused from profile nodes
        https://bugs.webkit.org/show_bug.cgi?id=136796

        Reviewed by Timothy Hatcher.

        * inspector/TimelineRecordFactory.cpp:
        (WebCore::buildInspectorObject):

2014-09-24  Christophe Dumez  <cdumez@apple.com>

        Use is<HTML*Element>() instead of isHTML*Element() - Part 1
        https://bugs.webkit.org/show_bug.cgi?id=137068

        Reviewed by Ryosuke Niwa.

        Start using is<HTML*Element>() instead of isHTML*Element().
        Remaining usages will be updated in a follow-up patch to
        reduce the size of the change.

        No new tests, no behavior change.

        * accessibility/AccessibilityListBoxOption.cpp:
        (WebCore::AccessibilityListBoxOption::isSelected):
        (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
        (WebCore::AccessibilityListBoxOption::stringValue):
        (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
        * accessibility/AccessibilityMediaControls.cpp:
        (WebCore::AccessibilityMediaTimeline::valueDescription):
        * accessibility/AccessibilityMenuListOption.cpp:
        (WebCore::AccessibilityMenuListOption::setElement):
        * accessibility/AccessibilityMenuListPopup.cpp:
        (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
        (WebCore::AccessibilityNodeObject::isNativeTextControl):
        (WebCore::AccessibilityNodeObject::isNativeImage):
        (WebCore::AccessibilityNodeObject::isInputImage):
        (WebCore::AccessibilityNodeObject::isReadOnly):
        (WebCore::AccessibilityNodeObject::valueForRange):
        (WebCore::AccessibilityNodeObject::maxValueForRange):
        (WebCore::AccessibilityNodeObject::minValueForRange):
        (WebCore::isNodeActionElement):
        (WebCore::AccessibilityNodeObject::titleElementText):
        (WebCore::AccessibilityNodeObject::visibleText):
        (WebCore::AccessibilityNodeObject::title):
        (WebCore::AccessibilityNodeObject::colorValue):
        (WebCore::accessibleNameForNode):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isFileUploadButton):
        (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
        (WebCore::AccessibilityRenderObject::setValue):
        (WebCore::AccessibilityRenderObject::accessibilityHitTest):
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        (WebCore::AccessibilityRenderObject::addTextFieldChildren):
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::notifyChildrenSelectionChange):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isDisabled):
        (WebCore::isEnabled):
        (WebCore::isChecked):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyle):
        * dom/EventDispatcher.cpp:
        (WebCore::EventDispatcher::dispatchEvent):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::selectAll):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::isInPasswordField):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::_processElement):
        * editing/gtk/EditorGtk.cpp:
        (WebCore::elementURL):
        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::appendText):
        (WebCore::isPlainTextMarkup):
        (WebCore::collectElementsToRemoveFromFragment):
        * html/HTMLCollection.cpp:
        (WebCore::isMatchingElement):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::rendererIsNeeded):
        * html/HTMLFormControlElement.cpp:
        (WebCore::shouldAutofocus):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::getTextFieldValues):
        (WebCore::HTMLFormElement::formElementIndex):
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::dispatchLoadEvent):
        (WebCore::HTMLImageLoader::notifyFinished):
        * html/HTMLNameCollection.cpp:
        (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatches):
        * html/HTMLOptGroupElement.cpp:
        (WebCore::HTMLOptGroupElement::recalcSelectOptions):
        (WebCore::HTMLOptGroupElement::ownerSelectElement):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::index):
        (WebCore::HTMLOptionElement::ownerSelectElement):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::add):
        (WebCore::HTMLSelectElement::value):
        (WebCore::HTMLSelectElement::setValue):
        (WebCore::HTMLSelectElement::childShouldCreateRenderer):
        (WebCore::HTMLSelectElement::setLength):
        (WebCore::HTMLSelectElement::nextValidIndex):
        (WebCore::HTMLSelectElement::saveLastSelection):
        (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
        (WebCore::HTMLSelectElement::updateListBoxSelection):
        (WebCore::HTMLSelectElement::listBoxOnChange):
        (WebCore::HTMLSelectElement::recalcListItems):
        (WebCore::HTMLSelectElement::selectedIndex):
        (WebCore::HTMLSelectElement::selectOption):
        (WebCore::HTMLSelectElement::optionToListIndex):
        (WebCore::HTMLSelectElement::listToOptionIndex):
        (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
        (WebCore::HTMLSelectElement::saveFormControlState):
        (WebCore::HTMLSelectElement::searchOptionsForValue):
        (WebCore::HTMLSelectElement::restoreFormControlState):
        (WebCore::HTMLSelectElement::appendFormData):
        (WebCore::HTMLSelectElement::reset):
        (WebCore::HTMLSelectElement::updateSelectedState):
        (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
        (WebCore::HTMLSelectElement::lastSelectedListIndex):
        (WebCore::HTMLSelectElement::optionAtIndex):
        (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
        (WebCore::HTMLSelectElement::length):
        * html/HTMLTagNames.in:
        * html/RadioInputType.cpp:
        (WebCore::RadioInputType::handleKeydownEvent):
        (WebCore::RadioInputType::isKeyboardFocusable):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::hasImpliedEndTag):
        * html/parser/HTMLElementStack.cpp:
        (WebCore::HTMLNames::isSelectScopeMarker):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
        (WebCore::HTMLTreeBuilder::processStartTag):
        (WebCore::HTMLTreeBuilder::processEndTag):
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::mediaControlElementType):
        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::create):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::handleFallbackContent):
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::requestObject):
        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::create):
        * page/Chrome.cpp:
        (WebCore::Chrome::setToolTip):
        * page/EventHandler.cpp:
        (WebCore::isSubmitImage):
        (WebCore::EventHandler::handleMousePressEvent):
        * page/FocusController.cpp:
        (WebCore::clearSelectionIfNeeded):
        * page/FrameView.cpp:
        (WebCore::FrameView::addEmbeddedObjectToUpdate):
        (WebCore::FrameView::updateEmbeddedObject):
        * page/PageSerializer.cpp:
        (WebCore::frameOwnerURLAttributeName):
        * page/SpatialNavigation.cpp:
        (WebCore::canScrollInDirection):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::altDisplayString):
        (WebCore::HitTestResult::absoluteImageURL):
        (WebCore::HitTestResult::absolutePDFURL):
        (WebCore::HitTestResult::isContentEditable):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::resizeTextPermitted):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::sizesLogicalWidthToFitContent):
        * rendering/RenderButton.cpp:
        (WebCore::RenderButton::updateFromElement):
        (WebCore::RenderButton::canHaveGeneratedChildren):
        * rendering/RenderDetailsMarker.cpp:
        (WebCore::RenderDetailsMarker::isOpen):
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::uploadButton):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::updateAltText):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::updateFromElement):
        (WebCore::RenderListBox::addFocusRingRects):
        (WebCore::RenderListBox::paintItemForeground):
        (WebCore::RenderListBox::paintItemBackground):
        * rendering/RenderMenuList.cpp:
        (WebCore::selectedOptionCount):
        (RenderMenuList::updateOptionsWidth):
        (RenderMenuList::setTextFromOption):
        (RenderMenuList::itemText):
        (RenderMenuList::itemIsEnabled):
        (RenderMenuList::itemIsSelected):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paintSliderTicks):
        * testing/Internals.cpp:
        (WebCore::Internals::selectColorInColorChooser):
        (WebCore::Internals::wasLastChangeUserEdit):
        (WebCore::Internals::isSelectPopupVisible):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::startElementNs):

2014-09-24  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Remove MediaPlayer::setHasPlaybackTargetAvailabilityListeners
        https://bugs.webkit.org/show_bug.cgi?id=137075

        Reviewed by Dean Jackson.

        No new tests, this just removes unused code.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setHasPlaybackTargetAvailabilityListeners): Deleted.
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::setHasPlaybackTargetAvailabilityListeners): Deleted.

2014-09-21  Timothy Hatcher  <timothy@apple.com>

        Make the Web Inspector use a separate web process.

        https://bugs.webkit.org/show_bug.cgi?id=135120

        Reviewed by Anders Carlsson.

        * English.lproj/Localizable.strings: Updated.

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/ScriptGlobalObject.h:
        * bindings/js/ScriptState.h:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorPageAgent.h:
        * page/Chrome.h:
        Exported a few functions and private headers.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::setInspectorFrontendClient):
        (WebCore::InspectorController::hasInspectorFrontendClient):
        (WebCore::InspectorController::show):
        * inspector/InspectorController.h:
        Make InspectorFrontendClient a pointer instead of a std::unique_ptr.
        This makes it easier to implement InspectorFrontendClient as
        part of an existing object that is externally owned.

        * testing/Internals.cpp:
        (WebCore::Internals::openDummyInspectorFrontend):
        (WebCore::Internals::closeDummyInspectorFrontend):
        * testing/Internals.h:
        Change InspectorFrontendClientDummy from being moved to owned.

2014-09-23  Dean Jackson  <dino@apple.com>

        [Yosemite] Button text doesn't go white while pushing the button, like it does for real buttons
        https://bugs.webkit.org/show_bug.cgi?id=137054
        rdar://problem/17559038

        Reviewed by Sam Weinig.

        On Yosemite and above, system buttons paint with white-ish text when they
        are pressed. Since this isn't exposed by API, I've hardcoded the value
        into RenderThemeMac.

        The actual state is exposed by adding a :active rule to html.css that
        uses a new CSSValueKeyword: ActiveButtonText.

        Unfortunately I can't find a way to test this, because the active state isn't
        testable. We should really expose the Inspector's forcePseudoState function into
        window.internals.

        * css/CSSValueKeywords.in: Add "activebuttontext".
        * css/html.css:
        (input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]::-webkit-file-upload-button:active, button:active): New rule for active
        button elements.
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::systemColor): Handle CSSValueActivebuttontext as black.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor): Handle CSSValueActivebuttontext as
        white with 75% opacity.

2014-09-24  Christophe Dumez  <cdumez@apple.com>

        Use is<SVG*Element>() instead of isSVG*Element()
        https://bugs.webkit.org/show_bug.cgi?id=137058

        Reviewed by Dirk Schulze.

        Use is<SVG*Element>() instead of isSVG*Element() and drop support for
        generated isSVG*Element().

        No new tests, no behavior change.

        * css/CSSCursorImageValue.cpp:
        (WebCore::resourceReferencedByCursorElement):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::useSVGZoomRulesForLength):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/ScriptElement.cpp:
        (WebCore::toScriptElementIfPossible):
        * dom/make_names.pl:
        (printTypeHelpers):
        * editing/gtk/EditorGtk.cpp:
        (WebCore::elementURL):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::absoluteImageURL):
        (WebCore::HitTestResult::isLiveLink):
        * rendering/svg/RenderSVGEllipse.cpp:
        (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
        * rendering/svg/RenderSVGTransformableContainer.cpp:
        (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
        * rendering/svg/SVGPathData.cpp:
        (WebCore::updatePathFromCircleElement):
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::operator<<):
        * rendering/svg/SVGResources.cpp:
        (WebCore::targetReferenceFromResource):
        * svg/SVGAltGlyphDefElement.cpp:
        (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
        * svg/SVGAltGlyphElement.cpp:
        (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
        * svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
        * svg/SVGDocument.cpp:
        (WebCore::SVGDocument::rootElement):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::isOutermostSVGSVGElement):
        (WebCore::SVGElement::ownerSVGElement):
        (WebCore::SVGElement::viewportElement):
        * svg/SVGFEComponentTransferElement.cpp:
        (WebCore::SVGFEComponentTransferElement::build):
        * svg/SVGFELightElement.cpp:
        (WebCore::SVGFELightElement::findLightElement):
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::ensureGlyphCache):
        * svg/SVGFontFaceElement.cpp:
        (WebCore::SVGFontFaceElement::associatedFontElement):
        (WebCore::SVGFontFaceElement::rebuildFontFace):
        * svg/SVGFontFaceSrcElement.cpp:
        (WebCore::SVGFontFaceSrcElement::srcValue):
        (WebCore::SVGFontFaceSrcElement::childrenChanged):
        * svg/SVGGlyphElement.cpp:
        (WebCore::SVGGlyphElement::invalidateGlyphCache):
        * svg/SVGHKernElement.cpp:
        (WebCore::SVGHKernElement::insertedInto):
        (WebCore::SVGHKernElement::removedFrom):
        * svg/SVGLengthContext.cpp:
        (WebCore::SVGLengthContext::determineViewport):
        * svg/SVGLocatable.cpp:
        (WebCore::isViewportElement):
        * svg/SVGMPathElement.cpp:
        (WebCore::SVGMPathElement::pathElement):
        (WebCore::SVGMPathElement::notifyParentOfPathChange):
        * svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::invalidateMPathDependencies):
        * svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::collectPatternAttributes):
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::setupInitialView):
        * svg/SVGUseElement.cpp:
        (WebCore::dumpInstanceTree):
        (WebCore::SVGUseElement::expandUseElementsInShadowTree):
        * svg/SVGVKernElement.cpp:
        (WebCore::SVGVKernElement::insertedInto):
        (WebCore::SVGVKernElement::removedFrom):

2014-09-24  Benjamin Poulain  <bpoulain@apple.com>

        Remove the style marking from :nth-child()
        https://bugs.webkit.org/show_bug.cgi?id=137055

        Reviewed by Andreas Kling.

        Previously, :nth-child() had to mark the RenderStyle as unique in order
        to prevent it from being used for style sharing.

        After r173229, :nth-child() use the more generic element marking
        "StyleIsAffectedByPreviousSibling".

        In StyleResolver::canShareStyleWithElement(), StyleIsAffectedByPreviousSibling
        is already used to prevent style sharing of those elements, making the "Unique"
        flag redundant.

        Since it is now useless, remove the style marking from SelectorChecker and the CSS JIT.

        Tests: fast/css/nth-child-style-sharing-even.html
               fast/css/nth-child-style-sharing-fixed-integer.html
               fast/css/nth-child-style-sharing-odd.html

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
        (WebCore::SelectorCompiler::setElementChildIndexAndUpdateStyle): Deleted.
        * rendering/style/RenderStyle.h:

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Add support for is<HTML*Element>() for type checking
        https://bugs.webkit.org/show_bug.cgi?id=137015

        Reviewed by Benjamin Poulain.

        Add support for is<HTML*Element>() for type checking while keeping
        support for the legacy toHTML*Element() form until the code base is
        ported.

        toHTML*Element() helpers are now macros to the new is<HTML*Element>()
        type checking helpers.

        No new tests, no behavior change.

        * dom/Document.cpp:
        (WebCore::Document::setTitle):
        * dom/Element.cpp:
        (WebCore::Element::childShouldCreateRenderer):
        * dom/Element.h:
        (WebCore::is):
        (WebCore::downcast):
        (WebCore::isElementOfType): Deleted.
        * dom/ElementAncestorIterator.h:
        (WebCore::lineageOfType):
        * dom/ElementIterator.h:
        (WebCore::findElementAncestorOfType):
        * dom/ElementTraversal.h:
        (WebCore::Traversal<ElementType>::firstChildTemplate):
        (WebCore::Traversal<ElementType>::lastChildTemplate):
        (WebCore::Traversal<ElementType>::firstWithinTemplate):
        (WebCore::Traversal<ElementType>::lastWithinTemplate):
        (WebCore::Traversal<ElementType>::nextTemplate):
        (WebCore::Traversal<ElementType>::previous):
        (WebCore::Traversal<ElementType>::nextSibling):
        (WebCore::Traversal<ElementType>::previousSibling):
        (WebCore::Traversal<ElementType>::nextSkippingChildren):
        * dom/TypedElementDescendantIterator.h:
        (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
        (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
        * dom/make_names.pl:
        (printTypeHelpers):

2014-09-23  Benjamin Poulain  <bpoulain@apple.com>

        The style resolution cache applies properties incorrectly whenever direction != ltr
        https://bugs.webkit.org/show_bug.cgi?id=137052

        Reviewed by Andreas Kling.

        The optimization r135021 introduced a bug whenever the direction of subtree is not
        uniform in the whole page.

        When StyleResolver::applyMatchedProperties() resolves the style, some properties are
        resolved differently based on the writing-mode and the direction.

        In isCacheableInMatchedPropertiesCache(), the cases for writing-mode are already handled
        by not caching any style with anything else than the default.
        The direction was ignored, causing the bugs solved here.

        Tests: css3/flexbox/flex-flow-2.html
               fast/css/style-resolver-cache-direction-1.html
               fast/css/style-resolver-cache-direction-2.html
               fast/css/style-resolver-cache-direction-3.html

        * css/StyleResolver.cpp:
        (WebCore::isCacheableInMatchedPropertiesCache):

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Have CSS classes' methods return more references
        https://bugs.webkit.org/show_bug.cgi?id=137036

        Reviewed by Ryosuke Niwa.

        Have CSS classes' methods return more references instead of pointers
        when possible.

        No new tests, no behavior change.

        * css/CSSFontFaceRule.cpp:
        (WebCore::CSSFontFaceRule::style):
        * css/CSSFontFaceRule.h:
        * css/CSSGroupingRule.cpp:
        (WebCore::CSSGroupingRule::cssRules):
        * css/CSSGroupingRule.h:
        * css/CSSImportRule.cpp:
        (WebCore::CSSImportRule::media):
        * css/CSSImportRule.h:
        * css/CSSPageRule.cpp:
        (WebCore::CSSPageRule::style):
        * css/CSSPageRule.h:
        * css/CSSStyleRule.cpp:
        (WebCore::CSSStyleRule::style):
        * css/CSSStyleRule.h:
        * css/WebKitCSSKeyframeRule.cpp:
        (WebCore::WebKitCSSKeyframeRule::style):
        * css/WebKitCSSKeyframeRule.h:
        * css/WebKitCSSKeyframesRule.cpp:
        (WebCore::WebKitCSSKeyframesRule::cssRules):
        * css/WebKitCSSKeyframesRule.h:
        * css/WebKitCSSViewportRule.cpp:
        (WebCore::WebKitCSSViewportRule::style):
        * css/WebKitCSSViewportRule.h:
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::asCSSRuleList):
        (WebCore::fillMediaListChain):
        (WebCore::InspectorStyleSheet::setRuleSelector):
        (WebCore::InspectorStyleSheet::deleteRule):
        (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
        (WebCore::InspectorStyleSheet::buildObjectForRule):
        (WebCore::InspectorStyleSheet::styleForId):
        (WebCore::InspectorStyleSheet::ruleIndexByStyle):
        (WebCore::InspectorStyleSheet::ruleId):
        (WebCore::InspectorStyleSheet::revalidateStyle):

2014-09-23  Roger Fong  <roger_fong@apple.com>

        [Windows] Enable CSS Supports Rule on Windows.

        * css/CSSAllInOne.cpp:

2014-09-23  Christophe Dumez  <cdumez@apple.com>

        Unreviewed build fix after r173893.

        Partial revert of r173893 to fix debug builds.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::text):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::namedItemGetter):
        (WebCore::JSDOMWindow::getOwnPropertySlot):
        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::isPlaceholderShown):
        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        * dom/Element.cpp:
        (WebCore::Element::insertedInto):
        (WebCore::Element::removedFrom):
        (WebCore::Element::updateName):
        (WebCore::Element::updateId):
        * editing/Editor.cpp:
        (WebCore::Editor::selectionForCommand):
        (WebCore::findFirstMarkable):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::selectAll):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::matchesReadWritePseudoClass):
        (WebCore::HTMLElement::directionality):
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseAttribute):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::updateDocNamedItem):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::enclosingTextFormControl):
        * page/FrameView.cpp:
        (WebCore::FrameView::addEmbeddedObjectToUpdate):
        (WebCore::FrameView::updateEmbeddedObject):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::absolutePDFURL):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintContents):
        (WebCore::RenderEmbeddedObject::layout):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::textFormControlElement):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
        (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
        * testing/Internals.cpp:
        (WebCore::Internals::visiblePlaceholder):

2014-09-22  Wenson Hsieh  <wenson_hsieh@apple.com>

        Implement snapping behavior for Mac overflow scrolling
        https://bugs.webkit.org/show_bug.cgi?id=135774

        Reviewed by Beth Dakin.

        Hooks into AxisScrollSnapAnimator to implement overflow scroll snapping on Mac.

        We need to find a way to test this!

        * dom/Element.cpp:
        (WebCore::Element::dispatchWheelEvent):
        * page/EventHandler.cpp:
        (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::handleWheelEvent):
        (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
        (WebCore::ScrollAnimator::scrollOffsetInAxis):
        (WebCore::ScrollAnimator::immediateScrollInAxis):
        (WebCore::ScrollAnimator::startScrollSnapTimer):
        (WebCore::ScrollAnimator::stopScrollSnapTimer):
        (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
        (WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
        * platform/ScrollAnimator.h:
        * platform/mac/AxisScrollSnapAnimator.h:
        * platform/mac/AxisScrollSnapAnimator.mm:
        (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
        (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
        (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
        (WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Use downcast<HTML*Element>() instead of toHTML*Element()
        https://bugs.webkit.org/show_bug.cgi?id=137007

        Reviewed by Benjamin Poulain.

        Use downcast<HTML*Element>() instead of toHTML*Element() and drop
        transition macros for toHTML*Element().

        This patch also cleans up the surrounding code.

        No new tests, no behavior change.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::labelChanged):
        * accessibility/AccessibilityListBox.cpp:
        (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
        (WebCore::AccessibilityListBox::addChildren):
        * accessibility/AccessibilityListBoxOption.cpp:
        (WebCore::AccessibilityListBoxOption::isSelected):
        (WebCore::AccessibilityListBoxOption::stringValue):
        (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
        * accessibility/AccessibilityMediaControls.cpp:
        (WebCore::AccessibilityMediaTimeline::valueDescription):
        * accessibility/AccessibilityMenuListOption.cpp:
        (WebCore::AccessibilityMenuListOption::isEnabled):
        (WebCore::AccessibilityMenuListOption::isSelected):
        (WebCore::AccessibilityMenuListOption::setSelected):
        (WebCore::AccessibilityMenuListOption::stringValue):
        * accessibility/AccessibilityMenuListPopup.cpp:
        (WebCore::AccessibilityMenuListPopup::addChildren):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
        (WebCore::AccessibilityNodeObject::isNativeTextControl):
        (WebCore::AccessibilityNodeObject::isNativeImage):
        (WebCore::AccessibilityNodeObject::isInputImage):
        (WebCore::AccessibilityNodeObject::isMultiSelectable):
        (WebCore::AccessibilityNodeObject::isReadOnly):
        (WebCore::AccessibilityNodeObject::valueForRange):
        (WebCore::AccessibilityNodeObject::maxValueForRange):
        (WebCore::AccessibilityNodeObject::minValueForRange):
        (WebCore::isNodeActionElement):
        (WebCore::AccessibilityNodeObject::alternativeText):
        (WebCore::AccessibilityNodeObject::visibleText):
        (WebCore::AccessibilityNodeObject::title):
        (WebCore::AccessibilityNodeObject::text):
        (WebCore::AccessibilityNodeObject::stringValue):
        (WebCore::AccessibilityNodeObject::colorValue):
        (WebCore::accessibleNameForNode):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isFileUploadButton):
        (WebCore::AccessibilityRenderObject::stringValue):
        (WebCore::AccessibilityRenderObject::labelElementContainer):
        (WebCore::AccessibilityRenderObject::internalLinkElement):
        (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
        (WebCore::AccessibilityRenderObject::url):
        (WebCore::AccessibilityRenderObject::setValue):
        (WebCore::AccessibilityRenderObject::getDocumentLinks):
        (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
        (WebCore::AccessibilityRenderObject::accessibilityHitTest):
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        (WebCore::AccessibilityRenderObject::addTextFieldChildren):
        (WebCore::AccessibilityRenderObject::stringValueForMSAA):
        (WebCore::AccessibilityRenderObject::isLinked):
        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySlider::inputElement):
        (WebCore::AccessibilitySliderThumb::elementRect):
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::tableElement):
        (WebCore::AccessibilityTable::title):
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::notifyChildrenSelectionChange):
        * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
        (optionFromSelection):
        (webkitAccessibleSelectionGetSelectionCount):
        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
        (webkitAccessibleTableGetCaption):
        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleGetDescription):
        * accessibility/ios/AccessibilityObjectIOS.mm:
        (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::namedItemGetter):
        (WebCore::JSDOMWindow::getOwnPropertySlot):
        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::JSHTMLDocument::nameGetter):
        * bindings/js/JSHTMLFrameSetElementCustom.cpp:
        (WebCore::JSHTMLFrameSetElement::nameGetter):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::isReachableFromDOM):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isChecked):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyle):
        * css/StyleSheetList.cpp:
        (WebCore::StyleSheetList::getNamedItem):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::isPlaceholderShown):
        * dom/CurrentScriptIncrementer.h:
        (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::setDragImage):
        * dom/Document.cpp:
        (WebCore::Document::setTitle):
        (WebCore::Document::processHttpEquiv):
        (WebCore::Document::iconURLs):
        * dom/DocumentOrderedMap.cpp:
        (WebCore::keyMatchesMapName):
        (WebCore::keyMatchesLowercasedMapName):
        (WebCore::keyMatchesLowercasedUsemap):
        (WebCore::DocumentOrderedMap::getElementByMapName):
        (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
        (WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
        (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/Element.cpp:
        (WebCore::Element::insertedInto):
        (WebCore::Element::removedFrom):
        (WebCore::Element::updateName):
        (WebCore::Element::updateId):
        (WebCore::Element::updateLabel):
        (WebCore::Element::ensureCachedHTMLCollection):
        * dom/EventDispatcher.cpp:
        (WebCore::EventDispatcher::dispatchEvent):
        * dom/ScriptElement.cpp:
        (WebCore::toScriptElementIfPossible):
        * dom/VisitedLinkState.cpp:
        (WebCore::linkHashForElement):
        (WebCore::VisitedLinkState::determineLinkStateSlowCase):
        * dom/make_names.pl:
        (printTypeHelpers):
        * editing/Editor.cpp:
        (WebCore::Editor::selectionForCommand):
        (WebCore::imageElementFromImageDocument):
        (WebCore::findFirstMarkable):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::selectAll):
        (WebCore::scanForForm):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
        (WebCore::VisibleSelection::isInPasswordField):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::_processElement):
        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
        * editing/markup.cpp:
        (WebCore::isPlainTextMarkup):
        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::suggestions):
        * html/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
        (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::findAssociatedForm):
        * html/HTMLAnchorElement.cpp:
        (WebCore::appendServerMapMousePosition):
        * html/HTMLAreaElement.cpp:
        (WebCore::HTMLAreaElement::imageElement):
        * html/HTMLCollection.cpp:
        (WebCore::isMatchingElement):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::matchesReadWritePseudoClass):
        (WebCore::HTMLElement::setInnerHTML):
        (WebCore::HTMLElement::directionality):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::rendererIsNeeded):
        * html/HTMLFieldSetElement.cpp:
        (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
        (WebCore::shouldAutofocus):
        * html/HTMLFormControlsCollection.cpp:
        (WebCore::HTMLFormControlsCollection::formControlElements):
        (WebCore::HTMLFormControlsCollection::formImageElements):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::getTextFieldValues):
        (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap):
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseAttribute):
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::notifyFinished):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::dataList):
        (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
        * html/HTMLKeygenElement.cpp:
        (WebCore::HTMLKeygenElement::shadowSelect):
        * html/HTMLLegendElement.cpp:
        (WebCore::HTMLLegendElement::virtualForm):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
        * html/HTMLNameCollection.cpp:
        (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatches):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::updateDocNamedItem):
        (WebCore::HTMLObjectElement::containsJavaApplet):
        * html/HTMLOptGroupElement.cpp:
        (WebCore::HTMLOptGroupElement::recalcSelectOptions):
        (WebCore::HTMLOptGroupElement::ownerSelectElement):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::ownerDataListElement):
        (WebCore::HTMLOptionElement::ownerSelectElement):
        * html/HTMLOptionsCollection.cpp:
        (WebCore::HTMLOptionsCollection::add):
        * html/HTMLOptionsCollection.h:
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
        (WebCore::HTMLSelectElement::value):
        (WebCore::HTMLSelectElement::setValue):
        (WebCore::HTMLSelectElement::saveLastSelection):
        (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
        (WebCore::HTMLSelectElement::updateListBoxSelection):
        (WebCore::HTMLSelectElement::listBoxOnChange):
        (WebCore::HTMLSelectElement::recalcListItems):
        (WebCore::HTMLSelectElement::selectedIndex):
        (WebCore::HTMLSelectElement::selectOption):
        (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
        (WebCore::HTMLSelectElement::saveFormControlState):
        (WebCore::HTMLSelectElement::searchOptionsForValue):
        (WebCore::HTMLSelectElement::restoreFormControlState):
        (WebCore::HTMLSelectElement::appendFormData):
        (WebCore::HTMLSelectElement::reset):
        (WebCore::HTMLSelectElement::updateSelectedState):
        (WebCore::HTMLSelectElement::lastSelectedListIndex):
        (WebCore::HTMLSelectElement::optionAtIndex):
        (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
        * html/HTMLSummaryElement.cpp:
        (WebCore::HTMLSummaryElement::detailsElement):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::caption):
        * html/HTMLTablePartElement.cpp:
        (WebCore::HTMLTablePartElement::findParentTable):
        * html/HTMLTableRowElement.cpp:
        (WebCore::HTMLTableRowElement::rowIndex):
        * html/HTMLTableRowsCollection.cpp:
        (WebCore::HTMLTableRowsCollection::rowAfter):
        (WebCore::HTMLTableRowsCollection::lastRow):
        (WebCore::HTMLTableRowsCollection::customElementAfter):
        * html/HTMLTableRowsCollection.h:
        * html/HTMLTemplateElement.cpp:
        (WebCore::HTMLTemplateElement::cloneNode):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::enclosingTextFormControl):
        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::createDocumentStructure):
        * html/LabelsNodeList.cpp:
        (WebCore::LabelsNodeList::elementMatches):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocumentParser::createDocumentStructure):
        (WebCore::descendentVideoElement):
        (WebCore::ancestorVideoElement):
        (WebCore::MediaDocument::replaceMediaElementTimerFired):
        * html/PluginDocument.cpp:
        (WebCore::PluginDocumentParser::createDocumentStructure):
        * html/RadioInputType.cpp:
        (WebCore::RadioInputType::handleKeydownEvent):
        (WebCore::RadioInputType::isKeyboardFocusable):
        * html/RadioNodeList.cpp:
        (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::updateTickMarkValues):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::insert):
        (WebCore::HTMLConstructionSite::insertTextNode):
        (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
        * html/shadow/DetailsMarkerControl.cpp:
        (WebCore::DetailsMarkerControl::rendererIsNeeded):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
        * html/shadow/MeterShadowElement.cpp:
        (WebCore::MeterShadowElement::meterElement):
        * html/shadow/ProgressShadowElement.cpp:
        (WebCore::ProgressShadowElement::progressElement):
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
        (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
        (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::create):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::handleFallbackContent):
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::requestObject):
        * page/Chrome.cpp:
        (WebCore::Chrome::setToolTip):
        * page/DragController.cpp:
        (WebCore::DragController::draggableElement):
        * page/EventHandler.cpp:
        (WebCore::isSubmitImage):
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocusDirectionally):
        * page/FrameView.cpp:
        (WebCore::FrameView::addEmbeddedObjectToUpdate):
        (WebCore::FrameView::updateEmbeddedObject):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeFrame):
        * page/SpatialNavigation.cpp:
        (WebCore::FocusCandidate::FocusCandidate):
        * page/ios/FrameIOS.mm:
        (WebCore::ancestorRespondingToClickEvents):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::altDisplayString):
        (WebCore::HitTestResult::absolutePDFURL):
        (WebCore::HitTestResult::enterFullscreenForVideo):
        (WebCore::HitTestResult::mediaControlsEnabled):
        (WebCore::HitTestResult::isLiveLink):
        (WebCore::HitTestResult::isContentEditable):
        * rendering/RenderButton.cpp:
        (WebCore::RenderButton::updateFromElement):
        * rendering/RenderCounter.cpp:
        (WebCore::planCounter):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintContents):
        (WebCore::RenderEmbeddedObject::layout):
        * rendering/RenderFieldset.h:
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::inputElement):
        (WebCore::RenderFileUploadControl::uploadButton):
        * rendering/RenderFrame.cpp:
        (WebCore::RenderFrame::frameElement):
        * rendering/RenderFrameSet.cpp:
        (WebCore::RenderFrameSet::frameSetElement):
        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::canvasElement):
        * rendering/RenderIFrame.cpp:
        (WebCore::RenderIFrame::iframeElement):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::RenderImage):
        (WebCore::RenderImage::paintAreaElementFocusRing):
        (WebCore::RenderImage::paintIntoRect):
        (WebCore::RenderImage::imageMap):
        (WebCore::RenderImage::updateAltText):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::canvasCompositingStrategy):
        (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
        (WebCore::RenderLayerBacking::updateConfiguration):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::selectElement):
        (WebCore::RenderListBox::updateFromElement):
        (WebCore::RenderListBox::paintItemForeground):
        (WebCore::RenderListBox::paintItemBackground):
        * rendering/RenderListItem.cpp:
        (WebCore::RenderListItem::calcValue):
        (WebCore::RenderListItem::updateListMarkerNumbers):
        * rendering/RenderMarquee.cpp:
        (WebCore::RenderMarquee::marqueeSpeed):
        * rendering/RenderMenuList.cpp:
        (WebCore::selectedOptionCount):
        (RenderMenuList::selectElement):
        (RenderMenuList::updateOptionsWidth):
        (RenderMenuList::setTextFromOption):
        (RenderMenuList::itemText):
        (RenderMenuList::itemIsSelected):
        * rendering/RenderMeter.cpp:
        (WebCore::RenderMeter::meterElement):
        * rendering/RenderProgress.cpp:
        (WebCore::RenderProgress::progressElement):
        * rendering/RenderSlider.cpp:
        (WebCore::RenderSlider::element):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::textFormControlElement):
        * rendering/RenderTextControlMultiLine.cpp:
        (WebCore::RenderTextControlMultiLine::textAreaElement):
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::inputElement):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paintSliderTicks):
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
        (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::videoElement):
        * svg/graphics/SVGImageCache.cpp:
        (WebCore::SVGImageCache::imageForRenderer):
        * svg/svgtags.in:
        Generate helpers to SVGAElement so that isSVGAElement() can be used
        instead of hasTagName(SVGNames::aTag). I did such update in this
        patch.

        * testing/Internals.cpp:
        (WebCore::Internals::visiblePlaceholder):
        (WebCore::Internals::wasLastChangeUserEdit):
        (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
        (WebCore::Internals::isSelectPopupVisible):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::startElementNs):

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Have DataTransfer::files() return a reference
        https://bugs.webkit.org/show_bug.cgi?id=137039

        Reviewed by Ryosuke Niwa.

        Have DataTransfer::files() return a reference instead of a pointer as
        it can never return null.

        No new tests, no behavior change.

        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::files):
        * dom/DataTransfer.h:

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Have NamedNodeMap::element() and DOMStringMap::element() return a reference
        https://bugs.webkit.org/show_bug.cgi?id=137040

        Reviewed by Ryosuke Niwa.

        Have NamedNodeMap::element() and DOMStringMap::element() return a
        reference instead of a pointer as they can never return null.

        No new tests, no behavior change.

        * dom/DatasetDOMStringMap.h:
        * dom/NamedNodeMap.h:
        (WebCore::NamedNodeMap::element):

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Have DOMImplementation::document() and Element::attributes() return references
        https://bugs.webkit.org/show_bug.cgi?id=137035

        Reviewed by Andreas Kling.

        Have DOMImplementation::document() and Element::attributes() return
        references instead of pointers as they can never return null.

        No new tests, no behavior change.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        Update the JS Bindings code generator to use WTF::getPtr() in a couple
        more places so that the implementation can return references instead
        of pointers even when [GenerateIsReachable=xxx] IDL extended attribute
        is used.

        * dom/DOMImplementation.h:
        (WebCore::DOMImplementation::document):
        * dom/Element.cpp:
        (WebCore::Element::attributes):
        * dom/Element.h:
        (WebCore::Node::attributes):

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Have Document::ensureTemplateDocument() return a reference
        https://bugs.webkit.org/show_bug.cgi?id=137033

        Reviewed by Ryosuke Niwa.

        Have Document::ensureTemplateDocument() return a reference instead of
        a pointer as it can never return null.

        No new tests, no behavior change.

        * dom/Document.cpp:
        (WebCore::Document::ensureTemplateDocument):
        * dom/Document.h:
        * editing/markup.cpp:
        (WebCore::createFragmentForInnerOuterHTML):
        * html/HTMLTemplateElement.cpp:
        (WebCore::HTMLTemplateElement::content):
        (WebCore::HTMLTemplateElement::didMoveToNewDocument):

2014-09-23  Chris Dumez  <cdumez@apple.com>

        Have Document::accessSVGExtensions() return a reference
        https://bugs.webkit.org/show_bug.cgi?id=137030

        Reviewed by Ryosuke Niwa.

        Have Document::accessSVGExtensions() return a reference instead of a
        pointer as it can never return null.

        No new tests, no behavior change.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::removeChild):
        (WebCore::ContainerNode::removeChildren):
        * dom/Document.cpp:
        (WebCore::Document::commonTeardown):
        (WebCore::Document::implicitClose):
        (WebCore::Document::accessSVGExtensions):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::Element::~Element):
        (WebCore::Element::removedFrom):
        * editing/markup.cpp:
        (WebCore::isPlainTextMarkup):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::restore):
        * rendering/FilterEffectRenderer.cpp:
        (WebCore::FilterEffectRenderer::buildReferenceFilter):
        * rendering/svg/RenderSVGResource.cpp:
        (WebCore::removeFromCacheAndInvalidateDependencies):
        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::svgExtensionsFromElement):
        * rendering/svg/RenderSVGResourceContainer.h:
        (WebCore::getRenderSVGResourceContainerById):
        (WebCore::getRenderSVGResourceById):
        * rendering/svg/SVGResources.cpp:
        (WebCore::registerPendingResource):
        (WebCore::SVGResources::buildCachedResources):
        * rendering/svg/SVGResourcesCache.cpp:
        (WebCore::resourcesCacheFromRenderer):
        (WebCore::SVGResourcesCache::resourceDestroyed):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::~SVGElement):
        (WebCore::SVGElement::reportAttributeParsingError):
        (WebCore::SVGElement::removedFrom):
        (WebCore::SVGElement::viewportElement):
        (WebCore::SVGElement::attributeChanged):
        (WebCore::SVGElement::buildPendingResourcesIfNeeded):
        (WebCore::SVGElement::accessDocumentSVGExtensions): Deleted.
        * svg/SVGElement.h:
        * svg/SVGFEConvolveMatrixElement.cpp:
        (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
        * svg/SVGFEGaussianBlurElement.cpp:
        (WebCore::SVGFEGaussianBlurElement::parseAttribute):
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::clearResourceReferences):
        (WebCore::SVGFEImageElement::buildPendingResource):
        * svg/SVGFitToViewBox.cpp:
        (WebCore::SVGFitToViewBox::parseViewBox):
        * svg/SVGFontFaceElement.cpp:
        (WebCore::SVGFontFaceElement::insertedInto):
        (WebCore::SVGFontFaceElement::removedFrom):
        * svg/SVGMPathElement.cpp:
        (WebCore::SVGMPathElement::buildPendingResource):
        (WebCore::SVGMPathElement::clearResourceReferences):
        * svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::parseAttribute):
        (WebCore::SVGPathElement::invalidateMPathDependencies):
        * svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::parseAttribute):
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::~SVGSVGElement):
        (WebCore::SVGSVGElement::insertedInto):
        (WebCore::SVGSVGElement::removedFrom):
        * svg/SVGTRefElement.cpp:
        (WebCore::SVGTRefElement::detachTarget):
        (WebCore::SVGTRefElement::buildPendingResource):
        * svg/SVGTextPathElement.cpp:
        (WebCore::SVGTextPathElement::clearResourceReferences):
        (WebCore::SVGTextPathElement::buildPendingResource):
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::clearResourceReferences):
        (WebCore::SVGUseElement::buildPendingResource):
        (WebCore::SVGUseElement::toClipPath):
        (WebCore::SVGUseElement::buildInstanceTree):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::clearResourceReferences):
        (WebCore::SVGSMILElement::buildPendingResource):

2014-09-23  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
        https://bugs.webkit.org/show_bug.cgi?id=136893

        Reviewed by Timothy Hatcher.

        Automatic inspection is currently disabled for web pages.
        This just updates the interfaces that changed.

        * WebCore.exp.in:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::connectFrontend):
        (WebCore::InspectorController::show):
        * inspector/InspectorController.h:
        * page/PageDebuggable.cpp:
        (WebCore::PageDebuggable::connect):
        * page/PageDebuggable.h:
        * testing/Internals.cpp:
        (WebCore::Internals::openDummyInspectorFrontend):

2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>

        [GTK] Adds implementation of subtle crypto HMAC algorithm
        https://bugs.webkit.org/show_bug.cgi?id=133320

        Reviewed by Philippe Normand.

        Tests are already in place under crypto/subtle/hmac-*.html

        * crypto/gtk/CryptoAlgorithmHMACGtk.cpp:
        (WebCore::getGnutlsDigestAlgorithm):
        (WebCore::calculateSignature):
        (WebCore::CryptoAlgorithmHMAC::platformSign):
        (WebCore::CryptoAlgorithmHMAC::platformVerify):

2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>

        [GTK] Adds implementation of Subtle Crypto digest algorithms
        https://bugs.webkit.org/show_bug.cgi?id=133319

        Reviewed by Philippe Normand.

        Tests are already in place under crypto/subtle/sha-*.html

        * crypto/gtk/CryptoDigestGtk.cpp:
        (WebCore::CryptoDigest::CryptoDigest):
        (WebCore::CryptoDigest::~CryptoDigest):
        (WebCore::CryptoDigest::create):
        (WebCore::CryptoDigest::addBytes):
        (WebCore::CryptoDigest::computeHash):

2014-09-15  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Do not grow tracks when the growth factor is 0
        https://bugs.webkit.org/show_bug.cgi?id=136575

        Reviewed by Darin Adler.

        A couple of performance optimizations for the track sizing
        algorithm. On the one hand we avoid the computation of the
        available logical space share if the track has no growth potential
        (the current breadth is the maximum breadth) and on the other
        hand, we avoid calling RenderGrid::distributeSpaceToTracks() if
        the available logical space is not greater than 0.

        The combined effect of these two changes is an impressive +16%
        improvement in auto-grid-lots-of-data.html performance test.

        No new tests as there is no change in the functionality.

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
        (WebCore::RenderGrid::distributeSpaceToTracks):

2014-09-23  Ion Rosca  <rosca@adobe.com>

        [CSS Blending] The composited layers isolated by the page group should blend with the default white background color.
        https://bugs.webkit.org/show_bug.cgi?id=136563

        Reviewed by Simon Fraser.

        If a blending layer is not isolated, then it should blend with a white backdrop:
        http://dev.w3.org/fxtf/compositing-1/#pagebackdrop

        Tests: css3/blending/blend-mode-body-composited-child-background-color.html
               css3/blending/blend-mode-body-composited-child.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
        If the isolating composited layer is the root renderer, then it should have a backing store
        into which the initial white backdrop will be painted.

2014-09-22  Christophe Dumez  <cdumez@apple.com>

        Unreviewed build fix after r173859.

        Partial revert to fix debug build after r173859.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::getSVGDocument):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        * page/Frame.cpp:
        (WebCore::Frame::setPageAndTextZoomFactors):
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollToAnchor):
        * rendering/svg/RenderSVGBlock.h:
        (WebCore::RenderSVGBlock::graphicsElement):
        * rendering/svg/RenderSVGGradientStop.cpp:
        (WebCore::RenderSVGGradientStop::gradientElement):
        * rendering/svg/RenderSVGInline.h:
        (WebCore::RenderSVGInline::graphicsElement):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
        * rendering/svg/RenderSVGShape.h:
        (WebCore::RenderSVGShape::graphicsElement):
        * rendering/svg/RenderSVGTransformableContainer.h:
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::operator<<):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
        * rendering/svg/SVGResources.cpp:
        (WebCore::targetReferenceFromResource):
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):
        * svg/SVGAnimateElement.cpp:
        (WebCore::SVGAnimateElement::calculateAnimatedValue):
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::getBoundingBox):
        * svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
        * svg/SVGLocatable.cpp:
        (WebCore::SVGLocatable::getTransformToElement):
        * svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::synchronizePoints):
        (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
        * svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::synchronizeTextLength):
        (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
        (WebCore::SVGTextContentElement::elementFromRenderer):
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::toClipPath):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::connectConditions):
        (WebCore::SVGSMILElement::disconnectConditions):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::hasSingleSecurityOrigin):
        (WebCore::SVGImage::setContainerSize):
        (WebCore::SVGImage::containerSize):
        (WebCore::SVGImage::embeddedContentBox):
        (WebCore::SVGImage::hasRelativeWidth):
        (WebCore::SVGImage::hasRelativeHeight):
        (WebCore::SVGImage::computeIntrinsicDimensions):
        (WebCore::SVGImage::startAnimation):
        (WebCore::SVGImage::stopAnimation):

2014-09-22  Simon Fraser  <simon.fraser@apple.com>

        Ensure that layout is up-to-date before hit-testing via RenderView
        https://bugs.webkit.org/show_bug.cgi?id=136651

        Reviewed by David Hyatt.

        Ensure that layout is up-to-date before we do hit-testing via the RenderView.
        Previously, RenderLayer::hitTest() called updateLayout(), but it's better
        to push that responsibility onto RenderView before entering the RenderLayer
        tree.
        
        Make callers a little more consistent in getting the RenderView via
        Frame::contentRenderer(), though perhaps we should remove that and just
        call Document::renderView() everywhere.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::press): Hit test via the RenderView, rather
        than doing so on the RenderView's layer, to ensure that we updateLayout().
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::accessibilityHitTest): This code calls
        hitTest() on arbitrary layers, so needs to explicitly update layout.
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::contains):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::eventMayStartDrag):
        (WebCore::EventHandler::updateSelectionForMouseDrag):
        (WebCore::EventHandler::hitTestResultAtPoint): The explicit updateLayout() is
        no longer needed.
        (WebCore::EventHandler::updateCursor):
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::hoverTimerFired):
        (WebCore::hitTestResultInFrame):
        * page/Frame.cpp:
        (WebCore::Frame::contentRenderer):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::hitTest):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::hitTest): Here's where we ensure that layout is up-to-date.

2014-09-22  Christophe Dumez  <cdumez@apple.com>

        Use downcast<SVG*Element>() instead of toSVG*Element()
        https://bugs.webkit.org/show_bug.cgi?id=137004

        Reviewed by Benjamin Poulain.

        Use downcast<SVG*Element>() instead of toSVG*Element() for casting SVG
        Elements and get rid of the transition toSVG*Element() macros.

        Also use downcast<MathML*Element>() instead of toMathML*Element() for
        casting MathML Elements.

        The HTML Elements casting counterparts will be taken care of in a
        separate patch.

        No new tests, no behavior change.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::alternativeText):
        (WebCore::AccessibilityNodeObject::accessibilityDescription):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSCursorImageValue.cpp:
        (WebCore::resourceReferencedByCursorElement):
        (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchAllRules):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::locateCousinList):
        (WebCore::StyleResolver::canShareStyleWithElement):
        (WebCore::StyleResolver::locateSharedStyle):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/Element.cpp:
        (WebCore::Element::synchronizeAllAttributes):
        (WebCore::Element::synchronizeAttribute):
        (WebCore::Element::boundsInRootViewSpace):
        (WebCore::Element::getBoundingClientRect):
        (WebCore::Element::childShouldCreateRenderer):
        (WebCore::Element::fastAttributeLookupAllowed):
        * dom/EventDispatcher.cpp:
        (WebCore::eventTargetRespectingTargetRules):
        * dom/ScriptElement.cpp:
        (WebCore::toScriptElementIfPossible):
        * dom/make_names.pl:
        (printTypeHelpers):
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::getSVGDocument):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::isPhrasingContent):
        (WebCore::MathMLElement::childShouldCreateRenderer):
        (WebCore::MathMLElement::attributeChanged):
        * mathml/MathMLElement.h:
        (WebCore::Node::hasTagName):
        * mathml/MathMLSelectElement.cpp:
        (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        (WebCore::instanceAssociatedWithShadowTreeElement):
        * page/Frame.cpp:
        (WebCore::Frame::setPageAndTextZoomFactors):
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollToAnchor):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::parseColSpanFromDOM):
        (WebCore::RenderTableCell::parseRowSpanFromDOM):
        (WebCore::RenderTableCell::computePreferredLogicalWidths):
        * rendering/mathml/RenderMathMLMenclose.cpp:
        (WebCore::RenderMathMLMenclose::addChild):
        (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
        (WebCore::RenderMathMLMenclose::updateLogicalHeight):
        (WebCore::RenderMathMLMenclose::paint):
        * rendering/svg/RenderSVGBlock.h:
        (WebCore::RenderSVGBlock::graphicsElement):
        * rendering/svg/RenderSVGForeignObject.cpp:
        (WebCore::RenderSVGForeignObject::foreignObjectElement):
        * rendering/svg/RenderSVGGradientStop.cpp:
        (WebCore::RenderSVGGradientStop::gradientElement):
        * rendering/svg/RenderSVGGradientStop.h:
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::imageElement):
        * rendering/svg/RenderSVGInline.h:
        (WebCore::RenderSVGInline::graphicsElement):
        * rendering/svg/RenderSVGModelObject.cpp:
        (WebCore::getElementCTM):
        (WebCore::RenderSVGModelObject::checkIntersection):
        (WebCore::RenderSVGModelObject::checkEnclosure):
        * rendering/svg/RenderSVGModelObject.h:
        (WebCore::RenderSVGModelObject::element):
        * rendering/svg/RenderSVGRect.cpp:
        (WebCore::RenderSVGRect::rectElement):
        * rendering/svg/RenderSVGResource.cpp:
        (WebCore::removeFromCacheAndInvalidateDependencies):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
        (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
        * rendering/svg/RenderSVGResourceClipper.h:
        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
        * rendering/svg/RenderSVGResourceFilter.h:
        * rendering/svg/RenderSVGResourceLinearGradient.h:
        * rendering/svg/RenderSVGResourceMarker.h:
        * rendering/svg/RenderSVGResourceMasker.h:
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::patternElement):
        * rendering/svg/RenderSVGResourceRadialGradient.h:
        * rendering/svg/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::svgSVGElement):
        * rendering/svg/RenderSVGShape.h:
        (WebCore::RenderSVGShape::graphicsElement):
        * rendering/svg/RenderSVGText.cpp:
        (WebCore::RenderSVGText::textElement):
        * rendering/svg/RenderSVGTextPath.cpp:
        (WebCore::RenderSVGTextPath::textPathElement):
        (WebCore::RenderSVGTextPath::layoutPath):
        * rendering/svg/RenderSVGTransformableContainer.cpp:
        (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
        * rendering/svg/RenderSVGTransformableContainer.h:
        * rendering/svg/RenderSVGViewportContainer.cpp:
        (WebCore::RenderSVGViewportContainer::svgSVGElement):
        * rendering/svg/SVGPathData.cpp:
        (WebCore::updatePathFromLineElement):
        (WebCore::updatePathFromPathElement):
        (WebCore::updatePathFromPolygonElement):
        (WebCore::updatePathFromPolylineElement):
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::layoutChildren):
        (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
        (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::operator<<):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
        * rendering/svg/SVGResources.cpp:
        (WebCore::targetReferenceFromResource):
        (WebCore::SVGResources::buildCachedResources):
        * rendering/svg/SVGTextLayoutEngine.cpp:
        (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::createElementRenderer):
        (WebCore::SVGAElement::defaultEventHandler):
        * svg/SVGAltGlyphDefElement.cpp:
        (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
        * svg/SVGAltGlyphElement.cpp:
        (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
        * svg/SVGAnimateElement.cpp:
        (WebCore::SVGAnimateElement::calculateAnimatedValue):
        * svg/SVGAnimatedTransformList.cpp:
        (WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator):
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
        (WebCore::SVGAnimationElement::adjustForInheritance):
        * svg/SVGDocument.cpp:
        (WebCore::SVGDocument::rootElement):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::ownerSVGElement):
        (WebCore::SVGElement::viewportElement):
        (WebCore::SVGElement::getBoundingBox):
        (WebCore::SVGElement::childShouldCreateRenderer):
        (WebCore::SVGElement::title):
        (WebCore::SVGElement::updateRelativeLengthsInformation):
        * svg/SVGElement.h:
        (WebCore::Node::hasTagName):
        * svg/SVGFEComponentTransferElement.cpp:
        (WebCore::SVGFEComponentTransferElement::build):
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::buildPendingResource):
        * svg/SVGFilterElement.cpp:
        (WebCore::SVGFilterElement::childShouldCreateRenderer):
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        (WebCore::isSVGFilterPrimitiveStandardAttributes):
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::ensureGlyphCache):
        * svg/SVGFontFaceElement.cpp:
        (WebCore::SVGFontFaceElement::rebuildFontFace):
        * svg/SVGFontFaceFormatElement.cpp:
        (WebCore::SVGFontFaceFormatElement::childrenChanged):
        * svg/SVGFontFaceSrcElement.cpp:
        (WebCore::SVGFontFaceSrcElement::srcValue):
        (WebCore::SVGFontFaceSrcElement::childrenChanged):
        * svg/SVGFontFaceUriElement.cpp:
        (WebCore::SVGFontFaceUriElement::childrenChanged):
        * svg/SVGGlyphElement.cpp:
        (WebCore::SVGGlyphElement::invalidateGlyphCache):
        * svg/SVGGraphicsElement.h:
        (WebCore::isSVGGraphicsElement):
        * svg/SVGHKernElement.cpp:
        (WebCore::SVGHKernElement::insertedInto):
        (WebCore::SVGHKernElement::removedFrom):
        * svg/SVGImageLoader.cpp:
        (WebCore::SVGImageLoader::dispatchLoadEvent):
        * svg/SVGLengthContext.cpp:
        (WebCore::SVGLengthContext::determineViewport):
        * svg/SVGLinearGradientElement.cpp:
        (WebCore::setGradientAttributes):
        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
        * svg/SVGLocatable.cpp:
        (WebCore::SVGLocatable::nearestViewportElement):
        (WebCore::SVGLocatable::farthestViewportElement):
        (WebCore::SVGLocatable::computeCTM):
        (WebCore::SVGLocatable::getTransformToElement):
        * svg/SVGMPathElement.cpp:
        (WebCore::SVGMPathElement::buildPendingResource):
        (WebCore::SVGMPathElement::pathElement):
        (WebCore::SVGMPathElement::notifyParentOfPathChange):
        * svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::synchronizeOrientType):
        (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
        * svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::invalidateMPathDependencies):
        (WebCore::SVGPathElement::lookupOrCreateDWrapper):
        (WebCore::SVGPathElement::synchronizeD):
        * svg/SVGPathSegList.cpp:
        (WebCore::SVGPathSegList::commitChange):
        * svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::collectPatternAttributes):
        * svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::synchronizePoints):
        (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
        * svg/SVGRadialGradientElement.cpp:
        (WebCore::setGradientAttributes):
        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::setupInitialView):
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::synchronizeTextLength):
        (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
        (WebCore::SVGTextContentElement::elementFromRenderer):
        * svg/SVGTextContentElement.h:
        (WebCore::isSVGTextContentElement):
        * svg/SVGTextPathElement.cpp:
        (WebCore::SVGTextPathElement::buildPendingResource):
        * svg/SVGUseElement.cpp:
        (WebCore::dumpInstanceTree):
        (WebCore::SVGUseElement::buildPendingResource):
        (WebCore::SVGUseElement::toClipPath):
        (WebCore::SVGUseElement::buildInstanceTree):
        (WebCore::SVGUseElement::hasCycleUseReferencing):
        (WebCore::SVGUseElement::expandUseElementsInShadowTree):
        (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
        * svg/SVGVKernElement.cpp:
        (WebCore::SVGVKernElement::insertedInto):
        (WebCore::SVGVKernElement::removedFrom):
        * svg/SVGViewSpec.cpp:
        (WebCore::SVGViewSpec::viewTarget):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::buildPendingResource):
        (WebCore::SVGSMILElement::connectConditions):
        (WebCore::SVGSMILElement::disconnectConditions):
        * svg/animation/SVGSMILElement.h:
        (WebCore::isSVGSMILElement):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::hasSingleSecurityOrigin):
        (WebCore::SVGImage::setContainerSize):
        (WebCore::SVGImage::containerSize):
        (WebCore::SVGImage::embeddedContentBox):
        (WebCore::SVGImage::hasRelativeWidth):
        (WebCore::SVGImage::hasRelativeHeight):
        (WebCore::SVGImage::computeIntrinsicDimensions):
        (WebCore::SVGImage::startAnimation):
        (WebCore::SVGImage::stopAnimation):
        * svg/graphics/filters/SVGFEImage.cpp:
        (WebCore::FEImage::platformApplySoftware):
        * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
        (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
        * svg/properties/SVGPathSegListPropertyTearOff.cpp:
        (WebCore::SVGPathSegListPropertyTearOff::contextElement):

2014-09-22  Pratik Solanki  <psolanki@apple.com>

        Follow on fix for [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
        https://bugs.webkit.org/show_bug.cgi?id=136962

        Rubber-stamped by Simon Fraser.

        Remove the const per review comment. It is not needed.

        * loader/cocoa/DiskCacheMonitorCocoa.mm:
        (WebCore::DiskCacheMonitor::DiskCacheMonitor):

2014-09-22  Simon Fraser  <simon.fraser@apple.com>

        Move nodeFromPoint() back to Document where it belongs
        https://bugs.webkit.org/show_bug.cgi?id=137012

        Reviewed by Zalan Bujtas.

        nodeFromPoint() was moved into TreeScope for ShadowDOM work, but now we can move
        it back to its logical place.
        
        Make versions of elementFromPoint and caretRangeFromPoint that take LayoutPoints,
        and change the current scale/offset code to be in layout units (which results
        in a small behavior change).
        
        elementFromPoint(int, int) and caretRangeFromPoint(int, int) are still required
        for bindings code.

        * dom/Document.cpp:
        (WebCore::Document::nodeFromPoint):
        (WebCore::Document::elementFromPoint):
        (WebCore::Document::caretRangeFromPoint):
        * dom/Document.h:
        (WebCore::Document::elementFromPoint): Move logic from TreeScope::elementFromPoint()
        here.
        * dom/TreeScope.cpp:
        (WebCore::nodeFromPoint): Deleted.
        (WebCore::TreeScope::elementFromPoint): Deleted.
        * dom/TreeScope.h:

2014-09-22  Benjamin Poulain  <bpoulain@apple.com>

        Add the baseline implementation of :nth-child(An+B of selector-list)
        https://bugs.webkit.org/show_bug.cgi?id=136975

        Reviewed by Darin Adler.

        Tests: fast/css/nth-child-of-classname.html
               fast/css/nth-child-of-complex-selector.html
               fast/css/nth-child-of-compound-selector.html
               fast/css/nth-child-of-tagname.html
               fast/selectors/nth-child-of-basics.html
               fast/selectors/nth-child-of-class-style-update.html
               fast/selectors/nth-child-of-complex-selectors.html
               fast/selectors/nth-child-of-selector-list.html

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        Pretty basic:
        -Go over the previous siblings.
        -For each sibling, test the selector list. If it matches, increase the count.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):
        Skip any case of the new selector. This will be implemented separately.

2014-09-19  Myles C. Maxfield  <mmaxfield@apple.com>

        Implement 'vhea', 'vmtx', and 'kern' tables in SVG -> OTF converter
        https://bugs.webkit.org/show_bug.cgi?id=136971

        Reviewed by Darin Adler.

        This patch fills in the tables related to vertical metrics and kerning. The vertical metrics tables are
        fairly straightforward. On the other hand, the 'kern' table has subtables which can be in a variety
        of formats; however, according to Microsoft, Windows only allows one particular format, which doesn't
        allow for ranges of glyphs to be described and therefore might lead to a large 'kern' table size. In
        the interest of platform agnosticism I have implemented this particular format, and have not actually
        witnessed any extremely large 'kern' tables in any of the fonts that I have looked at.

        I also added basic support for the horiz-origin-x and horiz-origin-y SVG properties, though support
        might not be perfect based on my testing.

        Regarding testing, after this patch, almost all of our SVG fonts tests pass (barring tiny rebaselining;
        the platform font system calculates slightly different advances than we did. These differences are tiny
        and expected from such a dramatic shift in text handling engines.) There are around two dozen failing
        tests left that look like they are actually indiciative of code problems.

        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::ensureGlyphCache): Refactor to accept new signature of
        SVG*KernElement::build*KerningPair().
        * svg/SVGHKernElement.cpp:
        (WebCore::SVGHKernElement::buildHorizontalKerningPair): Refactor to allow for intermediate data to be
        returned, which the SVG -> OTF font converter can use.
        * svg/SVGHKernElement.h: New signature for buildHorizontalKerningPair().
        * svg/SVGToOTFFontConversion.cpp:
        (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Save the glyph's vertical advance along with
        the glyph's horizontal advance.
        (WebCore::SVGToOTFFontConverter::KerningData::KerningData): This data represents a record in one of
        the two 'kern' subtables, and as such needs to be sorted.
        (WebCore::SVGToOTFFontConverter::KerningData::operator<): Sort comparator.
        (WebCore::SVGToOTFFontConverter::appendHEADTable): Save the unitsPerEm locally to save a conditional.
        (WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto. Also use the horizontal advance as opposed to
        the vertical advance.
        (WebCore::SVGToOTFFontConverter::appendOS2Table): Save the unitsPerEm locally to save a conditional.
        Also if the average advance isn't found in the font, use the missing glyph's advance. If there is no
        missing glyph, bail and use the unitsPerEm.
        (WebCore::SVGToOTFFontConverter::appendVORGTable): If the default vertical origin isn't found in the
        font, use the missing glyphs's vertical origin. If there is no missing glyph, bail and use 0.
        (WebCore::SVGToOTFFontConverter::appendVHEATable): Parallel of 'hhea' table, except for vertical info.
        (WebCore::SVGToOTFFontConverter::appendVMTXTable): Parallel of 'hmtx' table, except for vertical info.
        (WebCore::SVGToOTFFontConverter::appendKerningHelperFields): Computes and appends 4 fields that font
        parsers need in order to do a binary search on the kern records.
        (WebCore::SVGToOTFFontConverter::addCodepointRanges): For each codepoint in the ranges, look up its
        representative glyph and append it to a set.
        (WebCore::SVGToOTFFontConverter::addCodepoints): For each codepoint in the range, look up its
        representative glyph and append it to a set.
        (WebCore::SVGToOTFFontConverter::addGlyphNames): For each glyph name, look up its representative glyph
        and append it to a set.
        (WebCore::SVGToOTFFontConverter::computeKerningData): Call SVG*KernElement::build*KerningPair() and
        iterate through all the data it returned, building up records into a Vector.
        (WebCore::SVGToOTFFontConverter::appendKERNTable): Go through the vector that computeKerningData()
        returned and actually write out the two subtables. One is for horizontal kerning and the other is for
        vertical kerning.
        (WebCore::CFFBuilder::CFFBuilder): Use the position of the glyph origin to perform the initial moveto
        command.
        (WebCore::transcodeGlyphPaths): Get the glyph's origin and pass it to the CFFBuilder.
        (WebCore::SVGToOTFFontConverter::appendGlyphData): Templated overloading so that the missing glyph
        gets a null SVGGlyphElement pointer but the rest of the glyphs get a non-null one.
        (WebCore::SVGToOTFFontConverter::processGlyphElement): Called on both SVGGlyphElements and
        SVGMissingGlyphElements, this pulls out information from the element and computs its path information.
        (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Use the new templated version of
        processGlyphElement so we can get the same glyph parsing behavior on SVGMissingGlyphElements. In
        addition, populate two maps for the kerning table creation function to use.
        (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Append new tables.
        * svg/SVGVKernElement.cpp:
        (WebCore::SVGVKernElement::buildVerticalKerningPair): Refactor to allow for intermediate data to be
        returned, which the SVG -> OTF font converter can use.
        * svg/SVGVKernElement.h: New signature for buildVerticalKerningPair().

2014-09-22  Alexey Proskuryakov  <ap@apple.com>

        WebSocket crash when a connection is closed from server side
        https://bugs.webkit.org/show_bug.cgi?id=137009
        rdar://problem/18333977
        rdar://problem/12708225

        Reviewed by Brady Eidson.

        I don't think that this can be tested with our test server.

        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::WebSocketChannel): Added logging.
        (WebCore::WebSocketChannel::~WebSocketChannel): Ditto.
        (WebCore::WebSocketChannel::close): Protect self, because startClosingHandshake
        can release the last reference.
        (WebCore::WebSocketChannel::fail): Added an assertion that the channel is always
        closed after this function.
        (WebCore::WebSocketChannel::startClosingHandshake): Protect self, and don't change
        the stack from closed back to closing if after failing to send closing handshake.
        (WebCore::WebSocketChannel::processOutgoingFrameQueue): Protect self.

2014-09-22  David Hyatt  <hyatt@apple.com>

        Bad cast in isValidColumnSpanner.
        https://bugs.webkit.org/show_bug.cgi?id=133380.

        Reviewed by Simon Fraser.

        Added fast/multicol/multicol-crazy-nesting.html

        * rendering/RenderMultiColumnFlowThread.cpp:
        (WebCore::isValidColumnSpanner):
        The crawl up the chain looking for unsplittable objects should use containing blocks
        and not be casting to parent boxes. You can have an inline in the parent chain, so
        this was not the right way to walk up the tree.

2014-09-22  David Hyatt  <hyatt@apple.com>

        ASSERT in RenderMultiColumnSet::requiresBalancing.
        https://bugs.webkit.org/show_bug.cgi?id=136376.

        Reviewed by David Kilzer.

        Added fast/multicol/multicol-selection.html.

        * rendering/RenderMultiColumnFlowThread.cpp:
        (WebCore::isValidColumnSpanner):
        Don't allow an object to become a spanner if it does not have the flow
        thread as its containing block. Otherwise the flow thread won't get notified
        of spanner placeholder insertions, and so the spanner ends up orphaned.

2014-09-19  Brent Fulgham  <bfulgham@apple.com>

        [Win] Implement cap height in SimpleFontDataWin to enable initial-letter support for Windows.
        https://bugs.webkit.org/show_bug.cgi?id=136841

        Reviewed by David Hyatt.

        * platform/graphics/win/SimpleFontDataCGWin.cpp:
        (WebCore::SimpleFontData::platformInit): Add missing calls to set up our fonts.

2014-09-22  Eric Carlson  <eric.carlson@apple.com>

        Update HTMLMediaElement logging
        https://bugs.webkit.org/show_bug.cgi?id=136991

        Reviewed by Alexey Proskuryakov.

        No new tests, only logging was changed.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::parseAttribute):

2014-09-22  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        REGRESSION(r173631): It broke the !ENABLE(VIDEO) build
        https://bugs.webkit.org/show_bug.cgi?id=136946

        Reviewed by Jer Noble.

        No new tests required, no new functionality.

        * page/DragController.cpp:
        (WebCore::DragController::startDrag):

2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>

        [CSSRegions] Use nullptr in regions code
        https://bugs.webkit.org/show_bug.cgi?id=137001

        Reviewed by Andrei Bucur.

        No new tests as no new functionality is introduced.

        * dom/DOMNamedFlowCollection.cpp:
        (WebCore::DOMNamedFlowCollection::item):
        (WebCore::DOMNamedFlowCollection::namedItem):
        * dom/NamedFlowCollection.cpp:
        (WebCore::NamedFlowCollection::flowByName):
        * dom/WebKitNamedFlow.cpp:
        (WebCore::WebKitNamedFlow::WebKitNamedFlow):
        * rendering/RenderFlowThread.cpp:
        (WebCore::RenderFlowThread::getLayerListForRegion):
        (WebCore::RenderFlowThread::regionForCompositedLayer):
        (WebCore::RenderFlowThread::regionAtBlockOffset):
        (WebCore::RenderFlowThread::mapFromFlowToRegion):
        (WebCore::RenderFlowThread::firstRegion):
        (WebCore::RenderFlowThread::lastRegion):
        (WebCore::RenderFlowThread::currentActiveRenderBox):
        * rendering/RenderNamedFlowThread.cpp:
        (WebCore::RenderNamedFlowThread::nextRendererForElement):

2014-09-17  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Cannot play Vimeo video
        https://bugs.webkit.org/show_bug.cgi?id=134969

        Reviewed by Sergio Villar Senin.

        Ensure the GStreamer HTTP source element also sends cookies when
        it's sending its requests. Some streaming platforms such as Vimeo
        do server-side cookie checks on incoming requests before serving
        media data.

        Test: http/tests/media/hls/video-cookie.html

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcStart): Set first-party cookie URL to the request so
        the ResourceLoader properly sets cookies in the HTTP request.

2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>

        Leverage RenderLayerBacking::renderer() instead of m_owningLayer.renderer()
        https://bugs.webkit.org/show_bug.cgi?id=136954

        Reviewed by Darin Adler.

        No new tests just refactoring.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateCompositedBounds):
        (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
        (WebCore::RenderLayerBacking::paintIntoLayer):

2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>

        [CSS Regions] Assertion failure and null dereference crash when using animations and regions
        https://bugs.webkit.org/show_bug.cgi?id=136918

        Reviewed by Andrei Bucur.

        In some situations, for instance when an image has an attached animation, the style change caused by the animation
        triggers a geometry update for the backing store associated with the image's layer. This may occur before
        the layout for the image has finished.

        Moreover, if the image in such situation - having a composited layer - is displayed in a region,
        sicne the layout did not finish yet, the mappings between the layers of the elements collected in the named flow
        and the regions associated with the named flow are not updated and cannot be used.

        Therefore in those situations, we have to bail out early and use these mappings only after the layout has finished.

        This patch also changes RenderLayerBacking method updateAfterDescendents -> updateAfterDescendants.

        Test: fast/regions/animated-image-in-region.html

        * rendering/RenderFlowThread.cpp:
        (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateAfterDescendants):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
        (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
        (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):

2014-09-21  Chris Dumez  <cdumez@apple.com>

        Generate Element casting helper functions
        https://bugs.webkit.org/show_bug.cgi?id=136839

        Reviewed by Darin Adler.

        Generate Element casting helper functions instead of requiring explicit
        use of NODE_TYPE_CASTS() macro. Casting is now done using the following
        form: downcast<HTMLDivElement>(), instead of toHTMLDivElement().

        The previous form (i.e. toHTMLDivElement()) is still supported for now
        by generating macros that convert these calls into the new form, until
        the code base is ported to the new casting helpers.

        The plan is also to use is<HTMLDivElement>() instead of
        isHTMLDivElement() for consistency but this was not changed in this
        patch to avoid blowing up the size.

        This CL also updates the way we convert a JSValue into an
        implementation pointer. Instead of using toHTMLDivElement(), which
        looked like a cast, we now use JSHTMLDivElement::toWrapped(). This
        avoids conflicting with the toXXXElement() macros and makes it
        clearer this is not a simple cast.

        No new tests, no behavior change.

        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::QuickTimePluginReplacement::installReplacement):
        * WebCore.exp.in:
        * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
        (WebCore::JSAudioBufferSourceNode::setBuffer):
        * bindings/js/JSBlobCustom.cpp:
        (WebCore::constructJSBlob):
        * bindings/js/JSCommandLineAPIHostCustom.cpp:
        (WebCore::JSCommandLineAPIHost::getEventListeners):
        (WebCore::JSCommandLineAPIHost::databaseId):
        (WebCore::JSCommandLineAPIHost::storageId):
        * bindings/js/JSDOMFormDataCustom.cpp:
        (WebCore::toHTMLFormElementOrNull):
        (WebCore::constructJSDOMFormData):
        (WebCore::JSDOMFormData::append):
        (WebCore::toHTMLFormElement): Deleted.
        * bindings/js/JSDOMStringListCustom.cpp:
        (WebCore::JSDOMStringList::toWrapped):
        (WebCore::toDOMStringList): Deleted.
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::toWrapped):
        (WebCore::toDOMWindow): Deleted.
        * bindings/js/JSDictionary.cpp:
        (WebCore::JSDictionary::convertValue):
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::createTouchList):
        * bindings/js/JSEventTargetCustom.cpp:
        (WebCore::JSEventTarget::toWrapped):
        (WebCore::toEventTarget): Deleted.
        * bindings/js/JSExceptionBase.cpp:
        (WebCore::toExceptionBase):
        * bindings/js/JSHTMLMediaElementCustom.cpp:
        (WebCore::JSHTMLMediaElement::setController):
        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
        (WebCore::JSHTMLOptionsCollection::add):
        (WebCore::JSHTMLOptionsCollection::remove):
        * bindings/js/JSHTMLSelectElementCustom.cpp:
        (WebCore::JSHTMLSelectElement::remove):
        (WebCore::selectIndexSetter):
        * bindings/js/JSInspectorFrontendHostCustom.cpp:
        (WebCore::JSInspectorFrontendHost::showContextMenu):
        * bindings/js/JSMessageEventCustom.cpp:
        (WebCore::handleInitMessageEvent):
        * bindings/js/JSMessagePortCustom.cpp:
        (WebCore::fillMessagePortArray):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::JSNode::insertBefore):
        (WebCore::JSNode::replaceChild):
        (WebCore::JSNode::removeChild):
        (WebCore::JSNode::appendChild):
        * bindings/js/JSNodeFilterCustom.cpp:
        (WebCore::JSNodeFilter::toWrapped):
        (WebCore::toNodeFilter): Deleted.
        * bindings/js/JSSubtleCryptoCustom.cpp:
        (WebCore::JSSubtleCrypto::encrypt):
        (WebCore::JSSubtleCrypto::decrypt):
        (WebCore::JSSubtleCrypto::sign):
        (WebCore::JSSubtleCrypto::verify):
        (WebCore::JSSubtleCrypto::exportKey):
        (WebCore::JSSubtleCrypto::wrapKey):
        (WebCore::JSSubtleCrypto::unwrapKey):
        * bindings/js/JSWebGLRenderingContextCustom.cpp:
        (WebCore::JSWebGLRenderingContext::getAttachedShaders):
        (WebCore::JSWebGLRenderingContext::getProgramParameter):
        (WebCore::JSWebGLRenderingContext::getShaderParameter):
        (WebCore::JSWebGLRenderingContext::getUniform):
        (WebCore::dataFunctionf):
        (WebCore::dataFunctioni):
        (WebCore::dataFunctionMatrix):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::send):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::dumpIfTerminal):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        (GenerateParametersCheck):
        (JSValueToNative):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
        (WebCore::JSTestActiveDOMObject::toWrapped):
        (WebCore::toTestActiveDOMObject): Deleted.
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
        (WebCore::JSTestCustomNamedGetter::toWrapped):
        (WebCore::toTestCustomNamedGetter): Deleted.
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructor::toWrapped):
        (WebCore::toTestEventConstructor): Deleted.
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
        (WebCore::JSTestEventTarget::toWrapped):
        (WebCore::toTestEventTarget): Deleted.
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::JSTestException::toWrapped):
        (WebCore::toTestException): Deleted.
        * bindings/scripts/test/JS/JSTestException.h:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachable::toWrapped):
        (WebCore::toTestGenerateIsReachable): Deleted.
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::setJSTestInterfaceImplementsNode):
        (WebCore::setJSTestInterfaceSupplementalNode):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
        (WebCore::JSTestInterface::toWrapped):
        (WebCore::toTestInterface): Deleted.
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::JSTestMediaQueryListListener::toWrapped):
        (WebCore::toTestMediaQueryListListener): Deleted.
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructor::toWrapped):
        (WebCore::toTestNamedConstructor): Deleted.
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
        (WebCore::JSTestNondeterministic::toWrapped):
        (WebCore::toTestNondeterministic): Deleted.
        * bindings/scripts/test/JS/JSTestNondeterministic.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::setJSTestObjTestObjAttr):
        (WebCore::setJSTestObjXMLObjAttr):
        (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
        (WebCore::setJSTestObjWithScriptStateAttributeRaises):
        (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
        (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
        (WebCore::setJSTestObjMutablePoint):
        (WebCore::setJSTestObjImmutablePoint):
        (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
        (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
        (WebCore::jsTestObjPrototypeFunctionConvert1):
        (WebCore::jsTestObjPrototypeFunctionConvert2):
        (WebCore::jsTestObjPrototypeFunctionConvert4):
        (WebCore::jsTestObjPrototypeFunctionConvert5):
        (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
        (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
        (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
        (WebCore::JSTestObj::toWrapped):
        (WebCore::toTestObj): Deleted.
        * bindings/scripts/test/JS/JSTestObj.h:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
        (WebCore::JSTestOverloadedConstructors::toWrapped):
        (WebCore::toTestOverloadedConstructors): Deleted.
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
        (WebCore::toTestSerializedScriptValueInterface): Deleted.
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
        (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
        (WebCore::JSTestTypedefs::toWrapped):
        (WebCore::toTestTypedefs): Deleted.
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        * bindings/scripts/test/JS/JSattribute.cpp:
        (WebCore::JSattribute::toWrapped):
        (WebCore::toattribute): Deleted.
        * bindings/scripts/test/JS/JSattribute.h:
        * bindings/scripts/test/JS/JSreadonly.cpp:
        (WebCore::JSreadonly::toWrapped):
        (WebCore::toreadonly): Deleted.
        * bindings/scripts/test/JS/JSreadonly.h:
        * dom/Element.h:
        (WebCore::downcast):
        * dom/make_names.pl:
        (printTypeHelpers):
        * html/HTMLAnchorElement.h:
        * html/HTMLAreaElement.h:
        * html/HTMLAudioElement.h:
        * html/HTMLBaseElement.h:
        * html/HTMLBodyElement.h:
        * html/HTMLCanvasElement.h:
        * html/HTMLDataListElement.h:
        * html/HTMLDetailsElement.h:
        * html/HTMLDivElement.h:
        * html/HTMLEmbedElement.h:
        * html/HTMLFieldSetElement.h:
        * html/HTMLFormElement.h:
        * html/HTMLFrameElement.h:
        * html/HTMLFrameSetElement.h:
        * html/HTMLHtmlElement.h:
        * html/HTMLIFrameElement.h:
        * html/HTMLImageElement.h:
        * html/HTMLInputElement.h:
        * html/HTMLLabelElement.h:
        * html/HTMLLegendElement.h:
        * html/HTMLLinkElement.h:
        * html/HTMLMapElement.h:
        * html/HTMLMarqueeElement.h:
        * html/HTMLMetaElement.h:
        * html/HTMLMeterElement.h:
        * html/HTMLOListElement.h:
        * html/HTMLObjectElement.h:
        * html/HTMLOptGroupElement.h:
        * html/HTMLOptionElement.h:
        * html/HTMLParamElement.h:
        * html/HTMLProgressElement.h:
        * html/HTMLScriptElement.h:
        * html/HTMLSelectElement.h:
        * html/HTMLSourceElement.h:
        * html/HTMLStyleElement.h:
        * html/HTMLSummaryElement.h:
        * html/HTMLTableCaptionElement.h:
        * html/HTMLTableElement.h:
        * html/HTMLTableRowElement.h:
        * html/HTMLTemplateElement.h:
        * html/HTMLTextAreaElement.h:
        * html/HTMLTitleElement.h:
        * html/HTMLTrackElement.h:
        * html/HTMLVideoElement.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::scriptValueAsNode):
        * mathml/MathMLMencloseElement.h:
        * svg/SVGAltGlyphDefElement.h:
        * svg/SVGAltGlyphElement.h:
        * svg/SVGAltGlyphItemElement.h:
        * svg/SVGAnimateMotionElement.h:
        * svg/SVGAnimateTransformElement.h:
        * svg/SVGCircleElement.h:
        * svg/SVGClipPathElement.h:
        * svg/SVGCursorElement.h:
        * svg/SVGEllipseElement.h:
        * svg/SVGFEDistantLightElement.h:
        * svg/SVGFEFuncAElement.h:
        * svg/SVGFEFuncBElement.h:
        * svg/SVGFEFuncGElement.h:
        * svg/SVGFEFuncRElement.h:
        * svg/SVGFEMergeNodeElement.h:
        * svg/SVGFEPointLightElement.h:
        * svg/SVGFESpotLightElement.h:
        * svg/SVGFilterElement.h:
        * svg/SVGFontElement.h:
        * svg/SVGFontFaceElement.h:
        * svg/SVGFontFaceNameElement.h:
        * svg/SVGFontFaceSrcElement.h:
        * svg/SVGFontFaceUriElement.h:
        * svg/SVGForeignObjectElement.h:
        * svg/SVGGlyphElement.h:
        * svg/SVGGlyphRefElement.h:
        * svg/SVGHKernElement.h:
        * svg/SVGImageElement.h:
        * svg/SVGLineElement.h:
        * svg/SVGLinearGradientElement.h:
        * svg/SVGMPathElement.h:
        * svg/SVGMarkerElement.h:
        * svg/SVGMaskElement.h:
        * svg/SVGMissingGlyphElement.h:
        * svg/SVGPathElement.h:
        * svg/SVGPatternElement.h:
        * svg/SVGPolygonElement.h:
        * svg/SVGPolylineElement.h:
        * svg/SVGRadialGradientElement.h:
        * svg/SVGRectElement.h:
        * svg/SVGSVGElement.h:
        * svg/SVGScriptElement.h:
        * svg/SVGStopElement.h:
        * svg/SVGStyleElement.h:
        * svg/SVGTextElement.h:
        * svg/SVGTextPathElement.h:
        * svg/SVGTitleElement.h:
        * svg/SVGUseElement.h:
        * svg/SVGVKernElement.h:
        * svg/SVGViewElement.h:

2014-09-21  Christophe Dumez  <cdumez@apple.com>

        Fix post-mortem nits for r173724
        https://bugs.webkit.org/show_bug.cgi?id=136986

        Reviewed by Darin Adler.

        Fix post-mortem nits for r173724.

        No new tests, no behavior change.

        * editing/EditingStyle.cpp:
        (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
        (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
        Use nullptr instead of 0.

        * editing/SplitElementCommand.cpp:
        (WebCore::SplitElementCommand::doUnapply):
        Use getIdAttribute() / setIdAttribute().

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::computePreferredLogicalWidths):
        Use fastHasAttribute() for nowrap and do an early return to avoid
        calling styleOrColLogicalWidth() if the nowrap attribute is missing.

2014-09-21  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, speculative build fix.
        
        If you use typed arrays, you gotta include runtime/TypedArrayInlines.h.

        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:

2014-09-19  Jer Noble  <jer.noble@apple.com>

        [EME][Mac] Support secure proof of key release in the com.apple.fps.2_0 keysystem.
        https://bugs.webkit.org/show_bug.cgi?id=136898

        Reviewed by Eric Carlson.

        Add support for proof of key release to the CDM by supporting a new "mime" type called
        "keyrelease". When a session of type "keyrelease" is created, the initData is the server
        certificate, the keyMessage contains the first stored proof of key release if present,
        and closing the session will remove that proof from storage.

        * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
        (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
        (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
        (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
        (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
        (WebCore::sessionStorageDirectory):
        (WebCore::CDMSessionMediaSourceAVFObjC::update):
        (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):

2014-09-19  Jer Noble  <jer.noble@apple.com>

        [Media][Mac] Buffered range slides around as you resize a window
        https://bugs.webkit.org/show_bug.cgi?id=136960

        Reviewed by Dean Jackson.

        Rather than using a canvas as the background image for the timeline slider, use a generated SVG image
        to represent the buffered ranges.

        * Modules/mediacontrols/mediaControlsApple.css:
        (audio::-webkit-media-controls-timeline):
        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.createControls):
        (Controller.prototype.updateProgress):

2014-09-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [CoordinatedGraphics][EFL] window.scrollTo(x, y) doesn't work when fixed layout is enabled
        https://bugs.webkit.org/show_bug.cgi?id=136917

        Reviewed by Darin Adler.

        When fixed layout is enabled, scrollTo doesn't work on EFL port with coordinated graphics.
        Since updateScrollbars() doesn't update scroll position when delegatesScrolling() is enabled. 
        To fix this issue, EFL port should update scroll position based on WK2 port. This patch
        update scroll position in FrameView::requestScrollPositionUpdate() as Mac port.

        TestWebKitAPI: Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewScrollTo

        * page/FrameView.cpp:
        (WebCore::FrameView::requestScrollPositionUpdate):

2014-09-19  Brent Fulgham  <bfulgham@apple.com>

        Latching in iframes is not working as expected
        https://bugs.webkit.org/show_bug.cgi?id=136729
        <rdar://problem/18370549>

        Reviewed by Simon Fraser.

        Test: platform/mac/fast/scrolling/scrolling-iframe-100pct.html

        Correct latching behavior by moving the concept of latching from the event handler to the main frame.
        The event handlers are per-document, and can improperly latch to the iframe element (rather than the
        scrollable content of the iframe) resulting in incorrect behavior.

        Also move the wheel event delta tracking to the main frame, as this is similarly "top-level" in nature.

        * WebCore.vcxproj/WebCore.vcxproj: Add new LatchedState class.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::EventHandler): Update constructor after moving some members to the new
        LatchedState object.
        (WebCore::EventHandler::clear): Call 'clear' on the LatchedState class.
        (WebCore::EventHandler::platformRecordWheelEvent):  Update for new LatchedState class.
        (WebCore::EventHandler::handleWheelEvent): Ditto.
        (WebCore::EventHandler::clearLatchedState): Ditto.
        (WebCore::EventHandler::defaultWheelEventHandler): Ditto.
        * page/EventHandler.h:
        * page/LatchedState.cpp: Added.
        (WebCore::LatchedState::LatchedState):
        (WebCore::LatchedState::~LatchedState):
        (WebCore::LatchedState::clear):
        (WebCore::LatchedState::setWheelEventElement):
        (WebCore::LatchedState::setWidgetIsLatched):
        (WebCore::LatchedState::setPreviousWheelScrolledElement):
        (WebCore::LatchedState::setScrollableContainer):
        * page/LatchedState.h: Added.
        (WebCore::LatchedState::wheelEventElement):
        (WebCore::LatchedState::frame):
        (WebCore::LatchedState::setFrame):
        (WebCore::LatchedState::widgetIsLatched):
        (WebCore::LatchedState::previousWheelScrolledElement):
        (WebCore::LatchedState::scrollableContainer):
        (WebCore::LatchedState::startedGestureAtScrollLimit):
        (WebCore::LatchedState::setStartedGestureAtScrollLimit):
        * page/MainFrame.cpp:
        (WebCore::MainFrame::MainFrame): Update for new members (LatchedState and WheelEventDeltaTracker)
        * page/MainFrame.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformPrepareForWheelEvents): Use mainFrame-located latching information.
        (WebCore::EventHandler::platformRecordWheelEvent): Use mainFrame-located wheel event delta tracking.
        (WebCore::EventHandler::platformCompleteWheelEvent): Make sure to use the latched frame as well as
        the latched element so that events get routed properly.
        (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Update for new mainFrame
        location for latched state information.

2014-09-19  Chris Dumez  <cdumez@apple.com>

        Minimize virtual function calls in MarkupAccumulator
        https://bugs.webkit.org/show_bug.cgi?id=136957

        Reviewed by Benjamin Poulain.

        This patch minimizes the number of virtual function calls in
        MarkupAccumulator by:
        - De-virtualizing MarkupAccumulator::appendString(), which is never
          overridden
        - Having MarkupAccumulator::appendEndTag() virtual function take an
          Element in argument instead of a Node, as it only applies to Element.
          Also add a non-virtual overload that takes a Node in argument and
          that does the isElementNode() check so that we don't need to explicitly
          do the check at each call site.

        No new tests, no behavior change.

        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::appendEndTag):
        (WebCore::MarkupAccumulator::shouldSelfClose):
        (WebCore::MarkupAccumulator::appendEndMarkup):
        * editing/MarkupAccumulator.h:
        (WebCore::MarkupAccumulator::appendEndTag):
        * page/PageSerializer.cpp:
        (WebCore::SerializerMarkupAccumulator::appendEndTag):

2014-09-19  Pratik Solanki  <psolanki@apple.com>

        [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
        https://bugs.webkit.org/show_bug.cgi?id=136962
        <rdar://problem/18342344>

        Reviewed by Geoffrey Garen.

        The disk cache monitor callback code was being executed on the main thread. This is wrong
        when the web thread is being used in WebKit1 on iOS. The code needs to run on the web
        thread. Use WebThreadRun to dispatch the block to the web thread. This works for WebKit2 as
        well since when web thread is not being used, WebThreadRun invokes the block directly.

        * loader/cocoa/DiskCacheMonitorCocoa.mm:
        (WebCore::DiskCacheMonitor::DiskCacheMonitor):

2014-09-19  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix; pass duration into the lambda.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):

2014-09-19  Dean Jackson  <dino@apple.com>

        Multithreaded WebGL is a bad idea - remove it
        https://bugs.webkit.org/show_bug.cgi?id=136964
        <rdar://problem/18399858>

        Reviewed by Brent Fulgham.

        We should not allow multithreaded GL access. Remove the
        feature.

        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::create):
        * page/Settings.in:
        * platform/graphics/GraphicsContext3D.h:
        (WebCore::GraphicsContext3D::Attributes::Attributes):
        * platform/graphics/mac/GraphicsContext3DMac.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):

2014-09-19  Eric Carlson  <eric.carlson@apple.com>

        [MSE][Mac] work around AVSampleBufferRenderSynchronizer early callbacks
        https://bugs.webkit.org/show_bug.cgi?id=136958

        Reviewed by Jer Noble.

        No new tests, we have been unable to come up with a test case that reproduces
        this issue reliably.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged): Set the synchronizer
            time to duration when the duration time observer is called early. Add more logging.

2014-09-19  Benjamin Poulain  <bpoulain@apple.com>

        CSS JIT: allocate the minimum required register count in debug
        https://bugs.webkit.org/show_bug.cgi?id=136933

        Reviewed by Andreas Kling.

        It is hard to catch bugs of minimumRegisterRequirements() because every CPU has a different
        number of registers available by default.

        This patch aims at improving testing by creating artificial register pressure when running
        in debug. When running in debug, we no longer allocate all the available registers right away.
        Instead, we allocate just enough to satisfy minimumRegisterRequirements().

        The expectation with this is that under-allocation would be detected quicker since they would
        crash debug builds.

        * cssjit/RegisterAllocator.h:
        (WebCore::RegisterAllocator::RegisterAllocator):
        (WebCore::RegisterAllocator::reserveCallerSavedRegisters):
        (WebCore::RegisterAllocator::availableRegisterCount): Deleted.
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

2014-09-19  Benjamin Poulain  <bpoulain@apple.com>

        Add a size check for CSSSelector
        https://bugs.webkit.org/show_bug.cgi?id=136882

        Reviewed by Christophe Dumez.

        * css/CSSSelector.cpp:

2014-09-19  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        REGRESSION(r173464): It broke the !ENABLE(PICTURE_SIZES) build
        https://bugs.webkit.org/show_bug.cgi?id=136942

        Reviewed by Simon Fraser.

        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseAttribute):

2014-09-19  Simon Fraser  <simon.fraser@apple.com>

        Provide a default argument for the most commonly used HitTestRequest variant
        https://bugs.webkit.org/show_bug.cgi?id=136653

        Reviewed by Darin Adler.

        Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent
        and change call sites using the default flags to use a HitTestRequest temporary.

        * dom/TreeScope.cpp:
        (WebCore::nodeFromPoint):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::contains):
        * page/DragController.cpp:
        (WebCore::elementUnderMouse):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseDraggedEvent):
        (WebCore::EventHandler::handleMousePressEvent):
        * rendering/HitTestRequest.h:
        (WebCore::HitTestRequest::HitTestRequest):

2014-09-19  Chris Dumez  <cdumez@apple.com>

        Allow DOM methods to return references instead of pointers
        https://bugs.webkit.org/show_bug.cgi?id=136931

        Reviewed by Sam Weinig.

        It is common practice in WebKit to have methods return a reference
        instead of a pointer if the pointer can never be null. However, this
        unfortunately did not work for DOM methods (functions called by JS
        bindings). This prevented further refactoring.

        This patch brings support for having DOM methods to return references
        instead of pointers when the pointer cannot be null. The generated
        bindings were calling WTF::getPtr() on the pointer type returned by
        the implementation already (in case it was a smart pointer type).
        This patch leverages this by having WTF::getPtr() convert reference
        arguments into raw pointers.

        This patch also updates a few DOM methods on Document and Element
        classes to return a reference instead of a pointer, to test the change.
        There are likely more DOM methods that can be updated though.

        No new tests, no behavior change.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::classList):
        * bindings/js/JSDOMBinding.h:
        (WTF::getPtr): Deleted.
        * dom/Document.cpp:
        (WebCore::Document::implementation):
        (WebCore::Document::webkitGetNamedFlows):
        (WebCore::Document::namedFlows):
        (WebCore::Document::setXMLVersion):
        (WebCore::Document::setXMLStandalone):
        (WebCore::Document::securityPolicy):
        (WebCore::Document::styleSheets):
        * dom/Document.h:
        (WebCore::Document::timing):
        * dom/Element.cpp:
        (WebCore::Element::classList):
        (WebCore::Element::dataset):
        * dom/Element.h:
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlPanelElement::setPosition):
        (WebCore::MediaControlPanelElement::resetPosition):
        (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
        * html/track/VTTRegion.cpp:
        (WebCore::VTTRegion::displayLastTextTrackCueBox):
        (WebCore::VTTRegion::willRemoveTextTrackCueBox):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getAllStyleSheets):
        (WebCore::InspectorCSSAgent::getNamedFlowCollection):
        * page/PerformanceTiming.cpp:
        (WebCore::PerformanceTiming::documentTiming):
        * rendering/FlowThreadController.cpp:
        (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):

2014-09-19  Daniel Bates  <dabates@apple.com>

        Always assume internal SDK when building configuration Production
        https://bugs.webkit.org/show_bug.cgi?id=136925
        <rdar://problem/18362399>

        Reviewed by Dan Bernstein.

        As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
        and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.

        * Configurations/Base.xcconfig:

2014-09-19  Chris Dumez  <cdumez@apple.com>

        Optimize MarkupAccumulator::appendText()
        https://bugs.webkit.org/show_bug.cgi?id=136935

        Reviewed by Benjamin Poulain.

        MarkupAccumulator::appendText() was calling the generic appendNodeValue()
        method to append the text. appendNodeValue() supports any kind of Node and
        thus calls the Node::nodeValue() virtual function.

        Since appendText() is the only caller to appendNodeValue(), this patch
        inlines the code in appendText() and makes it specific to Text Node, and
        thus more efficient. The code now calls CharacterData::data() instead of
        the Node::nodeValue() virtual function. This patch also updates
        CharacterData::data() to return a const reference to avoid copying the
        return value.

        No new tests, no behavior change.

        * dom/CharacterData.h:
        (WebCore::CharacterData::data):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::appendText):
        (WebCore::MarkupAccumulator::appendNodeValue): Deleted.
        * editing/MarkupAccumulator.h:

2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Dot not allow to create delete-on-destroy GMainLoopSources
        https://bugs.webkit.org/show_bug.cgi?id=136923

        Reviewed by Gustavo Noronha Silva.

        * platform/gtk/GtkDragAndDropHelper.cpp:
        (WebCore::GtkDragAndDropHelper::handleDragLeave): Use GMainLoopSource::scheduleAndDeleteOnDestroy().

2014-09-18  Roger Fong  <roger_fong@apple.com>

        Add a move operator and constructor override to HashSet.
        https://bugs.webkit.org/show_bug.cgi?id=136934.

        * dom/Node.cpp:
        (WebCore::Document::invalidateNodeListAndCollectionCaches): Remove the now unneeded call to clear the HashSet.

2014-09-18  Roger Fong  <roger_fong@apple.com>

        [Windows] Media tests all fail because they cannot find localized strings.
        
        * rendering/RenderThemeSafari.cpp:
        (WebCore::RenderThemeSafari::mediaControlsScript):
        Make sure to use localized strings files in RenderThemeSafari.

2014-09-18  Simon Fraser  <simon.fraser@apple.com>

        Remove generator/yield terminology in RenderInline's GeneratorContext
        https://bugs.webkit.org/show_bug.cgi?id=119278

        Reviewed by Sam Weinig.
        
        Get rid of the icky Generator/yield syntax used for collecting rects in RenderInline.
        Just replace the operator() with an explicit addRect().
        
        Also some drive-by nullptr cleanup, and removing default arguments from
        addChildIgnoringContinuation() calls.

        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::willBeDestroyed):
        (WebCore::RenderInline::styleDidChange):
        (WebCore::RenderInline::splitInlines):
        (WebCore::RenderInline::addChildToContinuation):
        (WebCore::RenderInline::generateLineBoxRects):
        (WebCore::RenderInline::generateCulledLineBoxRects):
        * rendering/RenderInline.h:

2014-09-18  Jeremy Jones  <jeremyj@apple.com>

        Improve fullscreen video rotation animation.
        https://bugs.webkit.org/show_bug.cgi?id=136870

        Reviewed by Simon Fraser.

        Instead of setting the frame on the video layer, set position and bounds separately. This allows the position to be synchronized with the rest of the animation.
        When using a fencePort to synchronize animations, if the fence times out, pivoting around the center provides a better fallback.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVVideoLayer setVideoSublayer:]): added
        (-[WebAVVideoLayer videoSublayer]): added
        (-[WebAVVideoLayer setBounds:]):  set position and bounds insted of frame.
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): use setVideoSublayer
        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
        (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): set bounds and anchorPoint instead of frame
        (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): set bounds instead of frame.

2014-09-17  Myles C. Maxfield  <mmaxfield@apple.com>

        Text laid out with the SVG -> OTF font converter does not have the same metrics as with the SVG font code path
        https://bugs.webkit.org/show_bug.cgi?id=136907

        Reviewed by Darin Adler.

        There are three things that are causing text laid out with the SVG -> OTF font converter to not have metrics that
        measure our existing SVG codepath. They are:

        1. Creating a font with a 0 ascent or descent makes OS X think that something is wrong with the font, and take
        a different codepath when trying to parse ascent and descent information. This patch checks for this condition
        and sets the ascent/descent to 1 FUnit instead (which is generally much smaller than a pixel).
        2. Our SVG font codepath hardcodes a line gap of 1/10th of the font size for every font. This patch makes the
        font converter obey this.
        3. The converter was not allowing for default glyph advances as per the SVG font specification. This patch
        does so.

        No new tests yet, but they will come soon! I promise!

        * svg/SVGToOTFFontConversion.cpp:
        (WebCore::SVGToOTFFontConverter::appendHHEATable):
        (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

2014-09-18  Daniel Bates  <dabates@apple.com>

        REGRESSION (r168921): SVG elements may be unnecessarily rebuilt
        https://bugs.webkit.org/show_bug.cgi?id=136373

        Reviewed by David Kilzer.

        Fixes an issue where a SVG element may be unnecessarily rebuilt. In particular,
        it is unnecessary to rebuild a SVG element that will be removed from the document.

        Test: svg/custom/remove-subtree-including-use-with-child-textpath-that-references-earlier-path.html

        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Modified to remove a SVG element
        from the list of elements to be rebuilt.

2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>

        Unreviewed rollout r173731. Broke multiple builds.

        * WebCore.exp.in:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::connectFrontend):
        (WebCore::InspectorController::show):
        * inspector/InspectorController.h:
        * page/PageDebuggable.cpp:
        (WebCore::PageDebuggable::connect):
        * page/PageDebuggable.h:
        * testing/Internals.cpp:
        (WebCore::Internals::openDummyInspectorFrontend):

2014-09-18  Beth Dakin  <bdakin@apple.com>

        ASSERT in RenderBox::instrinsicScrollbarLogicalWidth opening the inspector
        https://bugs.webkit.org/show_bug.cgi?id=136929

        Reviewed by Simon Fraser.

        This is a regression from http://trac.webkit.org/changeset/173668 
        This code is wrong after that change because it assumes that overflow:scroll will 
        always have a scrollbar. That is no longer the case. We need to check to make sure 
        it’s an overflow:scroll that does NOT have overflow:auto behavior.

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::instrinsicScrollbarLogicalWidth):

2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
        https://bugs.webkit.org/show_bug.cgi?id=136893

        Reviewed by Timothy Hatcher.

        Automatic inspection is currently disabled for web pages.
        This just updates the interfaces that changed.

        * WebCore.exp.in:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::connectFrontend):
        (WebCore::InspectorController::show):
        * inspector/InspectorController.h:
        * page/PageDebuggable.cpp:
        (WebCore::PageDebuggable::connect):
        * page/PageDebuggable.h:
        * testing/Internals.cpp:
        (WebCore::Internals::openDummyInspectorFrontend):

2014-09-18  Chris Dumez  <cdumez@apple.com>

        Use fastHasAttribute() / fastGetAttribute() when possible
        https://bugs.webkit.org/show_bug.cgi?id=136900

        Reviewed by Benjamin Poulain.

        Use fastHasAttribute() / fastGetAttribute() when possible, that is when
        the attribute is not SVG-animated or the |style| attribute, to avoid
        synchronizing attributes unnecessarily.

        Also avoid calling hasAttribute(xxxAttr) then getAttribute(xxxAttr) as
        it causes 2 linear searches. It is best to call getAttribute(xxxAttr)
        directly and check if it returns the nullAtom.

        No new tests, no behavior change. Element::fastAttributeLookupAllowed()
        is there as a safety set for debug builds.

        * accessibility/AccessibilityListBoxOption.cpp:
        (WebCore::AccessibilityListBoxOption::isEnabled):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
        (WebCore::AccessibilityNodeObject::hierarchicalLevel):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
        * dom/Document.cpp:
        (WebCore::Document::hasManifest):
        * dom/DocumentOrderedMap.cpp:
        (WebCore::keyMatchesLabelForAttribute):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
        * dom/Element.cpp:
        (WebCore::Element::imageSourceURL):
        (WebCore::Element::pseudo):
        (WebCore::Element::spellcheckAttributeState):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
        * editing/EditingStyle.cpp:
        (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
        (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
        * editing/SplitElementCommand.cpp:
        (WebCore::SplitElementCommand::doUnapply):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::draggable):
        (WebCore::HTMLAnchorElement::sendPings):
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::updateWidget):
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::value):
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::dir):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::imageSourceURL):
        (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs):
        * html/HTMLFieldSetElement.cpp:
        (WebCore::HTMLFieldSetElement::~HTMLFieldSetElement):
        (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
        (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
        (WebCore::HTMLFieldSetElement::disabledStateChanged):
        (WebCore::HTMLFieldSetElement::childrenChanged):
        (WebCore::HTMLFieldSetElement::didMoveToNewDocument):
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::action):
        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::noResize):
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::location):
        * html/HTMLHRElement.cpp:
        (WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
        * html/HTMLHtmlElement.cpp:
        (WebCore::HTMLHtmlElement::insertedByParser):
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::altText):
        (WebCore::HTMLImageElement::alt):
        (WebCore::HTMLImageElement::draggable):
        (WebCore::HTMLImageElement::src):
        (WebCore::HTMLImageElement::addSubresourceAttributeURLs):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::finishParsingChildren):
        (WebCore::HTMLInputElement::altText):
        (WebCore::HTMLInputElement::reset):
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::control):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::rel):
        * html/HTMLMetaElement.cpp:
        (WebCore::HTMLMetaElement::content):
        (WebCore::HTMLMetaElement::httpEquiv):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::imageSourceURL):
        (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
        * html/HTMLOptGroupElement.cpp:
        (WebCore::HTMLOptGroupElement::groupLabelText):
        * html/HTMLProgressElement.cpp:
        (WebCore::HTMLProgressElement::max):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::sourceAttributeValue):
        (WebCore::HTMLScriptElement::charsetAttributeValue):
        (WebCore::HTMLScriptElement::languageAttributeValue):
        (WebCore::HTMLScriptElement::forAttributeValue):
        (WebCore::HTMLScriptElement::eventAttributeValue):
        * html/HTMLTableCellElement.cpp:
        (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::rules):
        (WebCore::HTMLTableElement::summary):
        (WebCore::HTMLTableElement::addSubresourceAttributeURLs):
        * html/HTMLTableSectionElement.cpp:
        (WebCore::HTMLTableSectionElement::align):
        (WebCore::HTMLTableSectionElement::ch):
        (WebCore::HTMLTableSectionElement::vAlign):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::maxLength):
        * html/SearchInputType.cpp:
        (WebCore::SearchInputType::searchEventsShouldBeDispatched):
        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::create):
        * page/Frame.cpp:
        (WebCore::Frame::matchLabelsAgainstElement):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeFrame):
        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::writeImageToDataObject):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::altDisplayString):
        * rendering/RenderSearchField.cpp:
        (WebCore::RenderSearchField::autosaveName):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::computePreferredLogicalWidths):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):

2014-09-18  Chris Dumez  <cdumez@apple.com>

        Have LiveNodeLists / HTMLCollections's elementMatches() take a reference
        https://bugs.webkit.org/show_bug.cgi?id=136902

        Reviewed by Darin Adler.

        Have LiveNodeLists / HTMLCollections's elementMatches() take a reference
        in argument instead of a pointer as the Element can never be null.

        No new tests, no behavior change.

        * dom/ClassNodeList.h:
        (WebCore::ClassNodeList::elementMatches):
        * dom/DocumentOrderedMap.cpp:
        (WebCore::keyMatchesWindowNamedItem):
        (WebCore::keyMatchesDocumentNamedItem):
        * dom/Element.cpp:
        (WebCore::Element::updateNameForDocument):
        (WebCore::Element::updateIdForDocument):
        * dom/LiveNodeList.cpp:
        (WebCore::LiveNodeList::namedItem):
        * dom/LiveNodeList.h:
        (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
        (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
        (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
        (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
        * dom/NameNodeList.h:
        (WebCore::NameNodeList::elementMatches):
        * dom/TagNodeList.h:
        (WebCore::TagNodeList::elementMatches):
        (WebCore::HTMLTagNodeList::elementMatches):
        * html/HTMLCollection.cpp:
        (WebCore::isMatchingElement):
        * html/HTMLNameCollection.cpp:
        (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
        (WebCore::WindowNameCollection::elementMatches):
        (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatches):
        * html/HTMLNameCollection.h:
        * html/LabelsNodeList.cpp:
        (WebCore::LabelsNodeList::elementMatches):
        * html/LabelsNodeList.h:
        * html/RadioNodeList.cpp:
        (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
        (WebCore::RadioNodeList::elementMatches):
        * html/RadioNodeList.h:

2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        Remove unused methods from MediaPlayerClient
        https://bugs.webkit.org/show_bug.cgi?id=136884

        Reviewed by Eric Carlson.

        Remove unused methods from MediaPlayerClient that introduce
        dependencies on WebCore types.

        * html/HTMLMediaElement.cpp:
        * html/HTMLMediaElement.h:
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerOwningDocument): Deleted.
        (WebCore::MediaPlayerClient::mediaPlayerHostWindow): Deleted.
        (WebCore::MediaPlayerClient::mediaPlayerWindowClipRect): Deleted.

2014-09-17  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Add Wayland support to GLContextEGL
        https://bugs.webkit.org/show_bug.cgi?id=136829

        Reviewed by Martin Robinson.

        * platform/graphics/egl/GLContextEGL.cpp:
        (WebCore::sharedEGLDisplay): Special-case the shared EGL display initialization
        for the GTK port when running under Wayland. In that case the pointer to the
        native wl_display object should be passed to eglGetDisplay(). If not running
        under Wayland we should fall back to using the shared X11 display (if support
        for that display system is enabled) or the EGL_DEFAULT_DISPLAY.

2014-09-17  Daniel Bates  <dabates@apple.com>

        Unreviewed, rolling out r173695.

        Broke building third-party Legacy WebKit apps; will
        investigate offline

        Reverted changeset:

        "[iOS] Make WebCore build with public iOS SDK"
        https://bugs.webkit.org/show_bug.cgi?id=136487
        http://trac.webkit.org/changeset/173695

2014-09-17  Roger Fong  <roger_fong@apple.com>

        Speculative fix for a fast\dom\html-collections-named-getter failing only in Debug builds.

        * dom/Node.cpp:
        (WebCore::Document::invalidateNodeListAndCollectionCaches):

2014-09-17  Benjamin Poulain  <bpoulain@apple.com>

        Add parsing for :nth-child(An+B of selector)
        https://bugs.webkit.org/show_bug.cgi?id=136845

        Reviewed by Antti Koivisto.

        Add support for parsing :nth-child(of). The implementation of selector matching
        will be in a follow up, there are enough edge cases here already.

        Spec here: http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo

        Test: fast/css/parsing-css-nth-child-of.html

        * css/CSSParser.cpp:
        (WebCore::CSSParser::detectFunctionTypeToken):
        (WebCore::CSSParser::realLex):
        The parser generate two new kinds of tokens:
        -NTHCHILDFUNCTION, matching the "nth-child" identifier.
        -NTHCHILDSELECTORSEPARATOR, matching the "of" keyword separating An+B from the selector list.

        NTHCHILDFUNCTION is used to extend the new syntax only for :nth-child() and not all the "nth" functions
        (e.g. :nth-of-type()).

        NTHCHILDSELECTORSEPARATOR exists for two reasons:
        -We must clear the "parsingMode" before parsing selectorList. If we failed to do that, the complex selectors
         would be parsed in NthChildMode, which has all kind of bad side effects.
        -The second reason is differentiacting "of" for all the other identifiers. Arguably, this could have been done
         in the grammar, but it is clearer this way since we already need the branches for the parsingMode.

        * css/CSSGrammar.y.in:
        Those are pretty much duplicates of the existing FUNCTION rules but supporting the new syntax.

        * css/CSSParserValues.cpp:
        (WebCore::selectorListMatchesPseudoElement):
        (WebCore::CSSParserSelector::matchesPseudoElement):
        Matching pseudo elements does not make much sense for those selectorList (e.g. :nth-child(2n of ::before)).
        Add helper function to fail parsing of those cases.

        * css/CSSParserValues.h:
        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText):
        * css/CSSSelector.h:
        (WebCore::CSSSelector::selectorList):
        Updated serialization code for CSS OM.

2014-09-17  Benjamin Poulain  <bpoulain@apple.com>

        CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
        https://bugs.webkit.org/show_bug.cgi?id=136807

        Reviewed by Antti Koivisto.

        The spec defines selector lists as token separated by white space.

        The definition of white space for CSS Selectors is:
        "White space in Selectors consists of the code points SPACE (U+0020),
        TAB (U+0009), LINE FEED (U+000A), CARRIAGE RETURN (U+000D), and FORM FEED (U+000C)
        can occur in whitespace. Other space-like code points, such as EM SPACE (U+2003)
        and IDEOGRAPHIC SPACE (U+3000), are never part of white space."

        The old code was only matching SPACE (U+0020) which is buggy. This patch
        adds support for the other caracters.

        Tests: fast/selectors/attr-list-01.html
               fast/selectors/attribute-list-with-whitespace-in-selector.html
               fast/selectors/attribute-list-with-whitespace-in-value.html

        * css/SelectorChecker.cpp:
        (WebCore::attributeValueMatches):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::constructFragments):
        (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
        Add the missing checks.

        * html/track/VTTRegion.cpp:
        (WebCore::VTTRegion::setRegionSettings):
        (WebCore::VTTRegion::parseSettingValue):
        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::hasRequiredFileIdentifier):
        (WebCore::WebVTTParser::collectTimingsAndSettings):
        * html/track/WebVTTParser.h:
        While looking for affected code, I discovered WebVTT redefines isHTMLSpace().
        I cleaned that code.

2014-09-17  Gavin Barraclough  <baraclough@apple.com>

        Aways have a PageThrottler (sometimes have a UserActivity::Impl)
        https://bugs.webkit.org/show_bug.cgi?id=136892

        Reviewed by Geoffrey Garen.

        Some instances of Page have a PageThrottler to track activity on the Page, and some do not.
        (Specifically, those created from WebPage in WK2 do, those related to WK1, SVG & inspector do not).

        We do this for three reasons:
            * We do not need to take AppNap assertions on WK1.
            * Some Pages do not track their visibility correctly, and would always claim to be visible.
            * Page VisibilityState is not set until after construction, so if we instantiate

        Creating the entire PageThrottler lazily has the drawback that we have to check for its existence at
        numerous points throughout the code, and we'll miss activity that occurs between the Page being created
        & the PageThrottler added to it (really a theoretical problem right now, since they're currently always
        created pretty much back to back).

        Instead, Page should always have a PageThrottler, & instead make the UserActivity::Impl on the
        PageThrottler be added later.

        * WebCore.exp.in:
            - createPageThrottler -> enablePageThrottler
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
            - Page::pageThrottler now returns a reference rather than a pointer
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::started):
            - Page::pageThrottler now returns a reference rather than a pointer
        * page/Page.cpp:
        (WebCore::Page::Page):
            - instantiate PageThrottler in constructor
        (WebCore::Page::enablePageThrottler):
            - renamed from createPageThrottler, instead of creating the PageThrottler this method now
              instruct PageThrottler to create a UserActivity::Impl
        (WebCore::Page::setViewState):
            - m_pageThrottler is not a pointer
        (WebCore::Page::createPageThrottler): Deleted.
            - renamed to enablePageThrottler
        * page/Page.h:
        (WebCore::Page::pageThrottler):
            - now returns a reference
        * page/PageThrottler.cpp:
        (WebCore::PageThrottler::PageThrottler):
            - no longer instantiate m_activity
        (WebCore::PageThrottler::createUserActivity):
            - lazily instantiate m_activity, call updateUserActivity
        (WebCore::PageThrottler::updateUserActivity):
            - m_activity may not yet be instantiated; added early return
        * page/PageThrottler.h:
            - m_activity becomes a std::unique_ptr, added createUserActivity

2014-09-17  Daniel Bates  <dabates@apple.com>

        [iOS] Make WebCore build with public iOS SDK
        https://bugs.webkit.org/show_bug.cgi?id=136487

        Reviewed by David Kilzer.

        Add headers that wrap Mac and iOS SPIs and update WebCore source files to include these
        headers instead of the corresponding actual SPI header(s).

        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.vcxproj/WebCoreCG.props:
        * WebCore.vcxproj/copyForwardingHeaders.cmd:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOMInternal.mm:
        * bridge/objc/objc_instance.mm:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        * platform/cocoa/DisplaySleepDisablerCocoa.cpp:
        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        * platform/graphics/SimpleFontData.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        * platform/graphics/cg/BitmapImageCG.cpp:
        * platform/graphics/cg/ColorCG.cpp:
        * platform/graphics/cg/GraphicsContextCG.cpp:
        * platform/graphics/cg/ImageSourceCG.cpp:
        * platform/graphics/cg/PDFDocumentImage.cpp:
        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        * platform/graphics/ios/FontCacheIOS.mm:
        * platform/graphics/ios/FontServicesIOS.mm:
        * platform/graphics/ios/SimpleFontDataIOS.mm:
        * platform/graphics/mac/FontMac.mm:
        * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
        * platform/graphics/mac/MediaPlayerProxy.h:
        * platform/graphics/mac/SimpleFontDataMac.mm:
        * platform/ios/LegacyTileCache.mm:
        * platform/ios/LegacyTileGrid.mm:
        * platform/ios/LegacyTileGridTile.mm:
        * platform/ios/PlatformEventFactoryIOS.mm:
        * platform/ios/PlatformScreenIOS.mm:
        * platform/ios/WebEvent.mm:
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        * platform/ios/wak/WAKAppKitStubs.h:
        * platform/ios/wak/WAKView.h:
        * platform/ios/wak/WKGraphics.h:
        * platform/ios/wak/WKGraphics.mm:
        * platform/ios/wak/WebCoreThread.mm:
        * platform/network/ios/QuickLook.mm:
        * platform/spi/ca/CALayerSPI.h: Added.
        * platform/spi/ca/CATiledLayerSPI.h: Added.
        * platform/spi/cf/CFLocaleSPI.h: Modified to use EXTERN_C.
        * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Ditto. Also changed header visibility from private to project.
        * platform/spi/cf/CFURLRequestSPI.h: Ditto. Also modified to unconditionally include header <CoreFoundation/CFBase.h>.
        * platform/spi/cg/CGColorTransformSPI.h: Added.
        * platform/spi/cg/CGContextSPI.h: Added.
        * platform/spi/cg/CGFloatSPI.h: Added.
        * platform/spi/cg/CGFontGlyphSupportSPI.h: Added.
        * platform/spi/cg/CGFontInfoSPI.h: Added.
        * platform/spi/cg/CGFontRenderingSPI.h: Added.
        * platform/spi/cg/CGFontUnicodeSupportSPI.h: Added.
        * platform/spi/cg/CGImageSPI.h: Added.
        * platform/spi/cg/CGSRegionSPI.h: Added.
        * platform/spi/cocoa/DispatchSPI.h: Added.
        * platform/spi/cocoa/IOPMLibSPI.h: Added.
        * platform/spi/cocoa/MachVMSPI.h: Added.
        * platform/spi/cocoa/NSFileManagerSPI.h: Added.
        * platform/spi/cocoa/NSGeometrySPI.h: Added.
        * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
        * platform/spi/cocoa/dyldSPI.h: Added.
        * platform/spi/ios/AVPlayerControllerSPI.h: Added.
        * platform/spi/ios/AVPlayerViewControllerSPI.h: Added.
        * platform/spi/ios/AVValueTimingSPI.h: Added.
        * platform/spi/ios/AVVideoLayerSPI.h: Added.
        * platform/spi/ios/CTFontDescriptorSPI.h: Added.
        * platform/spi/ios/CTFontSPI.h: Added.
        * platform/spi/ios/CUICatalogSPI.h: Added.
        * platform/spi/ios/CUIStyleEffectConfigurationSPI.h: Added.
        * platform/spi/ios/MPAVRoutingControllerSPI.h: Added.
        * platform/spi/ios/MobileGestaltSPI.h: Added.
        * platform/spi/ios/QLPreviewConverterSPI.h: Added.
        * platform/spi/ios/QuickLookSPI.h: Added.
        * rendering/RenderThemeIOS.mm:

2014-09-17  Gavin Barraclough  <barraclough@apple.com>

        DOM timer throttling for hidden plugins
        https://bugs.webkit.org/show_bug.cgi?id=136197

        Reviewed by Geoff Garen & Andreas Kling.

        For non-visible web pages we slow timers (since they can't be driving animations, etc).
        We should do the same for plugins.

        There are a few steps to this:
            - JSPluginElementFunctions notifies DOMTimer when script interacts with a plugin.
            - DOMTimerFireState keeps a record of events that occur while a timer is firing.
            - DOMTimer::fired detects timers that interact with invisible/inaudible plugins, and flags itself for throtting.
            - DOMTimer::intervalClampedToMinimum sets timer intervals appropriately.

        * bindings/js/JSPluginElementFunctions.cpp:
        (WebCore::pluginScriptObject):
            - notify DOMTimer when script interacts with a plugin.
        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::isDetectable):
        * html/HTMLPlugInElement.h:
            - added isDetectable, to check for visible / audible plugins.
        * page/DOMTimer.cpp:
        (WebCore::DOMTimerFireState::DOMTimerFireState):
        (WebCore::DOMTimerFireState::~DOMTimerFireState):
            - track current DOMTimerFireState.
        (WebCore::DOMTimer::DOMTimer):
            - initialize m_throttleState.
        (WebCore::DOMTimer::scriptDidInteractWithPlugin):
            - if interaction with a plugin occurs while a timer is firing, record on the DOMTimerFireState.
        (WebCore::DOMTimer::fired):
            - set DOMTimerFireState, and update m_throttleState accordingly.
        (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
            - remove redundant check of maxTimerNestingLevel (covered by intervalClampedToMinimum).
        (WebCore::DOMTimer::intervalClampedToMinimum):
            - Also take m_throttleState into account when throttling.
        * page/DOMTimer.h:
            - added scriptDidInteractWithPlugin, m_throttleState.
        * platform/audio/AudioHardwareListener.h:
            - enum -> enum class.
        * plugins/PluginViewBase.h:
        (WebCore::PluginViewBase::audioHardwareActivity):
            - expose audioHardwareActivity on PluginViewBase (previously available in subclass).

2014-09-16  Gavin Barraclough  <baraclough@apple.com>

        Exclude page visibility from PageThrottler's hysteresis
        https://bugs.webkit.org/show_bug.cgi?id=136866

        Reviewed by Geoff Garen.

        Including visibility in the hysteresis mechanism has the effect of prolonging the visually
        idle timeout, and causing the page hide event to be run at foreground priority. Neither of
        these are particularly desirable. Instead separate visibility from the rest of the page
        activities we track (and apply hysteresis to), and feed this directly into determination
        of the UserActivity state.

        * page/PageThrottler.cpp:
        (WebCore::PageThrottler::PageThrottler):
            - when the PageThrottler is instantiated call updateUserActivity to set initial UserActivity.
        (WebCore::PageThrottler::incrementActivityCount):
            - simplified - when m_activityCount becomes non-zero, start m_hysteresis.
        (WebCore::PageThrottler::decrementActivityCount):
            - simplified - when m_activityCount becomes zero, stop m_hysteresis.
        (WebCore::PageThrottler::updateUserActivity):
            - end the UserActivity (allow AppNap) if visually idle and no page activity is taking place.
        (WebCore::PageThrottler::setViewState):
            - when the visually idle state changed call updateUserActivity to update the UserActivity.
        (WebCore::PageThrottler::started):
        (WebCore::PageThrottler::stopped):
            - when the hysteresis state changed call updateUserActivity to update the UserActivity.
        (WebCore::PageThrottler::updateHysteresis): Deleted.
            - removed: simplified the hysteresis trigger, we now incorporate visually idle state in updateUserActivity.
        * page/PageThrottler.h:
            - removed updateHysteresis, added updateUserActivity.
        * platform/HysteresisActivity.h:
        (WebCore::HysteresisActivity::state):
            - determine the curent state of the HysteresisActivity - started, waiting, or stopped.

2014-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Fix runtime critical warnings when writing to the clipboard after r173687
        https://bugs.webkit.org/show_bug.cgi?id=136891

        Reviewed by Philippe Normand.

        * platform/gtk/PasteboardHelper.cpp:
        (WebCore::PasteboardHelper::writeClipboardContents): Check passed
        callback is not null before trying to ref/unref it since
        g_closure_ref/unref are not null safe.

2014-09-17  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Add a helper function for display system deduction
        https://bugs.webkit.org/show_bug.cgi?id=136849

        Reviewed by Martin Robinson.

        getDisplaySystemType() is a helper function that checks the type of the
        default GdkDisplay object and initializes a static variable to the
        corresponding value. It then returns the value of that variable.

        When building with the GTK+2 API (still the case with the GTK+2 plugin
        process) we default to X11.

        The function is declared and implemented in GtkUtilities files.

        * platform/gtk/GtkUtilities.cpp:
        (WebCore::widgetIsOnscreenToplevelWindow):
        (WebCore::getDisplaySystemType):
        * platform/gtk/GtkUtilities.h:

2014-09-16  Yusuke Suzuki  <utatane.tea@gmail.com>

        filterRootById accidentally clears inAdjacentChain flag
        https://bugs.webkit.org/show_bug.cgi?id=136851

        Reviewed by Benjamin Poulain.

        Test: fast/selectors/filter-root-node-with-selector-contains-adjacents.html

        * dom/SelectorQuery.cpp:
        (WebCore::filterRootById):

2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Fix layering violations in PasteboardGtk
        https://bugs.webkit.org/show_bug.cgi?id=136802

        Reviewed by Darin Adler.

        Refactor the Pasteboard code moving the WebCore parts to the Editor.

        * PlatformGTK.cmake: Add new file to compilation.
        * editing/Editor.cpp:
        (WebCore::Editor::performCutOrCopy):
        (WebCore::Editor::copyImage):
        * editing/Editor.h:
        * editing/gtk/EditorGtk.cpp: Added.
        (WebCore::createFragmentFromPasteBoardData):
        (WebCore::Editor::pasteWithPasteboard):
        (WebCore::getImageAndURLForElement):
        (WebCore::Editor::writeImageToPasteboard):
        (WebCore::Editor::writeSelectionToPasteboard):
        * page/DragController.cpp:
        (WebCore::DragController::startDrag):
        * page/gtk/DragControllerGtk.cpp:
        (WebCore::DragController::declareAndWriteDragImage):
        * platform/Pasteboard.h:
        * platform/gtk/DataObjectGtk.cpp: Remove range member, the caller
        should call setText() + setMarkup() intead.
        (WebCore::DataObjectGtk::setText):
        (WebCore::DataObjectGtk::setMarkup):
        (WebCore::DataObjectGtk::clearText):
        (WebCore::DataObjectGtk::clearMarkup):
        (WebCore::DataObjectGtk::clearAllExceptFilenames):
        * platform/gtk/DataObjectGtk.h:
        (WebCore::DataObjectGtk::hasText):
        (WebCore::DataObjectGtk::hasMarkup):
        (WebCore::DataObjectGtk::clearImage):
        (WebCore::DataObjectGtk::text):
        (WebCore::DataObjectGtk::markup):
        (WebCore::DataObjectGtk::setRange): Deleted.
        * platform/gtk/GtkDragAndDropHelper.h:
        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::PasteboardImage::PasteboardImage):
        (WebCore::PasteboardImage::~PasteboardImage):
        (WebCore::Pasteboard::write):
        (WebCore::Pasteboard::writeSelection): Deleted.
        (WebCore::getURLForImageElement): Deleted.
        (WebCore::Pasteboard::writeImage): Deleted.
        (WebCore::Pasteboard::documentFragment): Deleted.
        * platform/gtk/PasteboardHelper.cpp:
        (WebCore::displayFromFrame): Deleted.
        (WebCore::PasteboardHelper::getPrimarySelectionClipboard): Deleted.
        * platform/gtk/PasteboardHelper.h:

2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        DragData should not depend on Clipboard, DocumentFragment, and Document
        https://bugs.webkit.org/show_bug.cgi?id=21358

        Reviewed by Darin Adler.

        Refactor DragData to not depend on Frame, DocumentFragment,
        Document and Range. DragData::asFragment() has been moved to
        DragController and implemented in the platform specific file.
        DragData methods using Frame has been reworked in Mac to not use
        Frame, since all other ports were ignoreing the frame parameter.

        * page/DragController.cpp:
        (WebCore::DragController::documentFragmentFromDragData): Make it
        a static member to be able to use createFragmentFromDragData().
        (WebCore::DragController::performDragOperation): Update to
        DragData API changes.
        (WebCore::DragController::dispatchTextInputEventFor): Ditto.
        (WebCore::DragController::concludeEditDrag): Ditto.
        (WebCore::documentFragmentFromDragData): Deleted.
        * page/DragController.h:
        * page/efl/DragControllerEfl.cpp:
        (WebCore::DragController::createFragmentFromDragData): Move
        DragData::asFragment() implementation here.
        * page/gtk/DragControllerGtk.cpp:
        (WebCore::DragController::dragOperation):
        (WebCore::DragController::createFragmentFromDragData): Ditto.
        * page/mac/DragControllerMac.mm:
        (WebCore::DragController::dragOperation):
        (WebCore::DragController::createFragmentFromDragData): Ditto.
        * page/win/DragControllerWin.cpp:
        (WebCore::DragController::createFragmentFromDragData): Ditto.
        * platform/DragData.h:
        * platform/efl/DragDataEfl.cpp:
        (WebCore::DragData::asPlainText): Remove Frame parameter.
        (WebCore::DragData::containsURL): Ditto.
        (WebCore::DragData::asURL): Ditto.
        (WebCore::DragData::asFragment): Deleted.
        * platform/gtk/DragDataGtk.cpp:
        (WebCore::DragData::asPlainText): Remove Frame parameter.
        (WebCore::DragData::containsCompatibleContent):
        (WebCore::DragData::containsURL): Ditto.
        (WebCore::DragData::asURL): Ditto.
        (WebCore::DragData::asFragment): Deleted.
        * platform/mac/DragDataMac.mm:
        (WebCore::DragData::asPlainText): Same implementation as the
        Editor.
        (WebCore::DragData::containsURL): Remove Frame parameter.
        (WebCore::DragData::asURL): Use URLByCanonicalizingURL() instead
        of using the Editor client.
        (WebCore::DragData::asFragment): Deleted.
        * platform/win/DragDataWin.cpp:
        (WebCore::DragData::containsURL): Remove Frame parameter.
        (WebCore::DragData::asURL): Ditto.
        (WebCore::DragData::asPlainText): Ditto.
        (WebCore::DragData::containsCompatibleContent):
        (WebCore::DragData::asFragment): Deleted.

2014-09-16  Chris Dumez  <cdumez@apple.com>

        Rename Node::childNode(index) to traverseToChildAt(index) for clarity
        https://bugs.webkit.org/show_bug.cgi?id=136825

        Reviewed by Benjamin Poulain.

        Rename Node::childNode(index) to traverseToChildAt(index) to make it
        clearer that the method is actually traversing the children and thus
        potentially expensive.

        This patch also avoids calling traverseToChildAt() in a couple of
        easily avoidable cases.

        No new tests, no behavior change.

        * WebCore.exp.in:
        * WebCore.order:
        Remove symbol for ContainerNode::childNode() as it was renamed. It does
        not seem we need to expose ContainerNode::traverseToChildAt().

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::stringForVisiblePositionRange):
        (WebCore::AccessibilityObject::lengthForVisiblePositionRange):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
        Mechanical renaming.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::traverseToChildAt):
        (WebCore::ContainerNode::childNode): Deleted.
        * dom/ContainerNode.h:
        (WebCore::Node::traverseToChildAt):
        (WebCore::Node::childNode): Deleted.
        * dom/Node.h:
        - Rename Node / ContainerNode's childNode(index) to
          traverseToChildAt(index) to make it clear that it is actually
          traversing the children and thus potentially expensive.
        - Clean up the implementation of ContainerNode::traverseToChildAt()
          to avoid the use of an extra |i| variable.

        * dom/Position.cpp:
        (WebCore::Position::computeNodeBeforePosition):
        Avoid calling traverseToChildAt(-1). Relying on the unsigned argument
        wrapping and the method returning null in this case is a bit obscure
        and causes unnecessary traversal of all children.

        (WebCore::Position::computeNodeAfterPosition):
        (WebCore::Position::previous):
        (WebCore::Position::next):
        Mechanical renaming and update variable names to stop using
        abbreviations as per coding style.

        * dom/PositionIterator.h:
        (WebCore::PositionIterator::PositionIterator):
        * dom/Range.cpp:
        (WebCore::Range::insertNode):
        (WebCore::Range::checkNodeWOffset):
        (WebCore::Range::firstNode):
        (WebCore::Range::pastLastNode):
        * dom/RangeBoundaryPoint.h:
        (WebCore::RangeBoundaryPoint::set):
        * editing/BreakBlockquoteCommand.cpp:
        (WebCore::BreakBlockquoteCommand::doApply):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::removeChildrenInRange):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        * editing/TextIterator.cpp:
        (WebCore::nextInPreOrderCrossingShadowBoundaries):
        (WebCore::TextIterator::node):
        (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
        * editing/VisibleUnits.cpp:
        (WebCore::nextLinePosition):
        * editing/cocoa/HTMLConverter.mm:
        (WebCore::editingAttributedStringFromRange):
        Mechanical renaming.

        * inspector/DOMPatchSupport.cpp:
        (WebCore::DOMPatchSupport::innerPatchChildren):
        Iterate over children while incrementing the |i| variable to avoid
        calling traverseToChildAt(index) repeatedly and thus traversing the
        children from the beginning every time.

2014-09-16  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Reduce a bit of churn setting initial remote inspection state
        https://bugs.webkit.org/show_bug.cgi?id=136875

        Reviewed by Timothy Hatcher.

        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::finishCreation):
        We no longer need to toggle this state.

2014-09-16  Enrica Casucci  <enrica@apple.com>

        Should have an editing behavior specific for IOS.
        https://bugs.webkit.org/show_bug.cgi?id=136876

        Reviewed by Sam Weinig.

        This patch introduces a new editing behavior type to be able
        to perform editing tasks that are specific to iOS.
        All the existing EditingBehavior methods return the same boolean
        value for for Mac and iOS. A new one has been introduced to support
        a specific behavior in the DeleteSelectionCommand.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::doApply):
        * editing/EditingBehavior.h:
        (WebCore::EditingBehavior::shouldConsiderSelectionAsDirectional):
        (WebCore::EditingBehavior::shouldCenterAlignWhenSelectionIsRevealed):
        (WebCore::EditingBehavior::shouldToggleStyleBasedOnStartOfSelection):
        (WebCore::EditingBehavior::shouldAlwaysGrowSelectionWhenExtendingToBoundary):
        (WebCore::EditingBehavior::shouldSelectOnContextualMenuClick):
        (WebCore::EditingBehavior::shouldExtendSelectionByWordOrLineAcrossCaret):
        (WebCore::EditingBehavior::shouldRebalanceWhiteSpacesInSecureField):
        * editing/EditingBehaviorTypes.h:
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::positionForPlatform):
        * page/Settings.cpp:
        (WebCore::editingBehaviorTypeForPlatform):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::setEditingBehavior):

2014-09-16  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r173670.
        https://bugs.webkit.org/show_bug.cgi?id=136871

        Creates layering violation (Requested by enrica on #webkit).

        Reverted changeset:

        "Move HTMLConverter from editing/cocoa to platform/cocoa."
        https://bugs.webkit.org/show_bug.cgi?id=136474
        http://trac.webkit.org/changeset/173670

2014-09-16  Eric Carlson  <eric.carlson@apple.com>

        [Mac] MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput doesn't work with rotated movies
        https://bugs.webkit.org/show_bug.cgi?id=136872

        Reviewed by Tim Horton.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): Add logging.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Apply the video track
            preferred transform.

2014-09-16  Enrica Casucci  <enrica@apple.com>

        Move HTMLConverter from editing/cocoa to platform/cocoa.
        https://bugs.webkit.org/show_bug.cgi?id=136474

        Reviewed by Benjamin Poulain.

        This is a platform specific class and it belongs to the platform folder.

        * WebCore.xcodeproj/project.pbxproj:
        * editing/cocoa: Removed.
        * editing/cocoa/HTMLConverter.h: Removed.
        * editing/cocoa/HTMLConverter.mm: Removed.
        * platform/cocoa/HTMLConverter.h: Copied from editing/cocoa/HTMLConverter.h.
        * platform/cocoa/HTMLConverter.mm: Copied from editing/cocoa/HTMLConverter.mm.

2014-09-16  Enrica Casucci  <enrica@apple.com>

        Remove PLATFORM(IOS) from WebCore/editing (Part 3).
        https://bugs.webkit.org/show_bug.cgi?id=136474

        Reviewed by Benjamin Poulain.

        This is the updated version of the patch that was landed in r173340.
        This patch removes the use of PLATFORM(IOS) from TextAffinity.h
        and removes the assumption that EAffinity values match NSSelectionAffinity
        values. It also removes the includes in TextAffinity.h, creating the need to
        include explicitly the files when necessary.

        * editing/TextAffinity.h:
        (kit): Deleted.
        (core): Deleted.
        * editing/cocoa/HTMLConverter.mm:
        * page/mac/WebCoreFrameView.h:

2014-09-16  Beth Dakin  <bdakin@apple.com>

        overflow:scroll should not leave space for a scroll corner with overlay scrollbars
        https://bugs.webkit.org/show_bug.cgi?id=136861

        Reviewed by Sam Weinig.

        overflow:scroll should behave like overflow:auto when the scrollbar will render as 
        an overlay scrollbar.

        Re-name hasAutoVerticalScrollbar()/Horizontal to 
        hasVerticalScrollbarWithAutoBehavior()/Horizontal, and return true for 
        overflow:scroll scrollbars that will render as overlay scrollbars.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior):
        (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior):
        * rendering/RenderBox.h:
        (WebCore::RenderBox::scrollsOverflowX):
        (WebCore::RenderBox::scrollsOverflowY):
        (WebCore::RenderBox::hasAutoVerticalScrollbar): Deleted.
        (WebCore::RenderBox::hasAutoHorizontalScrollbar): Deleted.

        Re-name overflowRequiresScrollbar() to styleRequiresScrollbar() and also re-name 
        overflowDefinesAutomaticScrollbar() to styleDefinesAutomaticScrollbar(), and make         
        these functions take into account the fact that overflow:scroll should act like 
        overflow:auto when the scrollbar will render as an overlay scrollbar.
        * rendering/RenderLayer.cpp:
        (WebCore::styleRequiresScrollbar):
        (WebCore::styleDefinesAutomaticScrollbar):
        (WebCore::RenderLayer::updateScrollbarsAfterLayout):
        (WebCore::RenderLayer::calculateClipRects):

2014-09-16  peavo@outlook.com  <peavo@outlook.com>

        [Curl] Sometimes incomplete or empty content can be loaded from cache.
        https://bugs.webkit.org/show_bug.cgi?id=136855

        Reviewed by Alex Christensen.

        Sometimes, when two requests with the same url are started at the same time,
        there is a possibility of loading incomplete or empty content from the cache.
        This happens because the method CurlCacheEntry::isLoading() is returning the wrong status
        in the time period between the headers are received, and the content data is received.
        This can be fixed by using a flag for the load status, instead of checking whether
        the content file is open. 

        * platform/network/curl/CurlCacheEntry.cpp:
        (WebCore::CurlCacheEntry::CurlCacheEntry): Initialize loading flag.
        (WebCore::CurlCacheEntry::isLoading): Return loading flag.
        (WebCore::CurlCacheEntry::didFail): Call new method to set loading flag.
        (WebCore::CurlCacheEntry::didFinishLoading): Ditto.
        (WebCore::CurlCacheEntry::setIsLoading): Added new method to set loading flag.
        * platform/network/curl/CurlCacheEntry.h: Added loading flag and new method to set it.
        * platform/network/curl/CurlCacheManager.cpp:
        (WebCore::CurlCacheManager::didReceiveResponse): Call new method to set loading flag.

2014-09-16  Chris Dumez  <cdumez@apple.com>

        Rename Node::nodeIndex() to computeNodeIndex() for clarity
        https://bugs.webkit.org/show_bug.cgi?id=136826

        Reviewed by Benjamin Poulain.

        Rename Node::nodeIndex() to computeNodeIndex() to make it clear that
        index is being computed and that calling this method is potentially
        expensive.

        No new tests, no behavior change.

        * WebCore.exp.in:
        * WebCore.order:
        Rename exported symbol for Node::nodeIndex() as well.

        * dom/Document.cpp:
        (WebCore::Document::caretRangeFromPoint):
        * dom/Node.cpp:
        (WebCore::Node::computeNodeIndex):
        (WebCore::Node::nodeIndex): Deleted.
        * dom/Node.h:
        * dom/NodeWithIndex.h:
        (WebCore::NodeWithIndex::index):
        Clean up implementation to reduce the scope of the Node variable and
        to follow coding style (variable naming, spacing, star placement).

        * dom/Position.cpp:
        (WebCore::Position::computeOffsetInContainerNode):
        (WebCore::Position::previous):
        (WebCore::Position::next):
        (WebCore::Position::upstream):
        (WebCore::Position::downstream):
        * dom/Position.h:
        (WebCore::positionInParentBeforeNode):
        (WebCore::positionInParentAfterNode):
        * dom/Range.cpp:
        (WebCore::Range::compareNode):
        (WebCore::Range::intersectsNode):
        (WebCore::Range::processContents):
        (WebCore::Range::insertNode):
        (WebCore::Range::setStartAfter):
        (WebCore::Range::setEndBefore):
        (WebCore::Range::setEndAfter):
        (WebCore::Range::setStartBefore):
        * dom/RangeBoundaryPoint.h:
        (WebCore::RangeBoundaryPoint::ensureOffsetIsValid):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
        (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        * editing/Editor.cpp:
        (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::range):
        (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
        (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
        * editing/htmlediting.cpp:
        (WebCore::updatePositionForNodeRemoval):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::setContainerAndOffsetForRange):
        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::getRangeAt):
        (WebCore::DOMSelection::containsNode):
        (WebCore::DOMSelection::shadowAdjustedOffset):
        * rendering/RenderBlock.cpp:
        (WebCore::positionForPointRespectingEditingBoundaries):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::nodePosition):

2014-09-16  Jer Noble  <jer.noble@apple.com>

        Videos with controls enabled never receive 'dragstart' events.
        https://bugs.webkit.org/show_bug.cgi?id=136837

        Reviewed by Eric Carlson.

        Fixes a crash regression introduced by r173631. Node::contains() has an interesting property of returning false
        if `this` is NULL. Rather than depending on this behavior, explicitly NULL-check state.source and bail early.

        * page/DragController.cpp:
        (WebCore::DragController::startDrag):

2014-09-16  Csaba Osztrogonác  <ossy@webkit.org>

        URTBF after r173659.

        After r173659 convertToIntLength() is used only inside ENABLE(DASHBOARD_SUPPORT), so it
        became unused function and caused build failure if ENABLE(DASHBOARD_SUPPORT) is false.

        Source/WebCore/css/StyleResolver.cpp:1471:15: error: 'WebCore::Length WebCore::convertToIntLength(const WebCore::CSSPrimitiveValue*, const WebCore::CSSToLengthConversionData&)'
        defined but not used [-Werror=unused-function] cc1plus: all warnings being treated as errors

        * css/StyleResolver.cpp: Missing ENABLE(DASHBOARD_SUPPORT) guard added.

2014-09-14  Darin Adler  <darin@apple.com>

        Scroll snap properties don't handle inherit and initial propertly.
        https://bugs.webkit.org/show_bug.cgi?id=136643

        Reviewed by Beth Dakin.

        Restructured scroll snap code both to handle inherit and initial, and to reduce the
        total code size a bit, fixing a few minor bugs along the way. Updated the regression
        tests to cover the new parts.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::addValuesForNamedGridLinesAtIndex): Use a modern for loop.
        (WebCore::scrollSnapDestination): Changed to take a LengthSize. Also streamlined.
        (WebCore::scrollSnapPoints): Changed to to take a ScrollSnapPoints. Also streamlined and
        added code to handle the "uses elements" case; serialize that as an identifier, not the
        string "elements", fixing a minor bug.
        (WebCore::scrollSnapCoordinates): Changed to take a Vector<LengthSize>. Also streamlined
        and added code to handle the empty vector case; serialize that as an identifier, not the
        string "none", fixing a minor bug.
        (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword): Use nullptr.
        (WebCore::counterToCSSValue): Use nullptr.
        (WebCore::ComputedStyleExtractor::styledNode): Use nullptr.
        (WebCore::ComputedStyleExtractor::propertyValue): Use nullptr. Moved CSS_SCROLL_SNAP
        to a more appropriate section of the switch statement. Made it just call through to
        the functions above in a more straightforward way.
        (WebCore::CSSComputedStyleDeclaration::getPropertyValue): Reversed logic to use early
        return and to call emptyString.
        (WebCore::CSSComputedStyleDeclaration::item): Use emptyString.
        (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand): Use nullptr.
        (WebCore::CSSComputedStyleDeclaration::parentRule): Use nullptr.
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Use nullptr.
        (WebCore::CSSComputedStyleDeclaration::getPropertyPriority): Use emptyString.
        (WebCore::CSSComputedStyleDeclaration::getPropertyShorthand): Use emptyString.

        * css/DeprecatedStyleBuilder.cpp:
        (WebCore::ApplyPropertyMarqueeIncrement::applyValue): Use the switch statement for the
        invalid value as well as for the valid values, rather than a separate if statement.
        Call convertToLength directly rather than through a StyleResolver static member function.

        * css/PropertySetCSSStyleDeclaration.cpp:
        (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Fixed a formatting mistake.

        * css/StyleResolver.cpp:
        (WebCore::convertToIntLength): Made this function local to this file instead of a
        static member function.
        (WebCore::convertToFloatLength): Ditto.
        (WebCore::StyleResolver::parseSnapCoordinate): Added. Used to keep snap point parsing
        code small.
        (WebCore::StyleResolver::parseSnapCoordinatePair): Ditto.
        (WebCore::StyleResolver::parseSnapPoints): Added. Parses an entire snap points property.
        (WebCore::StyleResolver::applyProperty): Removed various bits of redundant code that
        were not using the primitiveValue value already in a local variable. Added the
        HANDLE_INHERIT_AND_INITIAL to all the scroll snap properties and updated since the
        RenderStyle structure now more closely matches the CSS properties.

        * css/StyleResolver.h: Updated for above changes, and removed a redundant "private:".

        * page/scrolling/AxisScrollSnapOffsets.cpp:
        (WebCore::appendChildSnapOffsets): Use auto& instead of SnapCoordinate since that type
        is now gone. Updated since coordinates are now LengthSize.
        (WebCore::updateFromStyle): Changed to take a reference instead of a pointer and
        also to fetch the data from RenderStyle in a new way that more closely matches the
        CSS properties.
        (WebCore::updateSnapOffsetsForScrollableArea): Ditto. Also moved some memory allocation
        inside if statements so we don't wastefully allocate and destroy.

        * rendering/style/RenderStyle.cpp: Added an include of StyleScrollSnapPoints.h now
        that the header doesn't include them. Moved the conditional includes out of the main
        include paragraph (even though I don't think conditional includes are usually a good
        idea).
        (WebCore::RenderStyle::initialScrollSnapPointsX): Added.
        (WebCore::RenderStyle::initialScrollSnapPointsY): Added.
        (WebCore::RenderStyle::initialScrollSnapDestination): Added.
        (WebCore::RenderStyle::initialScrollSnapCoordinates): Added.
        (WebCore::RenderStyle::scrollSnapPointsX): Added.
        (WebCore::RenderStyle::scrollSnapPointsY): Added.
        (WebCore::RenderStyle::scrollSnapDestination): Added.
        (WebCore::RenderStyle::scrollSnapCoordinates): Added.
        (WebCore::RenderStyle::setScrollSnapPointsX): Added.
        (WebCore::RenderStyle::setScrollSnapPointsY): Added.
        (WebCore::RenderStyle::setScrollSnapDestination): Added.
        (WebCore::RenderStyle::setScrollSnapCoordinates): Added.

        * rendering/style/RenderStyle.h: Replaced the include of StyleScrollSnapPoints.h with
        a forward declaration of ScrollSnapPoints. Removed getters and setters for the old
        style properties and replaced them with new ones that match the CSS properties more
        closely. Tweaked formatting a bit. Added initial value functions for the the scroll snap
        properties.

        * rendering/style/StyleRareNonInheritedData.cpp: Added include of StyleScrollSnapPoints.h
        now that RenderStyle.h doesn't include it.
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Updated since
        m_scrollSnapType is now unsigned instead of ScrollSnapType.

        * rendering/style/StyleRareNonInheritedData.h: Fixed type of m_scrollSnapType to be
        unsigned instead of ScrollSnapType. This should have been causing problems on Windows,
        but I think we got lucky and had no detectable problems.

        * rendering/style/StyleScrollSnapPoints.cpp:
        (WebCore::ScrollSnapPoints::ScrollSnapPoints): Added.
        (WebCore::operator==): Added overloads for both ScrollSnapPoints and also for
        StyleScrollSnapPoints; using a free function for both since both have public data.
        (WebCore::defaultScrollSnapDestination): Added, replaces a static member function.
        (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Updated both the default
        constructor and the copy constructor for the new design.

        * rendering/style/StyleScrollSnapPoints.h: Added a ScrollSnapPoints struct for the
        type of the snap-points-x and snap-points-y CSS properties. Changed the data members
        of StyleScrollSnapPoints to match the various CSS properties rather than breaking
        out all the data into separate data members.
        (WebCore::StyleScrollSnapPoints::defaultRepeatOffset): Deleted. Replaced by the
        default constructor for ScrollSnapPoints.
        (WebCore::StyleScrollSnapPoints::defaultDestinationOffset): Deleted. Replaced by
        a function inside the .cpp file.

2014-09-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [GStreamer] http/tests/media/video-auth.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=126619

        Reviewed by Philippe Normand.

        Test: http/tests/media/video-auth-cors.html

        Use stored credentials when retrieving videos following image loading behavior
        (i.e. stored credentials are always used except when in cors anonymous mode),
        except that requesting credentials from user remains disabled for cross-origin requests.

        Patch is covered by http/tests/media/video-auth.html.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (CachedResourceStreamingClient::CachedResourceStreamingClient): Enable using stored credentials except when using cors anonymous mode.

2014-09-16  Jinho Bang  <jinho.bang@samsung.com>

        Add version of drawFocusIfNeeded that take a Path2D parameter.
        https://bugs.webkit.org/show_bug.cgi?id=136846

        Reviewed by Dirk Schulze.

        Tests: fast/canvas/draw-focus-if-needed-with-path.html

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
        (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
        * html/canvas/CanvasRenderingContext2D.h:
        * html/canvas/CanvasRenderingContext2D.idl:

2014-09-15  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Add WaylandDisplay
        https://bugs.webkit.org/show_bug.cgi?id=136216

        Reviewed by Martin Robinson.

        Add the WaylandDisplay class. This class is used in the LayerTreeHostGtk,
        in the WebProcess, and controls the connection to the nested Wayland
        compositor in the UIProcess. Only one instance of the class is used in the
        WebProcess, accessible via the static WaylandDisplay::instance() method.

        The WaylandDisplay constructor performs the EGL initialization while also
        querying the Wayland register, resulting in initializing client-side objects
        that can interact with the wl_compositor and wl_webkitgtk interfaces
        implemented in the nested Wayland compositor. The single class instance is
        only deemed properly initialized if it picked up the Wayland interface objects
        and has properly acquired the EGL display and config.

        WaylandDisplay::createSurface() is called by the LayerTreeHostGtk during
        its own initialization. The method creates a new wl_surface object via the
        wl_compositor interface and a new wl_egl_window object that's based on that
        surface. For the wl_egl_window object, we fall back to a width or height of 1
        in case the passed-in value for either is 0. This avoids problems in Mesa
        where widths or heights of 0 are not supported.

        We associate the created surface with the passed-in widget ID, as provided
        by LayerTreeHostGtk, via the wl_webkitgtk interface. This enables proper
        mapping of Wayland surfaces and the GtkWidgets in the UIProcess and makes
        it possible for the nested Wayland compositor to correctly determine which
        GtkWidget has to be redrawn after some surface has been committed.

        WaylandDisplay::createSharingGLContext() creates a new GLContextEGL object
        that's to be used as a sharing context. The method creates a new surface
        via the wl_compositor interface and uses it to create a dummy native EGL
        window that's 1x1px in size. The GLContextEGL object is then created
        through the static GLContextEGL::createWindowContext() method.

        * PlatformGTK.cmake:
        * platform/graphics/wayland/WaylandDisplay.cpp: Added.
        (WebCore::WaylandDisplay::globalCallback):
        (WebCore::WaylandDisplay::globalRemoveCallback):
        (WebCore::WaylandDisplay::instance):
        (WebCore::WaylandDisplay::WaylandDisplay):
        (WebCore::WaylandDisplay::createSurface):
        (WebCore::WaylandDisplay::createSharingGLContext):
        * platform/graphics/wayland/WaylandDisplay.h: Added.
        (WebCore::WaylandDisplay::nativeDisplay):
        (WebCore::WaylandDisplay::eglDisplay):
        * platform/graphics/wayland/WaylandSurface.cpp:
        (WebCore::WaylandSurface::~WaylandSurface): Assert that the WaylandDisplay
        instance is present before going on to destroy the surface resources.

2014-09-15  Chris Dumez  <cdumez@apple.com>

        Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
        https://bugs.webkit.org/show_bug.cgi?id=136844

        Reviewed by Sam Weinig.

        Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
        for clarity as the argument is an Element.

        No new tests, no behavior change.

        * dom/ClassNodeList.h:
        (WebCore::ClassNodeList::elementMatches):
        (WebCore::ClassNodeList::nodeMatches): Deleted.
        * dom/DocumentOrderedMap.cpp:
        (WebCore::keyMatchesWindowNamedItem):
        (WebCore::keyMatchesDocumentNamedItem):
        * dom/Element.cpp:
        (WebCore::Element::updateNameForDocument):
        (WebCore::Element::updateIdForDocument):
        * dom/LiveNodeList.cpp:
        (WebCore::LiveNodeList::namedItem):
        * dom/LiveNodeList.h:
        (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
        (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
        (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
        (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
        * dom/NameNodeList.h:
        (WebCore::NameNodeList::elementMatches):
        (WebCore::NameNodeList::nodeMatches): Deleted.
        * dom/TagNodeList.h:
        (WebCore::TagNodeList::elementMatches):
        (WebCore::HTMLTagNodeList::elementMatches):
        (WebCore::TagNodeList::nodeMatches): Deleted.
        (WebCore::HTMLTagNodeList::nodeMatches): Deleted.
        * html/HTMLCollection.cpp:
        (WebCore::isMatchingElement):
        * html/HTMLNameCollection.cpp:
        (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
        (WebCore::WindowNameCollection::elementMatches):
        (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
        (WebCore::DocumentNameCollection::elementMatches):
        (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
        (WebCore::WindowNameCollection::nodeMatches): Deleted.
        (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Deleted.
        (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
        (WebCore::DocumentNameCollection::nodeMatches): Deleted.
        * html/HTMLNameCollection.h:
        * html/LabelsNodeList.cpp:
        (WebCore::LabelsNodeList::elementMatches):
        (WebCore::LabelsNodeList::nodeMatches): Deleted.
        * html/LabelsNodeList.h:
        * html/RadioNodeList.cpp:
        (WebCore::RadioNodeList::elementMatches):
        (WebCore::RadioNodeList::nodeMatches): Deleted.
        * html/RadioNodeList.h:

2014-09-15  Chris Dumez  <cdumez@apple.com>

        Use an AtomicString as key for caching ClassNodeList objects
        https://bugs.webkit.org/show_bug.cgi?id=136830

        Reviewed by Benjamin Poulain.

        Use an AtomicString as key for caching ClassNodeList objects instead of
        a String. ClassNodeList is the only type using a String instead of an
        AtomicString as key in the cache HashTable. This brings some
        complexity.

        I believe this was done to avoid unnecessarily atomizing the String,
        for performance reasons. However, at the moment, the String gets
        atomized anyway when constructing the ClassNodeList object. This is
        because the ClassNodeList::m_classNames member is of SpaceSplitString
        type and the SpaceSplitString constructor takes an AtomicString in
        argument.

        Using an AtomicString to cache ClassNodeLists simplifies the code quite
        a bit and decreases the size of NodeListsNodeData as well.

        Test: fast/dom/getElementsByClassName/conflict-tag-name.html

        * WebCore.order:
        Remove symbol corresponding to addCacheWithName() as it was removed.

        * dom/ClassNodeList.cpp:
        (WebCore::ClassNodeList::~ClassNodeList):
        Update the constructor to take an AtomicString in argument instead of
        a String, for clarity. The String gets atomized when initializing
        m_classNames anyway.

        (WebCore::ClassNodeList::ClassNodeList):
        Call removeCacheWithAtomicName() instead of removeCacheWithName() now
        that m_originalClassNames is an AtomicString.

        * dom/ClassNodeList.h:
        Use AtomicString instead of String type for classNames, in both the
        constructor argument and the m_originalClassNames data member.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::getElementsByClassName):
        Call addCacheWithAtomicName() instead of addCacheWithName() now that
        addCacheWithName() has been removed.

        * dom/Node.cpp:
        (WebCore::NodeListsNodeData::invalidateCaches):
        Stop invalidating m_nameCaches as this HashMap no longer exists.

        * dom/NodeRareData.h:
        (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash):
        (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
        (WebCore::NodeListsNodeData::isEmpty):
        (WebCore::NodeListsNodeData::adoptDocument):
        (WebCore::NodeListsNodeData::namedNodeListKey):
        (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
        (WebCore::NodeListsNodeData::addCacheWithName): Deleted.
        (WebCore::NodeListsNodeData::removeCacheWithName): Deleted.
        - Drop addCacheWithName() / removeCacheWithName() now that no NodeList
          uses a String as HashMap key.
        - Drop m_nameCaches now that ClassNodeLists are cached in
          m_atomicNameCaches instead.
        - Remove StringType template parameter and hardcode AtomicString
          instead.

2014-09-15  Chris Dumez  <cdumez@apple.com>

        Return early in SelectorChecker::checkOne() if selector.isAttributeSelector() is true
        https://bugs.webkit.org/show_bug.cgi?id=136838

        Reviewed by Benjamin Poulain.

        Return early in SelectorChecker::checkOne() if selector.isAttributeSelector()
        is true and the selector matched. Previously, we were only returning early if
        the selector did not match and we were falling through if it did. This means
        that we ended up doing the 2 if() checks below in the method unnecessarily:
        - selector.m_match == CSSSelector::PseudoClass
        - selector.m_match == CSSSelector::PseudoElement

        No new tests, no behavior change.

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):

2014-09-15  Chris Dumez  <cdumez@apple.com>

        Un-inline the Node constructor
        https://bugs.webkit.org/show_bug.cgi?id=136842

        Reviewed by Benjamin Poulain.

        Un-inline the Node constructor as it does not seem to impact
        performance, based on my testing:
        http://dromaeo.com/?id=226992,226998

        This reduces the stripped binary size by ~4Kb.

        No new tests, no behavior change.

        * dom/Document.h:
        (WebCore::Node::Node): Deleted.
        * dom/Node.cpp:
        (WebCore::Node::Node):

2014-09-15  Shivakumar JM  <shiva.jm@samsung.com>

        Web Core: Websocket state should be set to closed in didReceiveMessage call back.
        https://bugs.webkit.org/show_bug.cgi?id=136219

        Reviewed by Alexey Proskuryakov.

        Set the Websocket state to closed in didReceiveMessage call back.

        Test: http/tests/websocket/tests/hybi/error-event-ready-state.html

        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::didReceiveMessageError):

2014-09-15  Jon Honeycutt  <jhoneycutt@apple.com>

        Naming clean-up.

        Rubber-stamped by Andy Estes.

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::requestAutocomplete):
        (WebCore::HTMLFormElement::finishRequestAutocomplete):
        Remove superfluous "AutocompleteResult".

        * html/HTMLFormElement.h:
        Ditto.

2014-09-15  Alexey Proskuryakov  <ap@apple.com>

        Crash when logging in to optionshouse.com
        https://bugs.webkit.org/show_bug.cgi?id=136834

        Reviewed by Anders Carlsson.

        No test, because I couldn't make one. I don't have a way to reproduce first-hand.

        * platform/network/cf/SocketStreamHandleCFNet.cpp:
        (WebCore::SocketStreamHandle::readStreamCallback):
        (WebCore::SocketStreamHandle::writeStreamCallback):

2014-09-15  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix for 32-bit builds.

        Make casts from unsigned long long -> size_t explicit, rather than implicit. Also
        make CARingBuffer be protected by USING_MEDIA_TOOLBOX so ports without that flag
        won't try to compile unused code.

        * platform/audio/mac/CARingBuffer.cpp:
        (WebCore::CARingBuffer::fetch):
        * platform/audio/mac/CARingBuffer.h:
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::provideInput):

2014-09-15  Jer Noble  <jer.noble@apple.com>

        Unreviewed logic fix from r173631. Logic for includeShadowDOM was reversed.

        * page/DragController.cpp:
        (WebCore::DragController::startDrag):

2014-09-15  Jer Noble  <jer.noble@apple.com>

        Videos with controls enabled never receive 'dragstart' events.
        https://bugs.webkit.org/show_bug.cgi?id=136837

        Reviewed by Simon Fraser.

        When initiating a drag, the DragController checks whether the hit-tested element at a
        drag location is a child of the drag source, and bails if early if that is not the case.
        For a <video> element with controls, the hit-tested element is an element within the
        <video> element's Shadow DOM. Because the DragController uses a method which does not
        take Shadow DOM into account when determining a child-parent relationship, this test fails
        and all drag operations fail as well.

        For <video> elements only, when testing whether the drag source is an ancestor of the
        hit-tested element, use containsIncludingShadowDOM() instead of contains(). To ensure that
        the controls are still usable when a drag listener is active on a <video> element, mark
        the controls as a draggable element, but simply call preventDefault() in the controls'
        'dragstart' handler, ensuring the timeline and volume controls are themselves still draggable.

        * Modules/mediacontrols/mediaControlsApple.css:
        (audio::-webkit-media-controls-panel):
        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.createControls):
        (Controller.prototype.handlePanelDragStart):
        * page/DragController.cpp:
        (WebCore::DragController::startDrag):

2014-09-15  Roger Fong  <roger_fong@apple.com>

        Unreviewed. Add an unimplemented case to handle CSSPropertyWebkitInitialLetter so we don't get an assertion failure.

        * css/SVGCSSStyleSelector.cpp:
        (WebCore::StyleResolver::applySVGProperty):

2014-09-15  Jer Noble  <jer.noble@apple.com>

        [Mac] Support audioSourceProvider() in MediaPlayerPrivateAVFoundationObjC
        https://bugs.webkit.org/show_bug.cgi?id=135042

        Reviewed by Eric Carlson.

        Add support for AudioSourceProvider in MediaPlayerPrivateAVFoundationObjC, thereby
        supporting MediaElementAudioSourceNode.

        Import the CARingBuffer from CoreAudio sample code, making the necessary modifications
        for WebKit style and coding conventions. The threading assumptions for this class are
        that there will be a single writer thread and a single reader thread.

        * platform/audio/mac/CARingBuffer.cpp: Added.
        (WebCore::CARingBuffer::create): Create a unique_ptr.
        (WebCore::CARingBuffer::CARingBuffer): Simple constructor.
        (WebCore::CARingBuffer::~CARingBuffer): Simple destructor.
        (WebCore::CARingBuffer::allocate): Initialize the buffers and time bounds structures.
        (WebCore::CARingBuffer::deallocate): Destroy same.
        (WebCore::ZeroRange): Static utility method.
        (WebCore::StoreABL): Ditto.
        (WebCore::FetchABL): Ditto.
        (WebCore::ZeroABL): Ditto.
        (WebCore::CARingBuffer::store): Store the passed in buffer in the ring buffer, wrapping
            if necessary.
        (WebCore::CARingBuffer::setTimeBounds): Set the new time bounds by incrementing the
            bounds index locally, filling in the new values, then atomically incrementing the
            reader-visible index.
        (WebCore::CARingBuffer::getTimeBounds): Get the new time bounds by masking the time
            bounds index, and using it as an offset to the time bounds array. Protect against
            CPU starvation on the reading thread by checking the index against the stored
            index in the array entry. This check will fail if the writing thread has wrapped
            more than the size of the array.
        (WebCore::CARingBuffer::clipTimeBounds): Clamp the passed values to the available bounds.
        (WebCore::CARingBuffer::startFrame): Simple accessor.
        (WebCore::CARingBuffer::endFrame): Ditto.
        (WebCore::CARingBuffer::fetch): Read an audio buffer list from the ring buffer, possbily
            wrapping around to the start of the ring buffer.
        * platform/audio/mac/CARingBuffer.h: Added.
        (WebCore::CARingBuffer::numberOfChannels): Simple accessor.
        (WebCore::CARingBuffer::frameOffset): Ditto.
        (WebCore::CARingBuffer::TimeBounds::TimeBounds): Struct holding the start and end frame values.

        Add an implementation of AudioSourceProvider, using AVAudioMix and MTAudioProcessingTap
        to tap an AVPlayerItem's audio output and feed it to a MediaElementAudioSourceNode.

        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: Added.
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: Added.
        (WebCore::AudioSourceProviderAVFObjC::create): Simple factory.
        (WebCore::AudioSourceProviderAVFObjC::AudioSourceProviderAVFObjC): Simple constructor.
        (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC): Simple destructor.
        (WebCore::AudioSourceProviderAVFObjC::provideInput): Push audio into the ring buffer.
        (WebCore::AudioSourceProviderAVFObjC::setClient): Call destroyMix()/createMix() as appropriate.
        (WebCore::AudioSourceProviderAVFObjC::setPlayerItem): Ditto.
        (WebCore::AudioSourceProviderAVFObjC::destroyMix): Detach and destroy the AVAudioMix and tap.
        (WebCore::AudioSourceProviderAVFObjC::createMix): Set up the AVAudioMix and tap and attach to
            the AVPlayerItem.
        (WebCore::AudioSourceProviderAVFObjC::initCallback): Pass to class method.
        (WebCore::AudioSourceProviderAVFObjC::finalizeCallback): Ditto.
        (WebCore::AudioSourceProviderAVFObjC::prepareCallback): Ditto.
        (WebCore::AudioSourceProviderAVFObjC::unprepareCallback): Ditto.
        (WebCore::AudioSourceProviderAVFObjC::processCallback): Ditto.
        (WebCore::AudioSourceProviderAVFObjC::init): Set up the storage pointer for the tap.
        (WebCore::AudioSourceProviderAVFObjC::finalize): No-op.
        (WebCore::operator==): Compare two AudioStreamBasicDescription objects.
        (WebCore::operator!=): Ditto.
        (WebCore::AudioSourceProviderAVFObjC::prepare): Create an AudioCoverter object if necessary,
            create the ring buffer, and notify the client of format changes.
        (WebCore::AudioSourceProviderAVFObjC::unprepare): Destroy same.
        (WebCore::AudioSourceProviderAVFObjC::process): Copy samples out of the ring buffer,
            format converting them if necessary. Mute original audio.

        Create the AudioSourceProviderAVFObjC object and notify it when the current AVPlayerItem changes.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):

        Enable SOFT_LINK_MAY_FAIL on the Mac platform.

        * platform/mac/SoftLinking.h:

        Add new files to the project.

        * WebCore.xcodeproj/project.pbxproj:

2014-09-15  Chris Dumez  <cdumez@apple.com>

        Avoid redundant isElementNode() checks in Traversal<HTML*Element> / Traversal<SVG*Element>
        https://bugs.webkit.org/show_bug.cgi?id=136719

        Reviewed by Darin Adler.

        Avoid redundant isElementNode() checks in Traversal<HTML*Element> /
        Traversal<SVG*Element>.  We used to iterate through Elements, and then
        call isElementOfType<HTML*Element>()  on each Element. This made sense
        because hasTagName() used to be defined on Element. However, after
        http://trac.webkit.org/changeset/165699, hasTagName() is now defined on
        Node for HTMLQualifiedName / SVGQualifiedName arguments.

        Node::hasTagName(HTMLQualifiedName) basically does the following check
        "isHTMLElement() &&  toHTMLElement(*this).hasTagName(tagName)". As a
        consequence, doing an isElementNode() check is now redundant as
        isHTMLElement() is defined on Node.

        This patch adds a template parameter to isElementOfType() so that it can
        take any type in argument (particulaly Node, Element, HTMLElement,
        SVGElement, MathMLElement), not just an Element. I had to add an
        ElementTypeCastTraits struct to support partial specialization as C++
        does not support partial specialization of template functions.
        This patch also updates Traversal<ElementType> so that the methods use
        NodeTraversal internally instead of Traversal<ElementType>. As a result,
        we now iterate over Nodes (not Elements) and call the new
        isElementOfType<ElementType>(Node) helpers (which are efficient after
        r165699).

        Before the patch, the code ended up doing the following checks for
        Traversal<HTML*element>:
        node.isElementNode() && toElement(node).isHTMLElement()
            && toHTMLElement(node).hasTagName(HTMLNames::fooTag)

        After the patch, the code only does:
        node.isHTMLElement()
            && toHTMLElement(node).hasTagName(HTMLNames::fooTag)

        No new tests, no behavior change.

        * dom/Element.h:
        (WebCore::Element>):
        (WebCore::isElementOfType):
        Add template parameter to isElementOfType() function so that it can
        handle any argument type, not just Elements. Also introduce an
        ElementTypeCastTraits struct that is called by isElementOfType()
        function so that we can so partial template specialization.

        * dom/ElementTraversal.h:
        (WebCore::Traversal<ElementType>::firstWithinTemplate):
        (WebCore::Traversal<ElementType>::lastWithinTemplate):
        (WebCore::Traversal<ElementType>::nextTemplate):
        (WebCore::Traversal<ElementType>::previousTemplate):
        Use NodeTraversal API internally instead of Traversal<Element> to avoid
        redundant isElementNode() checks.

        (WebCore::Traversal<Element>::lastWithinTemplate): Deleted.
        The code is now identical to the generic version.

        (WebCore::Traversal<Element>::previousTemplate): Deleted.
        The code is now identical to the generic version.

        * dom/make_names.pl:
        (printTypeHelpers):
        - Generate template specializations for ElementTypeCastTraits struct
          instead of isElementOfType(). This avoids having to provide overloads
          for specific argument types (e.g. Node, Element, HTMLElement, ...).
        - Share more code between HTML code path and the other path (for SVG,
          MTHML).

        * html/HTMLElement.h:
        (WebCore::HTMLElement>):
        Provide HTMLElement template specialization for ElementTypeCastTraits
        struct instead of isElementOfType().

        * html/HTMLFormControlElement.h:
        (WebCore::HTMLFormControlElement>):
        Provide HTMLFormControlElement template specialization for
        ElementTypeCastTraits struct instead of isElementOfType().

        * html/HTMLFrameElementBase.h:
        (WebCore::isHTMLFrameElementBase):
        - Remove helper taking an Element in argument as it does not bring any
          benefit. Instead, update the overload taking a Node in argument to
          remove the unnecessary isElementNode() check as isHTMLFrameElement(Node)
          is now efficient.
        - Add an overload taking an HTMLElement in argument so that we can bypass
          the isHTMLElement() check when we know the input is an HTMLElement.

        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement>):
        Provide HTMLMediaElement template specialization for ElementTypeCastTraits
        struct instead of isElementOfType().

        * html/HTMLPlugInImageElement.h:
        (WebCore::HTMLPlugInImageElement>):
        Provide HTMLPlugInImageElement template specialization for
        ElementTypeCastTraits struct instead of isElementOfType().

        * html/LabelableElement.h:
        (WebCore::LabelableElement>):
        Provide LabelableElement template specialization for ElementTypeCastTraits
        struct instead of isElementOfType().

        * mathml/MathMLElement.h:
        (WebCore::MathMLElement>):
        Provide MathMLElement template specialization for ElementTypeCastTraits
        struct for consistency with HTMLElement / SVGElement.

        * svg/SVGElement.h:
        (WebCore::SVGElement>):
        - Provide SVGElement template specialization for ElementTypeCastTraits
          struct instead of isElementOfType().
        - include SVGElementTypeHelpers.h at the end of the file (similarly to
          what is already done in HTMLElement.h because
          isElementOfType(const SVGElement&) needs to be defiend because the
          include.

        * svg/SVGFilterPrimitiveStandardAttributes.h:
        (WebCore::SVGFilterPrimitiveStandardAttributes>):
        Provide SVGFilterPrimitiveStandardAttributes template specialization for
        ElementTypeCastTraits struct instead of isElementOfType().

        * svg/animation/SVGSMILElement.h:
        (WebCore::SVGSMILElement>):
        Provide SVGSMILElement template specialization for ElementTypeCastTraits
        struct instead of isElementOfType().


2014-08-07  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Sort items by span when resolving content-based track sizing functions
        https://bugs.webkit.org/show_bug.cgi?id=135701

        Reviewed by Darin Adler.

        Section 10.4 of the specs mentions that we should first treat non
        spanning items and then incrementally proceed with items with
        greater spans when resolving the track breaths in the Track Sizing
        Algorithm.

        As a nice side effect we're removing the multiple processing of
        spanning grid items caused by GridIterator (it returns the same
        item as many times as the number of cells it spans). This adds a
        ~4% performance penalty in auto-grid-lots-of-data.html mainly due
        to the use of a hash to remove duplicates.

        Test: fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::gridItemSpan):
        (WebCore::gridItemWithSpanSorter):
        (WebCore::uniquePointerInPair):
        (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
        * rendering/RenderGrid.h:

2014-09-15  Zan Dobersek  <zdobersek@igalia.com>

        [GTK][CMake] Build WebCore with Wayland-specific include directories, libraries
        https://bugs.webkit.org/show_bug.cgi?id=136815

        Reviewed by Philippe Normand.

        * PlatformGTK.cmake: Add the platform/graphics/wayland/ directory to the list of
        WebCore's include directories. Add include directories of the Wayland dependency
        to the list of WebCore's include directories. Same for the Wayland libraries.

2014-09-15  peavo@outlook.com  <peavo@outlook.com>

        [WinCairo] Make it easier to enable/disable GStreamer.
        https://bugs.webkit.org/show_bug.cgi?id=135766

        Reviewed by Brent Fulgham.

        Make it possible to enable/disable GStreamer by editing the new user macro ENABLE_GSTREAMER_WINCAIRO.

        * WebCore.vcxproj/WebCoreDebugWinCairo.props: Import GStreamer property file.
        * WebCore.vcxproj/WebCoreReleaseWinCairo.props: Ditto.

2014-09-12  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Crash at CSSParser::parseGridTemplateRowsAndAreas
        https://bugs.webkit.org/show_bug.cgi?id=136778

        Reviewed by Darin Adler.

        An empty list of grid line names (represented by "()") does not
        add anything to the list of parsed values. That's why trying to
        concatenate an adjacent list of grid line names was failing,
        because we were trying to concatenate a list with the last parsed
        CSSValue which was not the expected grid line names list.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
        (WebCore::CSSParser::parseGridLineNames):
        * css/CSSParser.h:

2014-09-15  Andres Gomez  <agomez@igalia.com>

        [GStreamer] don't send transferMode HTTP header
        https://bugs.webkit.org/show_bug.cgi?id=136781

        Reviewed by Philippe Normand.

        No header at all is better than having the wrong header as DLNA
        mandates that a missing header has to be tolerated while a wrong
        header is an error.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcStart):
        * platform/network/HTTPHeaderNames.in:

2014-09-14  Christophe Dumez  <cdumez@apple.com>

        Fix post-mortem nits for r173528 & r173549
        https://bugs.webkit.org/show_bug.cgi?id=136808

        Reviewed by Darin Adler.

        Fix post-mortem nits for r173528 & r173549.

        No new tests, no behavior change.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
        - Use auto* instead of more specific types.
        - Use fastGetAttribute() instead of getAttribute() as this is
          supported for the "title" attribute.

        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::setSelectionFromNone):
        Use auto* instead of more specific types.

2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Introduce FONT_DATA_TYPE_CASTS, and use it
        https://bugs.webkit.org/show_bug.cgi?id=136766

        Reviewed by Darin Adler.

        As a step to use toFoo, this patch introduces FONT_DATA_TYPE_CASTS macro for toFooFontData().
        This will help to detect wrong type cast.

        * platform/graphics/FontData.h:
        * platform/graphics/FontGlyphs.cpp:
        (WebCore::FontGlyphs::releaseFontData):
        (WebCore::FontGlyphs::determinePitch):
        * platform/graphics/GlyphPageTreeNode.cpp:
        (WebCore::GlyphPageTreeNode::initializePage):
        * platform/graphics/SegmentedFontData.h:
        * platform/graphics/SimpleFontData.h:
        * platform/graphics/mac/SimpleFontDataMac.mm:
        (WebCore::SimpleFontData::getCompositeFontReferenceFontData):

2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Generate toCSSStyleSheet using STYLE_SHEET_TYPE_CASTS
        https://bugs.webkit.org/show_bug.cgi?id=136774

        Reviewed by Darin Adler.

        As a step to use toFoo, this patch introduces STYLE_SHEET_TYPE_CASTS for toCSSStyleSheet().
        This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.

        No new tests, no behavior changes.

        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * css/CSSStyleSheet.h:
        * css/StyleSheet.h:
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::filterEnabledNonemptyCSSStyleSheets):
        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::parseStyleSheet):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getAllStyleSheets):
        (WebCore::InspectorCSSAgent::collectStyleSheets):

2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Generate toFooElementData() using ELEMENT_DATA_TYPE_CASTS
        https://bugs.webkit.org/show_bug.cgi?id=136775

        Reviewed by Darin Adler.

        As a step to use toFoo, this patch introduces ELEMENT_DATA_TYPE_CASTS for toFooElementData().
        This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.

        No new tests, no behavior changes.

        * dom/Element.cpp:
        (WebCore::Element::cloneAttributesFromElement):
        (WebCore::Element::createUniqueElementData):
        * dom/ElementData.cpp:
        (WebCore::ElementData::destroy):
        * dom/ElementData.h:
        (WebCore::ElementData::length):
        (WebCore::ElementData::attributeBase):
        (WebCore::ElementData::presentationAttributeStyle):
        (WebCore::ElementData::attributesIterator):
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::setupInitialView): Remove static_cast<SVGSVGElement*>

2014-09-14  Chris Dumez  <cdumez@apple.com>

        Remove unnecessary overloads taking a ContainerNode in Element Traversal
        https://bugs.webkit.org/show_bug.cgi?id=136767

        Reviewed by Darin Adler.

        Remove unnecessary overloads taking a ContainerNode in Element Traversal.
        Several of those don't bring any performance improvements as the needed
        methods are defined on Node (not ContainerNode).

        No new tests, no behavior change.

        * dom/ElementTraversal.h:
        (WebCore::Traversal<Element>::previous):
        NodeTraversal::previous() takes a const Node* in argument so the
        ContainerNode overload is not needed.

        (WebCore::Traversal<ElementType>::previous):
        Unnecessary now that Traversal<Element>::previous() takes a const Node*
        in argument.

        (WebCore::Traversal<ElementType>::nextSibling):
        nextSibling() is defined on Node, not ContainerNode, so the overload
        is not needed.

        (WebCore::Traversal<ElementType>::previousSibling):
        previousSibling() is defined on Node, not ContainerNode, so the overload
        is not needed.

        (WebCore::Traversal<Element>::previousTemplate): Deleted.
        (WebCore::Traversal<ElementType>::previousTemplate): Deleted.
        (WebCore::Traversal<ElementType>::nextSiblingTemplate): Deleted.
        (WebCore::Traversal<ElementType>::previousSiblingTemplate): Deleted.
        No need to have those functions templated anymore.

2014-09-14  Daniel Bates  <dabates@apple.com>

        [iOS] Attempt to fix the iOS build after <http://trac.webkit.org/changeset/173606>
        (https://bugs.webkit.org/show_bug.cgi?id=136789)

        Substitute Node::countChildNodes() for Node::childNodeCount() in more places.

        Although I updated a comment in WebCore::lastOffsetForEditing() (defined in file
        editing/htmlediting.cpp) to refer to Node::countChildNodes(), I'm unclear what the
        comment is trying to explain that isn't otherwise explained by the code or the
        comments that precede this function. Specifically, I don't understand the use of
        the word "preempt" in the comment. We should look to improve the readability of
        this comment.

        * editing/htmlediting.cpp:
        (WebCore::lastOffsetForEditing):
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::interpretationsForCurrentRoot):

2014-09-14  Chris Dumez  <cdumez@apple.com>

        Drop NodeTraversal::nextSkippingChildren() overload taking a ContainerNode
        https://bugs.webkit.org/show_bug.cgi?id=136764

        Reviewed by Darin Adler.

        Drop NodeTraversal::nextSkippingChildren() overload taking a
        ContainerNode argument. This one does not bring any performance
        improvement because nextSibling() is defined on Node and
        nextAncestorSibling() takes a Node in argument.

        Also remove the overload in ElementTraversal as it no longer makes
        sense after this change.

        No new tests, no behavior change.

        * dom/ElementTraversal.h:
        (WebCore::Traversal<ElementType>::nextSkippingChildren):
        (WebCore::Traversal<ElementType>::nextSkippingChildrenTemplate): Deleted.
        * dom/NodeTraversal.h:
        (WebCore::NodeTraversal::nextSkippingChildren):
        (WebCore::NodeTraversal::next):
        (WebCore::NodeTraversal::traverseNextSkippingChildrenTemplate): Deleted.

2014-09-14  Chris Dumez  <cdumez@apple.com>

        Rename Node::childNodeCount() to countChildNodes() and avoid inefficient uses
        https://bugs.webkit.org/show_bug.cgi?id=136789

        Reviewed by Darin Adler.

        Rename Node::childNodeCount() to countChildNodes() to make it clearer
        that the method actually computes the result rather than returning a
        cached value.

        This patch also introduces a new Node::hasOneChild() method that is
        used to check if a Node has a single child. This is much more efficient
        than calling countChildNodes() == 1.

        The patch also leverages Node::hasChildNodes() in a lot of places
        instead of calling countChildNodes().

        Finally, in a couple of places, we now use childrenOfType() to iterate
        over children more efficient than using countChildNodes() and
        childNode(index).

        No new tests, no behavior change.

        * WebCore.exp.in:
        * WebCore.order:
        Update the name of the exposed symbol for countChildNodes().

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::removeChildren):
        (WebCore::ContainerNode::countChildNodes):
        (WebCore::ContainerNode::childNodeCount): Deleted.
        Rename childNodeCount() to countChildNodes() to make it obvious it is
        computing the result rather than returning a cached value.

        * dom/ContainerNode.h:
        (WebCore::ContainerNode::hasOneChild):
        Introduce an efficient way to check in a ContainerNode has a single
        child as "countChildNodes() == 1" calls were frequent and inefficient.

        (WebCore::Node::countChildNodes):
        (WebCore::Node::childNodeCount): Deleted.
        * dom/Node.h:
        Rename childNodeCount() to countChildNodes().

        * dom/Position.cpp:
        (WebCore::Position::parentAnchoredEquivalent):
        * dom/Position.h:
        (WebCore::lastOffsetInNode):
        * dom/Range.cpp:
        Mechanical renaming.

        (WebCore::lengthOfContentsInNode):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
        (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
        (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
        (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
        (WebCore::ApplyStyleCommand::applyInlineStyleChange):
        Call hasChildNodes() rather than countChildNodes() as it is a lot more
        efficient.

        * editing/Editor.cpp:
        (WebCore::Editor::setTextAsChildOfElement):
        (WebCore::Editor::rangeOfString):
        (WebCore::Editor::countMatchesForText):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::elementRangeContainingCaretSelection):
        Mechanical renaming.

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::insertAsListItems):
        Call hasOneChild() instead of countChildNodes() == 1. Also remove
        redundant listElement->hasChildNodes() check as hasOneChild() takes
        care of this already.

        * editing/TextIterator.cpp:
        (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
        * editing/VisibleUnits.cpp:
        (WebCore::endOfDocument):
        * editing/htmlediting.cpp:
        (WebCore::lastOffsetForEditing):
        Mechanical renaming.

        (WebCore::visiblePositionBeforeNode):
        (WebCore::visiblePositionAfterNode):
        Call hasChildNodes() instead of converting countChildNodes() to a
        boolean.

        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
        Call !hasChildNodes() instead of !countChildNodes().

        (WebCore::isPlainTextMarkup):
        - Drop !node->isElementNode() check as !node->hasTagName(divTag) takes
          care of discarding non-Element Nodes already.
        - Cast the Node to an HTMLDivElement as soon as possible to avoid
          calling calling the slower Node APIs in several cases.
        - Call hasOneChild() instead of countChildNodes() == 1.

        * html/HTMLDivElement.h:
        * html/HTMLTagNames.in:
        Generate casting helpers as I use them in WebCore::isPlainTextMarkup().

        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::setText):
        * html/HTMLTitleElement.cpp:
        (WebCore::HTMLTitleElement::setText):
        Call hasOneChild() / hasChildNodes() instead of countChildNodes().

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden):
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
        Use childrenOfType<Element>() to iterate of child Elements instead of
        slower childNodeCount() + childNode(index) + isElementNode(). Also,
        childNodeCount() was not even cached before the loop.

        * html/track/VTTRegion.cpp:
        (WebCore::VTTRegion::displayLastTextTrackCueBox):
        Use childrenOfType<Element>() to iterate of child Elements, thus
        avoiding calling childNodeCount() + childNode(index).

        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::extend):
        (WebCore::DOMSelection::selectAllChildren):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::caretMaxOffset):
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::isSelected):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::splitSelectionBetweenSubtrees):
        Mechanical renaming.

2014-09-13  Chris Dumez  <cdumez@apple.com>

        Un-inline Element constructor
        https://bugs.webkit.org/show_bug.cgi?id=136786

        Reviewed by Benjamin Poulain.

        Un-inline Element constructor as it is non-trivial and it does not seem
        to impact performance based on my testing:
        http://dromaeo.com/?id=226865,226869

        This reduces the stripped binary size by 8 Kb.

        No new tests, no behavior change.

        * dom/Element.cpp:
        (WebCore::Element::Element):
        * dom/Element.h:
        (WebCore::Element::Element): Deleted.

2014-09-12  Jon Honeycutt  <jhoneycutt@apple.com>

        Build fix with REQUEST_AUTOCOMPLETE enabled

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::requestAutocomplete):
        (WebCore::HTMLFormElement::finishRequestAutocomplete):

2014-09-10  Jon Honeycutt  <jhoneycutt@apple.com>

        Re-add the request autocomplete feature

        <https://bugs.webkit.org/show_bug.cgi?id=136730>

        This feature was rolled out in r148731 because it was only used by
        Chromium. As we consider supporting this feature, roll it back in, but
        leave it disabled.

        This rolls out r148731 (which removed the feature) with small changes
        needed to make the code build in ToT, to match modern style, to make
        the tests run, and to remove unused code.

        Reviewed by Andy Estes.

        Tests: fast/events/constructors/autocomplete-error-event-constructor.html
               fast/forms/form-request-autocomplete.html

        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/AutocompleteErrorEvent.h: Added.
        (WebCore::AutocompleteErrorEvent::create):
        (WebCore::AutocompleteErrorEvent::reason):
        (WebCore::AutocompleteErrorEvent::AutocompleteErrorEvent):
        * dom/AutocompleteErrorEvent.idl: Added.
        * dom/EventNames.h:
        * dom/EventNames.in:
        * html/HTMLAttributeNames.in:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::HTMLFormElement):
        (WebCore::HTMLFormElement::requestAutocomplete):
        (WebCore::HTMLFormElement::finishRequestAutocomplete):
        (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
        (WebCore::HTMLFormElement::parseAttribute):
        * html/HTMLFormElement.h:
        * html/HTMLFormElement.idl:
        * loader/EmptyClients.h:
        * loader/FrameLoaderClient.h:
        * page/DOMWindow.idl:

2014-09-12  Vivek Galatage  <vivek.vg@samsung.com>

        CanvasRenderingContext2D should update the computed style while setting the font
        https://bugs.webkit.org/show_bug.cgi?id=136737

        Reviewed by Darin Adler.

        Before accessing the computed style for populating 'font' property of CanvasRenderingContext2D
        make sure to have an up-to-date computed style avoiding any stale reference.

        Test: fast/canvas/canvas-set-font-with-updated-style.html

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setFont):

2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>

        CSS JIT: Apply CSS JIT to SelectorQuery with multiple selectors
        https://bugs.webkit.org/show_bug.cgi?id=135255

        Reviewed by Benjamin Poulain.

        After dropping SelectorCheckerFastPath, Dromaeo cssquery-jquery test
        result becomes significantly worse. 400.26/s to 348.16/s, 13%
        performance regression.

        Investigated the cause of it and we found that the test results for
        querySelector with multiple selectors causes performance regressions.

        To solve this, we attempt to JIT compile all selectors in multiple
        selectors. And if compiling some selectors is failed, SelectorQuery
        fallbacks to the slower implementation.

        This change improves the performance. After applying this patch,
        cssquery-jquery test result becomes 418.71/s, 4.61% better than the
        previous good performance case.

        Test: fast/selectors/querySelector-multiple-selectors.html

        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::SelectorDataList):
        (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
        (WebCore::SelectorDataList::execute):
        * dom/SelectorQuery.h:

2014-09-12  Jer Noble  <jer.noble@apple.com>

        [Fullscreen] Taking embedded youtube video full screen takes the whole page full screen
        https://bugs.webkit.org/show_bug.cgi?id=136792

        Reviewed by Beth Dakin.

        Recalculate style after beginning the enter fullscreen animation, but before sending the
        "webkitfullscreenchange" event to listeners.

        * dom/Document.cpp:
        (WebCore::Document::webkitWillEnterFullScreenForElement):

2014-09-12  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r173575.
        https://bugs.webkit.org/show_bug.cgi?id=136790

        Failing tests (Requested by enrica on #webkit).

        Reverted changeset:

        "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
        https://bugs.webkit.org/show_bug.cgi?id=136474
        http://trac.webkit.org/changeset/173575

2014-09-12  Enrica Casucci  <enrica@apple.com>

        Remove PLATFORM(IOS) from WebCore/editing (Part 3).
        https://bugs.webkit.org/show_bug.cgi?id=136474

        Reviewed by Benjamin Poulain.

        This is the updated version of the patch that was landed in r173340.
        I changed the use of IntPoint to FloatPoint since it was causing tests
        to fail.
        This patch removes the use of PLATFORM(IOS) from TextAffinity.h
        and removes the assumption that EAffinity values match NSSelectionAffinity
        values. It also removes the includes in TextAffinity.h, creating the need to
        include explicitly the files when necessary. It also removes the unnecessary
        use of platform specific types, replacing them with WebCore types.

        * WebCore.exp.in:
        * editing/TextAffinity.h:
        (kit): Deleted.
        (core): Deleted.
        * editing/cocoa/HTMLConverter.mm:
        * page/mac/WebCoreFrameView.h:
        * platform/ios/ScrollViewIOS.mm:
        (WebCore::ScrollView::platformSetScrollPosition):
        * platform/ios/wak/WAKScrollView.mm:
        (-[WAKScrollView setScrollOrigin:updatePositionAtAll:immediately:]):
        (-[WAKScrollView scrollOrigin]):
        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::platformSetScrollPosition):

2014-09-12  Dean Jackson  <dino@apple.com>

        Unprefix the flexbox CSS properties
        https://bugs.webkit.org/show_bug.cgi?id=98420

        Unreviewed fix up, that missed the original
        commit. Tony Chang made some comments
        on the bugzilla.

        "justify-self" should not have been unprefixed.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSParser.cpp:
        (WebCore::isValidKeywordPropertyAndValue):
        (WebCore::CSSParser::parseValue):
        * css/CSSPropertyNames.in:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyProperty):

2014-09-12  Dean Jackson  <dino@apple.com>

        Unprefix the flexbox CSS properties
        https://bugs.webkit.org/show_bug.cgi?id=98420

        Reviewed by Benjamin Poulain.

        Remove the need for a "-webkit-" prefix on flexbox
        and related properties. This includes:
        - align-content
        - align-items
        - align-self
        - flex-basis
        - flex-direction
        - flex-wrap
        - flex-grow
        - flex-shrink
        - flex
        - flex-flow
        - justify-content
        - order

        ... as well as the display keyword values "flex" and
        "inline-flex".

        * css/CSSComputedStyleDeclaration.cpp:  Change names.
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSParser.cpp: Ditto.
        (WebCore::isValidKeywordPropertyAndValue):
        (WebCore::isKeywordPropertyID):
        (WebCore::CSSParser::parseValue):
        (WebCore::CSSParser::parseFlex):
        * css/CSSPrimitiveValueMappings.h: Since we need to still handle the old
        keywords for display, this has added two new keywords.
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator EDisplay): If the older keywords were used in
        content, map them to the new value names.
        * css/CSSPropertyNames.in: Add aliases for the prefixed properties.
        * css/CSSValueKeywords.in: Add "flex" and "inline-flex".
        * css/DeprecatedStyleBuilder.cpp: Change names.
        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
        * css/StyleProperties.cpp: Change names.
        (WebCore::StyleProperties::getPropertyValue):
        (WebCore::StyleProperties::asText):
        * css/StylePropertyShorthand.cpp: Rename shorthand methods to remove the prefix.
        (WebCore::flexFlowShorthand):
        (WebCore::flexShorthand):
        (WebCore::shorthandForProperty):
        (WebCore::matchingShorthandsForLonghand):
        (WebCore::webkitFlexFlowShorthand): Deleted.
        (WebCore::webkitFlexShorthand): Deleted.
        * css/StylePropertyShorthand.h:
        * css/StyleResolver.cpp:
        (WebCore::equivalentBlockDisplay):
        (WebCore::StyleResolver::applyProperty):
        * page/animation/CSSPropertyAnimation.cpp: Change names.
        (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::createFor): Handle the two new display values (the same way as
        the old values).
        * rendering/style/RenderStyleConstants.h: Add constants for the new display values.

2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>

        ASSERTION FAILED: e in WebCore::StyleResolver::adjustRenderStyle
        https://bugs.webkit.org/show_bug.cgi?id=136366

        Reviewed by Benjamin Poulain.

        Since element becomes nullptr when resolving styles for pseudo elements,
        so don't do `ASSERT(e)` and use pointer for that.

        Test: fast/css/appearance-with-pseudo-elements.html

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyle):
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::RenderSliderThumb::updateAppearance):
        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
        (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
        (WebCore::RenderThemeEfl::adjustSliderThumbSize):
        (WebCore::RenderThemeEfl::adjustCheckboxStyle):
        (WebCore::RenderThemeEfl::adjustRadioStyle):
        (WebCore::RenderThemeEfl::adjustButtonStyle):
        (WebCore::RenderThemeEfl::adjustMenuListStyle):
        (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
        (WebCore::RenderThemeEfl::adjustTextFieldStyle):
        (WebCore::RenderThemeEfl::adjustTextAreaStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
        (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
        (WebCore::RenderThemeEfl::adjustProgressBarStyle):
        * platform/efl/RenderThemeEfl.h:
        * platform/gtk/RenderThemeGtk.h:
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle):
        (WebCore::RenderTheme::adjustCheckboxStyle):
        (WebCore::RenderTheme::adjustRadioStyle):
        (WebCore::RenderTheme::adjustButtonStyle):
        (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
        (WebCore::RenderTheme::adjustTextFieldStyle):
        (WebCore::RenderTheme::adjustTextAreaStyle):
        (WebCore::RenderTheme::adjustMenuListStyle):
        (WebCore::RenderTheme::adjustMeterStyle):
        (WebCore::RenderTheme::adjustProgressBarStyle):
        (WebCore::RenderTheme::adjustMenuListButtonStyle):
        (WebCore::RenderTheme::adjustMediaControlStyle):
        (WebCore::RenderTheme::adjustSliderTrackStyle):
        (WebCore::RenderTheme::adjustSliderThumbStyle):
        (WebCore::RenderTheme::adjustSliderThumbSize):
        (WebCore::RenderTheme::adjustSearchFieldStyle):
        (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
        * rendering/RenderTheme.h:
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::adjustButtonStyle):
        (WebCore::RenderThemeGtk::adjustMenuListStyle):
        (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
        (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
        (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
        (WebCore::RenderThemeGtk::adjustSliderThumbSize):
        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
        (WebCore::RenderThemeGtk::adjustProgressBarStyle):
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::adjustCheckboxStyle):
        (WebCore::RenderThemeIOS::adjustRadioStyle):
        (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
        (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
        (WebCore::RenderThemeIOS::adjustSliderThumbSize):
        (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
        (WebCore::RenderThemeIOS::adjustButtonStyle):
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::adjustTextFieldStyle):
        (WebCore::RenderThemeMac::adjustTextAreaStyle):
        (WebCore::RenderThemeMac::adjustProgressBarStyle):
        (WebCore::RenderThemeMac::adjustMenuListStyle):
        (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
        (WebCore::RenderThemeMac::adjustSliderTrackStyle):
        (WebCore::RenderThemeMac::adjustSliderThumbStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeMac::adjustSliderThumbSize):
        * rendering/RenderThemeSafari.cpp:
        (WebCore::RenderThemeSafari::adjustButtonStyle):
        (WebCore::RenderThemeSafari::adjustTextFieldStyle):
        (WebCore::RenderThemeSafari::adjustTextAreaStyle):
        (WebCore::RenderThemeSafari::adjustMenuListStyle):
        (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
        (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
        (WebCore::RenderThemeSafari::adjustSliderThumbSize):
        (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeSafari::adjustMeterStyle):
        * rendering/RenderThemeSafari.h:
        * rendering/RenderThemeWin.cpp:
        (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
        (WebCore::RenderThemeWin::adjustMenuListStyle):
        (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
        (WebCore::RenderThemeWin::adjustSliderThumbSize):
        (WebCore::RenderThemeWin::adjustSearchFieldStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeWin::adjustMeterStyle):
        * rendering/RenderThemeWin.h:

2014-09-12  Joseph Pecoraro  <pecoraro@apple.com>

        Fix casing in method name - formatNumberForCustomCSSText
        https://bugs.webkit.org/show_bug.cgi?id=136758

        Reviewed by Benjamin Poulain.

        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
        (WebCore::CSSPrimitiveValue::customCSSText):
        (WebCore::CSSPrimitiveValue::formatNumberForcustomCSSText): Deleted.
        * css/CSSPrimitiveValue.h:

2014-09-12  Chris Dumez  <cdumez@apple.com>

        Make all CSSSelector data members private
        https://bugs.webkit.org/show_bug.cgi?id=136784

        Reviewed by Benjamin Poulain.

        Make all CSSSelector data members private. Previously, some of the data
        members such as m_relation / m_match / m_pseudoType were public and
        accessed directly from outside the class. The new approach is better
        because:
        - Those members are bit fields so by using getters, we can hide the
          casts inside the getters. The setters can now also check that the
          bitfield is big enough to actually store the enum value.
        - When using those in switch() statements, the compiler now complains
          if we fail to test some of the enum values as the value is now an
          enum, and not merely an unsigned integer.
        - Some of these members already has getters (e.g. relation()).
        - Better encapsulation.

        No new tests, no behavior change.

        * css/CSSParserValues.cpp:
        (WebCore::CSSParserSelector::parsePagePseudoSelector):
        (WebCore::CSSParserSelector::parsePseudoElementSelector):
        (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
        (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
        (WebCore::CSSParserSelector::setPseudoClassValue):
        (WebCore::CSSParserSelector::isSimple):
        (WebCore::CSSParserSelector::prependTagSelector):
        * css/CSSParserValues.h:
        (WebCore::CSSParserSelector::setMatch):
        (WebCore::CSSParserSelector::setRelation):
        (WebCore::CSSParserSelector::isPseudoElementCueFunction):
        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::createRareData):
        (WebCore::CSSSelector::specificityForOneSelector):
        (WebCore::CSSSelector::specificityForPage):
        (WebCore::CSSSelector::operator==):
        (WebCore::CSSSelector::selectorText):
        * css/CSSSelector.h:
        (WebCore::CSSSelector::setPseudoElementType):
        (WebCore::CSSSelector::setPagePseudoType):
        (WebCore::CSSSelector::pseudoClassType):
        (WebCore::CSSSelector::setPseudoClassType):
        (WebCore::CSSSelector::pseudoElementType):
        (WebCore::CSSSelector::pagePseudoClassType):
        (WebCore::CSSSelector::setRelation):
        (WebCore::CSSSelector::match):
        (WebCore::CSSSelector::setMatch):
        (WebCore::CSSSelector::matchesPseudoElement):
        (WebCore::CSSSelector::isUnknownPseudoElement):
        (WebCore::CSSSelector::isCustomPseudoElement):
        (WebCore::CSSSelector::isSiblingSelector):
        (WebCore::CSSSelector::isAttributeSelector):
        (WebCore::CSSSelector::setValue):
        (WebCore::CSSSelector::CSSSelector):
        (WebCore::CSSSelector::~CSSSelector):
        (WebCore::CSSSelector::tagQName):
        (WebCore::CSSSelector::value):
        * css/CSSSelectorList.cpp:
        (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
        * css/PageRuleCollector.cpp:
        (WebCore::checkPageSelectorComponents):
        * css/RuleFeature.cpp:
        (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
        * css/RuleSet.cpp:
        (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
        (WebCore::determinePropertyWhitelistType):
        (WebCore::RuleSet::addRule):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::matchRecursively):
        (WebCore::anyAttributeMatches):
        (WebCore::canMatchHoverOrActiveInQuirksMode):
        (WebCore::SelectorChecker::checkOne):
        (WebCore::SelectorChecker::checkScrollbarPseudoClass):
        (WebCore::SelectorChecker::determineLinkMatchType):
        * css/SelectorChecker.h:
        (WebCore::SelectorChecker::isCommonPseudoClassSelector):
        * css/SelectorFilter.cpp:
        (WebCore::collectDescendantSelectorIdentifierHashes):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::constructFragments):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
        * dom/SelectorQuery.cpp:
        (WebCore::isSingleTagNameSelector):
        (WebCore::isSingleClassNameSelector):
        (WebCore::findIdMatchingType):
        (WebCore::SelectorDataList::SelectorDataList):
        (WebCore::selectorForIdLookup):
        (WebCore::filterRootById):

2014-09-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r173441): [GTK] All buttons appear insensitive
        https://bugs.webkit.org/show_bug.cgi?id=136614

        Reviewed by Sergio Villar Senin.

        Do not use RenderTheme::isReadOnlyControl() to decide whether to
        render non text based forms sensitive or unsensitive, isEnabled()
        is enough in those cases.

        * rendering/RenderThemeGtk.cpp:
        (WebCore::paintToggle):
        (WebCore::renderButton):
        (WebCore::RenderThemeGtk::paintSliderTrack):
        (WebCore::RenderThemeGtk::paintSliderThumb):

2014-09-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r173423): CertificateInfo is never sent to the UI process when using shared secondary process model
        https://bugs.webkit.org/show_bug.cgi?id=136669

        Reviewed by Antti Koivisto.

        Add CertificateInfoPolicy option to ResourceLoaderOptions. It's
        set to DoNotIncludeCertificateInfo for all loads except the main
        resource load.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::startLoadingMainResource): Pass
        IncludeCertificateInfo to ResourceLoaderOptions.
        * loader/NetscapePlugInStreamLoader.cpp:
        (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
        Pass DoNotIncludeCertificateInfo to ResourceLoaderOptions().
        * loader/ResourceLoader.h:
        (WebCore::ResourceLoader::shouldIncludeCertificateInfo): Return
        true if IncludeCertificateInfo option was given.
        * loader/ResourceLoaderOptions.h:
        (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
        (WebCore::ResourceLoaderOptions::certificateInfoPolicy):
        (WebCore::ResourceLoaderOptions::setCertificateInfoPolicy):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse): If
        IncludeCertificateInfo option is present, call
        includeCertificateInfo() on the response.
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass
        DoNotIncludeCertificateInfo to ResourceLoaderOptions().
        (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.
        * loader/icon/IconLoader.cpp:
        (WebCore::IconLoader::startLoading): Ditto.
        * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
        (WebCore::WebCoreAVCFResourceLoader::startLoading): Ditto.
        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
        (WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (CachedResourceStreamingClient::CachedResourceStreamingClient): Ditto.

2014-09-11  Ryuan Choi  <ryuan.choi@gmail.com>

        Unreviewed build fix attempt on windows port since r173553.

        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:

2014-09-11  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: disambiguate integral and real number primitive types in the protocol
        https://bugs.webkit.org/show_bug.cgi?id=136606

        Reviewed by Timothy Hatcher.

        Update clients of InspectorValue to disambiguate integer and double primitive types.

        No new tests, no behavior changed.

        * inspector/InspectorDOMAgent.cpp:
        (WebCore::parseColor):
        (WebCore::parseQuad):
        (WebCore::InspectorDOMAgent::performSearch):
        * inspector/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
        * inspector/InspectorIndexedDBAgent.cpp:
        * inspector/InspectorOverlay.cpp:
        (WebCore::buildObjectForPoint):
        (WebCore::buildObjectForRect):
        (WebCore::buildObjectForSize):
        (WebCore::appendPathCommandAndPoints):
        (WebCore::InspectorOverlay::reset):
        * inspector/InspectorReplayAgent.cpp:
        (WebCore::InspectorReplayAgent::replayToPosition):
        * inspector/InspectorStyleSheet.h:
        (WebCore::InspectorCSSId::InspectorCSSId):
        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::didWriteHTML):
        (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
        * inspector/TimelineRecordFactory.cpp:
        (WebCore::TimelineRecordFactory::createGenericRecord):
        (WebCore::TimelineRecordFactory::createBackgroundRecord):
        (WebCore::TimelineRecordFactory::createGCEventData):
        (WebCore::TimelineRecordFactory::createFunctionCallData):
        (WebCore::TimelineRecordFactory::createProbeSampleData):
        (WebCore::TimelineRecordFactory::createGenericTimerData):
        (WebCore::TimelineRecordFactory::createTimerInstallData):
        (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
        (WebCore::TimelineRecordFactory::createEvaluateScriptData):
        (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
        (WebCore::TimelineRecordFactory::createResourceFinishData):
        (WebCore::TimelineRecordFactory::createReceiveResourceData):
        (WebCore::TimelineRecordFactory::createLayoutData):
        (WebCore::TimelineRecordFactory::createParseHTMLData):
        (WebCore::TimelineRecordFactory::createAnimationFrameData):
        (WebCore::createQuad):
        * inspector/TimelineRecordFactory.h:
        (WebCore::TimelineRecordFactory::createWebSocketCreateData):
        (WebCore::TimelineRecordFactory::createGenericWebSocketData):
        * page/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::reportViolation):

2014-09-11  Ryuan Choi  <ryuan.choi@gmail.com>

        [EFL][CoordinatedGraphics] Move CoordinatedGraphicsScene and CoordinatedBackingStore to WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=136770

        Reviewed by Gyuyoung Kim.

        CoordinatedGraphicsScene and CoordinatedBackingStore is only for UIProcess.
        This patch moved them from WebCore to WebKit2/UIProcess/CoordinatedGraphics/.

        No new tests, no behavior change.

        * PlatformEfl.cmake:

2014-09-11  Shivakumar JM  <shiva.jm@samsung.com>

        The overrideMimeType in XMLHttpRequest should throw the exception.
        https://bugs.webkit.org/show_bug.cgi?id=136699

        Reviewed by Darin Adler.

        No new tests, modifed test http/tests/xmlhttprequest/exceptions.html.

        Set XMLHttpRequest::overrideMimeType to throw an "InvalidStateError" exception, if the state is LOADING or DONE.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::overrideMimeType):
        * xml/XMLHttpRequest.h:
        * xml/XMLHttpRequest.idl:

2014-09-11  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Occasional ASSERT closing web inspector
        https://bugs.webkit.org/show_bug.cgi?id=136762

        Reviewed by Timothy Hatcher.

        * bindings/js/WorkerScriptDebugServer.h:
        * inspector/PageScriptDebugServer.h:

2014-09-11  Chris Dumez  <cdumez@apple.com>

        Simplify DOM tree traversal in FrameSelection::setSelectionFromNone()
        https://bugs.webkit.org/show_bug.cgi?id=136763

        Reviewed by Ryosuke Niwa.

        We only need to traverse the direct children of the Document element to
        find the body. The previous code was potentially traversing descendants.
        The new code is consistent with Document::body() except that we only
        look for an HTMLBodyElement (and ignore HTMLFrameSetElement).

        Also update the code to use tighter typing for clarity.

        No new tests, no behavior change.

        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::setSelectionFromNone):

2014-09-11  Chris Fleizach  <cfleizach@apple.com>

        AX: Size of web view in Safari as reported by AX changes when adding/removing bars is wrong
        https://bugs.webkit.org/show_bug.cgi?id=136756

        Reviewed by Beth Dakin.

        topContentInset not only seems to push the scroll view's origin down, but it also shrinks its height as well, which
        was not accounted for in the original fix.

        Modified: platform/mac-wk2/accessibility/content-inset-scrollview-frame.html

        * accessibility/AccessibilityScrollView.cpp:
        (WebCore::AccessibilityScrollView::elementRect):

2014-09-11  Roger Fong  <roger_fong@apple.com>

        [Windows] Unreviewed build fix.

        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::checkVaryingsPacking):

2014-09-11  Beth Dakin  <bdakin@apple.com>

        WebKit scrollbars flash in non-dominant spaces when entering Mission Control
        https://bugs.webkit.org/show_bug.cgi?id=136761
        -and corresponding-
        rdar://problem/18195616

        Reviewed by Tim Horton.

        This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
        Show match the logic in AppKit. We only want these notifications when the window 
        has become both visible and active (or lost both, in the case of hide).

        Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it 
        only when both visibility and active-state have changed.
        * page/FocusController.cpp:
        (WebCore::FocusController::setViewState):
        (WebCore::FocusController::setIsVisibleAndActiveInternal):
        (WebCore::FocusController::setIsVisibleInternal): Deleted.
        * page/FocusController.h:

        FocusController::setViewState() is the only place that needs to call 
        ScrollableArea::contentAreaDidHide/Show, so remove these callers.
        * page/FrameView.cpp:
        (WebCore::FrameView::didMoveOnscreen): Deleted.
        (WebCore::FrameView::willMoveOffscreen): Deleted.
        * page/FrameView.h:
        * page/Page.cpp:
        (WebCore::Page::setIsVisibleInternal):

2014-09-10  Michael Saboff  <msaboff@apple.com>

        Move JSScope out of JSFunction into separate JSCallee class
        https://bugs.webkit.org/show_bug.cgi?id=136725

        Reviewed by Oliver Hunt.

        Created new JSCallee class that contains a JSScope*.  Changed JSFunction to inherit from
        JSCallee.

        * ForwardingHeaders/runtime/JSCallee.h: New forwarding header.

2014-09-11  Roger Fong  <roger_fong@apple.com>

        Unreviewed build fix iOS.

        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::checkVaryingsPacking):

2014-09-11  Jer Noble  <jer.noble@apple.com>

        Add site-specific quirk for entering fullscreen on YouTube.com.
        https://bugs.webkit.org/show_bug.cgi?id=136742

        Reviewed by Eric Carlson.

        YouTube only resizes its <video> content when entering fullscreen after receiving the "webkitfullscreenchange"
        event, which is fired once the animation to enter fullscreen completes. This leaves the apparent <video> content
        too small during the animation, especially at the beginning of the animation. Add a site-specific hack for
        YouTube sites which fires the "webkitfullscreenchange" event synchronously with the beginning of the enter
        fullscreen animation. This will cause YouTube to resize their <video> content during the period of time where we
        disable screen updates, and makes the enter fullscreen animation seamless.

        Add a static utility method, hostIsYouTube(), for the various pieces of this site-specific hack, and expand it
        to match youtube.co.uk, youtube.fr, etc.

        * dom/Document.cpp:
        (WebCore::hostIsYouTube): Added.
        (WebCore::Document::webkitWillEnterFullScreenForElement): Fire fullscreenchange event if hacks are enabled.
        (WebCore::Document::webkitDidEnterFullScreenForElement): Don't fire the event if same.
        (WebCore::Document::webkitDidExitFullScreenForElement): Use hostIsYouTube().
        
2014-09-11  Bear Travis  <betravis@adobe.com>

        [CSS Font Loading] Enable CSS Font Loading on Mac
        https://bugs.webkit.org/show_bug.cgi?id=135473

        Reviewed by Antti Koivisto.

        Enable CSS Font Loading in FeatureDefines, and in
        RuntimeEnabledFeatures.

        Font Loading tests have been toggled back on in the Mac
        TestExpectations file.

        * Configurations/FeatureDefines.xcconfig:
        * bindings/generic/RuntimeEnabledFeatures.cpp:
        (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):

2014-09-11  Chris Dumez  <cdumez@apple.com>

        Use tighter typing for Document::ownerElement() return value
        https://bugs.webkit.org/show_bug.cgi?id=136746

        Reviewed by Ryosuke Niwa.

        Use tighter typing for Document::ownerElement() return value at call
        sites to increase code readability a bit and allow the compiler to
        generate slightly more efficient code in some cases. In particular,
        the more efficient HTMLElement::hasTagName(HTMLQualifiedName) is
        now called in several cases instead of the one on Node. This bypasses
        unnecessary isHTMLElement() checks.

        No new tests, no behavior change.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
        * dom/Document.cpp:
        (WebCore::Document::updateLayout):
        (WebCore::Document::topDocument):
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::insertedInto):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::paintBoxDecorations):

2014-09-10  Roger Fong  <roger_fong@apple.com>

        Check for varying packing restrictions per program instead of per shader.
        https://bugs.webkit.org/show_bug.cgi?id=136585.
        <rdar://problem/16308409>.

        Reviewed by Dean Jackson.

        Covered by webgl/1.0.2/conformance/ogles/GL/build/build_009_to_016.html.

        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::linkProgram): 
        Check for varying packing restrictions when linking the program.

        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::checkVaryingsPacking): 
        Checks varyings shared by both vertex and fragment shaders and makes sure
        they satisfy packing restrictions.

2014-09-11  Beth Dakin  <bdakin@apple.com>

        Support rubber-banding in sub-frames
        https://bugs.webkit.org/show_bug.cgi?id=136726
        -and corresponding-
        rdar://problem/10011924

        Reviewed by Tim Horton.

        Set the appropriate scroll elasticity for all frames! As long as its enabled, sub-
        frames want an elasticity of ScrollElasticityAutomatic, which will allow for 
        latching. 
        * page/FrameView.cpp:
        (WebCore::FrameView::FrameView):

        Account for rubber-banding in sub-frames.
        (WebCore::FrameView::isScrollableOrRubberbandable):
        (WebCore::FrameView::hasScrollableOrRubberbandableAncestor):

        This patch also re-names rubberBandingForOverflowScrollEnabled to 
        rubberBandingForSubScrollableRegionsEnabled
        * page/Settings.in:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::overhangAmount):
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):

2014-09-11  Myles C. Maxfield <mmaxfield@apple.com>  <litherum@gmail.com>

        Initial implementation of SVG to OTF font converter
        https://bugs.webkit.org/show_bug.cgi?id=136688

        Reviewed by Darin Adler.

        This patch creates a new file and new function which turns an SVG font into an OpenType font.
        This function is not very full featured, and as such is never called. However, it works with
        fonts that only support simple horizontal basic multilingual plane codepoints. It has only
        been tested on OS X, and does not have any automated tests. This patch is only jumping off
        point, laying the basic groundwork for a more robust font converter.

        The goal of this patch is to eventually allow us to delete the codepath with which we draw
        text using SVG fonts. Using a native codepath instead will allow for better performance,
        security, and code clarity. In my initial benchmarks, using this converter instead of the
        SVG codepath is at least a 100x speed improvement (after running for 4 hours I stepped
        away from my machine).

        No new tests because the function is not ready to be called (yet!)
        Initial implementation of SVG to OTF font converter
        https://bugs.webkit.org/show_bug.cgi?id=136688

        * WebCore.xcodeproj/project.pbxproj: Add new file.
        * svg/SVGPathBuilder.h: Single function. Takes a SVGFontElement and returns a byte
        * svg/SVGToOTFFontConversion.cpp: Added.
        (WebCore::write32): Write a big-endian Int32.
        (WebCore::write16): Write a big-endian Int16.
        (WebCore::overwrite32): Overwrite an existing Int32 in a vector (instead of appending)
        (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Internal class to hold state during
        function calls.
        (WebCore::roundDownToPowerOfTwo):
        (WebCore::SVGToOTFFontConverter::appendCMAPTable): See function name.
        (WebCore::SVGToOTFFontConverter::appendHEADTable): Ditto.
        (WebCore::clampTo): Used to clamp data types to fit into other data types.
        (WebCore::SVGToOTFFontConverter::appendHHEATable): See function name.
        (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto.
        (WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto.
        (WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto.
        (WebCore::isValidStringForCFF): The CFF font format only allows strings with particular
        characters in them.
        (WebCore::appendCFFValidString): Append a string assuming it's valid to append.
        (WebCore::SVGToOTFFontConverter::appendCFFTable): See function name.
        (WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.
        (WebCore::writeCFFEncodedNumber): CFF has this wacky encoding scheme for encoding and
        decoding numbers.
        (WebCore::CFFBuilder::CFFBuilder): Subclass of SVGPathBuilder, which is used for building
        CFF CharStrings (which are glyph path representations).
        (WebCore::CFFBuilder::updateForConstituentPoint): Invoked for every point in a path, does
        things like updates glyph bounding box information.
        (WebCore::CFFBuilder::boundingBox): Getter.
        (WebCore::transcodeGlyphPaths): SVG path data string -> CFF CharString
        (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Generate internal state ahead of
        time before generating any tables.
        (WebCore::isFourByteAligned):
        (WebCore::calculateChecksum): OTF files have checksums.
        (WebCore::SVGToOTFFontConverter::appendTable): Invoked for each entry in the table of
        contents of the OTF font.
        (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Write out the tables.
        (WebCore::convertSVGToOTFFont): Entry point.
        * svg/SVGToOTFFontConversion.h: Added.

2014-09-11  Jer Noble  <jer.noble@apple.com>

        [EME] REGRESSION(??): test media/encrypted-media/encrypted-media-v2-syntax.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=136723

        Reviewed by Eric Carlson.

        Update a comment to point to the implemented Working Draft 18 Feburary 2014 version of the spec.

        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::createSession):

2014-09-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [WK2] Authentication dialog is displayed for cross-origin XHR
        https://bugs.webkit.org/show_bug.cgi?id=131349

        Reviewed by Alexey Proskuryakov.

        * WebCore.exp.in: Export of isAllowedToAskUserForCredentials.
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::isAllowedToAskUserForCredentials): Replacing clientCredentialPolicy method. Returns true if credentials can be requested to the user.
        (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Updated to use isAllowedToAskUserForCredentials.
        * loader/ResourceLoader.h: Removing clientCredentialPolicy method and adding isAllowedToAskUserForCredentials method.

2014-09-11  Chris Fleizach  <cfleizach@apple.com>

        AX: Children inside a <legend> are not accessible
        https://bugs.webkit.org/show_bug.cgi?id=136735

        Reviewed by Mario Sanchez Prada.

        The AX children of a <legend> are being hidden currently, which makes it impossible for
        VoiceOver to activate control elements inside of a <legend>.
        The solution is that legend elements SHOULD be allowed to have children.

        Test: accessibility/legend-children-are-visible.html

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::canHaveChildren):

2014-09-11  Brendan Long  <b.long@cablelabs.com>

        Fix FIXME's in JSTrackCustom now that AudioTrack and VideoTrack exist.
        https://bugs.webkit.org/show_bug.cgi?id=136552

        Reviewed by Eric Carlson.

        * bindings/js/JSTrackCustom.cpp:
        (WebCore::toTrack): Add casts for AudioTrack and VideoTrack.

2014-09-11  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Merge WebKitAuthenticationWidget into WebKitAuthenticationDialog
        https://bugs.webkit.org/show_bug.cgi?id=136700

        Reviewed by Sergio Villar Senin.

        Remove WebKitAuthenticationWidget. The only reason why we had this
        widget separated in WebCore was to share it between WebKit1 and
        WebKit2, but now it's only used by WebKitAuthenticationDialog in WebKit2.

        * PlatformGTK.cmake: Remove files from compilation.
        * platform/gtk/WebKitAuthenticationWidget.cpp: Removed.
        * platform/gtk/WebKitAuthenticationWidget.h: Removed.

2014-09-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Use ASSERT instead of ASSERT_WITH_SECURITY_IMPLICATION
        https://bugs.webkit.org/show_bug.cgi?id=136732

        Reviewed by Andy Estes.

        Since r173458 changed to use static_cast<> with toFoo, ASSERT_WITH_SECURITY_IMPLICATION doesn't
        need to be used anymore. ASSERT is enough for it.

        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::SharedWorkerProxy::addToWorkerDocuments):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::document):

2014-09-10  Adenilson Cavalcanti  <cavalcantii@gmail.com>

        [SVG] Cleanup iterator code in SMILTimeContainer using range-based loop
        https://bugs.webkit.org/show_bug.cgi?id=136720

        Reviewed by Filip Pizlo.

        No new tests, no change on behavior.

        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::setElapsed):
        (WebCore::SMILTimeContainer::updateAnimations):

2014-09-10  Timothy Horton  <timothy_horton@apple.com>

        Fix the build.

        * platform/network/ResourceHandle.h:
        * platform/network/mac/ResourceHandleMac.mm:

2014-09-09  Myles C. Maxfield <mmaxfield@apple.com>  <litherum@gmail.com>

        Delete class SavedDrawingStateForMask
        https://bugs.webkit.org/show_bug.cgi?id=136498

        Reviewed by Darin Adler.

        This class is left over from when text-decoration-skip: ink used
        GraphicsContext masking.

        No new tests because there is no behavior change.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::applyShadowToGraphicsContext):
        * rendering/InlineTextBox.h:
        * rendering/TextPainter.cpp:
        (WebCore::TextPainter::TextPainter):
        (WebCore::paintTextWithShadows):
        (WebCore::TextPainter::paintText):
        * rendering/TextPainter.h:
        (WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask): Deleted.
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::paintTextWithShadows):

2014-09-10  Tim Horton  <timothy_horton@apple.com>

        Call setCollectsTimingData only once, and before making any {CF,NS}URLConnections
        https://bugs.webkit.org/show_bug.cgi?id=136731
        <rdar://problem/18252844>

        Reviewed by Simon Fraser.

        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::start):
        Move setCollectsTimingData to before createCFURLConnection, so the first connection
        has timing data associated with it.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::createNSURLConnection):
        Move setCollectsTimingData to before we create our NSURLConnection, so the first connection
        has timing data associated with it.
        Use setCollectsTimingData instead of the NSURLConnection SPI directly.

        (WebCore::ResourceHandle::setCollectsTimingData):
        Only call _setCollectsTimingData once.

2014-09-10  Enrica Casucci  <enrica@apple.com>

        Remove iOS-only -webkit-composition-fill-color CSS property.
        https://bugs.webkit.org/show_bug.cgi?id=136728
        rdar://problem/10439154

        Reviewed by Tim Horton.

        This property is no longer used on iOS.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/CSSPropertyNames.in:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyProperty):
        * editing/EditingStyle.cpp:
        * platform/graphics/Color.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintCompositionBackground):
        * rendering/style/RenderStyle.h:
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator==):
        * rendering/style/StyleRareInheritedData.h:

2014-09-10  Tim Horton  <timothy_horton@apple.com>

        Remove ImageSource::ShouldSkipMetadata
        https://bugs.webkit.org/show_bug.cgi?id=136713

        Reviewed by Pratik Solanki.

        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::createImageSourceOptions):
        (WebCore::imageSourceOptions):
        (WebCore::ImageSource::frameSizeAtIndex):
        (WebCore::ImageSource::createFrameAtIndex):
        (WebCore::ImageSource::frameDurationAtIndex):
        Remove ShouldSkipMetadata and users. Nobody ever uses DoNotSkipMetadata.

2014-09-10  Beth Dakin  <bdakin@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=136650
        Rubber-banding in the DOM view of the WebInspector is really jumpy
        -and corresponding-
        rdar://problem/18166043

        Reviewed by Darin Adler.

        This patch implements the ScrollableArea virtual function isRubberBandInProgress() 
        for RenderLayer, and then uses that to determine whether to clamp the scroll 
        position in updateScrollInfoAfterLayout().
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::isRubberBandInProgress):
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
        * rendering/RenderLayer.h:

2014-09-10  Tim Horton  <timothy_horton@apple.com>

        Remove a workaround in frameIsCompleteAtIndex for a problem that was fixed in Lion
        https://bugs.webkit.org/show_bug.cgi?id=136652

        Reviewed by Dan Bernstein.

        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::frameIsCompleteAtIndex):
        ImageIO returns the right thing now.

2014-09-10  Myles C. Maxfield  <mmaxfield@apple.com>

        Laying out a TextRun using an SVG font is O(n^2)
        https://bugs.webkit.org/show_bug.cgi?id=136584

        Reviewed by Darin Adler.

        Addressing post-commit review from Darin.

        No new tests.

        * platform/graphics/Font.h:
        (WebCore::Font::treatAsSpace): Un-inline.
        (WebCore::Font::treatAsZeroWidthSpace): Ditto.
        (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
        * svg/SVGFontData.cpp:
        (WebCore::computeNormalizedSpaces): Avoid unnecessary copy.

2014-09-10  peavo@outlook.com  <peavo@outlook.com>

        [Curl] Optimization; avoid reallocating string many times.
        https://bugs.webkit.org/show_bug.cgi?id=136704

        Reviewed by Alex Christensen.

        Adding individual characters to a string is inefficient, the string will be reallocated each time.

        * platform/network/curl/CookieJarCurl.cpp:
        (WebCore::readCurlCookieToken):

2014-09-10  peavo@outlook.com  <peavo@outlook.com>

        [Curl] Compile error, CertificateInfo.h is not found.
        https://bugs.webkit.org/show_bug.cgi?id=136703

        Reviewed by Alex Christensen.

        Curl also needs to implement the CertificateInfo class.

        * platform/network/curl/CertificateInfo.h: Added.
        (WebCore::CertificateInfo::CertificateInfo):

2014-09-10  Simon Fraser  <simon.fraser@apple.com>

        Clean up some ENABLE(PICTURE_SIZES) stuff, don't change function signatures inside #ifdefs
        https://bugs.webkit.org/show_bug.cgi?id=136654

        Reviewed by Darin Adler.

        Adding parameters inside an #ifdef makes for unreadable code, so remove some
        #if ENABLE(PICTURE_SIZES) related to the preload scanner and always pass the arguments.
        Reduced the argument count on some functions by just passing a Document&. 
        
        Also fix a couple of uses of #if ENABLE_PICTURE_SIZES.

        * html/HTMLImageElement.h:
        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::pumpTokenizer):
        (WebCore::HTMLDocumentParser::insert):
        (WebCore::HTMLDocumentParser::append):
        (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::scan):
        (WebCore::HTMLPreloadScanner::scan):
        * html/parser/HTMLPreloadScanner.h:
        * html/parser/HTMLSrcsetParser.cpp:
        (WebCore::pickBestImageCandidate):
        (WebCore::bestFitSourceForImageAttributes):
        * html/parser/HTMLSrcsetParser.h:

2014-09-10  Chris Fleizach  <cfleizach@apple.com>

        AX: aria-labelledby is not honoring sub-node text
        https://bugs.webkit.org/show_bug.cgi?id=136689

        Reviewed by Mario Sanchez Prada.

        Test: accessibility/aria-labelledby-with-descendants.html

        When aria-labelledby retrieves the textUnderElements it needs to consider
        all sub-children, including focusable content.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::accessibleNameForNode):

2014-09-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Use toDocument instead of static_cast<Document*>
        https://bugs.webkit.org/show_bug.cgi?id=136694

        Reviewed by Andy Estes.

        Clean up static_cast<Document*>.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::document):
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::document):
        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::dispatchErrorEvent): Add a line to remove .get().
        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::SharedWorkerProxy::addToWorkerDocuments):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::document):
        (WebCore::XMLHttpRequest::open):

2014-09-10  Yusuke Suzuki  <utatane.tea@gmail.com>

        Merge CheckingContexts from SelectorCompiler and SelectorChecker
        https://bugs.webkit.org/show_bug.cgi?id=135255

        Reviewed by Benjamin Poulain.

        In this patch, we merge SelectorChecker::SelectorCheckingContext and SelectorCompiler::CheckingContext.
        We expose only SelectorChecker::CheckingContext. That is the same to the old SelectorCompiler::CheckingContext.

        In SelectorChecker.cpp, we define SelectorChecker::CheckingContextWithStatus and use it internally.
        And we move VisitedMatchType from SelectorChecker.h to SelectorChecker.cpp.

        VisitedMatchType is also explicitly used by SelectorCheckerFastPath. However, SelectorCheckerFastPath is now
        used only from SelectorQuery (Style resolution algorithm no longer uses it: r171059).
        In this patch, we remove SelectorCheckerFastPath since the major cases are covered by CSS JIT.
        In `RightMostWithIdMatch`, `Element#matches` and multiple selectors `querySelector('a, b')` cases,
        CSS JIT is not used. So dropping fast path affects them. But 1) these cases are rare or 2) the target node
        is typically only one since nodes are filtered before matching. So it doesn't have performance regression.

        And now since CheckingContextWithStatus is the derived class of CheckingContext, we can use
        the same test functions; template parameter is not necessary. It reduces code size.

        * CMakeLists.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSAllInOne.cpp:
        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ruleMatches):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
        (WebCore::SelectorChecker::match):
        (WebCore::checkingContextForParent):
        (WebCore::SelectorChecker::matchRecursively):
        (WebCore::canMatchHoverOrActiveInQuirksMode):
        (WebCore::SelectorChecker::checkOne):
        (WebCore::SelectorChecker::checkScrollbarPseudoClass):
        * css/SelectorChecker.h:
        (WebCore::SelectorChecker::CheckingContext::CheckingContext):
        (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Deleted.
        * css/SelectorCheckerFastPath.cpp: Removed.
        * css/SelectorCheckerFastPath.h: Removed.
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::scrollbarMatchesEnabledPseudoClass):
        (WebCore::scrollbarMatchesDisabledPseudoClass):
        (WebCore::scrollbarMatchesHoverPseudoClass):
        (WebCore::scrollbarMatchesActivePseudoClass):
        (WebCore::scrollbarMatchesHorizontalPseudoClass):
        (WebCore::scrollbarMatchesVerticalPseudoClass):
        (WebCore::scrollbarMatchesDecrementPseudoClass):
        (WebCore::scrollbarMatchesIncrementPseudoClass):
        (WebCore::scrollbarMatchesStartPseudoClass):
        (WebCore::scrollbarMatchesEndPseudoClass):
        (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
        (WebCore::scrollbarMatchesSingleButtonPseudoClass):
        (WebCore::scrollbarMatchesNoButtonPseudoClass):
        (WebCore::scrollbarMatchesCornerPresentPseudoClass):
        * css/StyleResolver.h:
        (WebCore::checkRegionSelector):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
        (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingModeWithCheckingContext):
        (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
        (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
        (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
        (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
        * cssjit/SelectorCompiler.h:
        (WebCore::SelectorCompiler::CheckingContext::CheckingContext): Deleted.
        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::SelectorDataList):
        (WebCore::SelectorDataList::selectorMatches):
        (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
        (WebCore::isCompiledSelector):
        (WebCore::SelectorDataList::compileSelector):
        (WebCore::SelectorDataList::execute):
        * dom/SelectorQuery.h:
        (WebCore::SelectorDataList::SelectorData::SelectorData):

2014-09-09  Jer Noble  <jer.noble@apple.com>

        [MSE] http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html failing after r173318
        https://bugs.webkit.org/show_bug.cgi?id=136676

        Reviewed by Eric Carlson.

        Revert the inadvertant conditional change introduced in r173318.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::setDurationInternal):

2014-09-09  Roger Fong  <roger_fong@apple.com>

        Unreviewed build fix for Windows.

        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

2014-09-09  Dan Bernstein  <mitz@apple.com>

        FrameLoader::prepareForHistoryNavigation is unused
        https://bugs.webkit.org/show_bug.cgi?id=136683

        Reviewed by Tim Horton.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::prepareForHistoryNavigation): Deleted.
        * loader/FrameLoader.h: Removed the declaration.

2014-09-09  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Ignore ::first-letter pseudo-element
        https://bugs.webkit.org/show_bug.cgi?id=136625

        Reviewed by Darin Adler.

        According to the spec the ::first-letter pseudo-element do not apply to
        grid containers (neither to flexboxes).

        Fixed issue in RenderBlock::getFirstLetter() that applies to both grids
        and flexboxes. Basically if the grid's or flexbox's container was
        defining the ::first-line pseudo-element and the grid or flexbox itself
        too, the value from the grid or flexbox was being applied to the items.
        Added the proper check to avoid this.

        Added two new tests for grid and modified one flexbox test to cover the
        issue explained above.

        Tests: css3/flexbox/flexbox-ignore-container-firstLetter.html
               fast/css-grid-layout/grid-container-ignore-first-letter.html
               fast/css-grid-layout/grid-item-first-letter-valid.html

        * rendering/RenderBlock.cpp:
        (WebCore::isRenderBlockFlowOrRenderButton): New method refactoring
        similar calls through the source code.
        (WebCore::RenderBlock::firstLineBlock): Use
        isRenderBlockFlowOrRenderButton().
        (WebCore::findFirstLetterBlock): Modify it to use
        isRenderBlockFlowOrRenderButton() in order to include grids and not only
        check flexboxes.
        (WebCore::RenderBlock::getFirstLetter): Use
        isRenderBlockFlowOrRenderButton().
        (WebCore::RenderBlock::updateFirstLetter): Early return if
        firstLetterContainer is null (in the case of flexboxes or grids).

2014-09-09  Benjamin Poulain  <benjamin@webkit.org>

        Add support for :read-write/:read-only matching editable content
        https://bugs.webkit.org/show_bug.cgi?id=136668

        Reviewed by Antti Koivisto.

        This is the second part of the update of :read-write/:read-only to the latest spec
        (http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selectors).

        The selectors :read-write/:read-only should match elements that are editable. The exact definition is:
        "elements that are editing hosts or editable and are neither input elements nor textarea elements".

        Matching that definition is really easy. It was done by updating HTMLElement's matchesReadWritePseudoClass()
        to consider both contentEditable and designMode.

        The tricky part is making that efficient in all cases. Matching contentEditable is horribly inefficient
        compared to the other primitives. We don't want to execute that for every element.

        Since matchesReadWritePseudoClass() was used by the theming code, that code was adjusted to
        -Avoid calling that on regular HTMLElement, limiting the query to <input> and <textarea> where it is fast.
        -Avoid the call entirely when possible.

        Tests: fast/css/read-only-read-write-contenteditable-basics.html
               fast/css/read-only-read-write-designmode-basics.html
               fast/css/read-only-read-write-webkit-user-modify.html
               fast/selectors/read-only-read-write-contenteditable-basics.html
               fast/selectors/read-only-read-write-contenteditable-svg-foreignObject.html
               fast/selectors/read-only-read-write-designmode-basics.html
               fast/selectors/read-only-read-write-style-update.html

        * html/HTMLElement.cpp:
        (WebCore::contentEditableType):
        This code is a generalization of the code that was in HTMLElement::contentEditable().
        It is used by both matchesReadWritePseudoClass() and contentEditable() to determine
        a valid state from the value of contentEditable.

        (WebCore::HTMLElement::matchesReadWritePseudoClass):
        Per the definition of editable content, we first check if the current element is an editing host,
        if not we look for an editing host. If there are none, test for designMode.

        (WebCore::HTMLElement::contentEditable):

        (WebCore::RenderTheme::isReadOnlyControl):
        The old definition would only match <input> and <textarea>. The code was updated to keep the same
        behavior after matchesReadWritePseudoClass() is udpated. This avoids the performance problem of calling
        matchesReadWritePseudoClass() on regular HTMLElement.

        * platform/ControlStates.h:
        ReadOnlyState was only used by ThemeMac for convertControlStatesToThemeDrawState().
        In turn, convertControlStatesToThemeDrawState() was only used for painting
        "-webkit-inner-spin-button". Buttons are not read-write to begin with.
        The whole code looks like legacy from styling of input elements and was removed.

        Removing ReadOnlyState removes the expensive part of extractControlStatesForRenderer().

        * html/HTMLElement.h:
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
        * platform/mac/ThemeMac.mm:
        (WebCore::convertControlStatesToThemeDrawState):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::extractControlStatesForRenderer):

2014-09-09  Jer Noble  <jer.noble@apple.com>

        [MSE] media/media-source tests broken after r173318
        https://bugs.webkit.org/show_bug.cgi?id=136675

        Reviewed by Eric Carlson.

        Fixes the following tests:
            http/tests/media/media-source/mediasource-play.html
            http/tests/media/media-source/mediasource-remove.html
            media/media-source/media-source-monitor-source-buffers.html
            media/media-source/media-source-overlapping-append-buffered.html   

        In r173318, a for loop was converted to a C++11 loop, but in so doing, left
        pre-initialized, empty values in the beginning of returned Vector, which caused
        the calling algorithm to miscalculate the amount of data buffered by the media
        source.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::activeRanges):

2014-09-09  Takeshi Kurosawa  <taken.spc@gmail.com>

        AX: HTML5 landmark (and related) elements should not be ignored.
        https://bugs.webkit.org/show_bug.cgi?id=135116

        Reviewed by Chris Fleizach.

        Make sure following element should not be ignored in computeAccessibilityIsIgnored
        - header, aside, address, main, nav, article, section
        - dt, dd

        Tests: platform/mac/accessibility/descriptionlist-not-ignored.html
               platform/mac/accessibility/landmark-not-ignored.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):

2014-09-08  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] RenderGrid methods should take RenderBox references
        https://bugs.webkit.org/show_bug.cgi?id=136630

        Reviewed by Darin Adler.

        RenderGrid has several methods that take pointers to RenderBox
        instances but the body of those methods assumes that the objects
        will never be NULL. We should replace them by references.

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
        (WebCore::RenderGrid::logicalContentHeightForChild):
        (WebCore::RenderGrid::minContentForChild):
        (WebCore::RenderGrid::maxContentForChild):
        (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
        (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
        (WebCore::RenderGrid::insertItemIntoGrid):
        (WebCore::RenderGrid::placeItemsOnGrid):
        (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
        (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
        (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid):
        (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
        (WebCore::RenderGrid::layoutGridItems):
        (WebCore::RenderGrid::cachedGridCoordinate):
        (WebCore::RenderGrid::gridAreaBreadthForChild):
        (WebCore::RenderGrid::findChildLogicalPosition):
        * rendering/RenderGrid.h:

2014-09-09  Antti Koivisto  <antti@apple.com>

        Remove unnecessary assert that is getting hit in some scenarios.

        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::certificateInfo):

2014-09-09  Antti Koivisto  <antti@apple.com>

        Try to fix windows build.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::platformCertificateInfo):

2014-09-08  Mihnea Ovidenie  <mihnea@adobe.com>

        [CSSRegions]Incorrect layout for multicol element transformed into region
        https://bugs.webkit.org/show_bug.cgi?id=136459

        Reviewed by David Hyatt.

        Until we will support the multicolumn region functionality, a multicolumn element
        that also has flow-from style is not transformed into a region (https://bugs.webkit.org/show_bug.cgi?id=135153).
        However, when a multicolumn element with flow-from style dynamically loses
        its multicolumn style while keeping the flow-from style, we have to transform
        the element into a region by detaching and attaching the associated DOM node,
        in the same way we are proceeding when an element receives a different flow-from style.

        Test: fast/regions/multicol/nested-multicol-into-region-dynamic.html

        * style/StyleResolveTree.cpp:
        (WebCore::Style::determineChange):

2014-09-08  Antti Koivisto  <antti@apple.com>

        Pass certificate info as part of ResourceResponse
        https://bugs.webkit.org/show_bug.cgi?id=136611

        Reviewed by Darin Adler.

        The current way of passing certificate info separately from ResourceResponse and then jamming it back
        is complex and confusing. This patch makes it a true part of the ResourceResponse.

        With this patch we also only create and pass the certificate info object for the main resource. It is
        a big and complex object and we never look into it for any other resource type.

        * WebCore.exp.in:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::ResourceResponseBase):

            Mark initialized for synthetic responses, unitialized for those backed by a platform request.

        (WebCore::ResourceResponseBase::initializeCertificateInfo):

            Calling this pulls the certificate info out from the platform type.
            It shoud only be used for resources that need it.

        (WebCore::ResourceResponseBase::certificateInfo):
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::platformCertificateInfo):
        (WebCore::ResourceResponseBase::platformSuggestedFileName):
        (WebCore::ResourceResponseBase::encode):
        (WebCore::ResourceResponseBase::decode):

            Encode and decode certificate info if it is present.

        * platform/network/cf/ResourceResponse.h:
        * platform/network/mac/CertificateInfo.h:
        * platform/network/mac/CertificateInfoMac.mm:
        (WebCore::CertificateInfo::CertificateInfo):
        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::platformCertificateInfo):
        (WebCore::ResourceResponse::setCertificateChain): Deleted.
        (WebCore::ResourceResponse::certificateChain): Deleted.
        * platform/network/soup/ResourceResponse.h:
        * platform/network/soup/ResourceResponseSoup.cpp:
        (WebCore::ResourceResponse::platformCertificateInfo):

2014-09-09  Mihnea Ovidenie  <mihnea@adobe.com>

        [CSSRegions] Use C++11 range-based loops in FlowThreadController
        https://bugs.webkit.org/show_bug.cgi?id=136634

        Reviewed by Andrei Bucur.

        No new tests as no new functionality was introduced.

        * rendering/FlowThreadController.cpp:
        (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
        (WebCore::FlowThreadController::styleDidChange):
        (WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
        (WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
        (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
        (WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
        (WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
        (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
        (WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
        (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
        (WebCore::FlowThreadController::collectFixedPositionedLayers):
        (WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):

2014-09-08  Simon Fraser  <simon.fraser@apple.com>

        Minor refactor in CSSComputedStyleDeclaration
        https://bugs.webkit.org/show_bug.cgi?id=136664

        Reviewed by Darin Adler.

        The "if (length.isPercentNotCalculated()) createValue() else zoomAdjustedPixelValue()"
        pattern occurred a number of times here, so factor into percentageOrZoomAdjustedValue().

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::positionOffsetValue): l -> length
        (WebCore::percentageOrZoomAdjustedValue):
        (WebCore::getBorderRadiusCornerValues):
        (WebCore::getBorderRadiusCornerValue):
        (WebCore::scrollSnapDestination):
        (WebCore::scrollSnapPoints):
        (WebCore::scrollSnapCoordinates):

2014-09-08  Alexey Proskuryakov  <ap@apple.com>

        Application Cache Storage: failed to execute statement "DELETE FROM CacheGroups" error "no such table: CacheGroups"
        https://bugs.webkit.org/show_bug.cgi?id=136647

        Reviewed by Darin Adler.

        * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion):
        Don't try to delete the tables if we can't expect to have them yet.

2014-09-08  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION (r172153): Text drawn with wrong color when second text shadow has zero offset and blur (breaks buttons at aws.amazon.com)
        https://bugs.webkit.org/show_bug.cgi?id=136612

        Reviewed by Darin Adler.

        r172153 was fundamentally broken, and would restore graphics contexts that had never been saved. This patch
        reimplements r172153 by using "continue" to skip loop iterations instead of changing the internal logic of
        the loop.

        In addition, I have refactored InlineTextBox::applyShadowToGraphicsContext() to take an extra boolean
        reference as an out parameter in order to make it obvious it if saved a graphics context that needs
        to be restored. This should make it less likely to make these kinds of mistakes in the future.

        Test: fast/text/empty-shadow-with-color.html

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::applyShadowToGraphicsContext): Add bool reference out param.
        * rendering/InlineTextBox.h: Ditto.
        * rendering/TextPainter.cpp:
        (WebCore::isEmptyShadow): Change logic to not skip loop iterations on a null shadow.
        (WebCore::paintTextWithShadows): Use continue to skip loop iterations for empty shadows. In addition,
        use the out param in InlineTextBox::applyShadowToGraphicsContext().
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::paintTextWithShadows): Update for new sigurature of
        InlineTextBox::applyShadowToGraphicsContext().

2014-09-08  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r173402.
        https://bugs.webkit.org/show_bug.cgi?id=136649

        Breaking buildw with error "unable to restore file position to
        0x00000c60 for section __DWARF.__debug_info (errno = 9)"
        (Requested by mlam_ on #webkit).

        Reverted changeset:

        "Move CallFrame and Register inlines functions out of
        JSScope.h."
        https://bugs.webkit.org/show_bug.cgi?id=136579
        http://trac.webkit.org/changeset/173402

2014-09-05  Mark Lam  <mark.lam@apple.com>

        Move CallFrame and Register inlines functions out of JSScope.h.
        <https://webkit.org/b/136579>

        Reviewed by Geoffrey Garen.

        No new tests.

        Added #include of the appropriate *Inlines.h files.  Unlike in
        JavaScriptCore, I #include'd the specific needed *Inlines.h instead of
        JSCInlines.h.  This is done to minimize the need for WebCore to be
        rebuilt when JSC changes are introduced.

        * ForwardingHeaders/interpreter/RegisterInlines.h: Added.
        * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
        * bindings/js/JSAudioTrackCustom.cpp:
        * bindings/js/JSBiquadFilterNodeCustom.cpp:
        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
        * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
        * bindings/js/JSCommandLineAPIHostCustom.cpp:
        * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
        * bindings/js/JSDOMBinding.h:
        * bindings/js/JSDOMStringListCustom.cpp:
        * bindings/js/JSDOMWindowBase.cpp:
        * bindings/js/JSDOMWindowShell.cpp:
        * bindings/js/JSDocumentCustom.cpp:
        * bindings/js/JSHTMLDocumentCustom.cpp:
        * bindings/js/JSOscillatorNodeCustom.cpp:
        * bindings/js/JSPannerNodeCustom.cpp:
        * bindings/js/JSPopStateEventCustom.cpp:
        * dom/TreeWalker.cpp:
        * html/HTMLPlugInImageElement.cpp:
        * inspector/CommandLineAPIModule.cpp:
        * inspector/InspectorController.cpp:

2014-09-08  Dean Jackson  <dino@apple.com>

        Separate the Apple media controls module from other ports
        https://bugs.webkit.org/show_bug.cgi?id=136644
        rdar://problem/18270969

        Reviewed by Eric Carlson.

        Make a mediaControlsBase.{js|css} that acts as the base
        class for the EFL and GTK ports (they were using mediaControlsApple).
        Over time, the Apple-specific controls may use more of the
        Base class.

        * Modules/mediacontrols/mediaControlsBase.css: Added.
        * Modules/mediacontrols/mediaControlsBase.js: Added.
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::RenderThemeEfl::mediaControlsStyleSheet): Load Base rather than Apple.
        (WebCore::RenderThemeEfl::mediaControlsScript): Ditto.
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::mediaControlsScript): Ditto.

2014-09-08  Jochen Eisinger  <jochen@chromium.org>

        Always update the referrer header in CachedResource
        https://bugs.webkit.org/show_bug.cgi?id=136642

        Reviewed by Alexey Proskuryakov.

        If a request already includes a referrer header, and the document has
        a non-default referrer policy, it is possible that we have to modify
        the referrer header.

        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::addAdditionalRequestHeaders):

2014-09-08  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        Remove FILTERS flag
        https://bugs.webkit.org/show_bug.cgi?id=136571

        Reviewed by Darin Adler.

        No new tests required, no new functionality.

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.make:
        * dom/DOMImplementation.cpp:
        (WebCore::isSupportedSVG10Feature):
        (WebCore::isSupportedSVG11Feature):
        * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
        * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
        * platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h:
        * platform/graphics/cpu/arm/filters/NEONHelpers.h:
        * platform/graphics/filters/DistantLightSource.cpp:
        * platform/graphics/filters/DistantLightSource.h:
        * platform/graphics/filters/FEBlend.cpp:
        * platform/graphics/filters/FEBlend.h:
        * platform/graphics/filters/FEColorMatrix.cpp:
        * platform/graphics/filters/FEColorMatrix.h:
        * platform/graphics/filters/FEComponentTransfer.cpp:
        * platform/graphics/filters/FEComponentTransfer.h:
        * platform/graphics/filters/FEComposite.cpp:
        * platform/graphics/filters/FEComposite.h:
        * platform/graphics/filters/FEConvolveMatrix.cpp:
        * platform/graphics/filters/FEConvolveMatrix.h:
        * platform/graphics/filters/FEDiffuseLighting.cpp:
        * platform/graphics/filters/FEDiffuseLighting.h:
        * platform/graphics/filters/FEDisplacementMap.cpp:
        * platform/graphics/filters/FEDisplacementMap.h:
        * platform/graphics/filters/FEDropShadow.cpp:
        * platform/graphics/filters/FEDropShadow.h:
        * platform/graphics/filters/FEFlood.cpp:
        * platform/graphics/filters/FEFlood.h:
        * platform/graphics/filters/FEGaussianBlur.cpp:
        * platform/graphics/filters/FEGaussianBlur.h:
        * platform/graphics/filters/FELighting.cpp:
        * platform/graphics/filters/FELighting.h:
        * platform/graphics/filters/FEMerge.cpp:
        * platform/graphics/filters/FEMerge.h:
        * platform/graphics/filters/FEMorphology.cpp:
        * platform/graphics/filters/FEMorphology.h:
        * platform/graphics/filters/FEOffset.cpp:
        * platform/graphics/filters/FEOffset.h:
        * platform/graphics/filters/FESpecularLighting.cpp:
        * platform/graphics/filters/FESpecularLighting.h:
        * platform/graphics/filters/FETile.cpp:
        * platform/graphics/filters/FETile.h:
        * platform/graphics/filters/FETurbulence.cpp:
        * platform/graphics/filters/FETurbulence.h:
        * platform/graphics/filters/Filter.h:
        * platform/graphics/filters/FilterEffect.cpp:
        * platform/graphics/filters/FilterEffect.h:
        * platform/graphics/filters/LightSource.h:
        * platform/graphics/filters/PointLightSource.cpp:
        * platform/graphics/filters/PointLightSource.h:
        * platform/graphics/filters/SourceAlpha.cpp:
        * platform/graphics/filters/SourceAlpha.h:
        * platform/graphics/filters/SourceGraphic.cpp:
        * platform/graphics/filters/SourceGraphic.h:
        * platform/graphics/filters/SpotLightSource.cpp:
        * platform/graphics/filters/SpotLightSource.h:
        * rendering/svg/RenderSVGResource.cpp:
        (WebCore::removeFromCacheAndInvalidateDependencies):
        * rendering/svg/RenderSVGResourceFilter.cpp:
        * rendering/svg/RenderSVGResourceFilter.h:
        * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
        * rendering/svg/RenderSVGResourceFilterPrimitive.h:
        * rendering/svg/RenderSVGRoot.cpp:
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::writeSVGResourceContainer):
        (WebCore::writeResources):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::~SVGRenderingContext):
        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
        * rendering/svg/SVGRenderingContext.h:
        (WebCore::SVGRenderingContext::SVGRenderingContext):
        * rendering/svg/SVGResources.cpp:
        (WebCore::targetReferenceFromResource):
        (WebCore::SVGResources::buildCachedResources):
        (WebCore::SVGResources::removeClientFromCache):
        (WebCore::SVGResources::resourceDestroyed):
        (WebCore::SVGResources::buildSetOfResources):
        (WebCore::SVGResources::resetFilter):
        (WebCore::SVGResources::dump):
        * rendering/svg/SVGResources.h:
        (WebCore::SVGResources::filter):
        (WebCore::SVGResources::ClipperFilterMaskerData::ClipperFilterMaskerData):
        * rendering/svg/SVGResourcesCycleSolver.cpp:
        (WebCore::SVGResourcesCycleSolver::breakCycle):
        * svg/SVGAnimatedEnumeration.cpp:
        (WebCore::enumerationValueForTargetAttribute):
        * svg/SVGComponentTransferFunctionElement.cpp:
        * svg/SVGComponentTransferFunctionElement.h:
        * svg/SVGComponentTransferFunctionElement.idl:
        * svg/SVGFEBlendElement.cpp:
        * svg/SVGFEBlendElement.h:
        * svg/SVGFEBlendElement.idl:
        * svg/SVGFEColorMatrixElement.cpp:
        * svg/SVGFEColorMatrixElement.h:
        * svg/SVGFEColorMatrixElement.idl:
        * svg/SVGFEComponentTransferElement.cpp:
        * svg/SVGFEComponentTransferElement.h:
        * svg/SVGFEComponentTransferElement.idl:
        * svg/SVGFECompositeElement.cpp:
        * svg/SVGFECompositeElement.h:
        * svg/SVGFECompositeElement.idl:
        * svg/SVGFEConvolveMatrixElement.cpp:
        * svg/SVGFEConvolveMatrixElement.h:
        * svg/SVGFEConvolveMatrixElement.idl:
        * svg/SVGFEDiffuseLightingElement.cpp:
        * svg/SVGFEDiffuseLightingElement.h:
        * svg/SVGFEDiffuseLightingElement.idl:
        * svg/SVGFEDisplacementMapElement.cpp:
        * svg/SVGFEDisplacementMapElement.h:
        * svg/SVGFEDisplacementMapElement.idl:
        * svg/SVGFEDistantLightElement.cpp:
        * svg/SVGFEDistantLightElement.h:
        * svg/SVGFEDistantLightElement.idl:
        * svg/SVGFEDropShadowElement.cpp:
        * svg/SVGFEDropShadowElement.h:
        * svg/SVGFEDropShadowElement.idl:
        * svg/SVGFEFloodElement.cpp:
        * svg/SVGFEFloodElement.h:
        * svg/SVGFEFloodElement.idl:
        * svg/SVGFEFuncAElement.cpp:
        * svg/SVGFEFuncAElement.h:
        * svg/SVGFEFuncAElement.idl:
        * svg/SVGFEFuncBElement.cpp:
        * svg/SVGFEFuncBElement.h:
        * svg/SVGFEFuncBElement.idl:
        * svg/SVGFEFuncGElement.cpp:
        * svg/SVGFEFuncGElement.h:
        * svg/SVGFEFuncGElement.idl:
        * svg/SVGFEFuncRElement.cpp:
        * svg/SVGFEFuncRElement.h:
        * svg/SVGFEFuncRElement.idl:
        * svg/SVGFEGaussianBlurElement.cpp:
        * svg/SVGFEGaussianBlurElement.h:
        * svg/SVGFEGaussianBlurElement.idl:
        * svg/SVGFEImageElement.cpp:
        * svg/SVGFEImageElement.h:
        * svg/SVGFEImageElement.idl:
        * svg/SVGFELightElement.cpp:
        * svg/SVGFELightElement.h:
        * svg/SVGFEMergeElement.cpp:
        * svg/SVGFEMergeElement.h:
        * svg/SVGFEMergeElement.idl:
        * svg/SVGFEMergeNodeElement.cpp:
        * svg/SVGFEMergeNodeElement.h:
        * svg/SVGFEMergeNodeElement.idl:
        * svg/SVGFEMorphologyElement.cpp:
        * svg/SVGFEMorphologyElement.h:
        * svg/SVGFEMorphologyElement.idl:
        * svg/SVGFEOffsetElement.cpp:
        * svg/SVGFEOffsetElement.h:
        * svg/SVGFEOffsetElement.idl:
        * svg/SVGFEPointLightElement.cpp:
        * svg/SVGFEPointLightElement.h:
        * svg/SVGFEPointLightElement.idl:
        * svg/SVGFESpecularLightingElement.cpp:
        * svg/SVGFESpecularLightingElement.h:
        * svg/SVGFESpecularLightingElement.idl:
        * svg/SVGFESpotLightElement.cpp:
        * svg/SVGFESpotLightElement.h:
        * svg/SVGFESpotLightElement.idl:
        * svg/SVGFETileElement.cpp:
        * svg/SVGFETileElement.h:
        * svg/SVGFETileElement.idl:
        * svg/SVGFETurbulenceElement.cpp:
        * svg/SVGFETurbulenceElement.h:
        * svg/SVGFETurbulenceElement.idl:
        * svg/SVGFilterElement.cpp:
        * svg/SVGFilterElement.h:
        * svg/SVGFilterElement.idl:
        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        * svg/graphics/filters/SVGFEImage.cpp:
        * svg/graphics/filters/SVGFEImage.h:
        * svg/graphics/filters/SVGFilter.cpp:
        * svg/graphics/filters/SVGFilter.h:
        * svg/graphics/filters/SVGFilterBuilder.cpp:
        * svg/graphics/filters/SVGFilterBuilder.h:
        * svg/svgtags.in:

2014-09-08  Simon Fraser  <simon.fraser@apple.com>

        Use enum class for the RunPostLayoutTasks enum
        https://bugs.webkit.org/show_bug.cgi?id=136640

        Reviewed by Dean Jackson.

        Use enum class for RunPostLayoutTasks fixing callers. Add an explanatory comment,
        and add some spacing.

        * dom/Document.cpp:
        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
        * dom/Document.h:
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
        * testing/Internals.cpp:
        (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):

2014-09-08  peavo@outlook.com  <peavo@outlook.com>

        [WinCairo] Compile error.
        https://bugs.webkit.org/show_bug.cgi?id=136633

        Reviewed by Darin Adler.

        Enum name has already been defined.

        * platform/audio/AudioHardwareListener.h:

2014-09-08  Tim Horton  <timothy_horton@apple.com>

        Remove some unused code in ImageSourceCG
        https://bugs.webkit.org/show_bug.cgi?id=136638

        Reviewed by Dan Bernstein.

        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::setData):
        Remove this code. Firstly, it's in a USE(CG) && !PLATFORM(COCOA) && !PLATFORM(WIN)
        block, and that's simply not a thing. Secondly, the referenced bug was fixed in Lion.

2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Introduce CSS_RULE_TYPE_CASTS, and use it
        https://bugs.webkit.org/show_bug.cgi?id=136628

        Reviewed by Darin Adler.

        As a step to use toFoo, this patch introduces toCSSFooRule(). This will help to detect
        wrong type cast. Additionally some missing type casts are clean up as well.

        No new tests, no behavior changes.

        * bindings/gobject/WebKitDOMPrivate.cpp:
        (WebKit::wrap):
        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::addFontFaceRule):
        * css/CSSImportRule.h:
        * css/CSSMediaRule.h:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
        * css/CSSRule.h:
        * css/CSSStyleRule.h:
        * css/CSSSupportsRule.h:
        * css/InspectorCSSOMWrappers.cpp:
        (WebCore::InspectorCSSOMWrappers::collect):
        * css/WebKitCSSRegionRule.h:
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::asCSSStyleRule):
        (WebCore::InspectorCSSAgent::collectStyleSheets):
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::asCSSRuleList):
        (WebCore::fillMediaListChain):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeCSSStyleSheet):

2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL[WK2] MiniBrowser comes to crash on debug mode
        https://bugs.webkit.org/show_bug.cgi?id=136617

        Reviewed by Csaba Osztrogonác.

        Fix wrong ASSERTION use in applyCursorFromEcoreX().

        * platform/efl/EflScreenUtilities.cpp: Change ASSERT(!window) with *ASSERT(window)*
        (WebCore::applyCursorFromEcoreX):

2014-09-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Introduce toBasicShapeFoo() instead of static_cast<BasicShapeFoo*>
        https://bugs.webkit.org/show_bug.cgi?id=136609

        Reviewed by Darin Adler.

        To use BasicShapeFoo() helps to detect wrong type casting and improve code readability.

        No new tests, no behavior changes.

        * css/BasicShapeFunctions.cpp:
        (WebCore::valueForBasicShape):
        * rendering/shapes/Shape.cpp:
        (WebCore::Shape::createShape):
        * rendering/style/BasicShapes.cpp:
        (WebCore::BasicShape::canBlend):
        (WebCore::BasicShapeCircle::blend):
        (WebCore::BasicShapeEllipse::blend):
        (WebCore::BasicShapePolygon::blend):
        (WebCore::BasicShapeInset::blend):
        * rendering/style/BasicShapes.h:

2014-09-06  Jer Noble  <jer.noble@apple.com>

        [Fullscreen] Add a site-specific hack to work around "flash on exit" behavior of YouTube.com.
        https://bugs.webkit.org/show_bug.cgi?id=136604

        Reviewed by Eric Carlson.

        YouTube.com will cause a "flash" of the full screen sized <video> element upon exiting full
        screen because the "fullscreenchange" event is fired asynchronously after the exit animation
        completes. Only YouTube sites and embeds, add a site-specific-quirk which runs the "fullscreenchange"
        event synchronously at the end of the exit animation. This causes YouTube's video resizing logic
        to run during the period of time where we've disabled screen updates, instead of immediately
        after.

        * dom/Document.cpp:
        (WebCore::Document::webkitDidExitFullScreenForElement):

2014-09-06  Darin Adler  <darin@apple.com>

        Make updates suggested by new version of Xcode
        https://bugs.webkit.org/show_bug.cgi?id=136603

        Reviewed by Mark Rowe.

        * Configurations/Base.xcconfig: Added COMBINE_HIDPI_IMAGES and
        ENABLE_STRICT_OBJC_MSGSEND as suggested by Xcode upgrade check.

        * WebCore.xcodeproj/project.pbxproj: Let Xcode remove an orphaned item from the file,
        and also updated LastUpgradeCheck.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateTextTrackDisplay): Use #if/#else/#endif instead of
        using #if/return/#endif and leaving code unreachable.
        (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
        (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
        * html/canvas/WebGLDrawBuffers.cpp:
        (WebCore::WebGLDrawBuffers::supported): Ditto.

2014-09-06  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: convert DockSide to an enum class
        https://bugs.webkit.org/show_bug.cgi?id=136601

        Reviewed by Timothy Hatcher.

        * inspector/InspectorFrontendClient.h:
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
        (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
        (WebCore::InspectorFrontendClientLocal::canAttachWindow):
        (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::requestSetDockSide):

2014-09-06  Antti Koivisto  <antti@apple.com>

        Serialize ResourceResponses using WebKit types
        https://bugs.webkit.org/show_bug.cgi?id=136545

        Fix the failing webarchive tests.

        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::initNSURLResponse): Map empty text encoding name to nil NSString.

2014-09-06  peavo@outlook.com  <peavo@outlook.com>

        [WinCairo][Curl] fileExists() incorrectly claims folder does not exist.
        https://bugs.webkit.org/show_bug.cgi?id=136598

        Reviewed by Alex Christensen.

        The fileExists() function will always return false on Windows,
        if the filename parameter ends with a slash or backslash.

        * platform/network/curl/CurlCacheManager.cpp:
        (WebCore::CurlCacheManager::setCacheDirectory): Add slash after call to fileExists().

2014-09-06  David Kilzer  <ddkilzer@apple.com>

        New clang warns about boolean checks for |this| pointer in RenderObject debug methods
        <http://webkit.org/b/136599>

        Reviewed by Zalan Bujtas.

        Ignores the following static analyzer warnings:

            Source/WebCore/rendering/RenderObject.cpp:1465:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
                if (!this) {
                    ~^~~~
            Source/WebCore/rendering/RenderObject.cpp:1584:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
                if (!this)
                    ~^~~~

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::showRenderObject):
        (WebCore::RenderObject::showRenderSubTreeAndMark):
        Add "#pragma clang" preprocessor macros to ignore this warning
        since the code is only compiled for Debug builds.  Also add a
        pragma for the pragma so older clangs don't complain about an
        unkonwn pragma.

2014-09-06  Antti Koivisto  <antti@apple.com>

        Serialize ResourceResponses using WebKit types
        https://bugs.webkit.org/show_bug.cgi?id=136545

        Reviewed by Alexey Proskuryakov.

        Serialization is faster and we can mostly avoid having NSURLResponses in web process.

        * WebCore.exp.in:
        * platform/network/ResourceLoadTiming.h:
        (WebCore::ResourceLoadTiming::encode):
        (WebCore::ResourceLoadTiming::decode):
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::encode):
        (WebCore::ResourceResponseBase::decode):

            Serialize from the WebCore data instead of serializing NSURLResponse.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::cfURLResponse):

            Synthesize CFURLResponse by creating NSURLResponse on Cocoa platforms so we don't need copy code.
            This has negligible performance impact, NSURLResponse is just a wrapper around CFURLResponse.

        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::nsURLResponse):
        (WebCore::ResourceResponse::setCertificateChain):

            Avoid unnecessary NSURLRequest instantiation in debug builds.

2014-09-06  David Kilzer  <ddkilzer@apple.com>

        HTMLElement.cpp does not compile with new clang
        <http://webkit.org/b/136600>

        Reviewed by Chris Fleizach.

        Fixes the following static analyzer warning:

            Source/WebCore/html/HTMLElement.cpp:545:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
                if (!this || !parentNode())
                    ~^~~~

        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::setOuterText): Remove "!this" check added
        in r75738.  It would only cover up real bugs, and isn't even hit
        in layout tests.

2014-09-06  Ryuan Choi  <ryuan.choi@gmail.com>

        [EFL] Drop evas object cursor support
        https://bugs.webkit.org/show_bug.cgi?id=136324

        Reviewed by Gyuyoung Kim.

        Removed evas object cursor because there are some bugs.
        ewebkit will only support ecore_x_cursor because ewebkit is available with X, now.

        * platform/efl/DefaultTheme/CMakeLists.txt: Removed cursor related code.
        * platform/efl/DefaultTheme/default.edc: Ditto.
        * platform/efl/DefaultTheme/widget/cursor/cursor.edc: Removed.
        * platform/efl/EflScreenUtilities.cpp:
        (WebCore::getEcoreCursor):
        (WebCore::applyCursorFromEcoreX): Renamed applyFallbackCursor.
        (WebCore::createCustomCursor): Added to make custom cursor.
        (WebCore::applyFallbackCursor): Deleted.
        * platform/efl/EflScreenUtilities.h:

2014-09-05  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r173340 and r173342.
        https://bugs.webkit.org/show_bug.cgi?id=136596

        Broke many tests (Requested by ap on #webkit).

        Reverted changesets:

        "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
        https://bugs.webkit.org/show_bug.cgi?id=136474
        http://trac.webkit.org/changeset/173340

        "Build fix after r173340."
        http://trac.webkit.org/changeset/173342

2014-09-05  Joseph Pecoraro  <pecoraro@apple.com>

        Use WTFString::split(char) in more places
        https://bugs.webkit.org/show_bug.cgi?id=136543

        Reviewed by Sam Weinig.

        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::nodeForPath):
        * mathml/MathMLMencloseElement.cpp:
        (WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
        * page/PerformanceResourceTiming.cpp:
        (WebCore::passesTimingAllowCheck):
        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
        (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
        * platform/graphics/opengl/GLPlatformContext.cpp:
        (WebCore::parseExtensions):
        * platform/gtk/PasteboardHelper.cpp:
        (WebCore::PasteboardHelper::fillDataObjectFromDropData):
        * platform/network/curl/CurlCacheEntry.cpp:
        (WebCore::CurlCacheEntry::loadResponseHeaders):
        * platform/network/curl/CurlCacheManager.cpp:
        (WebCore::CurlCacheManager::loadIndex):

2014-09-05  Myles C. Maxfield  <mmaxfield@apple.com>

        Laying out a TextRun using an SVG font is O(n^2)
        https://bugs.webkit.org/show_bug.cgi?id=136584

        Reviewed by Andreas Kling.

        Caching the version of the run with normalized spaces leads to a 5x speedup on the
        performance test this patch adds.

        Note that SVGFontData::applySVGGlyphSelection() is still unnecesarrily O(n), so more
        work can be done here. In particular, the call to collectGlyphsForString() can likely
        be sped up.

        No new correctness tests because there is no behavior change.
        Performance Test: SVG/SVG-Text.html

        * platform/graphics/Font.h:
        (WebCore::Font::treatAsSpace): Make inline.
        (WebCore::Font::treatAsZeroWidthSpace): Ditto.
        (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
        * platform/graphics/SimpleFontData.h: Add String cache argument.
        * platform/graphics/TextRun.h: Move member variables around for better packing.
        (WebCore::TextRun::TextRun): Ditto.
        * platform/graphics/WidthIterator.cpp: Add String cache argument.
        (WebCore::WidthIterator::glyphDataForCharacter): Ditto.
        (WebCore::WidthIterator::advanceInternal): Create String cache and pass it to
        glyphDataForCharacter.
        * platform/graphics/WidthIterator.h: Add String cache argument.
        * rendering/svg/SVGTextRunRenderingContext.cpp: Ditto.
        (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Ditto.
        * rendering/svg/SVGTextRunRenderingContext.h: Ditto.
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection): Call computeNormalizedSpaces
        to consult with the cache.
        (WebCore::computeNormalizedSpaces): Compute cached String value.
        * svg/SVGFontData.h: Add String cache argument.

2014-09-05  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r169407): Calls to RenderStyle::getRoundedBorderFor() in computeRoundedRectForBoxShape() still include RenderView pointer
        <http://webkit.org/b/136591>
        <rdar://problem/18143731>

        Reviewed by Simon Fraser.

        In r169407, the RenderView* argument was removed from
        RenderStyle::getRoundedBorderFor().  This argument was not
        removed from these calls in computeRoundedRectForBoxShape(), but
        because getRoundedBorderFor() always returned a reference, and
        because the default for the next argument was true, there was no
        actual change in behavior from this bug.

        No new tests since there is no change in behavior.

        * rendering/shapes/BoxShape.cpp:
        (WebCore::computeRoundedRectForBoxShape): Remove RenderView*
        arguments from calls to getRoundedBorderFor().

2014-09-05  Tim Horton  <timothy_horton@apple.com>

        [iOS] Work around bug 136593 by disabling the PDFDocumentImage live resize optimization there
        https://bugs.webkit.org/show_bug.cgi?id=136594
        rdar://problem/17457013

        Reviewed by Simon Fraser.

        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
        Disable the optimization on iOS, because bug 136593 rears its head
        most often on iOS because it is more common to have contexts that always
        use low-quality image interpolation on that platform.

2014-09-05  Tim Horton  <timothy_horton@apple.com>

        Doing a navigation on a non-opaque WKWebView can result in an empty layer tree
        https://bugs.webkit.org/show_bug.cgi?id=136590
        <rdar://problem/18234000>

        Reviewed by Simon Fraser.

        * page/FrameView.cpp:
        (WebCore::FrameView::setTransparent):
        Avoid scheduling a compositing layer update if the RenderView isn't the
        one associated with this FrameView. This can happen during a navigation,
        before the new Document (and RenderView) is swapped in. This is particularly
        bad in the case of setTransparent because it is called from Frame::createView,
        which is right in the middle of that transition window. If we let the compositing
        layer update go ahead, it can end up detaching the new Document's layer tree,
        and we have no mechanism that would cause it to reattach.

2014-09-05  Enrica Casucci  <enrica@apple.com>

        Remove PLATFORM(IOS) from WebCore/editing (Part 3).
        https://bugs.webkit.org/show_bug.cgi?id=136474

        Reviewed by Benjamin Poulain.

        This patch removes the use of PLATFORM(IOS) from TextAffinity.h
        and removes the assumption that EAffinity values match NSSelectionAffinity
        values. It also removes the includes in TextAffinity.h, creating the need to
        include explicitly the files when necessary. It also removes the unnecessary
        use of platform specific types, replacing them with WebCore types.

        * editing/TextAffinity.h:
        (kit): Deleted.
        (core): Deleted.
        * editing/cocoa/HTMLConverter.mm:
        * page/mac/WebCoreFrameView.h:
        * platform/ios/ScrollViewIOS.mm:
        (WebCore::ScrollView::platformSetScrollPosition):
        (WebCore::ScrollView::platformSetScrollOrigin):
        * platform/ios/wak/WAKScrollView.mm:
        (-[WAKScrollView setScrollOrigin:updatePositionAtAll:immediately:]):
        (-[WAKScrollView scrollOrigin]):

2014-09-05  Jer Noble  <jer.noble@apple.com>

        Unreviewed GTK build fix; include StringPrintStream to pull in toString().

        * html/HTMLMediaElement.h:

2014-09-05  Brady Eidson  <beidson@apple.com>

        Allow pages with unload handlers in the page cache
        <rdar://problem/11084669> and https://bugs.webkit.org/show_bug.cgi?id=136535

        Reviewed by Oliver Hunt.

        This will match what iOS has been doing for some time.

        Updated tests for new behavior.

        * history/PageCache.cpp:
        (WebCore::logCanCacheFrameDecision):
        (WebCore::PageCache::canCachePageContainingThisFrame):

2014-09-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [SOUP] Implement ResourceResponse::platformSuggestedFilename() when USE(SOUP) is enabled.
        https://bugs.webkit.org/show_bug.cgi?id=136562

        Reviewed by Martin Robinson.

        No new tests, this makes existing tests pass.

        * platform/network/soup/ResourceResponseSoup.cpp:
        (WebCore::ResourceResponse::platformSuggestedFilename):
        Implement ResourceResponse::platformSuggestedFilename() for SOUP after r173272, r173301 and r173305.

2014-09-05  peavo@outlook.com  <peavo@outlook.com>

        [Curl] Compile error.
        https://bugs.webkit.org/show_bug.cgi?id=136574

        Reviewed by Alex Christensen.

        The ResourceResponse::setSuggestedFilename method is no longer available.

        * platform/network/curl/CurlCacheEntry.cpp:
        (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
        * platform/network/curl/CurlDownload.cpp:
        (WebCore::CurlDownload::didReceiveHeader):
        * platform/network/curl/MultipartHandle.cpp:
        (WebCore::MultipartHandle::didReceiveResponse):
        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::headerCallback):
        * platform/network/curl/ResourceResponse.h:
        (WebCore::ResourceResponse::platformSuggestedFilename):

2014-09-05  Benjamin Poulain  <benjamin@webkit.org>

        Update the current matching of :read-only and :read-write to the latest spec
        https://bugs.webkit.org/show_bug.cgi?id=136566

        Reviewed by Antti Koivisto.

        WebKit's implementation of :read-only and :read-write dated from 2008 and
        it was based on the web form spec (http://www.w3.org/TR/web-forms-2/).
        That spec is very dead now.

        There are new definitions of :read-only and :read-write in three specs:
        -the HTML living spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selector-read-only
        -Selectors level 4: http://dev.w3.org/csswg/selectors4/#rw-pseudos
        -CSS 3 UI: http://www.w3.org/TR/css3-ui/

        All the definitions say about the same thing. The definitions of Selector Level 4 and
        CSS 3 UI are very vague and poorly worded. I used the HTML when something was ambiguous.

        In the new definitions, :read-only and :read-write are opposite. It is no longer possible to
        match both selector simultaneously for the same element.
        Consequently, I got rid of Element:matchesReadOnlyPseudoClass(). Matching :read-only is now equivalent
        to :not(:read-write).

        The existing definition of :read-write was matching the spec so I could reuse that.

        There is one more part to the new spec that is not addressed here: the pseudo class :read-write should
        now also match arbitrary editable HTMLElement (e.g. an element with contenteditable). This will be fixed
        in a follow up.

        Tests: fast/css/read-only-read-write-input-basics.html
               fast/css/read-only-read-write-textarea-basics.html
               fast/selectors/read-only-read-write-input-basics.html
               fast/selectors/read-only-read-write-input-in-fieldset.html
               fast/selectors/read-only-read-write-textarea-basics.html
               fast/selectors/read-only-read-write-textarea-in-fieldset.html

        * css/SelectorCheckerTestFunctions.h:
        (WebCore::matchesReadOnlyPseudoClass):
        * dom/Element.cpp:
        (WebCore::Element::matchesReadOnlyPseudoClass): Deleted.
        * dom/Element.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass): Deleted.
        * html/HTMLInputElement.h:
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass): Deleted.
        * html/HTMLTextAreaElement.h:
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass): Deleted.
        * html/shadow/SliderThumbElement.h:
        * html/shadow/SpinButtonElement.cpp:
        (WebCore::SpinButtonElement::matchesReadOnlyPseudoClass): Deleted.
        * html/shadow/SpinButtonElement.h:
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::isReadOnlyControl):

2014-09-05  Andreas Kling  <akling@apple.com>

        CTTE: SVGResourcesCache should only allow RenderElements.
        <https://webkit.org/b/136578>

        Only RenderElement subclasses can use SVG resources.
        Codify this by making SVGResourcesCache::m_cache keyed on RenderElement.

        Reviewed by Antti Koivisto.

        * rendering/svg/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::selfWillPaint):
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::imageChanged):
        * rendering/svg/RenderSVGResource.cpp:
        (WebCore::requestPaintingResource):
        (WebCore::removeFromCacheAndInvalidateDependencies):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
        * rendering/svg/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::paintReplaced):
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
        (WebCore::RenderSVGShape::markerRect):
        (WebCore::RenderSVGShape::drawMarkers):
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::invalidateResourcesOfChildren):
        (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
        (WebCore::SVGRenderSupport::filtersForceContainerLayout):
        (WebCore::SVGRenderSupport::pointInClippingArea):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
        * rendering/svg/SVGResourcesCache.cpp:
        (WebCore::resourcesCacheFromRenderer):
        (WebCore::SVGResourcesCache::cachedResourcesForRenderer):
        (WebCore::SVGResourcesCache::clientLayoutChanged):
        (WebCore::SVGResourcesCache::clientDestroyed):
        (WebCore::SVGResourcesCache::resourceDestroyed):
        (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Deleted.
        * rendering/svg/SVGResourcesCache.h:
        * rendering/svg/SVGResourcesCycleSolver.cpp:
        (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):

2014-09-05  Simon Fraser  <simon.fraser@apple.com>

        IDB version changed events should have a valid eventType()
        https://bugs.webkit.org/show_bug.cgi?id=136583

        Reviewed by Brady Eidson.

        IDBDatabase::dispatchEvent() asserts that the event type is versionchangeEvent,
        but the version changed event created with an empty event type. Correct this.

        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::onVersionChange):

2014-09-05  Simon Fraser  <simon.fraser@apple.com>

        Remove some PLATFORM(IOS) code in Color.h/cpp
        https://bugs.webkit.org/show_bug.cgi?id=136582

        Reviewed by Dan Bates.

        Remove Color::tap which is unused, and remove createCGColorWithDeviceWhite()
        which was only called in one file in WebKit.

        * WebCore.exp.in:
        * platform/graphics/Color.h:
        * platform/graphics/cg/ColorCG.cpp:
        (WebCore::createCGColorWithDeviceWhite): Deleted.

2014-09-05  Beth Dakin  <bdakin@apple.com>

        ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not 
        actually scrollable
        https://bugs.webkit.org/show_bug.cgi?id=136558

        Reviewed by Simon Fraser.

        This patch requires adding a new virtual function to ScrollableArea called 
        isScrollableOrRubberbandable(). Unfortunately, there is already a virtual function 
        of that name that exists on RenderLayerModelObject, which is only problematic 
        because RenderListBox inherits from both RenderLayerModelObject and 
        ScrollableArea. This patch resolves that conflict in the simplest way, by re-
        naming the RenderLayerModelObject version of the function to 
        isScrollableOrRubberbandableBox(). It’s a little unfortunate, but simpler than the 
        other solutions I came up with.

        New ScrollableArea virtual function.
        * page/FrameView.cpp:
        (WebCore::FrameView::isScrollableOrRubberbandable):
        * page/FrameView.h:

        The point of the whole patch! Return early if you can’t scroll or rubber band.
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::handleWheelEvent):

        New ScrollableArea virtual function.
        * platform/ScrollableArea.h:
        * platform/win/PopupMenuWin.h:

        Re-name.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::isScrollableOrRubberbandableBox):
        (WebCore::RenderBox::isScrollableOrRubberbandable): Deleted.
        * rendering/RenderBox.h:

        Implement new ScrollableArea virtual function, and adapt to the re-name.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::isScrollableOrRubberbandable):
        (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
        * rendering/RenderLayer.h:

        Re-name.
        * rendering/RenderLayerModelObject.h:
        (WebCore::RenderLayerModelObject::isScrollableOrRubberbandableBox):
        (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable): Deleted.

        Implement ScrollableArea virtual function.
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::isScrollableOrRubberbandable):
        * rendering/RenderListBox.h:

        Re-name.
        * rendering/RenderView.cpp:
        (WebCore::RenderView::isScrollableOrRubberbandableBox):
        (WebCore::RenderView::isScrollableOrRubberbandable): Deleted.
        * rendering/RenderView.h:

2014-06-06  Jer Noble  <jer.noble@apple.com>

        Refactoring: make MediaTime the primary time type for audiovisual times.
        https://bugs.webkit.org/show_bug.cgi?id=133579

        Reviewed by Eric Carlson.

        In order to limit the number of floating-point rounding errors for media systems which
        can make use of rational time objects.

        Add some convenience methods to convert between QTTime and MediaTime.
        * platform/graphics/mac/MediaTimeQTKit.h: Added.
        * platform/graphics/mac/MediaTimeQTKit.mm: Added.
        (WebCore::toMediaTime):
        (WebCore::toQTTime):

        Rename MediaTimeMac -> MediaTimeAVFoundation:
        * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp: Renamed from Source/WebCore/platform/mac/MediaTimeMac.cpp.
        (WebCore::toMediaTime):
        (WebCore::toCMTime):
        * platform/graphics/avfoundation/MediaTimeAVFoundation.h: Renamed from Source/WebCore/platform/mac/MediaTimeMac.h.

        Use MediaTime instead of double:
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::duration):
        (WebCore::MediaSource::currentTime):
        (WebCore::MediaSource::buffered):
        (WebCore::MediaSource::setDuration):
        (WebCore::MediaSource::activeRanges):
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::remove):
        (WebCore::SourceBuffer::removeCodedFrames):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
        (WebCore::SourceBuffer::hasCurrentTime):
        (WebCore::SourceBuffer::hasFutureTime):
        (WebCore::SourceBuffer::canPlayThrough):
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDataCueCustom.cpp:
        (WebCore::JSDataCueConstructor::constructJSDataCue):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::parseAttribute):
        * html/HTMLMediaElement.h:
        (WebCore::ValueToString<MediaTime>::string):
        * html/MediaFragmentURIParser.cpp:
        (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
        (WebCore::MediaFragmentURIParser::startTime):
        (WebCore::MediaFragmentURIParser::endTime):
        (WebCore::MediaFragmentURIParser::parseTimeFragment):
        (WebCore::MediaFragmentURIParser::parseNPTFragment):
        (WebCore::MediaFragmentURIParser::parseNPTTime):
        (WebCore::MediaFragmentURIParser::invalidTimeValue): Deleted.
        * html/MediaFragmentURIParser.h:
        * html/TimeRanges.h:
        (WebCore::TimeRanges::ranges):
        * html/track/DataCue.cpp:
        (WebCore::DataCue::DataCue):
        * html/track/DataCue.h:
        (WebCore::DataCue::create):
        * html/track/InbandDataTextTrack.cpp:
        (WebCore::InbandDataTextTrack::addDataCue):
        (WebCore::InbandDataTextTrack::updateDataCue):
        (WebCore::InbandDataTextTrack::removeDataCue):
        * html/track/InbandDataTextTrack.h:
        * html/track/InbandGenericTextTrack.cpp:
        (WebCore::InbandGenericTextTrack::updateCueFromCueData):
        (WebCore::InbandGenericTextTrack::addGenericCue):
        (WebCore::InbandGenericTextTrack::removeGenericCue):
        * html/track/InbandTextTrack.cpp:
        (WebCore::InbandTextTrack::startTimeVariance):
        * html/track/InbandTextTrack.h:
        * html/track/InbandWebVTTTextTrack.cpp:
        (WebCore::InbandWebVTTTextTrack::newCuesParsed):
        * html/track/TextTrack.cpp:
        (WebCore::TextTrack::addCue):
        (WebCore::TextTrack::hasCue):
        * html/track/TextTrack.h:
        (WebCore::TextTrack::startTimeVariance):
        * html/track/TextTrackCue.cpp:
        (WebCore::TextTrackCue::create):
        (WebCore::TextTrackCue::TextTrackCue):
        (WebCore::TextTrackCue::setStartTime):
        (WebCore::TextTrackCue::setEndTime):
        (WebCore::TextTrackCue::hasEquivalentStartTime):
        * html/track/TextTrackCue.h:
        (WebCore::TextTrackCue::startTime):
        (WebCore::TextTrackCue::endTime):
        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGeneric::TextTrackCueGeneric):
        * html/track/TextTrackCueGeneric.h:
        * html/track/TextTrackCueList.cpp:
        (WebCore::TextTrackCueList::add):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::VTTCue):
        (WebCore::VTTCue::markFutureAndPastNodes):
        (WebCore::VTTCue::updateDisplayTree):
        * html/track/VTTCue.h:
        (WebCore::VTTCue::create):
        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::WebVTTParser):
        (WebCore::WebVTTParser::resetCueValues):
        (WebCore::WebVTTParser::collectTimeStamp):
        (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
        * html/track/WebVTTParser.h:
        (WebCore::WebVTTCueData::startTime):
        (WebCore::WebVTTCueData::setStartTime):
        (WebCore::WebVTTCueData::endTime):
        (WebCore::WebVTTCueData::setEndTime):
        (WebCore::WebVTTCueData::WebVTTCueData): Deleted.
        * platform/graphics/InbandTextTrackPrivateClient.h:
        (WebCore::GenericCueData::startTime):
        (WebCore::GenericCueData::setStartTime):
        (WebCore::GenericCueData::endTime):
        (WebCore::GenericCueData::setEndTime):
        (WebCore::GenericCueData::GenericCueData):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::duration):
        (WebCore::MediaPlayer::startTime):
        (WebCore::MediaPlayer::initialTime):
        (WebCore::MediaPlayer::currentTime):
        (WebCore::MediaPlayer::seekWithTolerance):
        (WebCore::MediaPlayer::seek):
        (WebCore::MediaPlayer::maxTimeSeekable):
        (WebCore::MediaPlayer::minTimeSeekable):
        (WebCore::MediaPlayer::mediaTimeForTimeValue):
        (WebCore::MediaPlayer::totalFrameDelay):
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::durationMediaTime):
        (WebCore::MediaPlayerPrivateInterface::currentMediaTime):
        (WebCore::MediaPlayerPrivateInterface::seek):
        (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
        (WebCore::MediaPlayerPrivateInterface::startTime):
        (WebCore::MediaPlayerPrivateInterface::initialTime):
        (WebCore::MediaPlayerPrivateInterface::seekable):
        (WebCore::MediaPlayerPrivateInterface::maxMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateInterface::minMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValue):
        (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
        (WebCore::MediaPlayerPrivateInterface::startTimeDouble): Deleted.
        (WebCore::MediaPlayerPrivateInterface::maxTimeSeekableDouble): Deleted.
        (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValueDouble): Deleted.
        * platform/graphics/MediaSourcePrivateClient.h:
        * platform/graphics/TrackPrivateBase.h:
        (WebCore::TrackPrivateBase::startTimeVariance):
        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
        (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
        (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
        (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
        (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
        (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue):
        (WebCore::IncompleteMetaDataCue::startTime):
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::processCue):
        (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
        (WebCore::MediaPlayerPrivateAVFoundation::durationMediaTime):
        (WebCore::MediaPlayerPrivateAVFoundation::seek):
        (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance):
        (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundation::maxTimeLoaded):
        (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
        (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
        (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged):
        (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
        (WebCore::MediaPlayerPrivateAVFoundation::timeChanged):
        (WebCore::MediaPlayerPrivateAVFoundation::didEnd):
        (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
        (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
        (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
        (WebCore::MediaPlayerPrivateAVFoundation::duration): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Deleted.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
        (WebCore::MediaPlayerPrivateAVFoundation::Notification::time):
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
        (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
        (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
        (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
        (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
        (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
        (WebCore::AVFWrapper::seekToTime): Deleted.
        (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
        (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
        (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
        (WebCore::AVFWrapper::seekToTime): Deleted.
        (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
        (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationMediaTime):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTime):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Deleted.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Deleted.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble): Deleted.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble): Deleted.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable): Deleted.
        * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
        (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
        * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
        (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
        (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::maxValueForTimeRanges):
        (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
        (WebCore::MediaPlayerPrivateQTKit::durationMediaTime):
        (WebCore::MediaPlayerPrivateQTKit::currentMediaTime):
        (WebCore::MediaPlayerPrivateQTKit::seek):
        (WebCore::MediaPlayerPrivateQTKit::doSeek):
        (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
        (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
        (WebCore::MediaPlayerPrivateQTKit::seeking):
        (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
        (WebCore::MediaPlayerPrivateQTKit::buffered):
        (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
        (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress):
        (WebCore::MediaPlayerPrivateQTKit::updateStates):
        (WebCore::MediaPlayerPrivateQTKit::timeChanged):
        (WebCore::MediaPlayerPrivateQTKit::didEnd):
        (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
        (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
        (WebCore::MediaPlayerPrivateQTKit::createQTTime): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::duration): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::currentTime): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::maxTimeLoaded): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::mediaTimeForTimeValue): Deleted.
        * platform/mac/PlatformClockCM.mm:
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
        (WebCore::MockMediaPlayerMediaSource::maxMediaTimeSeekable):
        (WebCore::MockMediaPlayerMediaSource::currentMediaTime):
        (WebCore::MockMediaPlayerMediaSource::durationMediaTime):
        (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
        (WebCore::MockMediaPlayerMediaSource::totalFrameDelay):
        (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Deleted.
        (WebCore::MockMediaPlayerMediaSource::currentTimeDouble): Deleted.
        (WebCore::MockMediaPlayerMediaSource::durationDouble): Deleted.
        * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
        * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
        (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
        * platform/mock/mediasource/MockMediaSourcePrivate.h:
        * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
        (WebCore::MockSourceBufferPrivate::enqueueSample):

2014-09-05  Antti Koivisto  <antti@apple.com>

        REGRESSION(r173272): Two blob tests failing on WK1
        https://bugs.webkit.org/show_bug.cgi?id=136573

        Reviewed by Alexey Proskuryakov.

        http/tests/fileapi/blob-url-in-subframe.html
        http/tests/security/mixedContent/blob-url-in-iframe.html

        * platform/network/BlobResourceHandle.cpp:
        (WebCore::BlobResourceHandle::notifyResponseOnSuccess):

            No need to set this twice.

        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::initNSURLResponse):

            Also test that it is an HTTP URL before using NSHTTPURLResponse. Blobs create non-HTTP URLs with status codes.
            Pass the accidentally lost expected content length.

2014-09-05  Zalan Bujtas  <zalan@apple.com>

        Move computeInlinePreferredLogicalWidths() from RenderBlock to RenderBlockFlow
        https://bugs.webkit.org/show_bug.cgi?id=136461

        Reviewed by Darin Adler.

        This patch enables us to go from const_cast<RenderBlockFlow*>(this)->computeInlinePreferredLogicalWidths()
        to computeInlinePreferredLogicalWidths().

        Covered by existing tests.

        * rendering/RenderBlock.cpp:
        (WebCore::InlineMinMaxIterator::endOfInline): Deleted.
        (WebCore::InlineMinMaxIterator::next): Deleted.
        (WebCore::getBPMWidth): Deleted.
        (WebCore::getBorderPaddingMargin): Deleted.
        (WebCore::stripTrailingSpace): Deleted.
        (WebCore::preferredWidth): Deleted.
        (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): Deleted.
        * rendering/RenderBlock.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
        (WebCore::InlineMinMaxIterator::initial): The (parent == current) condition was used as 'initial' state before.
        and in order to make computeInlinePreferredLogicalWidths const, InlineMinMaxIterator() needs to take const RenderObject*.
        (WebCore::InlineMinMaxIterator::next):
        (WebCore::getBPMWidth):
        (WebCore::getBorderPaddingMargin):
        (WebCore::stripTrailingSpace):
        (WebCore::preferredWidth):
        (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
        * rendering/RenderBlockFlow.h:

2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Unreviewed, build fix for EFL and GTK ports since r173272.

        * platform/network/soup/ResourceResponseSoup.cpp:
        (WebCore::ResourceResponse::updateFromSoupMessageHeaders):

2014-09-04  Pratik Solanki  <psolanki@apple.com>

        Unreviewed. Speculative build fix. Add platformSuggestedFilename() to all the ResourceResponse header files.

        * platform/network/curl/ResourceResponse.h:
        (WebCore::ResourceResponse::platformSuggestedFilename):
        * platform/network/soup/ResourceResponse.h:
        * platform/network/win/ResourceResponse.h:
        (WebCore::ResourceResponse::platformSuggestedFilename):

2014-09-04  Pratik Solanki  <psolanki@apple.com>

        Unreviewed. Another speculative build fix after r173272. Add a stub implementation for
        ResourceResponse::platformSuggestedFilename(). Filed bug 136562 for proper fix.

        * platform/network/soup/ResourceResponseSoup.cpp:
        (ResourceResponse::platformSuggestedFilename):

2014-09-04  Pratik Solanki  <psolanki@apple.com>

        Unreviewed. Speculative EFL and GTK build fix after r173272. Remove the filename argument
        from the various ResourceResponse constructors.

        * platform/network/curl/ResourceResponse.h:
        (WebCore::ResourceResponse::ResourceResponse):
        * platform/network/soup/ResourceResponse.h:
        (WebCore::ResourceResponse::ResourceResponse):
        * platform/network/win/ResourceResponse.h:
        (WebCore::ResourceResponse::ResourceResponse):

2014-09-04  Simon Fraser  <simon.fraser@apple.com>

        border-radius should not force layer backing store
        https://bugs.webkit.org/show_bug.cgi?id=136555

        Reviewed by Dean Jackson.
        
        Border-radius is not a reason to allocate backing store; it's not relevant unless
        we also have a border or background, and hasBoxDecorations() already checks for that.
        
        With that gone, we can now use renderer.hasBoxDecorations() (which also checks for
        a background), but it doesn't check for outlines, so do that in addition.

        Test: compositing/backing/border-radius-no-backing.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):

2014-09-04  Simon Fraser  <simon.fraser@apple.com>

        CSS filter on a compositing layer should not cause unncessary backing store allocation
        https://bugs.webkit.org/show_bug.cgi?id=136557

        Reviewed by Dean Jackson.
        
        Remove the style.hasFilter() check from hasBoxDecorations(), since filters aren't
        a box decoration. This allows creation of simple container layers with composited filters.

        Test: compositing/backing/filter-no-backing.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):

2014-09-04  Simon Fraser  <simon.fraser@apple.com>

        Improve the logic for compositing backing store avoidance
        https://bugs.webkit.org/show_bug.cgi?id=136556

        Reviewed by Dean Jackson.
        
        Avoid backing store allocation in more cases by improving the logic that detects
        whether a RenderLayer has any painted, non-layer descendent renderers.
        
        Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(),
        and make it recur 3 levels deep, walking child lists of up to 20 siblings looking
        for renderers that paint anything. Any renderer with box decorations paints;
        replaced elements paint, and non-whitespace text nodes paint. We can avoid
        making backing store when whitespace nodes are present only when user-select is none,
        since we have to ensure that there's backing store to paint the selection into.

        Tests: compositing/backing/inline-block-no-backing.html
               compositing/backing/whitespace-nodes-no-backing.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants().
        (WebCore::RenderLayer::hasBoxDecorationsOrBackground):
        (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced()
        rather than isReplaced(), since the latter includes inline-blocks.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer()
        logic in the root layer, since it always wants backing store.
        (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto.
        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes
        inline-block, so use isRenderReplaced() instead.

2014-09-04  Daniel Bates  <dabates@apple.com>

        [iOS] Fix the iOS build after <http://trac.webkit.org/changeset/173258>
        (https://bugs.webkit.org/show_bug.cgi?id=136494)

        Use ENABLE_TOUCH_EVENT instead of ENABLE(TOUCH_EVENT) as the latter isn't available
        to some clients of this private header.

        * platform/ios/wak/WAKResponder.h:

2014-09-04  Roger Fong  <roger_fong@apple.com>

        Increase number of maximum active WebGL contexts.
        https://bugs.webkit.org/show_bug.cgi?id=136551.
        <rdar://problem/18236425>

        Reviewed by Brent Fulgham.

        Test covered by Khronos conformance test:
        webgl/1.0.2/conformance/context/context-creation-and-destruction.html

        * platform/graphics/mac/GraphicsContext3DMac.mm:

2014-09-04  Roger Fong  <roger_fong@apple.com>

        Clicking on a select element should never hide the popup menu.
        https://bugs.webkit.org/show_bug.cgi?id=136548.
        <rdar://problem/10215926>

        Reviewed by Simon Fraser.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
        Never call hidePopup as a result of a click on a select element.
        The only way you can properly hide a popup is to click again or lose focus on the popup itself.

2014-09-04  Enrica Casucci  <enrica@apple.com>

        Remove PLATFORM(IOS) from WebCore/editing (Part 2).
        https://bugs.webkit.org/show_bug.cgi?id=136474

        Reviewed by Tim Horton.

        Removing some more PLATFORM(IOS) from the editing code.
        Most of these changes are fixes that were made for IOS but never merged
        to OpenSource.

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
        (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
        * editing/VisibleUnits.cpp:
        (WebCore::startOfDocument):
        (WebCore::endOfDocument):
        * editing/ios/EditorIOS.mm: No need for platform guard, this file is not built for Mac.

2014-09-03  Andy Estes  <aestes@apple.com>

        [Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
        https://bugs.webkit.org/show_bug.cgi?id=136521

        Reviewed by Anders Carlsson.

        * platform/ios/wak/WebCoreThread.h: Stopped defining WEBCORE_EXPORT.

2014-09-03  David Hyatt  <hyatt@apple.com>

        Initial letters should clear one another.
        https://bugs.webkit.org/show_bug.cgi?id=136514

        Reviewed by Simon Fraser.

        Added fast/css-generated-content/initial-letter-clearance.html.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
        Compute the required clearance and add it both to the block's logical height
        and to the logical top offset of the float.

        (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
        * rendering/RenderBlockFlow.h:
        A new method for determining the lowest floating initial letter.

2014-09-04  Joseph Pecoraro  <pecoraro@apple.com>

        Use WTFString::find(char) in more places
        https://bugs.webkit.org/show_bug.cgi?id=136541

        Reviewed by Daniel Bates.

        * Modules/plugins/YouTubePluginReplacement.cpp:
        (WebCore::queryKeysAndValues):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::parseAttribute):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::parametersForPlugin):
        * html/parser/XSSAuditor.cpp:
        (WebCore::XSSAuditor::decodedSnippetForAttribute):
        * page/UserContentURLPattern.cpp:
        (WebCore::UserContentURLPattern::parse):

2014-09-04  Antti Koivisto  <antti@apple.com>

        Try to fix iOS build.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::initForSynthesizedDocument):

2014-09-04  Maciej Stachowiak  <mjs@apple.com>

        Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
        https://bugs.webkit.org/show_bug.cgi?id=136527

        Reviewed by Alexey Proskuryakov.

        * WebCore.exp.in:
        * WebCore.order:
        * platform/ios/WebCoreSystemInterfaceIOS.mm:
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:

2014-09-04  Beth Dakin  <bdakin@apple.com>

        REGRESSION (r172832): Poor 2-finger scrolling performance at theverge.com articles 
        (all tiles repaint)
        https://bugs.webkit.org/show_bug.cgi?id=136433
        -and corresponding-
        rdar://problem/18193942

        Reviewed by Tim Horton.

        We should ensure that we are only setting scroll elasticity for layers that return 
        true for scrollsOverflow(). When overflow:scroll is set on the root element, we 
        wound up setting the ScrollElasticity for the root, which messed up with the 
        special way that the root is meant to scroll. Even though overflow:scroll has been 
        set on the root, scrollsOverflow() is still false because we knew not to set 
        hasOverflowClip() since it’s the root, which is why this check works.  
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):

        Really, we should have never even called RenderLayer::setHasVerticalScrollbar or 
        RenderLayer::setHasHorizontalScrollbar since it’s wrong to be creating a scrollbar 
        on RenderLayer for the root. We should make sure, in addition to the other 
        requirements consulted, that the renderer has an overflow clip before we create 
        the scrollbars.
        (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):

2014-09-04  Antti Koivisto  <antti@apple.com>

        Remove ResourceResponse::m_suggestedFilename
        https://bugs.webkit.org/show_bug.cgi?id=136534

        Reviewed by Alexey Proskuryakov.

        This will simplify things.

        * WebCore.exp.in:
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
        (WebCore::DocumentLoader::maybeLoadEmpty):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::willLoadMediaElementURL):
        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::ApplicationCacheStorage::loadCache):
        * loader/archive/ArchiveResource.cpp:
        (WebCore::ArchiveResource::create):
        * platform/network/BlobResourceHandle.cpp:
        (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
        (WebCore::BlobResourceHandle::notifyResponseOnError):
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::ResourceResponseBase):
        (WebCore::ResourceResponseBase::adopt):
        (WebCore::ResourceResponseBase::copyData):
        (WebCore::ResourceResponseBase::suggestedFilename):
        (WebCore::ResourceResponseBase::httpStatusText):
        (WebCore::ResourceResponseBase::setHTTPStatusText):
        (WebCore::ResourceResponseBase::httpHeaderField):
        (WebCore::ResourceResponseBase::setHTTPHeaderField):
        (WebCore::ResourceResponseBase::addHTTPHeaderField):
        (WebCore::ResourceResponseBase::httpHeaderFields):
        (WebCore::ResourceResponseBase::isAttachment):
        (WebCore::ResourceResponseBase::wasCached):
        (WebCore::ResourceResponseBase::connectionReused):
        (WebCore::ResourceResponseBase::setConnectionReused):
        (WebCore::ResourceResponseBase::connectionID):
        (WebCore::ResourceResponseBase::setConnectionID):

            Remove AllFields initialization. It was only used to get m_suggestedFilename.
            Rename CommonAndUncommonFields to AllFields

        (WebCore::ResourceResponseBase::setSuggestedFilename): Deleted.

            No more setter.

        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::platformSuggestedFileName):

            Get the suggested filename from the platform class on-demand.

        * platform/network/cf/ResourceResponse.h:
        (WebCore::ResourceResponse::ResourceResponse):

            Remove never-used file name constructor parameter.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::platformLazyInit):
        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::initNSURLResponse):

            Synthesize HTTP response properly so it can hold Content-Disposition for file name (and other headers).

        (WebCore::ResourceResponse::platformLazyInit):

            Don't pull the suggested filename anymore.

        (WebCore::ResourceResponse::platformSuggestedFilename):

            Get the suggested name from the (possibly synthetic) NSURLRequest.

2014-09-04  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        Remove CSS_FILTERS flag
        https://bugs.webkit.org/show_bug.cgi?id=136529

        Reviewed by Dirk Schulze.

        No new tests, no behaviour changed.

        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.cpp:
        * WebCore.exp.in:
        * bindings/js/JSCSSValueCustom.cpp:
        (WebCore::toJS):
        * bindings/objc/DOMCSS.mm:
        (kitClass):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForFilter):
        (WebCore::isLayoutDependent):
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSComputedStyleDeclaration.h:
        * css/CSSFilterImageValue.cpp:
        * css/CSSFilterImageValue.h:
        * css/CSSImageGeneratorValue.cpp:
        (WebCore::CSSImageGeneratorValue::image):
        (WebCore::CSSImageGeneratorValue::isFixedSize):
        (WebCore::CSSImageGeneratorValue::fixedSize):
        (WebCore::CSSImageGeneratorValue::isPending):
        (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
        (WebCore::CSSImageGeneratorValue::loadSubimages):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        (WebCore::CSSParser::parseGeneratedImage):
        (WebCore::CSSParser::parseFilterImage):
        (WebCore::CSSParser::parseFilter):
        * css/CSSParser.h:
        * css/CSSPropertyNames.in:
        * css/CSSValue.cpp:
        (WebCore::CSSValue::hasFailedOrCanceledSubresources):
        (WebCore::CSSValue::equals):
        (WebCore::CSSValue::cssText):
        (WebCore::CSSValue::destroy):
        (WebCore::CSSValue::cloneForCSSOM):
        * css/CSSValue.h:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::State::clear):
        (WebCore::StyleResolver::applyProperty):
        (WebCore::StyleResolver::generatedOrPendingFromValue):
        (WebCore::StyleResolver::loadPendingResources):
        * css/StyleResolver.h:
        * css/WebKitCSSFilterValue.cpp:
        * css/WebKitCSSFilterValue.h:
        * css/WebKitCSSFilterValue.idl:
        * loader/cache/CachedSVGDocumentReference.cpp:
        * loader/cache/CachedSVGDocumentReference.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollContentsFastPath):
        * page/animation/AnimationBase.cpp:
        (WebCore::AnimationBase::AnimationBase):
        * page/animation/AnimationBase.h:
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFilter):
        (WebCore::blendFunc):
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::reset):
        (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists):
        * page/animation/ImplicitAnimation.h:
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::KeyframeAnimation):
        (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists):
        * page/animation/KeyframeAnimation.h:
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::validateFilterOperations):
        * platform/graphics/GraphicsLayer.h:
        * platform/graphics/GraphicsLayerAnimation.cpp:
        (WebCore::applyFilterAnimation):
        (WebCore::GraphicsLayerAnimation::applyInternal):
        * platform/graphics/GraphicsLayerAnimation.h:
        * platform/graphics/IntRectExtent.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::propertyIdToString):
        (WebCore::supportsAcceleratedFilterAnimations):
        (WebCore::GraphicsLayerCA::filtersCanBeComposited):
        (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
        (WebCore::GraphicsLayerCA::setFilters):
        (WebCore::GraphicsLayerCA::addAnimation):
        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
        (WebCore::GraphicsLayerCA::updateFilters):
        (WebCore::GraphicsLayerCA::ensureStructuralLayer):
        (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
        (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/graphics/ca/PlatformCAAnimation.h:
        * platform/graphics/ca/PlatformCAFilters.h:
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
        * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
        (PlatformCAAnimationMac::setFromValue):
        (PlatformCAAnimationMac::setToValue):
        (PlatformCAAnimationMac::setValues):
        * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
        (PlatformCAFilters::animatedFilterPropertyName):
        * platform/graphics/ca/mac/PlatformCALayerMac.h:
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        (PlatformCALayerMac::clone):
        (PlatformCALayerMac::filtersCanBeComposited):
        * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
        (PlatformCAAnimationWin::setFromValue):
        (PlatformCAAnimationWin::setToValue):
        (PlatformCAAnimationWin::setValues):
        * platform/graphics/ca/win/PlatformCAAnimationWin.h:
        * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
        (PlatformCAFilters::animatedFilterPropertyName):
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        (PlatformCALayerWin::clone):
        * platform/graphics/ca/win/PlatformCALayerWin.h:
        * platform/graphics/filters/FilterOperation.cpp:
        * platform/graphics/filters/FilterOperation.h:
        * platform/graphics/filters/FilterOperations.cpp:
        * platform/graphics/filters/FilterOperations.h:
        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
        (WebCore::GraphicsLayerTextureMapper::setFilters):
        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
        * platform/graphics/texmap/TextureMapper.h:
        * platform/graphics/texmap/TextureMapperGL.cpp:
        (WebCore::TextureMapperGLData::TextureMapperGLData):
        (WebCore::prepareFilterProgram):
        (WebCore::TextureMapperGL::drawTexture):
        (WebCore::BitmapTextureGL::applyFilters):
        * platform/graphics/texmap/TextureMapperGL.h:
        * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
        (WebCore::BitmapTextureImageBuffer::applyFilters):
        * platform/graphics/texmap/TextureMapperImageBuffer.h:
        * platform/graphics/texmap/TextureMapperLayer.cpp:
        (WebCore::TextureMapperLayer::setAnimatedFilters):
        (WebCore::TextureMapperLayer::computeOverlapRegions):
        (WebCore::TextureMapperLayer::paintIntoSurface):
        (WebCore::TextureMapperLayer::setFilters):
        (WebCore::TextureMapperLayer::syncAnimations):
        * platform/graphics/texmap/TextureMapperLayer.h:
        (WebCore::TextureMapperLayer::hasFilters):
        * platform/graphics/texmap/TextureMapperShaderProgram.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::didChangeFilters):
        (WebCore::CoordinatedGraphicsLayer::setFilters):
        (WebCore::CoordinatedGraphicsLayer::syncFilters):
        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
        (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
        (WebCore::CoordinatedGraphicsScene::setLayerState):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
        * rendering/FilterEffectRenderer.cpp:
        * rendering/FilterEffectRenderer.h:
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::adjustStyleDifference):
        * rendering/RenderElement.h:
        (WebCore::RenderElement::hasFilter): Deleted.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::~RenderLayer):
        (WebCore::transparencyClipBox):
        (WebCore::RenderLayer::paintLayerContents):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::RenderLayerBacking):
        (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
        (WebCore::RenderLayerBacking::updateFilters):
        (WebCore::RenderLayerBacking::updateGeometry):
        (WebCore::RenderLayerBacking::startAnimation):
        (WebCore::RenderLayerBacking::startTransition):
        (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
        (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
        (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
        * rendering/RenderLayerFilterInfo.cpp:
        * rendering/RenderLayerFilterInfo.h:
        * rendering/RenderLayerModelObject.cpp:
        (WebCore::RenderLayerModelObject::styleWillChange):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::containerForRepaint):
        (WebCore::RenderObject::repaintUsingContainer):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::RenderView):
        * rendering/RenderView.h:
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::changeRequiresLayout):
        (WebCore::RenderStyle::changeRequiresLayerRepaint):
        * rendering/style/RenderStyle.h:
        * rendering/style/StyleFilterData.cpp:
        * rendering/style/StyleFilterData.h:
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::StyleRareNonInheritedData::hasFilters):
        * rendering/style/StyleRareNonInheritedData.h:
        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):

2014-09-04  Pratik Solanki  <psolanki@apple.com>

        Remove iOS specific disk image cache
        https://bugs.webkit.org/show_bug.cgi?id=136517

        Reviewed by Antti Koivisto.

        Disk image cache code unnecessarily complicates SharedBuffer implementation. We can remove
        this now since we don't enable it in WebKit2 on iOS.

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/ResourceBuffer.cpp:
        (WebCore::ResourceBuffer::isUsingDiskImageCache): Deleted.
        * loader/ResourceBuffer.h:
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::canUseDiskImageCache): Deleted.
        (WebCore::CachedImage::useDiskImageCache): Deleted.
        * loader/cache/CachedImage.h:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::isUsingDiskImageCache): Deleted.
        * loader/cache/CachedResource.h:
        (WebCore::CachedResource::canUseDiskImageCache): Deleted.
        (WebCore::CachedResource::useDiskImageCache): Deleted.
        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::TypeStatistic::addResource):
        (WebCore::MemoryCache::dumpStats):
        (WebCore::MemoryCache::dumpLRULists):
        (WebCore::MemoryCache::flushCachedImagesToDisk): Deleted.
        * loader/cache/MemoryCache.h:
        (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
        * loader/ios/DiskImageCacheClientIOS.h: Removed.
        * loader/ios/DiskImageCacheIOS.h: Removed.
        * loader/ios/DiskImageCacheIOS.mm: Removed.
        * platform/Logging.h:
        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::SharedBuffer):
        (WebCore::SharedBuffer::~SharedBuffer):
        (WebCore::SharedBuffer::data):
        (WebCore::SharedBuffer::append):
        (WebCore::SharedBuffer::buffer):
        (WebCore::SharedBuffer::getSomeData):
        (WebCore::SharedBuffer::isAllowedToBeMemoryMapped): Deleted.
        (WebCore::SharedBuffer::allowToBeMemoryMapped): Deleted.
        (WebCore::SharedBuffer::failedMemoryMap): Deleted.
        (WebCore::SharedBuffer::markAsMemoryMapped): Deleted.
        (WebCore::SharedBuffer::memoryMappedNotificationCallbackData): Deleted.
        (WebCore::SharedBuffer::memoryMappedNotificationCallback): Deleted.
        (WebCore::SharedBuffer::setMemoryMappedNotificationCallback): Deleted.
        * platform/SharedBuffer.h:
        (WebCore::SharedBuffer::isMemoryMapped): Deleted.
        * platform/cf/SharedBufferCF.cpp:
        (WebCore::SharedBuffer::SharedBuffer):
        * platform/mac/SharedBufferMac.mm:
        (-[WebCoreSharedBufferData length]):
        (-[WebCoreSharedBufferData bytes]):
        (WebCore::SharedBuffer::createCFData):
        (-[WebCoreSharedBufferData initWithMemoryMappedSharedBuffer:]): Deleted.

2014-09-04  Brian J. Burg  <burg@cs.washington.edu>

        LegacyProfiler: ProfileNodes should be used more like structs
        https://bugs.webkit.org/show_bug.cgi?id=136381

        Reviewed by Timothy Hatcher.

        * inspector/ScriptProfileNode.idl: Remove an unused property.

2014-09-04  Renato Nagy  <rnagy@inf.u-szeged.hu>

        Remove Qt cruft: MIMESniffing.cpp and MIMESniffing.h
        https://bugs.webkit.org/show_bug.cgi?id=136528

        Reviewed by Alexey Proskuryakov.

        * platform/network/MIMESniffing.cpp: Removed.
        * platform/network/MIMESniffing.h: Removed.

2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Introduce CSS_BASIC_SHAPES_TYPE_CASTS, and use it
        https://bugs.webkit.org/show_bug.cgi?id=136403

        Reviewed by Daniel Bates.

        toCSSBasicShapeFoo() will help to detect wrong type casting. So this patch generates it, and use it
        instead of static_cast<const CSSBasicShapeFoo*>().

        No new tests no behavior changes.

        * css/BasicShapeFunctions.cpp:
        (WebCore::basicShapeForValue):
        * css/CSSBasicShapes.cpp:
        (WebCore::CSSBasicShapeCircle::equals):
        (WebCore::CSSBasicShapeEllipse::equals):
        (WebCore::CSSBasicShapePolygon::equals):
        (WebCore::CSSBasicShapeInset::equals):
        * css/CSSBasicShapes.h:

2014-09-04  Daniel Bates  <dabates@apple.com>

        [iOS] Make iOS build when ENABLE_TOUCH_EVENT and ENABLE_IOS_TOUCH_EVENTS disabled
        https://bugs.webkit.org/show_bug.cgi?id=136494

        Reviewed by Andy Estes.

        * WebCore.exp.in: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. Also, sort this file using
        the script Tools/Scripts/sort-export-file.
        * bindings/js/JSDocumentCustom.cpp: Add ENABLE(TOUCH_EVENTS)-guard around headers JSTouch.h and JSTouchList.h.
        * page/ios/WebEventRegion.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS) since this
        code is specific to the iOS touch machinery.
        * page/scrolling/ScrollingCoordinator.cpp: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. 
        (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS).
        * platform/ios/ScrollAnimatorIOS.h: Add ENABLE(TOUCH_EVENTS) guard.
        * platform/ios/ScrollAnimatorIOS.mm:
        (WebCore::ScrollAnimatorIOS::ScrollAnimatorIOS): Ditto.
        * platform/ios/wak/WAKResponder.h: Ditto.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer): Add ENABLE(IOS_TOUCH_EVENTS) guard.
        (WebCore::RenderLayer::~RenderLayer): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS) since this
        code is specific to the iOS touch machinery.
        * rendering/RenderLayer.h: Add ENABLE(IOS_TOUCH_EVENTS) guard.

2014-09-04  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        REGRESSION(r173240) [GTK] Debug build broken.

        Unreviewed build fix after r173240.

        * dom/EventListenerMap.h: Add missing include.

2014-09-04  Dan Bernstein  <mitz@apple.com>

        Get rid of HIGH_DPI_CANVAS leftovers
        https://bugs.webkit.org/show_bug.cgi?id=136491

        Reviewed by Benjamin Poulain.

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::HTMLCanvasElement): Removed m_deviceScaleFactor initializer.
        (WebCore::HTMLCanvasElement::reset): Removed checking if the scale factor has changed and
        updating m_deviceScaleFactor.
        (WebCore::HTMLCanvasElement::convertLogicalToDevice): Removed scaling by the device scale
        factor.
        (WebCore::HTMLCanvasElement::convertDeviceToLogical): Ditto.
        (WebCore::HTMLCanvasElement::createImageBuffer): Replaced m_deviceScaleFactor with a literal
        1.
        (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Deleted.
        * html/HTMLCanvasElement.h: Removed m_deviceScaleFactor member variable and its getter.

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::putImageData): Removed scaling by the device scale
        factor.
        * html/canvas/CanvasRenderingContext2D.h:
        (WebCore::CanvasRenderingContext2D::webkitBackingStorePixelRatio): Changed to return 1.

        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::texImage2D): Replaced deviceScaleFactor() with 1.
        (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.

2014-09-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        XMLHttpRequest always defaults Content-Type to application/xml, while it should depend on data type
        https://bugs.webkit.org/show_bug.cgi?id=11049

        Reviewed by Darin Adler.

        Updated default mime type when sending text (changed from application/xml to text/plain;charset=UTF-8)
        Updated default mime type when sending document (set to application/xml;charset=UTF-8 for XML documents and text/html;charset=UTF-8 for HTML documents)

        Test: http/tests/xmlhttprequest/post-content-type-document.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send): updating default Content-Type valuess.

2014-09-02  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
        https://bugs.webkit.org/show_bug.cgi?id=136476

        Reviewed by Timothy Hatcher.

        No new tests. No behavior changed.

        * CMakeLists.txt:
        * WebCore.exp.in:
        * WebCore.order:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
        * bindings/js/ScriptCachedFrameData.cpp:
        (WebCore::ScriptCachedFrameData::restore):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::clearWindowShell):
        (WebCore::ScriptController::initScript):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::logError):
        * dom/Document.cpp:
        (WebCore::Document::addConsoleMessage):
        (WebCore::Document::addMessage):
        * inspector/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::muteConsole):
        (WebCore::PageDebuggerAgent::unmuteConsole):
        (WebCore::PageDebuggerAgent::breakpointActionLog):
        * inspector/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::muteConsole):
        (WebCore::PageRuntimeAgent::unmuteConsole):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::console):
        (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
        (WebCore::DOMWindow::close):
        (WebCore::DOMWindow::printErrorMessage):
        (WebCore::DOMWindow::pageConsole): Deleted.
        * page/DOMWindow.h:
        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/Page.h:
        * page/PageConsoleClient.cpp: Renamed from Source/WebCore/page/PageConsole.cpp.
        * page/PageConsoleClient.h: Renamed from Source/WebCore/page/PageConsole.h.
        * testing/Internals.cpp:
        (WebCore::Internals::consoleProfiles):
        * testing/Internals.h:
        * xml/XSLStyleSheetLibxslt.cpp:
        (WebCore::XSLStyleSheet::parseString):
        * xml/XSLTProcessorLibxslt.cpp:
        (WebCore::XSLTProcessor::parseErrorFunc):
        (WebCore::docLoaderFunc):

2014-09-03  Maciej Stachowiak  <mjs@apple.com>

        Fix a few leftovers from removing MIME-related WKSI usage
        https://bugs.webkit.org/show_bug.cgi?id=136513

        Reviewed by Alexey Proskuryakov.

        * WebCore.exp.in:
        * WebCore.order:
        * platform/ios/WebCoreSystemInterfaceIOS.mm:
        * platform/mac/WebCoreSystemInterface.mm:

2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Text caret changes to color of text in Mail and Notes
        https://bugs.webkit.org/show_bug.cgi?id=135904

        Reviewed by Simon Fraser.

        Consult with the background color of spans inside editable divs to determine what color
        the caret should be.

        Test: editing/caret/color-span-inside-editable.html

        * editing/FrameSelection.cpp:
        (WebCore::CaretBase::paintCaret):

2014-09-03  Tim Horton  <timothy_horton@apple.com>

        Fix the iOS build after r173230

        * WebCore.exp.in:

2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Remove unnecessary function from TextPainter
        https://bugs.webkit.org/show_bug.cgi?id=136497

        Reviewed by Simon Fraser.

        Function is never called.

        No new tests because there is no behavior change.

        * rendering/TextPainter.cpp:
        (WebCore::TextPainter::paintTextInContext): Deleted.
        * rendering/TextPainter.h:

2014-09-03  Anders Carlsson  <andersca@apple.com>

        Don't use DEPRECATED_DEFINE_STATIC_LOCAL for mutexes
        https://bugs.webkit.org/show_bug.cgi?id=136510

        Reviewed by Andreas Kling.

        Mutexes are intended to be used from multiple threads, and DEPRECATED_DEFINE_STATIC_LOCAL is not thread safe.

        * bindings/objc/DOMInternal.mm:
        (wrapperCacheLock):
        (getDOMWrapper):
        (addDOMWrapper):
        (removeDOMWrapper):
        Use LazyNeverDestroyed + std::call_once, and switch the mutex over to an std::mutex.

        * dom/EventListenerMap.cpp:
        (WebCore::EventListenerMap::assertNoActiveIterators):
        (WebCore::EventListenerIterator::EventListenerIterator):
        (WebCore::EventListenerIterator::~EventListenerIterator):
        (WebCore::activeIteratorCountMutex):
        (WebCore::EventListenerMap::EventListenerMap): Deleted.
        * dom/EventListenerMap.h:
        Use an std::atomic<int> instead of a mutex here.

2014-09-03  Enrica Casucci  <enrica@apple.com>

        Remove PLATFORM(IOS) from WebCore/editing (Part 1).
        https://bugs.webkit.org/show_bug.cgi?id=136474

        Reviewed by Tim Horton.

        This is the first part of the work to remove PLATFORM(IOS) everywhere
        in the editing code.

        * dom/Range.cpp:
        (WebCore::Range::create): Adding create function that takes VisiblePosition.
        * dom/Range.h:
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::apply):
        (WebCore::CompositeEditCommand::inputText):
        * editing/CompositeEditCommand.h:
        * editing/DeleteButton.h: No need for the platform guard since it is already under
        DELETION_UI
        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::enable):
        (WebCore::DeleteButtonController::disable):
        * editing/EditAction.h:
        * editing/EditCommand.h:
        (WebCore::EditCommand::isInsertTextCommand):
        * editing/Editor.cpp:
        (WebCore::ClearTextCommand::CreateAndApply):
        * editing/Editor.h:
        * editing/EditorCommand.cpp:
        (WebCore::executeClearText):
        (WebCore::enabledCopy):
        (WebCore::enabledCut):
        (WebCore::enabledClearText):
        (WebCore::createCommandMap):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::modifyExtendingRight):
        (WebCore::FrameSelection::modifyExtendingForward):
        (WebCore::FrameSelection::modifyMovingRight):
        (WebCore::FrameSelection::modifyMovingForward):
        (WebCore::FrameSelection::modifyExtendingLeft):
        (WebCore::FrameSelection::modifyExtendingBackward):
        (WebCore::FrameSelection::modifyMovingLeft):
        (WebCore::FrameSelection::modifyMovingBackward):
        * editing/InsertTextCommand.h:
        * editing/TextCheckingHelper.cpp:
        * editing/TextGranularity.h:
        * editing/VisiblePosition.h:
        (WebCore::operator>=):
        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
        * editing/VisibleUnits.cpp:
        * editing/VisibleUnits.h:

2014-09-03  Anders Carlsson  <andersca@apple.com>

        Get rid of some uses of OwnPtr
        https://bugs.webkit.org/show_bug.cgi?id=136503

        Reviewed by Sam Weinig.

        * dom/ElementRareData.cpp:
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::create): Deleted.
        * dom/MutationObserverRegistration.cpp:
        (WebCore::MutationObserverRegistration::create): Deleted.
        * dom/MutationObserverRegistration.h:
        * dom/Node.cpp:
        (WebCore::Node::materializeRareData):
        (WebCore::Node::didMoveToNewDocument):
        (WebCore::eventTargetDataMap):
        (WebCore::Node::eventTargetData):
        (WebCore::Node::ensureEventTargetData):
        (WebCore::Node::mutationObserverRegistry):
        (WebCore::Node::registerMutationObserver):
        (WebCore::Node::unregisterMutationObserver):
        (WebCore::Node::notifyMutationObserversNodeWillDetach):
        * dom/Node.h:
        * dom/NodeRareData.h:
        (WebCore::NodeListsNodeData::NodeListsNodeData):
        (WebCore::NodeRareData::NodeRareData):
        (WebCore::NodeRareData::clearNodeLists):
        (WebCore::NodeRareData::ensureNodeLists):
        (WebCore::NodeRareData::ensureMutationObserverData):
        (WebCore::NodeListsNodeData::create): Deleted.
        (WebCore::NodeMutationObserverData::create): Deleted.
        (WebCore::NodeRareData::create): Deleted.

2014-09-02  Maciej Stachowiak  <mjs@apple.com>

        Clean up naming for and slightly refactor legacy video fullscreen support
        https://bugs.webkit.org/show_bug.cgi?id=136446

        Reviewed by Jer Noble.

        Key changes:
        supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
        enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
        exitFullscreenForNode(Node*) --> exitVideoFullscreen()
        
        The old versions had unnecessary parameters, did not clearly distinguish their purpose
        from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
        Also changed many other places to use HTMLVideoElement* instead of Node* or 
        HTMLMediaElement* when they were in fact only used for video elements and would only
        work for such.

        The implications of this include a bunch of renaming in some iOS fullscreen code.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Rename m_isFullscreen flag to 
        m_isInVideoFullscreen, since it only covers the case of legacy video fullscreen,
        not element fullscreen.
        (WebCore::HTMLMediaElement::stop): ditto
        (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): ditto
        (WebCore::HTMLMediaElement::isFullscreen): ditto
        (WebCore::HTMLMediaElement::enterFullscreen): Rename m_isFullscreen flag to
        m_isInVideoFullscreen. Hoist video element check here from all supportsFullscrenForNode
        clients. Adjust for relevant ChromeClient refactorings.
        (WebCore::HTMLMediaElement::enterFullscreen): ditto above
        * html/HTMLMediaElement.h:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::supportsFullscreen): Adjust for relevant ChromeClient 
        refactorings.
        * page/ChromeClient.h:
        (WebCore::ChromeClient::supportsVideoFullscreen): Renamed from 
        supportsFullscreenForNode, and removed Node* parameter.
        (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): Renamed from
        enterFulscreenForNode and changed Node* parameter to HTMLVideoElement*.
        (WebCore::ChromeClient::exitVideoFullscreen): Renamed from 
        exitFullscreenForNode, and removed Node* parameter.
        * platform/ios/WebVideoFullscreenControllerAVKit.h:
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement;
        return a video element and not just a media element.
        (-[WebVideoFullscreenController dealloc]): Renamed _mediaElement data member
        to _videoElement and changed type accordingly.
        (-[WebVideoFullscreenController setVideoElement:]): Renamed from setMediaElement:
        and adjust parameter type accordingly.
        (-[WebVideoFullscreenController enterFullscreen:]): Video elements, not media
        elements.
        (-[WebVideoFullscreenController exitFullscreen]): ditto
        (-[WebVideoFullscreenController didCleanupFullscreen]): ditto
        * platform/ios/WebVideoFullscreenInterface.h:
        * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove gratuitous HTMLMEdiaElement.h include
        and fix declarations accordingly.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include WTFString.h
        * platform/ios/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.h.
        * platform/ios/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm.
        (WebVideoFullscreenModelVideoElement) Renamed from WebVideoFullscreenModelMediaElement
        (WebVideoFullscreenModelVideoElement::setVideoElement): Renamed from setMediaElement and
        change param type accordingly. Also no need to check for actual videoness of the element.
        (WebVideoFullscreenModelVideoElement::updateForEventName): Rename data member from m_mediaElement
        to m_videoElement and change type accordingly.
        (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): ditto
        (WebVideoFullscreenModelVideoElement::play): ditto
        (WebVideoFullscreenModelVideoElement::pause): ditto
        (WebVideoFullscreenModelVideoElement::togglePlayState): ditto
        (WebVideoFullscreenModelVideoElement::beginScrubbing): ditto
        (WebVideoFullscreenModelVideoElement::endScrubbing): ditto
        (WebVideoFullscreenModelVideoElement::seekToTime): ditto
        (WebVideoFullscreenModelVideoElement::fastSeek): ditto
        (WebVideoFullscreenModelVideoElement::beginScanningForward): ditto
        (WebVideoFullscreenModelVideoElement::beginScanningBackward): ditto
        (WebVideoFullscreenModelVideoElement::endScanning): ditto
        (WebVideoFullscreenModelVideoElement::requestExitFullscreen): ditto
        (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): ditto
        (WebVideoFullscreenModelVideoElement::setVideoLayerGravity): ditto
        (WebVideoFullscreenModelVideoElement::updateLegibleOptions): ditto
        * platform/mac/WebVideoFullscreenController.h:
        * platform/mac/WebVideoFullscreenController.mm:
        (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement
        and update return type accordingly.
        (-[WebVideoFullscreenController setVideoElement:]): Renamed from 
        setMediaElement and update return type accordingly.
        (-[WebVideoFullscreenController videoElementRect]): Renamed
        from mediaElementRect.
        (-[WebVideoFullscreenController enterFullscreen:]): Update for
        rename.
        (-[WebVideoFullscreenController exitFullscreen]): ditto
        (-[WebVideoFullscreenController updatePowerAssertions]): Rename
        member from _mediaElement to _videoElement
        (-[WebVideoFullscreenController _requestExit]): ditto
        * WebCore.exp.in: Adjust for function and class renames.
        * WebCore.xcodeproj/project.pbxproj: Adjust for file renames.

2014-09-03  Benjamin Poulain  <benjamin@webkit.org>

        Fix style invalidation of elements with multiple siblings dependencies
        https://bugs.webkit.org/show_bug.cgi?id=136472

        Reviewed by Andreas Kling.

        Previously, style invalidation of siblings was driven by a pair of flags:
        -ChildrenAffectedByDirectAdjacentRules.
        -ChildrenAffectedByForwardPositionalRules.

        When ChildrenAffectedByDirectAdjacentRules was set, the element after an element
        with "needsStyleRecalc" was also recomputed. While this work for pair of elements:
            a + b
        It does not work for more than that. For example, with
            a.propery + b + c
        When the state of <a> changes, the style of <b> was updated, which is useless. The style
        of <c> was untouched, which is incorrect.

        When ChildrenAffectedByForwardPositionalRules, all elements after one with "needsStyleRecalc"
        were invalidated. While more correct, it caused avalanche of style recalc and was not a very
        useful "optimization".

 
        To fix the correctness issues (e.g. "a + b + c"), I could have gone two ways:
        1) Invalidate the parent of a, b, c. The children would always get a correct style
           when their parent's style would be resolved.
        2) Create invalidation relations to enforce that the right siblings are invalidated.

        I have decided for a weak version of (2). The reason is that most DOM trees are very
        shallow while being very wide. Invalidating the parent generally causes massive style
        recalculation.

        To keep things simple for now, there is no explicit dependency list between siblings.
        Instead, each element has a pair of flag:
        1) The element's style depends on the state of a previous sibling.
        2) The element's state affects following siblings.

        With the notation "<-" for (1), "->" for (2), the selector "a + b + c" create this kind
        of marking:
            a  +  b  +  c
            ->    ->
                       <-

        When <a> is invalidated, the style resolver will go through the chain of dependent elements
        and invalidate any element that can be affected by a prior invalidation, here <c>.

        Overlaps are possible. For example with the two selector, "a + b + c", "b ~ d"
        the marking would be
            a  +  b  +  c  +  d
            ->    ->    ->
                       <-    <-

        A change in <a> would invalidate both <c> and <d>. This is overkill, but the end result
        is correct and it is a net improvement over the previous flags.


        As usual, the CSS JIT makes an effort at compile time to reduce tree marking. SelectorChecker
        marks everything as usual.

        Tests: fast/css/direct-adjacent-style-update-optimization.html
               fast/css/indirect-adjacent-style-update-optimization.html
               fast/css/non-matching-adjacent-style-update.html
               fast/selectors/first-of-type-direct-adjacent-style-update.html
               fast/selectors/first-of-type-sibling-style-update.html
               fast/selectors/id-direct-adjacent-style-update.html
               fast/selectors/id-sibling-style-update.html
               fast/selectors/nth-child-as-first-simple-selector-style-update.html
               fast/selectors/nth-child-direct-adjacent-style-update.html
               fast/selectors/nth-child-style-update.html

        * css/SelectorChecker.cpp:
        (WebCore::isFirstOfType):
        (WebCore::countElementsBefore):
        (WebCore::countElementsOfTypeBefore):
        Counting selectors are not unlike adjacent combinators, they are handled the exact same way.
        For example a :nth-child(4) would generate somewhat similar marking as
            :first-child + * + * + *

        Everything prior to the element with the counter affects the style of the element.

        (WebCore::hasScrollbarPseudoElement):
        The assertion was incorrect. You can get an scrollbar pseudo ID on an element without scrollbar.
        It will never match, but such case is possible.

        (WebCore::SelectorChecker::matchRecursively):
        (WebCore::SelectorChecker::checkOne):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::canShareStyleWithElement):
        Previously, any subtree affected by sibling selectors were unshareable. That was done by checking
        for Element::hasFlagsSetDuringStylingOfChildren().

        Now that sibling relation are local, they no longer prevent sharing of all children. Instead, we can
        test locally for subgroup with sibling relations.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::isAdjacentRelation):
        (WebCore::SelectorCompiler::shouldMarkStyleIsAffectedByPreviousSibling):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::markElementIfResolvingStyle):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle): Deleted.
        * dom/Document.cpp:
        (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
        * dom/Element.cpp:
        (WebCore::checkForSiblingStyleChanges):
        (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
        (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
        (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules): Deleted.
        * dom/Element.h:
        (WebCore::Element::affectsNextSiblingElementStyle):
        (WebCore::Element::setAffectsNextSiblingElementStyle):
        (WebCore::Element::setStyleIsAffectedByPreviousSibling):
        (WebCore::Element::childrenAffectedByPositionalRules): Deleted.
        (WebCore::Element::childrenAffectedByDirectAdjacentRules): Deleted.
        (WebCore::Element::childrenAffectedByForwardPositionalRules): Deleted.
        (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
        (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::ElementRareData):
        (WebCore::ElementRareData::resetDynamicRestyleObservations):
        (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules): Deleted.
        (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules): Deleted.
        * dom/Node.h:
        (WebCore::Node::styleIsAffectedByPreviousSibling):
        (WebCore::Node::flagAffectsNextSiblingElementStyle):
        (WebCore::Node::flagStyleIsAffectedByPreviousSibling):
        (WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag): Deleted.
        * html/HTMLElement.h:
        (WebCore::HTMLElement::isHTMLUnknownElement):
        * html/HTMLUnknownElement.h:
        * style/StyleResolveTree.cpp:
        (WebCore::Style::resetStyleForNonRenderedDescendants):
        (WebCore::Style::resolveTree):

2014-09-03  Simon Fraser  <simon.fraser@apple.com>

        Dump SimpleLineLayout info in showRenderTree() output
        https://bugs.webkit.org/show_bug.cgi?id=136489

        Reviewed by Zalan Bujtas.
        
        Include info about SimpleLineLayout to showRenderTree() output.
        
        Also show RenderText length, and truncate the RenderText contents
        to 80 chars (since the string is replicated in inline boxes or simple line layout output).

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::showLineTreeAndMark):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::showRenderObject):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::printPrefix):
        (WebCore::SimpleLineLayout::showLineTreeForFlow):
        * rendering/SimpleLineLayoutFunctions.h:

2014-09-03  Tim Horton  <timothy_horton@apple.com>

        iOS build fix after r173217 

        * platform/graphics/ios/FontServicesIOS.h:
        (WebCore::FontServicesIOS::capHeight):
        * platform/graphics/ios/FontServicesIOS.mm:
        (WebCore::FontServicesIOS::FontServicesIOS):
        This fixes the build, but I don't know if it's completely correct.

2014-09-03  Anders Carlsson  <andersca@apple.com>

        Get rid of DOMImplementationFront
        https://bugs.webkit.org/show_bug.cgi?id=136495

        Reviewed by Andreas Kling.

        DOMImplementationFront was used in a workaround for a GCC bug, and since we're building with clang
        on Mac this is no longer an issue.

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOMImplementationFront.cpp: Removed.
        * bindings/objc/DOMImplementationFront.h: Removed.
        Remove files.

        * bindings/objc/DOMUtility.mm:
        (JSC::createDOMWrapper):
        Remove call to implementationFront.

        * bindings/scripts/CodeGeneratorObjC.pm:
        (GetImplClassName):
        Remove DOMImplementation special case

        (AddIncludesForType):
        Ditto.

        (GenerateHeader):
        Use the class header name in the #import in the internal header.

        (GenerateImplementation):
        Remove DOMImplementation special case.

2014-09-03  Brent Fulgham  <bfulgham@apple.com>

        [Win] Improper release of unretained AVCFAssetResourceLoaderRef
        https://bugs.webkit.org/show_bug.cgi?id=136493
        <rdar://problem/18112559>

        Reviewed by Eric Carlson.

        Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
        RetainPtr. We don't hold onto this value or want to control its lifetime; we just
        want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.

        Use of the RetainPtr created a double-release and crash.

        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::AVFWrapper::createAssetForURL): 

2014-09-03  David Hyatt  <hyatt@apple.com>

        Add support for the initial-letter CSS property to first-letter
        https://bugs.webkit.org/show_bug.cgi?id=136484

        Reviewed by Dean Jackson.
        
        New tests in fast/css-generated-content/initial-letter-*.html

        This patch add support for the CSS initial-letter property, enabling
        better drop caps support in WebKit. Letters size to a specified number of
        paragraph lines, and align to the cap-height of the first line and the baseline
        of the last line.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        Add -webkit-initial-letter to the list.

        * css/CSSLineBoxContainValue.cpp:
        (WebCore::CSSLineBoxContainValue::customCSSText):
        * css/CSSLineBoxContainValue.h:
        Add support for a new value of line-box-contain, initial-letter, that causes
        lines to use cap-height above the baseline and the glyph bounds below the
        baseline.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        Add support for parsing of initial-letter.

        (WebCore::CSSParser::parseLineBoxContain):
        Add the new line-box-contain value for first-letters with initial-letter set.

        * css/CSSPropertyNames.in:
        Add the new initial-letter property.

        * css/CSSValueKeywords.in:
        Add the new initial-letter line-box-contain value.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyProperty):
        Map initial-letter into the RenderStyle.

        * platform/graphics/FontMetrics.h:
        (WebCore::FontMetrics::hasCapHeight):
        (WebCore::FontMetrics::floatCapHeight):
        (WebCore::FontMetrics::setCapHeight):
        (WebCore::FontMetrics::capHeight):
        * platform/graphics/ios/SimpleFontDataIOS.mm:
        (WebCore::SimpleFontData::platformInit):
        * platform/graphics/mac/SimpleFontDataMac.mm:
        (WebCore::SimpleFontData::platformInit):
        Add support for cap-height to the font system. iOS and Mac have been patched.
        Other platforms will need to add support for cap-height to get this feature.
        hasCapHeight() will return false for unsupported platforms for graceful
        degradation.

        * rendering/RenderBlock.cpp:
        (WebCore::styleForFirstLetter):
        Modified to check for initialLetterDrop/Height and to adjust the style
        accordingly (e.g., to apply float when needed).

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
        Code to adjust the float's position and margin to do cap-height alignment
        and sunken letters.

        * rendering/RenderBlockFlow.h:
        Remove the const from computeLogicalLocationForFloat, since the margin of the
        float can now be modified dynamically for sunken first-letters.

        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::ascentAndDescentForBox):
        Add support for initial-letter line-box-contain value.

        * rendering/RootInlineBox.h:
        Add the includeInitialLetterForBox method to support the new line-box-contain value.

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::changeRequiresLayout):
        * rendering/style/RenderStyle.h:
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        * rendering/style/StyleRareNonInheritedData.h:
        Normal maintenance stuff for addition of a new CSS property (making sure it is diffed
        properly for layout changes and copied on assignment, etc.)

2014-09-03  Brent Fulgham  <bfulgham@apple.com>

        [Win] Prevent double-release on AVCFURLAssetRef
        https://bugs.webkit.org/show_bug.cgi?id=136492
        <rdar://problem/18206746>

        Reviewed by Eric Carlson.

        The AVFWrapper::setAsset method needs to retain the passed argument, since it
        originates from AVCFPlayerItemGetAsset, which does not increment the
        reference count of its return value as expected by Cocoa Get/Create/Copy
        semantics.

        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::AVFWrapper::setAsset): Retain the passed argument.

2014-09-03  Dan Bernstein  <mitz@apple.com>

        Get rid of HIGH_DPI_CANVAS leftovers
        https://bugs.webkit.org/show_bug.cgi?id=136491

        Reviewed by Benjamin Poulain.

        * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
        and removed it from FEATURE_DEFINES.
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Removed #if ENABLE(HIGH_DPI_CANVAS)
        code.

2014-09-03  Joseph Pecoraro  <pecoraro@apple.com>

        Use StringBuilder append(char) and appendLiteral in more places
        https://bugs.webkit.org/show_bug.cgi?id=136470

        Reviewed by Andreas Kling.

        * Modules/indexeddb/IDBKeyData.cpp:
        (WebCore::IDBKeyData::loggingString):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::encodeProtocolString):
        * Modules/websockets/WebSocketExtensionDispatcher.cpp:
        (WebCore::WebSocketExtensionDispatcher::createHeaderValue):
        (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::clientLocation):
        (WebCore::WebSocketHandshake::clientHandshakeMessage):
        * css/CSSCalculationValue.cpp:
        (WebCore::buildCssText):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::cssText):
        * css/CSSMediaRule.cpp:
        (WebCore::CSSMediaRule::cssText):
        * css/CSSSelectorList.cpp:
        (WebCore::CSSSelectorList::selectorsText):
        * css/CSSSupportsRule.cpp:
        (WebCore::CSSSupportsRule::cssText):
        * css/MediaQuery.cpp:
        (WebCore::MediaQuery::serialize):
        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::generateUniquePrefix):
        * editing/markup.cpp:
        (WebCore::urlToMarkup):
        * fileapi/FileReaderLoader.cpp:
        (WebCore::FileReaderLoader::convertToDataURL):
        * html/EmailInputType.cpp:
        (WebCore::EmailInputType::sanitizeValue):
        * html/FormController.cpp:
        (WebCore::recordFormStructure):
        * html/parser/XSSAuditorDelegate.cpp:
        (WebCore::buildConsoleError):
        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::collectCueText):
        * mathml/MathMLMencloseElement.cpp:
        (WebCore::MathMLMencloseElement::longDivLeftPadding):
        * page/PageSerializer.cpp:
        (WebCore::SerializerMarkupAccumulator::appendElement):
        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::toRawString):
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::logThreadedScrollingMode):
        * platform/PODInterval.h:
        (WebCore::PODInterval::toString):
        * platform/PODRedBlackTree.h:
        (WebCore::PODRedBlackTree::dumpFromNode):
        * platform/UUID.cpp:
        (WebCore::createCanonicalUUIDString):
        * platform/network/ProxyServer.cpp:
        (WebCore::appendProxyServerString):
        (WebCore::toString):
        * platform/text/DateTimeFormat.cpp:
        (WebCore::DateTimeFormat::quoteAndAppendLiteral):
        * platform/text/PlatformLocale.cpp:
        (WebCore::DateTimeStringBuilder::zeroPadString):
        (WebCore::Locale::convertFromLocalizedNumber):
        * platform/text/TextStream.cpp:
        (WebCore::TextStream::operator<<):
        * rendering/RenderListMarker.cpp:
        (WebCore::listMarkerText):
        * testing/Internals.cpp:
        (WebCore::Internals::parserMetaData):
        (WebCore::Internals::getCurrentCursorInfo):

2014-09-03  Bear Travis  <betravis@adobe.com>

        [CSS Font Loading] Enable Page Caching
        https://bugs.webkit.org/show_bug.cgi?id=136044

        Reviewed by Andreas Kling.

        Modifying FontLoader to track fonts loaded via the loadFont
        method as well as via CSS rules. Fonts loaded via loadFont are
        tracked in m_numLoadingFromJS, while fonts loaded via CSS rules
        are tracked in m_numLoadingFromCSS. The page is cacheable when no
        fonts are currently loading.

        Added fast/css/fontloader-page-cache.html

        * css/FontLoader.cpp:
        (WebCore::LoadFontCallback::create): Modified to take and store
        the number of fonts it will be loading.
        (WebCore::LoadFontCallback::createFromParams): Ditto.
        (WebCore::LoadFontCallback::familyCount): Getter for number of
        fonts loaded via this callback.
        (WebCore::LoadFontCallback::LoadFontCallback):
        (WebCore::LoadFontCallback::notifyLoaded): Callback the FontLoader
        to let it update its count when all the fonts have finished loading.
        (WebCore::FontLoader::loadFontDone): Ditto.
        (WebCore::FontLoader::FontLoader):
        (WebCore::FontLoader::beginFontLoading): Track the number of fonts
        loading.
        (WebCore::FontLoader::fontLoaded): Ditto.
        (WebCore::FontLoader::loadError): Ditto.
        (WebCore::FontLoader::loadFont):
        * css/FontLoader.h:
        (WebCore::FontLoader::loading):

2014-08-29  Gavin Barraclough  <barraclough@apple.com>

        Simplify DOMTimer::adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
        https://bugs.webkit.org/show_bug.cgi?id=136402

        Reviewed by Andreas Kling.

        When the minimum DOM timer interval changes, the Page updates all DOMTimers accordingly.
        Updating the fire/repeat interval on TimerBase requires a delta, but in
        DOMTimer::adjustMinimumTimerInterval we have the new requested interval. In the case of
        timers we can get the current interval to calculate the delta by calling repeatInterval(),
        but in the case of one-shot timers neither TimerBase nor DOMTimer have store the interval
        that was actually set for the timer (DOMTimer knows the original, unadjusted timer, but
        not the actual interval). The way this currently works is that when the minimum interval
        changes, Page calls adjustMinimumTimerInterval providing the previous minimum. If the
        timer is one-shot, then adjustMinimumTimerInterval will use this to compute the delta
        based on what the interval would have been.

        We can simplify & unify with the code to throttle interval timers when the nesting
        threshold is hit, by instead tracking the current timer interval as a member on DOMTimer &
        using this to compute the delta in all cases.

        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
            - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::DOMTimer):
            initialize m_currentTimerInterval
        (WebCore::DOMTimer::fired):
            - when the nesting level changes (potentially triggering throttling) just call updateTimerIntervalIfNecessary
        (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
            - compute delta based on m_currentTimerInterval
        (WebCore::DOMTimer::intervalClampedToMinimum):
            - this now always takes m_originalInterval and scriptExecutionContext()->minimumTimerInterval()
              as its inputs, so remove arguments.
        (WebCore::DOMTimer::adjustMinimumTimerInterval): Deleted.
            - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
        * page/DOMTimer.h:
            - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary, added m_currentTimerInterval

2014-09-03  Daniel Bates  <dabates@apple.com>

        [XSLT] Make WebKit build when XSLT is disabled
        https://bugs.webkit.org/show_bug.cgi?id=136471

        Reviewed by Simon Fraser.

        Fixes a Clang compiler warning that file-static function WebCore::hasNoStyleInformation is unused.
        This function is only called from ENABLE(XSLT)-guarded code. So, add a ENABLE(XSLT)-guard around
        WebCore::hasNoStyleInformation().

        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::hasNoStyleInformation):

2014-09-02  Brian J. Burg  <burg@cs.washington.edu>

        LegacyProfiler: remove redundant ProfileNode members and other cleanup
        https://bugs.webkit.org/show_bug.cgi?id=136380

        Reviewed by Timothy Hatcher.

        Remove Profile.idleTime, rename head to rootNode, and remove ProfileNode members.

        Covered by existing tests.

        * inspector/ScriptProfile.idl:
        * inspector/ScriptProfileNode.idl:
        * inspector/TimelineRecordFactory.cpp:

2014-09-02  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: remove ProfilerAgent and legacy profiler files in the frontend
        https://bugs.webkit.org/show_bug.cgi?id=136462

        Reviewed by Timothy Hatcher.

        It's not used by the frontend anymore.

        No new tests, no behavior changed.

        * CMakeLists.txt:
        * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Removed.
        * WebCore.order:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * inspector/InspectorAllInOne.cpp:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        * inspector/InspectorController.h:
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
        * inspector/InstrumentingAgents.cpp:
        (WebCore::InstrumentingAgents::InstrumentingAgents):
        (WebCore::InstrumentingAgents::reset):
        * inspector/InstrumentingAgents.h:
        (WebCore::InstrumentingAgents::inspectorProfilerAgent): Deleted.
        (WebCore::InstrumentingAgents::setInspectorProfilerAgent): Deleted.
        * inspector/PageProfilerAgent.cpp: Removed.
        * inspector/PageProfilerAgent.h: Removed.
        * inspector/TimelineRecordFactory.cpp: Moved these builders to their only callsite.
        (WebCore::buildInspectorObject):
        (WebCore::buildProfileInspectorObject):
        (WebCore::TimelineRecordFactory::appendProfile):
        * inspector/WebProfilerAgent.cpp: Removed.
        * inspector/WebProfilerAgent.h: Removed.
        * inspector/WorkerInspectorController.cpp:
        (WebCore::WorkerInspectorController::WorkerInspectorController):
        * inspector/WorkerProfilerAgent.cpp: Removed.
        * inspector/WorkerProfilerAgent.h: Removed.
        * inspector/protocol/Timeline.json:

2014-09-02  Jer Noble  <jer.noble@apple.com>

        [EME][Mac] Refactor CDMPrivateMediaSourceAVFObjC to allow sessions to be created without being attached to an AVStreamDataParser.
        https://bugs.webkit.org/show_bug.cgi?id=136016

        Reviewed by Eric Carlson.

        The CDMPrivateMediaPlayer class will delegate creation of CDMSession instances to the current MediaPlayer. This
        of course requires the MediaKeys object owning the CDM to be attached to a HTMLMediaElement, and specifically to
        one with a valid src attribute or source node which has sucessfully begun loading. For certain CDM operations,
        it would be better if a given MediaKeys could create a session without actually being connected to a
        HTMLMediaElement (yet).

        To facilitate this for CDMSessionPrivateMediaSourceAVFObjC, add a new class, CDMPrivateMediaSourceAVFObjC, which
        is the primary factory for CDMSessionPrivateMediaSOurceAVFObjC. Disclaim responsibility for creating these sessions
        in MediaPlayerPrivateMediaSourceAVFObjC by not passing the "supportsKeySystem" method when registering itself.

        Add methods to CDMSessionPrivateMediaSourceAVFObjC to allow SourceBuffers to be added and removed from the session,
        to support adding the session to the HTMLMediaElement after the session has been created.

        Since MediaPlayerPrivate instance and  CDMSession instances must be able to communicate with one another, add a type()
        enum and virtual method to allow CDMSession instnaces to be distinguisted from (and casted to) one another.

        * Modules/encryptedmedia/CDM.cpp:
        (WebCore::installedCDMFactories): Register CDMPrivateMediaSourceAVFObjC.
        (WebCore::CDM::createSession): Notify the MediaPlayer of the new CDMSession.
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::setMediaElement): Notify the HTMLMediaElement of any existing sessions.
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/CDMSession.h:
        (WebCore::CDMSession::type): Added.
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setCDMSession): Pass through to the MediaPlayerPrivate.
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::setCDMSession): Added. Default no-op.
        * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: Added.
        (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Simple constructor.
        (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Simple destructor.
        (WebCore::CDMPrivateMediaSourceAVFObjC::create): Simple factory.
        (WebCore::CDMPrivateMediaSourceAVFObjC::cdm): Simple accessor.
        * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: 
        (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Moved from MediaPlayerPrivateMediaSourceAVFObjC.
        (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType): Ditto.
        (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Ditto.
        (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Returns new CDMSessionMediaSourceAVFObjC.
        * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
        (WebCore::CDMSessionAVFoundationObjC::type): Added.
        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
        (WebCore::CDMSessionMediaSourceAVFObjC::type): Added.
        (WebCore::toCDMSessionMediaSourceAVFObjC): Throw assertion if type() is not correct.
        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
        (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Removed m_parent ivar.
        (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Ditto.
        (WebCore::CDMSessionMediaSourceAVFObjC::update): Determing which SourceBuffer is protected.
        (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Added.
        (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Added.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Remove supportsKeyType parameter.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Remove keyType check.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Tell the CDMSession about outstanding SourceBuffers.
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:

2014-09-02  Daniel Bates  <dabates@apple.com>

        [Win] Attempt to fix the Windows build after <http://trac.webkit.org/changeset/173192>
        (https://bugs.webkit.org/show_bug.cgi?id=136467)

        Declare ResourceHandleClient::connectionProperties() when building for iOS or when USE(CFNETWORK).

        * platform/network/ResourceHandleClient.h:

2014-09-02  Daniel Bates  <dabates@apple.com>

        [iOS] Support using Foundation networking code
        https://bugs.webkit.org/show_bug.cgi?id=136467

        Reviewed by Pratik Solanki.

        We should support building iOS WebKit with the Foundation networking code
        (i.e. !USE(CFNETWORK)).

        Additionally, disable USE(CFNETWORK) and use the Foundation networking code
        by default when building iOS WebKit without the Apple Internal SDK.

        * Configurations/WebCore.xcconfig: Remove file WebCoreURLResponse.mm from the list of excluded files
        so that we compile an implementation for function WebCore::synthesizeRedirectResponseIfNecessary when
        building without USE(CFNETWORK).
        * WebCore.exp.in: Add symbols for WebCore::synthesizeRedirectResponseIfNecessary() and WebCore::ResourceHandleClient::willCacheResponseAsync().
        * WebCore.xcodeproj/project.pbxproj: Add new files CFNetworkConnectionCacheSPI.h and CFURLRequestSPI.h.
        Also move group platform/spi such that it appears in alphabetical order in the platform group.
        * platform/cf/URLCF.cpp: Remove unnecessary header <CoreFoundation/CFPriv.h>.
        * platform/network/ResourceHandle.h: Declare iOS-specific variant of ResourceHandle::createNSURLConnection().
        * platform/network/ResourceHandleClient.h: Always include header <wtf/RetainPtr.h> when building for iOS.
        (WebCore::ResourceHandleClient::connectionProperties): Add PLATFORM(IOS)-guard around declaration.
        * platform/network/cf/ResourceRequestCFNet.cpp: Substitute header CFNetworkConnectionCacheSPI.h for
        <CFNetwork/CFNetworkConnectionCachePriv.h>.
        * platform/network/mac/CredentialStorageMac.mm:
        (WebCore::CredentialStorage::saveToPersistentStorage): Use Credential::nsCredential() and ProtectionSpace::nsSpace()
        instead of WebCore::mac(const {Credential, ProtectionSpace}&) as the latter were removed in <http://trac.webkit.org/changeset/171801>
        and <http://trac.webkit.org/changeset/171540>, respectively.
        * platform/network/mac/ResourceErrorMac.mm: Add USE(CFNETWORK)-guard around <CFNetwork/CFSocketStreamPriv.h>.
        * platform/network/mac/ResourceHandleMac.mm: Substitute header CFURLRequestSPI.h for <CFNetwork/CFURLRequest.h>.
        (WebCore::ResourceHandle::start): Modified to use ResourceHandle::makeDelegate() instead of d->m_proxy, which 
        was removed in <http://trac.webkit.org/changeset/147476>.
        (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
        * platform/network/mac/WebCoreURLResponse.mm:
        (WebCore::synthesizeRedirectResponseIfNecessary): Add !USE(CFNETWORK)- and PLATFORM(IOS)- guards.
        * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Added.
        * platform/spi/cf/CFURLRequestSPI.h: Added.

2014-09-02  Myles C. Maxfield  <mmaxfield@apple.com>

        Use references in public EventSender functions
        https://bugs.webkit.org/show_bug.cgi?id=136463

        Reviewed by Dan Bates.

        Passing nullptr to EventSender shouldn't be allowed.

        No new tests because there is no behavior change.

        * dom/EventSender.h:
        (WebCore::EventSender::hasPendingEvents):
        (WebCore::EventSender<T>::dispatchEventSoon):
        (WebCore::EventSender<T>::cancelEvent):
        (WebCore::EventSender<T>::dispatchPendingEvents):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::~HTMLLinkElement):
        (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::~HTMLStyleElement):
        (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::~ImageLoader):
        (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent):
        (WebCore::ImageLoader::updateFromElement):
        (WebCore::ImageLoader::notifyFinished):
        (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):

2014-09-02  Daniel Bates  <dabates@apple.com>

        [iOS] Exclude touch and gesture files when building without ENABLE_TOUCH_EVENTS
        and ENABLE_IOS_GESTURE_EVENTS, respectively
        https://bugs.webkit.org/show_bug.cgi?id=136456

        Reviewed by Andy Estes.

        It's sufficient to exclude the touch and gesture files when building without
        ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS, respectively. Currently we
        exclude these files when building without the Apple Internal SDK, which is
        heavy handed.

        * Configurations/WebCore.xcconfig:

2014-09-02  Simon Fraser  <simon.fraser@apple.com>

        Fix an assertion sometimes seen under RenderLayerCompositor::detachRootLayer()
        https://bugs.webkit.org/show_bug.cgi?id=136464

        Reviewed by Tim Horton.

        Don't try to call RenderLayer::isVisuallyNonEmpty() under RenderLayerCompositor::detachRootLayer()
        when layout might be stale; there's not point trying to update the backing store state
        when detaching, only when attaching.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):

2014-09-02  Simon Fraser  <simon.fraser@apple.com>

        Avoid backing store allocation with some combinations of replaced elements, masking and visibility:hidden
        https://bugs.webkit.org/show_bug.cgi?id=136400

        Reviewed by Tim Horton.
        
        RenderLayer::isVisuallyNonEmpty() would return true for replaced elements (e.g. images)
        with visibility:hidden, and for layers with a mask, and both would cause additional
        backing store in some cases.
        
        We can move the hasVisibleContent() to the top of the function, since visibility:hidden
        will always hide any content of this layer. The hasMask() check can also be removed;
        a mask can only mask content that is already visible; it never contributes additional
        pixels.

        Tests: compositing/backing/masked-child-no-backing.html
               compositing/backing/replaced-child-no-backing.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):

2014-09-02  Joseph Pecoraro  <pecoraro@apple.com>

        Use jsNontrivialString for strings we know are more than a single character
        https://bugs.webkit.org/show_bug.cgi?id=136393

        Reviewed by Geoffrey Garen.

        * bindings/js/JSCryptoKeySerializationJWK.cpp:
        (WebCore::addUsagesToJSON):

2014-09-02  Alex Christensen  <achristensen@webkit.org>

        Fix bindings tests after r173176.
        https://bugs.webkit.org/show_bug.cgi?id=136460

        Reviewed by Simon Fraser.

        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        * bindings/scripts/test/JS/JSTestException.cpp:
        * bindings/scripts/test/JS/JSTestException.h:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        * bindings/scripts/test/JS/JSTestNode.cpp:
        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
        * bindings/scripts/test/JS/JSTestNondeterministic.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        * bindings/scripts/test/JS/JSTestObj.h:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        * bindings/scripts/test/JS/JSattribute.cpp:
        * bindings/scripts/test/JS/JSattribute.h:
        * bindings/scripts/test/JS/JSreadonly.cpp:
        * bindings/scripts/test/JS/JSreadonly.h:
        * bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
        * bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
        * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
        * bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
        * bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
        * bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
        * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
        * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h:
        * bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
        * bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
        * bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
        * bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
        * bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h:
        * bindings/scripts/test/ObjC/DOMTestObjInternal.h:
        * bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
        * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
        * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
        * bindings/scripts/test/ObjC/DOMattributeInternal.h:
        * bindings/scripts/test/ObjC/DOMreadonlyInternal.h:
        Added new WEBCORE_EXPORT macros.

2014-09-02  Simon Fraser  <simon.fraser@apple.com>

        Non-composited child RenderLayers cause allocation of unncessary backing store
        https://bugs.webkit.org/show_bug.cgi?id=136375

        Reviewed by David Hyatt.
        
        A composited element that has non-composited descendant elements that fall into
        RenderLayers was getting backing store when none was required. descendentLayerPaintsIntoAncestor()
        was simply checking the "visibility:visible" bit on descendant non-composited layers,
        instead of actually asking them if they have any visual content.
        
        Added a couple of FIXME comments.

        Test: compositing/backing/child-layer-no-backing.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::descendentLayerPaintsIntoAncestor):

2014-09-02  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r173175.
        https://bugs.webkit.org/show_bug.cgi?id=136454

        it broke debug builds (Requested by jessieberlin on #webkit).

        Reverted changeset:

        "Introduce CSS_BASIC_TYPE_CASTS, and use it"
        https://bugs.webkit.org/show_bug.cgi?id=136403
        http://trac.webkit.org/changeset/173175

2014-09-02  Alex Christensen  <achristensen@webkit.org>

        More use of WEBCORE_EXPORT.

        Reviewed by Darin Adler.

        These changes from a patch attached to https://bugs.webkit.org/show_bug.cgi?id=136172
        contain more deployment of the WEBCORE_EXPORT macro. As of this writing, the macro is
        defined to do nothing, so landing these is a harmless way to get closer to be the point
        where we can throw the switch to use these instead of explicit export files on OS X,
        iOS, and Windows.

        * bindings/js/JSDOMBinding.h:
        * bindings/js/JSDOMGlobalObject.h:
        * bindings/js/JSDOMWindowBase.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        * bindings/scripts/CodeGeneratorObjC.pm:
        (GenerateHeader):
        * bridge/runtime_method.cpp:
        * bridge/runtime_object.cpp:
        * dom/Document.h:
        * dom/Element.h:
        * dom/Position.h:
        * dom/Range.h:
        * dom/StaticNodeList.h:
        * dom/make_names.pl:
        (printInit):
        (printNamesCppFile):
        * editing/Editor.h:
        * editing/FrameSelection.h:
        * editing/TextIterator.h:
        * inspector/InspectorFrontendClient.h:
        * inspector/InspectorFrontendClientLocal.h:
        * loader/DocumentLoader.h:
        * loader/FrameLoader.h:
        * loader/cache/MemoryCache.h:
        * loader/cocoa/DiskCacheMonitorCocoa.h:
        * loader/mac/LoaderNSURLExtras.h:
        * page/Page.h:
        * page/PageGroup.h:
        * page/SecurityPolicy.h:
        * page/Settings.h:
        * page/make_settings.pl:
        (printGetterAndSetter):
        * page/scrolling/ScrollingStateScrollingNode.h:
        * platform/CrossThreadCopier.h:
        * platform/LocalizedStrings.h:
        * platform/MemoryPressureHandler.cpp:
        * platform/PlatformScreen.h:
        * platform/PublicSuffix.h:
        * platform/graphics/Gradient.h:
        * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
        * platform/graphics/filters/FilterOperation.h:
        * platform/ios/WebVideoFullscreenControllerAVKit.h:
        * platform/mac/PlatformEventFactoryMac.h:
        * platform/mac/WebCoreFullScreenPlaceholderView.h:
        * platform/mac/WebCoreFullScreenWindow.h:
        * platform/mac/WebCoreNSStringExtras.h:
        * platform/mac/WebCoreObjCExtras.h:
        * platform/mac/WebFontCache.h:
        * platform/mac/WebVideoFullscreenController.h:
        * platform/mac/WebWindowAnimation.h:
        * platform/network/BlobRegistryImpl.h:
        * platform/network/CredentialStorage.h:
        * platform/network/PlatformCookieJar.h:
        * platform/network/ProxyServer.h:
        * platform/sql/SQLiteStatement.h:
        * platform/text/TextEncoding.h:
        * rendering/HitTestResult.h:
        * rendering/RenderTreeAsText.h:
        * testing/Internals.h:
        Add many more correct uses of WEBCORE_EXPORT; remove a few incorrect ones.

2014-09-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Introduce CSS_BASIC_TYPE_CASTS, and use it
        https://bugs.webkit.org/show_bug.cgi?id=136403

        Reviewed by Darin Adler.

        toCSSBasicFoo() will help to detect wrong type casting. So this patch generates it, and use it
        instead of static_cast<const CSSBasicFoo*>().

        No new tests no behavior changes.

        * css/BasicShapeFunctions.cpp:
        (WebCore::basicShapeForValue):
        * css/CSSBasicShapes.cpp:
        (WebCore::CSSBasicShapeCircle::equals):
        (WebCore::CSSBasicShapeEllipse::equals):
        (WebCore::CSSBasicShapePolygon::equals):
        (WebCore::CSSBasicShapeInset::equals):
        * css/CSSBasicShapes.h:

2014-09-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        CachedResourceLoader should check redirections to reuse or not cached resources
        https://bugs.webkit.org/show_bug.cgi?id=131757

        Reviewed by Antti Koivisto.

        Added cache-control redirection check to properly determine revalidation policy.
        Tightened redirection cache-control header check by testing for no-cache and must-revalidate directives.
        Added redirection freshness check.

        Test: http/tests/cache/cache-redirections.html

        * loader/cache/CachedRawResource.cpp:
        (WebCore::CachedRawResource::canReuse): Removed redirection check (now handled by CachedResource::redirectChainAllowsReuse).
        * loader/cache/CachedResource.cpp:
        (WebCore::currentAge): Moved from WebCore::CachedResource::currentAge method to static function. Added response and responseTimestamp as parameters.
        (WebCore::CachedResource::CachedResource): Initialized redirection chain status (no redirection and expiracy date set to never).
        (WebCore::CachedResource::isExpired): Updated according new currentAge/freshnessLifetime method parameters.
        (WebCore::CachedResource::freshnessLifetime): Added response as parameter.
        (WebCore::CachedResource::willSendRequest): Computes whether a redirection can be cached, and if cached for how long it will remain fresh.
        (WebCore::CachedResource::redirectChainAllowsReuse): Return false if any of the redirection in the redirection chain cannot be cached or expired. 
        * loader/cache/CachedResource.h: Added cache chain member that stores whether the redirection chain can be cached and if so when it will be expired.
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::determineRevalidationPolicy): Added check of the redirection chain.

2014-09-02  Daewoong Jang  <daewoong.jang@navercorp.com>

        Prevent decoded images from being destroyed when they're in use.
        https://bugs.webkit.org/show_bug.cgi?id=136259.

        Reviewed by Darin Adler.

        Try to fix a regression introduced by r172790. Before the patch,
        CachedImage does not release its Image object if it still has clients.
        However this behavior was changed due to removal of CachedResource::isSafeToMakePurgeable(),
        which implied a call to CachedResource::hasClients(). This patch restores
        the behavior by adding a check to hasClients() in CachedImage::destroyDecodedData().

        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::destroyDecodedData):

2014-09-01  Tim Horton  <timothy_horton@apple.com>

        RenderThemeMac::paintProgressBar creates a buffer without respecting the destination's acceleration setting
        https://bugs.webkit.org/show_bug.cgi?id=136427

        Reviewed by Dan Bernstein.

        No new tests, just a performance improvement.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintProgressBar):

2014-09-01  Tim Horton  <timothy_horton@apple.com>

        Remove an unnecessary local in GraphicsLayerCA::ensureStructuralLayer
        https://bugs.webkit.org/show_bug.cgi?id=136426

        Reviewed by Dan Bernstein.

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::ensureStructuralLayer):
        This was here so that we could call PlatformCALayerClient::platformLayerChanged,
        but that no longer exists!

2014-08-29  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Resolved value of grid-template-* must include every track listed
        https://bugs.webkit.org/show_bug.cgi?id=136362

        Reviewed by Darin Adler.

        Section 5.1.5 of the specs clearly states that the resolved value
        for grid-template-* must include every listed track, whether
        explicitly or implicitly created. We were only listing the
        explicit grid tracks.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForGridTrackList):

2014-09-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
        https://bugs.webkit.org/show_bug.cgi?id=136194

        Reviewed by Csaba Osztrogonác.

        Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt.

        * CMakeLists.txt:

2014-08-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Unreviewed, fix build break on EFL and GTK since r173152.

        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::platformInit): Remove a bool parameter because it was removed from function's declaration.

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        Remove GraphicsContext constructor that takes shouldUseContextColors
        https://bugs.webkit.org/show_bug.cgi?id=136421

        Reviewed by Dan Bernstein.

        * WebCore.exp.in:
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::GraphicsContext):
        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContextState::GraphicsContextState):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::platformInit):
        (WebCore::GraphicsContext::drawLinesForText):
        As far as I can tell, the last user of this constructor died with WebNSStringDrawing.
        Adjust all code to assume shouldUseContextColors=true.

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        Remove unused ARMv6-specific #if branches in WebCore::canHyphenate
        https://bugs.webkit.org/show_bug.cgi?id=136420

        Reviewed by Dan Bernstein.

        * platform/text/cf/HyphenationCF.cpp:
        (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForNullKey):
        Use kCFAllocatorDefault instead of 0.

        (WebCore::canHyphenate):
        Remove ARMv6-specific code.

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
        https://bugs.webkit.org/show_bug.cgi?id=136416

        Reviewed by Dan Bernstein.

        * WebCore.exp.in:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::setStrokeAndFillColor): Deleted.
        Remove.

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        Remove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs
        https://bugs.webkit.org/show_bug.cgi?id=136413

        Reviewed by Dan Bernstein.

        No new tests, just cleanup.

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawRaisedEllipse):
        There's nothing iOS specific about this function.

        * platform/graphics/GraphicsContext.h:
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::drawEllipse):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawEllipse):
        Un-ifdef drawRaisedEllipse; delete the reimplementation of drawEllipse that takes
        a FloatRect and make the normal one take a FloatRect instead.

        (WebCore::GraphicsContext::platformInit):
        Make sure that the CGContext's line width starts out in sync with GraphicsContext's.
        By default, CGContext has a line width of 1 and GraphicsContext 0, so they could previously
        have been out of sync until someone set the width explicitly.

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        Fix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary
        https://bugs.webkit.org/show_bug.cgi?id=136412

        Reviewed by Alexey Proskuryakov.

        No new tests, just cleanup.

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
        Drop the leading 'c' and the 'static' on the cutoff parameter.
        Remove the duplicated early return (seems like it happened in the merge).
        Remove reference to the exact size in the comment, since it's different on iOS.

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        Use SinkDocument instead of PDFDocument; get rid of PDFDocument
        https://bugs.webkit.org/show_bug.cgi?id=136414

        Reviewed by Alexey Proskuryakov.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::createDocument):
        * pdf/ios/PDFDocument.cpp: Removed.
        * pdf/ios/PDFDocument.h: Removed.
        Use the generic SinkDocument, which ignores all incoming data just like PDFDocument.
        Delete the unnecessary and iOS-specific PDFDocument.cpp/h

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        Adjust an antique comment in Image::drawPattern
        https://bugs.webkit.org/show_bug.cgi?id=136411

        Reviewed by Dan Bernstein.

        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::Image::drawPattern):
        Reword the comment.

2014-08-31  Tim Horton  <timothy_horton@apple.com>

        SVGImage::drawPatternForContainer creates a buffer without respecting the destination's acceleration setting
        https://bugs.webkit.org/show_bug.cgi?id=136408
        <rdar://problem/12013317>

        Reviewed by Dan Bernstein.

        No new tests required, just a performance improvement.

        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::drawPatternForContainer):
        Use ImageBuffer::createCompatibleBuffer, which passes the destination's
        acceleration setting through to the ImageBuffer constructor.

        I didn't use GraphicsContext::createCompatibleBuffer because adjusting
        how this function applies the destination's CTM is outside the scope of this patch.

2014-08-30  Joseph Pecoraro  <pecoraro@apple.com>

        Convert string literals to character literals in makeString usage
        https://bugs.webkit.org/show_bug.cgi?id=136394

        Reviewed by Sam Weinig.

        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::evaluateInOverlay):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::setOriginalURLForDownloadRequest):
        * loader/MixedContentChecker.cpp:
        (WebCore::MixedContentChecker::logWarning):
        * page/ContentSecurityPolicy.cpp:
        (WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation):
        (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
        (WebCore::ContentSecurityPolicy::reportInvalidPathCharacter):
        Also reorder some code to ensure single string creation.

2014-08-26  Maciej Stachowiak  <mjs@apple.com>

        Use RetainPtr::autorelease in some places where it seems appropriate
        https://bugs.webkit.org/show_bug.cgi?id=136280

        Reviewed by Darin Adler.

        * platform/mac/URLMac.mm:
        (WebCore::URL::operator NSURL *): Use autorelease() instead of
        CFBridgingRelease(leakRef())

2014-08-30  Yusuke Suzuki  <utatane.tea@gmail.com>

        CSS: Refactor :visited handling in SelectorChecker
        https://bugs.webkit.org/show_bug.cgi?id=135639

        Reviewed by Benjamin Poulain.

        :visited is specially handled in the SelectorChecker and style resolution
        because of security issues. That is nested links and adjacent combinators.
        Since we propagate linkState from the ancestors,

            1. linkStates of ancestors from the target node are only used to calculate
            the linkState of the current node.
            This is why adjacent combinators disable :visited.

            2. linkState is overrides by the closest link element in the ancestors.
            This is why :visited is effective on the closest link element.

        In this patch, we fix 3 things.

            1. Simplify SelectorChecker. Move m_mode to CheckingContext and it makes
            CheckingContext more similar to SelectorCompiler::CheckingContext in CSS JIT.
            And hide visitedMatchType parameter from the caller of SelectorChecker.

            2. Disable :visited inside :-webkit-any. Currently, :-webkit-any provides MatchAll
            link match type. So considering visited match type in the matching phase of :visited
            provides inconsistency. In this patch, :-webkit-any(:visited) never matches.
            And :-webkit-any(:link) acts like a :-webkit-any(:any-link). This behavior represents
            that visited match type is always considered as disabled inside :-webkit-any.
            This behavior may be changed when Selector Level4 is implemented.

            3. Fix the issue when traversing the descendant element,
            first encountered link check is missing.

        Tests: fast/history/link-inside-any.html
               fast/history/link-inside-not.html
               fast/history/nested-visited-test-override.html
               fast/history/visited-inside-any.html
               fast/history/visited-inside-not.html

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ruleMatches):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::SelectorChecker):
        (WebCore::SelectorChecker::match):
        (WebCore::hasScrollbarPseudoElement):
        (WebCore::checkingContextForParent):
        (WebCore::SelectorChecker::matchRecursively):
        (WebCore::SelectorChecker::checkOne):
        * css/SelectorChecker.h:
        (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
        * css/StyleResolver.h:
        (WebCore::checkRegionSelector):
        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::selectorMatches):

2014-08-29  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Remove LayoutUnit's kEffectiveFixedPointDenominator.
        https://bugs.webkit.org/show_bug.cgi?id=136383.

        Reviewed by Simon Fraser.

        There's only one subpixel denominator now.

        No change in functionality.

        * platform/LayoutUnit.h:
        (WebCore::LayoutUnit::LayoutUnit):
        (WebCore::LayoutUnit::fromFloatCeil):
        (WebCore::LayoutUnit::fromFloatFloor):
        (WebCore::LayoutUnit::toInt):
        (WebCore::LayoutUnit::toFloat):
        (WebCore::LayoutUnit::toDouble):
        (WebCore::LayoutUnit::operator++):
        (WebCore::LayoutUnit::ceil):
        (WebCore::LayoutUnit::round):
        (WebCore::LayoutUnit::floor):
        (WebCore::LayoutUnit::ceilToFloat):
        (WebCore::LayoutUnit::fraction):
        (WebCore::LayoutUnit::epsilon):
        (WebCore::LayoutUnit::nearlyMax):
        (WebCore::LayoutUnit::nearlyMin):
        (WebCore::LayoutUnit::isInBounds):
        (WebCore::LayoutUnit::setValue):
        (WebCore::boundedMultiply):
        (WebCore::operator*):
        (WebCore::operator/):
        (WebCore::operator%):
        (WebCore::roundToDevicePixel):
        (WebCore::floorToDevicePixel):
        (WebCore::ceilToDevicePixel):

2014-08-29  Zalan Bujtas  <zalan@apple.com>

        Rename updatePreferredWidth to make it more explicit.
        https://bugs.webkit.org/show_bug.cgi?id=136389

        Reviewed by Simon Fraser.

        No change in functionality.

        * rendering/RenderBlock.cpp:
        (WebCore::preferredWidth):
        (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
        (WebCore::updatePreferredWidth): Deleted.

2014-08-29  Gavin Barraclough  <barraclough@apple.com>

        Make timerNestingLevel threadsafe
        https://bugs.webkit.org/show_bug.cgi?id=136401

        Reviewed by Tim Horton.

        timerNestingLevel, used by DOMTimer to determine whether a timer is 'nested'
        (repeating, possible due to a timer rescheduling itself) is a global. Since
        worker threads can set timers too this is not thread safe.

        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::ScriptExecutionContext):
            - added initialize m_timerNestingLevel
        * dom/ScriptExecutionContext.h:
        (WebCore::ScriptExecutionContext::timerNestingLevel):
        (WebCore::ScriptExecutionContext::setTimerNestingLevel):
            - added accessors
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::DOMTimer):
        (WebCore::DOMTimer::fired):
            - move timerNestingLevel to the context

2014-08-29  Gavin Barraclough  <barraclough@apple.com>

        DOMTimer::m_nestingLevel is prone to overflow
        https://bugs.webkit.org/show_bug.cgi?id=136399

        Reviewed by Alexey Proskuryakov.

        Since this would happen after the 2 billionth timer fire this is unlikely,
        and consequences aren't severe (breaks throttling).

        This change has the following consequences.

            - m_nestingLevel saturates to its max value.
            - unnested timers are indicated by a nesting level of 0.
            - repeat timers update m_nestingLevel on every fire,
              not just those that should have been throttled.

        The last point is subtle, but ultimately should be inconsequential. Timers
        whose requested timeout is less that the minimum interval will saturate quickly
        anyway; timers with an original interval greater than the minimum previously
        wouldn't have incremented m_nestingLevel, but doing so now doesn't hurt since
        they won't be throttled when they hit the threshold. This simplifies things
        conceptually a little & reduces the test performed on each timer fire.

        * page/DOMTimer.cpp:
        (WebCore::shouldForwardUserGesture):
            - unnested timers are indicated by a nesting level of 0
        (WebCore::DOMTimer::DOMTimer):
            - don't increment nesting level on construction
        (WebCore::DOMTimer::fired):
            - saturating increments
        (WebCore::DOMTimer::adjustMinimumTimerInterval):
        (WebCore::DOMTimer::intervalClampedToMinimum):
            - added ASSERTs

2014-08-29  Zalan Bujtas  <zalan@apple.com>

        Improve showRenderTree() output.
        https://bugs.webkit.org/show_bug.cgi?id=136244

        Reviewed by Darin Adler.

        Add more debugging information to showRenderTree().

        Not testable.

        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::showLineTreeForThis):
        (WebCore::InlineBox::showLineTreeAndMark):
        (WebCore::InlineBox::showLineBox):
        (showNodeTree):
        (showLineTree):
        (WebCore::InlineBox::showBox): Deleted.
        * rendering/InlineBox.h:
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::showLineTreeAndMark):
        * rendering/InlineFlowBox.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::showLineBox):
        (WebCore::InlineTextBox::showBox): Deleted.
        * rendering/InlineTextBox.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::showLineTreeAndMark): Deleted.
        * rendering/RenderBlock.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::showLineTreeAndMark):
        * rendering/RenderBlockFlow.h:
        * rendering/RenderObject.cpp:
        (WebCore::showRenderTreeLegend):
        (WebCore::RenderObject::showNodeTreeForThis):
        (WebCore::RenderObject::showRenderTreeForThis):
        (WebCore::RenderObject::showLineTreeForThis):
        (WebCore::RenderObject::showRegionsInformation):
        (WebCore::RenderObject::showRenderObject):
        (WebCore::RenderObject::showRenderSubTreeAndMark):
        (showNodeTree):
        (showLineTree):
        (showRenderTree):
        (WebCore::RenderObject::showRenderTreeAndMark): Deleted.
        * rendering/RenderObject.h:
        * rendering/RootInlineBox.h:

2014-08-29  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed, remove empty directories.

        * Modules/networkinfo: Removed.
        * inspector/front-end: Removed.
        * inspector/front-end/Images: Removed.
        * inspector/front-end/UglifyJS: Removed.
        * inspector/front-end/ace: Removed.
        * inspector/front-end/cm: Removed.
        * platform/audio/ffmpeg: Removed.
        * platform/audio/ipp: Removed.
        * platform/graphics/gpu/opencl: Removed.

2014-08-29  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        [EFL] Remove non Coordinated Graphics code path from cmake build system after r142169
        https://bugs.webkit.org/show_bug.cgi?id=135560

        Reviewed by Gyuyoung Kim.

        No new tests required, no new functionality.

        * PlatformEfl.cmake: Removed TEXTURE_MAPPER and 3D_GRAPHICS guards.
        * platform/graphics/efl/GraphicsContext3DEfl.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
        (WebCore::GraphicsContext3D::platformLayer):
        (WebCore::GraphicsContext3D::createGraphicsSurfaces):
        * platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
        (WebCore::GraphicsContext3DPrivate::initialize):
        (WebCore::GraphicsContext3DPrivate::releaseResources):
        (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
        (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
        * platform/graphics/efl/GraphicsContext3DPrivate.h: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
        * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Removed GRAPHICS_SURFACE guard.

2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        RenderThemeGtk depends on classes outside of platform
        https://bugs.webkit.org/show_bug.cgi?id=22176

        Reviewed by Martin Robinson.

        Move RenderThemeGtk.cpp from platform to rendering.

        * PlatformGTK.cmake:
        * rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp.

2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
        https://bugs.webkit.org/show_bug.cgi?id=136338

        Reviewed by Philippe Normand.

        Remove the dependency by creating the GtkStyleContext for the
        scrollbars in ScrollbarThemeGtk.

        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged().
        (WebCore::getStyleContext): Remove the scrollbar style context support.
        * platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle().
        * platform/gtk/ScrollbarThemeGtk.cpp:
        (WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper
        class to create the global GtkStyleContext for scrollbars.
        (WebCore::ScrollbarStyleContext::~ScrollbarStyleContext):
        (WebCore::ScrollbarStyleContext::context):
        (WebCore::gtkScrollbarStyleContext):
        (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization.
        (WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the
        GtkStylecontext and call updateThemeProperties().
        (WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the
        global style context.
        (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
        (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
        (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
        (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
        * platform/gtk/ScrollbarThemeGtk.h:

2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp intoScrollbarThemeGtk.cpp
        https://bugs.webkit.org/show_bug.cgi?id=136336

        Reviewed by Philippe Normand.

        There's no reason to have two files now that there's no GTK+2
        support. Also fix coding style issues and compile warnings.

        * PlatformGTK.cmake:
        * platform/gtk/RenderThemeGtk.cpp:
        * platform/gtk/RenderThemeGtk.h:
        * platform/gtk/RenderThemeGtk3.cpp: Removed.
        * platform/gtk/ScrollbarThemeGtk.cpp:
        * platform/gtk/ScrollbarThemeGtk3.cpp: Removed.

2014-08-28  Mark Lam  <mark.lam@apple.com>

        DebuggerCallFrame::scope() should return a DebuggerScope.
        <https://webkit.org/b/134420>

        Reviewed by Geoffrey Garen.

        No new tests.

        Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::attachDebugger):
        - We should acquire the JSLock before modifying a JS global object.

2014-08-28  Enrica Casucci  <enrica@apple.com>

        Can't hit tab key more than 3 times continuously.
        https://bugs.webkit.org/show_bug.cgi?id=136357
        rdar://problem/17927266

        Reviewed by Dean Jackson.

        Test: fast/css/multiple-tabs.html

        When computing the tabWidth disregard increments of less than half the size of the space character
        for the given font.

        * platform/graphics/Font.h:
        (WebCore::Font::tabWidth):

2014-08-28  Daniel Bates  <dabates@apple.com>

        [iOS] Clients that include WebCoreThread.h fail to build after <http://trac.webkit.org/changeset/172814/>
        (https://bugs.webkit.org/show_bug.cgi?id=136108)

        Define WEBCORE_EXPORT (if its not already defined) in WebCoreThread.h so as to fix the
        build for clients that include this header.

        * platform/ios/wak/WebCoreThread.h:

2014-08-28  Pratik Solanki  <psolanki@apple.com>

        WebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing some websites
        https://bugs.webkit.org/show_bug.cgi?id=136347
        <rdar://problem/18073745>

        Reviewed by Andreas Kling.

        When passing data to ImageIO, we create a copy if we have to reallocate the buffer. We would
        set the size of the new buffer to be the size of the SharedBuffer data. This causes memory
        churn since we would create a new buffer for every data chunk we get. Fix this by at least
        doubling the capacity of the buffer when we duplicate it.

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::duplicateDataBufferIfNecessary):

2014-08-28  Dan Bernstein  <mitz@apple.com>

        iOS build fix.

        * WebCore.exp.in: Updated symbol.

2014-08-28  Benjamin Poulain  <bpoulain@apple.com>

        Scrolling with spacebar on a page with fixed header breaks reading flow
        https://bugs.webkit.org/show_bug.cgi?id=135506

        Reviewed by Simon Fraser.

        When scrolling by page, find the height of any bar that is obscuring the top or bottom of the page,
        and substract that height from the step to scroll.

        Tests: scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html
               scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html
               scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html
               scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html
               scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html
               scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html
               scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html
               scrollbars/scrolling-by-page-on-keyboard-spacebar.html

        * WebCore.exp.in:
        * page/FrameView.cpp:
        (WebCore::FrameView::adjustScrollStepForFixedContent):
        * page/FrameView.h:
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::adjustScrollStepForFixedContent):
        (WebCore::ScrollableArea::scroll):
        * platform/ScrollableArea.h:

2014-08-28  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Remove unused pixel snapping functions.
        https://bugs.webkit.org/show_bug.cgi?id=136341

        Reviewed by Simon Fraser.

        Let's not encourage integral snapping by having these functions around.
        
        No change in functionality.

        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityObject::pixelSnappedElementRect): Deleted.
        (WebCore::AccessibilityObject::pixelSnappedSize): Deleted.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::width):
        (WebCore::HTMLImageElement::height):
        * page/FrameView.cpp:
        (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
        * platform/graphics/LayoutPoint.h:
        (WebCore::snappedIntSize):
        (WebCore::snapSizeToDevicePixel):
        * platform/graphics/LayoutRect.h:
        (WebCore::LayoutRect::pixelSnappedLocation): Deleted.
        (WebCore::LayoutRect::pixelSnappedX): Deleted.
        (WebCore::LayoutRect::pixelSnappedY): Deleted.
        (WebCore::LayoutRect::pixelSnappedWidth): Deleted.
        (WebCore::LayoutRect::pixelSnappedHeight): Deleted.
        (WebCore::LayoutRect::pixelSnappedMaxX): Deleted.
        (WebCore::LayoutRect::pixelSnappedMaxY): Deleted.
        (WebCore::snappedIntRectFromEdges): Deleted.
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat): Deleted.
        (WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat): Deleted.
        (WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat): Deleted.
        (WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat): Deleted.
        * rendering/RenderBox.h:
        (WebCore::RenderBox::pixelSnappedLogicalHeight):
        (WebCore::RenderBox::pixelSnappedLogicalWidth):
        (WebCore::RenderBox::pixelSnappedBorderBoxRect):
        (WebCore::RenderBox::pixelSnappedWidth): Deleted.
        (WebCore::RenderBox::pixelSnappedHeight): Deleted.
        (WebCore::RenderBox::pixelSnappedFrameRect): Deleted.
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::nodeWidth):
        (WebCore::nodeHeight):
        (WebCore::RenderFileUploadControl::maxFilenameWidth):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPosition):
        (WebCore::RenderLayer::isPointInResizeControl):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::ensureRootLayer):
        * rendering/RenderMediaControls.cpp:
        (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
        * rendering/RenderMultiColumnSet.cpp:
        (WebCore::RenderMultiColumnSet::paintColumnRules):
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::buttonRect):
        * rendering/RenderView.h:

2014-08-27  Enrica Casucci  <enrica@apple.com>

        textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
        https://bugs.webkit.org/show_bug.cgi?id=136323
        rdar://problem/18141964

        Reviewed by Antti Koivisto.

        For underline style we need to check typingStyle first and use that information to populate
        the dictionary. If there is no typing style we can use the render style.

        * WebCore.exp.in:
        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::fontAttributesForSelectionStart):

2014-08-28  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Add WaylandEventSource
        https://bugs.webkit.org/show_bug.cgi?id=136213

        Reviewed by Martin Robinson.

        Add the WaylandEventSource class. Its static method, createEventSource(),
        creates a new GSource object that is attached to the main context and
        enables handling Wayland display events through the GLib's main loop.

        The method will be called by the nested Wayland compositor during its
        initialization, which will also take the control over the ownership and
        will be tasked with properly removing the GSource from the main context.

        GLibSource is a GSource-based struct that additionally holds a GPollFD object
        and the pointer to the wl_display object whose event loop we'll be
        dispatching during the GSource dispatch. This is the type that g_source_new
        uses when allocating the new GSource object.

        The GSource is assigned the default priorty, can recurse, and is attached
        to the main context.

        * PlatformGTK.cmake:
        * platform/graphics/wayland/WaylandEventSource.cpp: Added.
        (WebCore::GLibSource::initialize):
        (WebCore::GLibSource::check):
        (WebCore::GLibSource::dispatch):
        (WebCore::prepareCallback):
        (WebCore::checkCallback):
        (WebCore::dispatchCallback):
        (WebCore::WaylandEventSource::createDisplayEventSource):
        * platform/graphics/wayland/WaylandEventSource.h: Added.

2014-08-28  Chris Fleizach  <cfleizach@apple.com>

        AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse
        https://bugs.webkit.org/show_bug.cgi?id=136333

        Reviewed by David Kilzer.

        If a Node is asked for it's Document when it's not actually in a document, it can lead to an assert/crash.
        We can avoid this by checking that the node is in a document before asking for its document.

        I was not able to make a test case.      

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::clearTextMarkerNodesInUse):

2014-08-28  Andreas Kling  <akling@apple.com>

        ASSERTION FAILED: !m_renderView.document().inPageCache() in compositing/iframes/resources/page-cache-helper.html
        <https://webkit.org/b/136329>

        Cancel any pending compositing layer updates when moving a document
        into the page cache.

        Reviewed by Zalan Bujtas.

        * dom/Document.cpp:
        (WebCore::Document::documentWillSuspendForPageCache):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::cancelCompositingLayerUpdate):
        * rendering/RenderLayerCompositor.h:

2014-08-28  Mihnea Ovidenie  <mihnea@adobe.com>

        [CSSRegions] Incorrect selection clearing on a document without regions
        https://bugs.webkit.org/show_bug.cgi?id=134901

        Reviewed by David Hyatt.

        When we select all the content of document with named flows but without regions,
        the start and end points of selection is cached in RenderView. However, since
        the document has named flows, the selection is split between the subtrees. During the split,
        it is possible that the cached end-points of the original selection are not included
        in any of the resulting subtree selection and they are not marked accordingly.
        In order to process the selection clearing correctly, we have to take the original
        selection end-points into account.

        Test: fast/regions/selection/select-all-without-regions.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::isSelectionBorder):

2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
        https://bugs.webkit.org/show_bug.cgi?id=136248

        Reviewed by Gustavo Noronha Silva.

        Move the code to update the SoupMessageHeaders to a new public
        method.

        * platform/network/soup/ResourceResponse.h:
        * platform/network/soup/ResourceResponseSoup.cpp:
        (WebCore::ResourceResponse::updateSoupMessageHeaders):
        (WebCore::ResourceResponse::toSoupMessage):

2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove support for GTK+2 theme rendering
        https://bugs.webkit.org/show_bug.cgi?id=136285

        Reviewed by Philippe Normand.

        GTK+2 is only used by the plugin process that doesn't need to
        render html controls themed. Since the theme files are still
        built for WebCorePlatformGTK2, we need to provide dummy
        implementations for the pure virtual methods when
        GTK_API_VERSION_2 is defined.

        * PlatformGTK.cmake: Remove deleted files from compilation.
        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::create):
        (WebCore::RenderTheme::themeForPage):
        (WebCore::getScreenDPI):
        (WebCore::RenderThemeGtk::systemFont):
        (WebCore::RenderThemeGtk::sliderTickSize):
        (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
        (WebCore::RenderThemeGtk::getScreenDPI): Deleted.
        * platform/gtk/RenderThemeGtk.h:
        * platform/gtk/RenderThemeGtk2.cpp: Removed.
        * platform/gtk/RenderThemeGtk3.cpp:
        * platform/gtk/ScrollbarThemeGtk.cpp:
        (WebCore::ScrollbarThemeGtk::hasThumb):
        (WebCore::ScrollbarThemeGtk::backButtonRect):
        (WebCore::ScrollbarThemeGtk::forwardButtonRect):
        (WebCore::ScrollbarThemeGtk::trackRect):
        (WebCore::ScrollbarThemeGtk::registerScrollbar):
        (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
        (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
        * platform/gtk/ScrollbarThemeGtk.h:
        * platform/gtk/ScrollbarThemeGtk2.cpp: Removed.
        * platform/gtk/WidgetRenderingContext.cpp: Removed.
        * platform/gtk/WidgetRenderingContext.h: Removed.

2014-08-28  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed GTK build fix for the Wayland windowing target after r173052.

        * platform/graphics/wayland/WaylandSurface.cpp: Include the IntSize header.
        * platform/graphics/wayland/WaylandSurface.h: Forward-declare IntSize.

2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>

        One more URTBF after r173047.

        * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
        (webkitAccessibleComponentGetExtents):

2014-08-27  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Add WaylandSurface
        https://bugs.webkit.org/show_bug.cgi?id=136220

        Reviewed by Martin Robinson.

        Add the WaylandSurface class. An objects of this type is meant to be used
        by the LayerTreeHostGtk in the WebProcess and is constructed via the
        WaylandDisplay::createSurface() method.

        LayerTreeHostGtk uses such object to perform frame requests to the nested
        Wayland compositor in the UIProcess, and to create the GLContextEGL object
        that's used during the layer flushing and compositing.

        The resize() method is called whenever LayerTreeHostGtk is being resized,
        and basically only wraps the wl_egL_window_resize() call.

        * PlatformGTK.cmake:
        * platform/graphics/wayland/WaylandSurface.cpp: Added.
        (WebCore::frameCallback):
        (WebCore::WaylandSurface::WaylandSurface):
        (WebCore::WaylandSurface::~WaylandSurface):
        (WebCore::WaylandSurface::resize):
        (WebCore::WaylandSurface::createGLContext):
        (WebCore::WaylandSurface::requestFrame):
        * platform/graphics/wayland/WaylandSurface.h: Added.
        (WebCore::WaylandSurface::surface):
        (WebCore::WaylandSurface::nativeWindowHandle):

2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>

        URTBF after r173047.

        * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
        (webkitAccessibleImageGetImagePosition):

2014-08-27  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Cleanup snapSizeToPixel/snapSizeToDevicePixel.
        https://bugs.webkit.org/show_bug.cgi?id=136264

        Reviewed by Simon Fraser.
        
        1. Align snapSizeToPixel()/snapSizeToDevicePixel() function names with the rest of snapping
        functions. ->snappedIntSize()/snapSizeToDevicePixel().
        2. Operate on LayoutSize/LayoutPoint instead of LayoutUnit/LayoutUnit to reflect functionality.

        Covered by existing tests.

        * platform/LayoutUnit.h:
        (WebCore::snapSizeToPixel): Deleted.
        (WebCore::snapSizeToDevicePixel): Deleted.
        * platform/graphics/LayoutPoint.h:
        (WebCore::snappedIntSize):
        (WebCore::snapSizeToDevicePixel):
        (WebCore::pixelSnappedIntSize): Deleted.
        * platform/graphics/LayoutRect.h:
        (WebCore::LayoutRect::pixelSnappedSize):
        (WebCore::LayoutRect::pixelSnappedWidth):
        (WebCore::LayoutRect::pixelSnappedHeight):
        (WebCore::pixelSnappedIntRect):
        (WebCore::pixelSnappedIntRectFromEdges):
        (WebCore::pixelSnappedForPainting):
        (WebCore::directionalPixelSnappedForPainting):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::pixelSnappedClientWidth):
        (WebCore::RenderBox::pixelSnappedClientHeight):
        (WebCore::RenderBox::pixelSnappedOffsetWidth):
        (WebCore::RenderBox::pixelSnappedOffsetHeight):
        (WebCore::RenderBox::scrollWidth):
        (WebCore::RenderBox::scrollHeight):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth):
        (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPosition):
        (WebCore::RenderLayer::scrollWidth):
        (WebCore::RenderLayer::scrollHeight):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::writeLayers):

2014-08-27  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Rename LayoutRect's device pixel snapping functions.
        https://bugs.webkit.org/show_bug.cgi?id=136319

        Reviewed by Simon Fraser.

        From pixelSnappedForPainting() to snapRectToDevicePixels() and 
        pixelSnappedIntRect*() to snappedIntRect*().

        No change in functionality.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::boundingBoxForQuads):
        (WebCore::AccessibilityObject::isOnscreen):
        (WebCore::AccessibilityObject::scrollToMakeVisible):
        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect):
        (WebCore::AccessibilityObject::pixelSnappedElementRect):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isOffScreen):
        (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
        (-[WebAccessibilityObjectWrapper accessibilityFrame]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper position]):
        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
        * bindings/objc/DOMUIKitExtensions.mm:
        (-[DOMHTMLAreaElement boundingBoxWithOwner:]):
        (-[DOMHTMLAreaElement absoluteQuadWithOwner:]):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::computedTransform):
        * dom/Node.h:
        (WebCore::Node::pixelSnappedBoundingBox):
        (WebCore::Node::pixelSnappedRenderRect):
        * editing/RenderedPosition.cpp:
        (WebCore::RenderedPosition::absoluteRect):
        * editing/mac/FrameSelectionMac.mm:
        (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::paint):
        * inspector/InspectorOverlay.cpp:
        (WebCore::buildObjectForElementInfo):
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didPaint):
        * page/FrameSnapshotting.cpp:
        (WebCore::snapshotNode):
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollContentsFastPath):
        (WebCore::FrameView::extendedBackgroundRectForPainting):
        (WebCore::FrameView::windowClipRectForFrameOwner):
        (WebCore::FrameView::convertFromRendererToContainingView):
        * page/Page.cpp:
        (WebCore::Page::addRelevantRepaintedObject):
        (WebCore::Page::addRelevantUnpaintedObject):
        * page/ios/FrameIOS.mm:
        (WebCore::ancestorRespondingToClickEvents):
        * platform/DragImage.cpp:
        (WebCore::createDragImageForImage):
        * platform/graphics/LayoutRect.cpp:
        (WebCore::enclosingRectToDevicePixels):
        (WebCore::enclosingRectForPainting): Deleted.
        * platform/graphics/LayoutRect.h:
        (WebCore::snappedIntRect):
        (WebCore::snappedIntRectFromEdges):
        (WebCore::snapRectToDevicePixels):
        (WebCore::snapRectToDevicePixelsWithWritingDirection):
        (WebCore::pixelSnappedIntRect): Deleted.
        (WebCore::pixelSnappedIntRectFromEdges): Deleted.
        (WebCore::pixelSnappedForPainting): Deleted.
        (WebCore::directionalPixelSnappedForPainting): Deleted.
        * platform/graphics/RoundedRect.cpp:
        (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::computePixelAlignment):
        * platform/text/TextStream.cpp:
        (WebCore::TextStream::operator<<):
        * rendering/EllipsisBox.cpp:
        (WebCore::EllipsisBox::paintSelection):
        * rendering/FilterEffectRenderer.cpp:
        (WebCore::FilterEffectRendererHelper::applyFilterEffect):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paint):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintCompositionBackground):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::positionForOffset):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::addVisualOverflowFromTheme):
        (WebCore::RenderBlock::paint):
        (WebCore::RenderBlock::blockSelectionGap):
        (WebCore::RenderBlock::logicalLeftSelectionGap):
        (WebCore::RenderBlock::logicalRightSelectionGap):
        (WebCore::RenderBlock::absoluteRects):
        (WebCore::RenderBlock::addFocusRingRects):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::clipOutFloatingObjects):
        (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::absoluteRects):
        (WebCore::RenderBox::absoluteContentBox):
        (WebCore::RenderBox::outlineBoundsForRepaint):
        (WebCore::RenderBox::addFocusRingRects):
        (WebCore::RenderBox::getBackgroundPaintedExtent):
        (WebCore::RenderBox::pushContentsClip):
        (WebCore::RenderBox::computeRectForRepaint):
        * rendering/RenderBox.h:
        (WebCore::RenderBox::pixelSnappedFrameRect):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
        (WebCore::RenderBoxModelObject::paintNinePieceImage):
        (WebCore::RenderBoxModelObject::paintBorder):
        (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
        (WebCore::RenderBoxModelObject::paintBoxShadow):
        * rendering/RenderDetailsMarker.cpp:
        (WebCore::RenderDetailsMarker::paint):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintSnapshotImage):
        (WebCore::RenderEmbeddedObject::isReplacementObscured):
        * rendering/RenderFieldset.cpp:
        (WebCore::RenderFieldset::paintBoxDecorations):
        * rendering/RenderFlowThread.cpp:
        (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
        * rendering/RenderFrameSet.cpp:
        (WebCore::RenderFrameSet::paint):
        (WebCore::RenderFrameSet::layout):
        (WebCore::RenderFrameSet::positionFramesWithFlattening):
        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::paintReplaced):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintReplaced):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::paintOutlineForLine):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateTransform):
        (WebCore::RenderLayer::currentTransform):
        (WebCore::RenderLayer::beginTransparencyLayers):
        (WebCore::RenderLayer::scrollRectToVisible):
        (WebCore::RenderLayer::scrollCornerRect):
        (WebCore::RenderLayer::drawPlatformResizerImage):
        (WebCore::RenderLayer::paintResizer):
        (WebCore::RenderLayer::hitTestOverflowControls):
        (WebCore::RenderLayer::clipToRect):
        (WebCore::RenderLayer::paintLayerByApplyingTransform):
        (WebCore::RenderLayer::paintOverflowControlsForFragments):
        (WebCore::RenderLayer::hitTestResizerInFragments):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateTransform):
        (WebCore::RenderLayerBacking::updateGeometry):
        (WebCore::RenderLayerBacking::resetContentsRect):
        (WebCore::RenderLayerBacking::updateImageContents):
        (WebCore::RenderLayerBacking::backgroundBoxForPainting):
        (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
        (WebCore::RenderLayerBacking::paintContents):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::addToOverlapMap):
        (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
        (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
        (WebCore::RenderLayerCompositor::paintContents):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::addFocusRingRects):
        (WebCore::RenderListBox::paintScrollbar):
        (WebCore::RenderListBox::paintItemBackground):
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::paint):
        * rendering/RenderMeter.cpp:
        (WebCore::RenderMeter::updateLogicalWidth):
        (WebCore::RenderMeter::computeLogicalHeight):
        * rendering/RenderMultiColumnSet.cpp:
        (WebCore::RenderMultiColumnSet::paintColumnRules):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::drawLineForBoxSide):
        (WebCore::RenderObject::addPDFURLRect):
        (WebCore::RenderObject::paintOutline):
        (WebCore::RenderObject::absoluteBoundingBoxRect):
        (WebCore::RenderObject::repaintUsingContainer):
        (WebCore::RenderObject::repaintSlowRepaintObject):
        (WebCore::RenderObject::pixelSnappedAbsoluteClippedOverflowRect):
        * rendering/RenderProgress.cpp:
        (WebCore::RenderProgress::computeLogicalHeight):
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::paint):
        * rendering/RenderScrollbarPart.cpp:
        (WebCore::RenderScrollbarPart::paintIntoRect):
        * rendering/RenderSearchField.cpp:
        (WebCore::RenderSearchField::showPopup):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paintCollapsedBorders):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::addFocusRingRects):
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::paint):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paint):
        (WebCore::RenderTheme::paintBorderOnly):
        (WebCore::RenderTheme::paintDecorations):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::write):
        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::videoBox):
        (WebCore::RenderVideo::paintReplaced):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::repaintViewRectangle):
        (WebCore::RenderView::computeRectForRepaint):
        (WebCore::RenderView::absoluteRects):
        (WebCore::RenderView::selectionBounds):
        (WebCore::RenderView::unscaledDocumentRect):
        * rendering/RenderView.h:
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::paintContents):
        (WebCore::RenderWidget::paint):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::paintDebugBorders):
        * rendering/shapes/Shape.cpp:
        (WebCore::Shape::createRasterShape):
        * rendering/svg/RenderSVGModelObject.cpp:
        (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
        * rendering/svg/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::paintReplaced):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::selectionRectForTextFragment):

2014-08-27  Daniel Bates  <dabates@apple.com>

        Scrollbar corner can be drawn outside containing frame
        https://bugs.webkit.org/show_bug.cgi?id=133131
        <rdar://problem/16382769>

        Reviewed by Simon Fraser.

        Merged from Blink (patch by Levi Weintraub):
        <https://src.chromium.org/viewvc/blink?revision=170625&view=revision>

        Fixes an issue where the scroll corner may be painted outside the rectangle of
        its associated frame by setting a clip rectangle before painting the scroll bar(s)
        and scroll corner.

        Test: scrollbars/custom-scrollbars-paint-outside-iframe.html

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::paint):

2014-08-27  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions.
        https://bugs.webkit.org/show_bug.cgi?id=136314

        Reviewed by Simon Fraser.

        From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil)

        EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting,
        but currently untestable.

        * WebCore.exp.in:
        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::showPaintRect):
        * platform/graphics/FloatPoint.h:
        (WebCore::flooredIntSize):
        (WebCore::floorPointToDevicePixels):
        (WebCore::ceilPointToDevicePixels):
        (WebCore::flooredToDevicePixels): Deleted.
        (WebCore::ceiledToDevicePixels): Deleted.
        * platform/graphics/FloatRect.cpp:
        (WebCore::enclosingRectToDevicePixels):
        (WebCore::enclosingRectExtendedToDevicePixels): Deleted. Renamed.
        (WebCore::enclosedIntRect): Deleted. Not needed.
        * platform/graphics/FloatRect.h:

2014-08-27  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Rename LayoutPoint's device pixel snapping functions.
        https://bugs.webkit.org/show_bug.cgi?id=136306

        Reviewed by Simon Fraser.

        From *edForPainting() to *PointToDevicePixels() (* = floor/round/ceil)

        No change in functionality.

        * platform/graphics/LayoutPoint.h:
        (WebCore::roundPointToDevicePixels):
        (WebCore::floorPointToDevicePixels):
        (WebCore::ceilPointToDevicePixels):
        (WebCore::roundedForPainting): Deleted.
        (WebCore::flooredForPainting): Deleted.
        (WebCore::ceiledForPainting): Deleted.
        * platform/graphics/LayoutRect.cpp:
        (WebCore::enclosingRectForPainting):
        * platform/graphics/LayoutRect.h:
        (WebCore::directionalPixelSnappedForPainting):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayerByApplyingTransform):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGeometry):

2014-08-27  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Rename LayoutSize's device pixel snapping functions.
        https://bugs.webkit.org/show_bug.cgi?id=136310

        Reviewed by Simon Fraser.

        From *edForPainting() to *SizeToDevicePixels() (* = floor/round/ceil)

        No change in functionality.

         * platform/graphics/LayoutSize.h:
        (WebCore::floorSizeToDevicePixels):
        (WebCore::flooredForPainting): Deleted.
        * rendering/style/StyleGeneratedImage.cpp:
        (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):

2014-08-27  Brian J. Burg  <burg@cs.washington.edu>

        Enums in ScrollTypes and PlatformWheelEvent should not use uint64_t storage
        https://bugs.webkit.org/show_bug.cgi?id=136318

        Reviewed by Simon Fraser.

        This regressed in a replay-related patch. Revert back to uint8_t storage size.

        * platform/PlatformWheelEvent.h:
        * platform/ScrollTypes.h:
        * replay/WebInputs.json:

2014-08-27  Simon Fraser  <simon.fraser@apple.com>

        Speling is hard.

        Reviewed by Tim Horton.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseDoubleClickEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        (WebCore::EventHandler::handlePasteGlobalSelection):
        (WebCore::EventHandler::updateMouseEventTargetNode):
        (WebCore::EventHandler::dispatchMouseEvent):
        (WebCore::EventHandler::sendContextMenuEventForKey):
        (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):

2014-08-27  Simon Fraser  <simon.fraser@apple.com>

        Fix the iOS build.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):

2014-08-27  Andreas Kling  <akling@apple.com>

        Drawing text in an SVG font causes load events to be fired.
        <https://webkit.org/b/136269>
        <rdar://problem/15724915>

        Don't flush pending load events in Document::implicitClose() for frameless documents.
        This is a targeted fix for an issue where parsing SVG fonts during layout would cause
        event dispatch to happen in the main document, leading to arbitrary JS execution.

        Note that the testcase only works in DRT/WTR, since once the SVG font is in cached
        by WebCore, we won't reparse it again. Caches are cleared between tests, so it will
        correctly fail if this should regress.

        Longer-term, we should clean this up and get rid of the global dispatch entirely.

        Reviewed by Simon Fraser.

        Test: fast/text/svg-font-trigger-load-event.html

        * dom/Document.cpp:
        (WebCore::Document::implicitClose):

2014-08-27  Simon Fraser  <simon.fraser@apple.com>

        Some EventHandler naming cleanup
        https://bugs.webkit.org/show_bug.cgi?id=136303

        Reviewed by Beth Dakin.
        
        Rename "mev" variables to "mouseEvent".
        
        No behavior change.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseDoubleClickEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        (WebCore::EventHandler::updateDragAndDrop):
        (WebCore::EventHandler::prepareMouseEvent):
        (WebCore::EventHandler::sendContextMenuEvent):
        (WebCore::EventHandler::passMousePressEventToScrollbar):
        (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):

2014-08-27  Simon Fraser  <simon.fraser@apple.com>

        Some EventHandler naming cleanup
        https://bugs.webkit.org/show_bug.cgi?id=136303

        Reviewed by Beth Dakin.

        Rename PlatformMouseEvent variables from "mouseEvent" to "platformMouseEvent"
        so that a later patch can rename "mev" to "mouseEvent".
        
        0 => nullptr.
        
        No behavior change.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::clear):
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseDoubleClickEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::invalidateClick):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        (WebCore::EventHandler::handlePasteGlobalSelection):
        (WebCore::EventHandler::updateMouseEventTargetNode):
        (WebCore::EventHandler::dispatchMouseEvent):
        (WebCore::EventHandler::sendContextMenuEventForKey):
        (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):

2014-08-27  Beth Dakin  <bdakin@apple.com>

        Make isScrollableOrRubberbandable() a virtual function on RenderLayerModelObject
        https://bugs.webkit.org/show_bug.cgi?id=136307

        Reviewed by Simon Fraser.

        Remove extra parentheses. 
        * page/FrameView.cpp:
        (WebCore::FrameView::isScrollable):

        Mark isScrollableOrRubberbandable() as override now that the root implementation 
        is moving to RenderLayerModelObject. It can also be private now.
        * rendering/RenderBox.h:

        isBox() check and cast are no longer necessary.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):

        Base implementation should return false.
        * rendering/RenderLayerModelObject.h:
        (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable):

        Mark as override.
        * rendering/RenderView.h:

2014-08-27  Antti Koivisto  <antti@apple.com>

        REGRESSION(r172946): Plugin tests asserting on Yosemite debug bot
        https://bugs.webkit.org/show_bug.cgi?id=136301

        Reviewed by Alexey Proskuryakov.

        Don't pull the priority from the platform request if it is not defined.

        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdateResourceRequest):

2014-08-27  Timothy Hatcher  <timothy@apple.com>

        Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB)
        https://bugs.webkit.org/show_bug.cgi?id=136293

        Reviewed by Joseph Pecoraro.

        * inspector/InspectorIndexedDBAgent.cpp:
        (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from
        IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing.

2014-08-27  Beth Dakin  <bdakin@apple.com>

        overflow:scroll elements should not latch to the body if the body is 
        overflow:hidden
        https://bugs.webkit.org/show_bug.cgi?id=136273

        Reviewed by Darin Adler.

        This patch adds an optional parameter to isScrollable(). The Scrollability 
        parameter that allows the caller to define what they mean by 'scrollable.' Most 
        callers are interested in the default value, Scrollability::Scrollable, which 
        means that there is actually content to scroll to, and a scrollbar that will allow 
        you to access it. In some cases, such as this latching case, callers want to know 
        if the FrameView is allowed to rubber-band, which the main frame might be allowed 
        to do even if there is no content to scroll to. In that case, callers use 
        Scrollability::ScrollableOrRubberbandable.
        * page/FrameView.cpp:
        (WebCore::FrameView::isScrollable):
        (WebCore::FrameView::hasScrollableOrRubberbandableAncestor):

        New virtual function on ScrollableArea answers whether a ScrollableArea has any 
        scrollable or rubber-bandable ancestor.
        * page/FrameView.h:
        * platform/ScrollableArea.h:

        Events should only be allowed to prevent stretching if there is some ancestor 
        ScrollableArea that will be able to make use of the event. 
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
        (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):

        New ScrollableArea virtual function.
        * platform/win/PopupMenuWin.h:

        New RenderBox isScrollableOrRubberbandable() returns just 
        canBeScrolledAndHasScrollableArea() for most RenderBox, but will be overridden by 
        RenderView.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::isScrollableOrRubberbandable):
        * rendering/RenderBox.h:

        Recurse up the parent chain to find out if anything is scrollable or just rubber-
        bandable.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
        * rendering/RenderLayer.h:

        Call into RenderLayer.
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::hasScrollableOrRubberbandableAncestor):
        * rendering/RenderListBox.h:

        Override isScrollableOrRubberbandable() to handle the main frame case where the 
        main frame is typically allowed to rubber-band even if there is no content to 
        scroll to.
        * rendering/RenderView.cpp:
        (WebCore::RenderView::isScrollableOrRubberbandable):
        * rendering/RenderView.h:

2014-08-27  Benjamin Poulain  <bpoulain@apple.com>

        Updating attributes on HTML elements do not invalidate the style correctly unless the attribute name is lowercase in the stylesheet
        https://bugs.webkit.org/show_bug.cgi?id=136270

        Reviewed by Andreas Kling.

        In HTML, WebKit treats every attribute name lowercase to implement case-insensitive matching.
        When invalidating style, the StyleResolver was ignoring HTML and always using the XML names.

        This patch split the names on RuleFeatureSet in two sets: one for XML, one for HTML.
        In StyleResolver, the name used depends on the type of the element being updated.

        This patch also adds nodeNeedsStyleRecalc() to Internals to test the optimization and various cases
        of style update.

        Tests: fast/css/attribute-for-content-property-style-update-html.html
               fast/css/attribute-for-content-property-style-update-xhtml.xhtml
               fast/css/attribute-style-invalidation-optimization-html.html
               fast/css/attribute-style-invalidation-optimization-xhtml.xhtml
               fast/css/attribute-style-update-html.html
               fast/selectors/attribute-style-update-html.html
               fast/selectors/attribute-style-update-svg-in-html.html
               fast/selectors/attribute-style-update-xhtml.xhtml

        * css/RuleFeature.cpp:
        (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
        (WebCore::RuleFeatureSet::add):
        (WebCore::RuleFeatureSet::clear):
        * css/RuleFeature.h:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyProperty):
        * css/StyleResolver.h:
        (WebCore::StyleResolver::hasSelectorForAttribute):
        * dom/Element.cpp:
        (WebCore::Element::willModifyAttribute):
        * testing/Internals.cpp:
        (WebCore::Internals::address):
        (WebCore::Internals::nodeNeedsStyleRecalc):
        * testing/Internals.h:
        * testing/Internals.idl:

2014-08-27  Benjamin Poulain  <bpoulain@apple.com>

        Update the CSS Grammar selector names to get closer to the latest terminology
        https://bugs.webkit.org/show_bug.cgi?id=136277

        Reviewed by Andreas Kling.

        CSS Selector Level 4 gives useful definitions for various parts of a selector
        (see http://dev.w3.org/csswg/selectors4/#structure). This patch updates our names to be closer
        to that spec.

        Stricto sensu, our definition of "simple selector list" is wrong. I did not attempt to fix this
        because updates of CSS Selector Level 4 and WebVTT will eventually make that whole concept useless.

        * css/CSSGrammar.y.in:

2014-08-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL] Unskip compositing test
        https://bugs.webkit.org/show_bug.cgi?id=136151

        Reviewed by Csaba Osztrogonác.

        * rendering/RenderLayerBacking.cpp: Set true to setContentsOpaque() to support compositing test.
        (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):

2014-08-26  Vivek Galatage  <vivek.vg@samsung.com>

        Canvas direction should reflect change in dir attribute and also across save/restore operations
        https://bugs.webkit.org/show_bug.cgi?id=136098

        Reviewed by Darin Adler.

        Changed State.m_direction type from TextDirection to Direction enum to accomodate 'inherit'
        as a separate value. Modified the getter to compute the 'live' value for the direction attribute.
        Removed explicit passing of direction to CanvasRenderingContext2D::State constructor.

        Updated existing canvas-direction.html with additional cases to reflect this change.

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
        (WebCore::CanvasRenderingContext2D::reset):
        (WebCore::CanvasRenderingContext2D::State::State):
        (WebCore::CanvasRenderingContext2D::toTextDirection):
        (WebCore::CanvasRenderingContext2D::direction):
        (WebCore::CanvasRenderingContext2D::setDirection):
        (WebCore::CanvasRenderingContext2D::drawTextInternal):
        (WebCore::inheritedDirection): Deleted.
        * html/canvas/CanvasRenderingContext2D.h:

2014-08-26  Benjamin Poulain  <bpoulain@apple.com>

        Minor style tweak on StyleResolveTree
        https://bugs.webkit.org/show_bug.cgi?id=136233

        Reviewed by Sam Weinig.

        * style/StyleResolveTree.cpp:
        (WebCore::Style::resolveTree):
        Clang likely optimized it away, but I find that explicit style cleaner.

2014-08-26  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: put feature flags for Inspector domains in the protocol specification
        https://bugs.webkit.org/show_bug.cgi?id=136027

        Reviewed by Timothy Hatcher.

        Add 'featureGuard' settings to wrap domains with ENABLE macros.

        No new tests. No behavior was changed.

        * inspector/protocol/Database.json:
        * inspector/protocol/IndexedDB.json:
        * inspector/protocol/Replay.json:

2014-08-26  Andy Estes  <aestes@apple.com>

        [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR
        https://bugs.webkit.org/show_bug.cgi?id=136267

        Reviewed by Dan Bernstein.

        INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix.
        Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in
        engineering configurations.

        Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is
        used instead.

        * WebCore.xcodeproj/project.pbxproj:

2014-08-26  Brent Fulgham  <bfulgham@apple.com>

        [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
        https://bugs.webkit.org/show_bug.cgi?id=136258
        <rdar://problem/18134138>

        Reviewed by Tim Horton.

        Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
        values from passing through the 32-bit OLE_HANDLE data type.

        * platform/win/WindowMessageBroadcaster.cpp:
        (WebCore::WindowMessageBroadcaster::addListener):
        (WebCore::WindowMessageBroadcaster::removeListener):
        (WebCore::WindowMessageBroadcaster::destroy):
        (WebCore::WindowMessageBroadcaster::unsubclassWindow):
        (WebCore::WindowMessageBroadcaster::SubclassedWndProc):

2014-08-25  Maciej Stachowiak  <mjs@apple.com>

        Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
        https://bugs.webkit.org/show_bug.cgi?id=136082

        Reviewed by Alexey Proskuryakov.

        * platform/mac/Language.mm:
        (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
        with new WebCoreNSStringExtras helper.
        * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
        WKCopyCFLocalizationPreferredName.
        (preferredBundleLocalizationName): New helper - most preferred localization available
        in the main bundle, canonicalized the way we like it.
        (canonicalLocalizationName): Convert a lcalization name to a string with language and
        country code, using default if necessary (e.g. "en" maps to "en_US").
        * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
        * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
        * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
        * platform/mac/WebCoreSystemInterface.h: ditto
        * platform/mac/WebCoreSystemInterface.mm: ditto
        * platform/spi/cf: Added.
        * platform/spi/cf/CFLocaleSPI.h: Added. Declare
        CFLocaleGetLanguageRegionEncodingForLocaleIdentifier.

2014-08-26  Zoltan Horvath  <zoltan@webkit.org>

        [CSS Shapes] Positioned polygon reftests failing
        https://bugs.webkit.org/show_bug.cgi?id=135925

        Reviewed by David Hyatt.

        We didn't respect the shape-margin before a positioned polygon, since we checked
        the shape-margin for only 1 vertex for a polygon edge. This patch fixes the behavior,
        removes the tests from the skipped list and updates 1 test, which was incorrect.

        Updated existing test and removed tests from skipped list.

        * rendering/shapes/PolygonShape.cpp:
        (WebCore::clippedCircleXRange):
        (WebCore::PolygonShape::getExcludedInterval):

2014-08-26  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: Remove float to LayoutUnit ceil/round function wrappers.
        https://bugs.webkit.org/show_bug.cgi?id=136253

        Reviewed by Simon Fraser.

        These functions wrap LayoutUnit::fromFloatCeil/fromFloatRound() functions to ceil/round float to LayoutUnit.
        Their usage is limited and can easily be confused with the snapping functions (snap to css/device pixels).

        No change in functionality.

        * platform/LayoutUnit.h:
        (WebCore::roundedLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatRound() function.
        (WebCore::ceiledLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatCeil() function.
        * rendering/RenderBlock.cpp:
        (WebCore::updatePreferredWidth):
        (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
        (WebCore::adjustFloatForSubPixelLayout): Deleted.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::positionLineBox):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::offsetForInFlowPositionedInline):
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):

2014-08-26  Simon Fraser  <simon.fraser@apple.com>

        Ensure that layout is up-to-date before hit testing
        https://bugs.webkit.org/show_bug.cgi?id=136242
        rdar://problem/17435564

        Reviewed by Tim Horton.
        
        Various code paths can call into RenderView::hitTest() but fail to
        ensure that layout is up-to-date. This is a conservative change that
        fixes the issue for callers of EventHandler::hitTestResultAtPoint(),
        including WebPage::acceptsFirstMouse() and WebFrame::hitTest().
        
        This change is not general enough that we can ASSERT(!needsLayout())
        in RenderView::hitTest() yet.
        
        * page/EventHandler.cpp:
        (WebCore::EventHandler::hitTestResultAtPoint):

2014-08-26  Beth Dakin  <bdakin@apple.com>

        Rubber-banding in overflow:scroll regions does not work correctly with 
        direction:rtl
        https://bugs.webkit.org/show_bug.cgi?id=136176

        Reviewed by Tim Horton.

        Small cleanup.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::visibleContentRectInternal):

2014-08-26  Tim Horton  <timothy_horton@apple.com>

        Fix the build after r172963

        * page/DOMTimer.h:

2014-08-25  Gavin Barraclough  <barraclough@apple.com>

        DOMTimer may be deleted during timer fire
        https://bugs.webkit.org/show_bug.cgi?id=136198

        Reviewed by Geoff Garen.

        Consequentially ScheduledActions may also be deleted mid execution.
        This is fairly surprising & fragile, let's make this simpler.

        Currently DOMTimer instances are effectively owned by the ScriptExecutionContext.
        There is a 1-1 mapping between timers and contexts, all timers are help in a map
        on the context and if the context goes away all timers are deleted. Rather than
        being implemented in a straightforward fashion (a smart pointer type for the map
        value) this is currently implemented by having the timer objects listen for the
        context going away using contextDestroyed, and deleting themselves if so.

        Switch to using a smart pointer for values of m_timeouts in ScriptExecutionContext.
        By using a RefCounted object we can also extend the lifetime of the DOMTimer instance
        from within the DOMTimer::fired method, so the object is not destroyed while the
        member function is still on the stack.

        * WebCore.xcodeproj/project.pbxproj:
            - project -> private since DOMTimer could no longer be a forward declare in ScriptExecutionContext.h.
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
        (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
            - auto* -> auto& since value type in map is no longer a raw pointer.
        * dom/ScriptExecutionContext.h:
        (WebCore::ScriptExecutionContext::addTimeout):
            - DOMTimer* -> PassRefPtr<DOMTimer>
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::DOMTimer):
            - adopt the initial ref, and pass to addTimeout.
        (WebCore::DOMTimer::install):
            - updated comment.
        (WebCore::DOMTimer::removeById):
            - instead of explicitly deleting the timer and assuming this will implicitly remove it from the context map,
              we explicitly remove it from the context map and assume this will implicitly deleting the timer!
        (WebCore::DOMTimer::fired):
            - Add a RefPtr to keep the DOMTimer object alive until the fired method completes; to cancel a one-shot timer
              just remove it from the context's map, rather than explicitly deleting it.
        (WebCore::DOMTimer::~DOMTimer): Deleted.
        (WebCore::DOMTimer::contextDestroyed): Deleted.
            - no need! object lifetime management now handled by smart pointers.
        * page/DOMTimer.h:
            - added parent class RefCounted<DOMTimer>.

2014-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Selection background is rendered white when unfocused with recent GTK+
        https://bugs.webkit.org/show_bug.cgi?id=136251

        Reviewed by Martin Robinson.

        This is due to a change in the GTK+ theme, but because we are not
        using the right flags to get the selections colors. We should use
        GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_FOCUSED when focused and
        GTK_STATE_FLAG_SELECTED when unfocused, instead of
        GTK_STATE_FLAG_ACTIVE when unfocused.

        * platform/gtk/RenderThemeGtk3.cpp:
        (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
        (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
        (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
        (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
        (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
        (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
        (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
        (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):

2014-08-26  Krzysztof Czech  <k.czech@samsung.com>

        [EFL] Utilize espeak as a synthesizer back-end for WebSpeech
        https://bugs.webkit.org/show_bug.cgi?id=136127

        Reviewed by Gyuyoung Kim.

        Utilize espeak API to have support for speak, cancel and initializeVoiceList.

        * PlatformEfl.cmake:
        * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
        (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
        (WebCore::PlatformSpeechSynthesisProviderEfl::convertRateToEspeakValue):
        (WebCore::PlatformSpeechSynthesisProviderEfl::convertVolumeToEspeakValue):
        (WebCore::PlatformSpeechSynthesisProviderEfl::convertPitchToEspeakValue):
        (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName):
        (WebCore::PlatformSpeechSynthesisProviderEfl::engineInit):
        (WebCore::PlatformSpeechSynthesisProviderEfl::currentVoice):
        (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
        (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
        (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
        (WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
        * platform/efl/PlatformSpeechSynthesisProviderEfl.h:
        * platform/efl/PlatformSpeechSynthesizerEfl.cpp:
        (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
        (WebCore::PlatformSpeechSynthesizer::pause):
        (WebCore::PlatformSpeechSynthesizer::resume):
        (WebCore::PlatformSpeechSynthesizer::speak):
        (WebCore::PlatformSpeechSynthesizer::cancel):

2014-08-26  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL] Build break using clang
        https://bugs.webkit.org/show_bug.cgi?id=136245

        Reviewed by Gyuyoung Kim.

        * css/ViewportStyleResolver.cpp: Includes NodeRenderStyle.h

2014-08-26  Mark Rowe  <mrowe@apple.com>

        Build fix after r172951.

        * fileapi/Blob.h: Give the argument the name that the predicates expect.

2014-08-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Generate toFile() instead of manual functions.
        https://bugs.webkit.org/show_bug.cgi?id=136207

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * fileapi/Blob.h: Define BLOB_TYPE_CASTS.
        * fileapi/File.h: Use BLOB_TYPE_CASTS to generate toFile().
        (WebCore::toFile): Deleted.

2014-08-25  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions.
        https://bugs.webkit.org/show_bug.cgi?id=136236

        Reviewed by Simon Fraser.

        These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all.

        Non change in functionality.

        * dom/MouseRelatedEvent.cpp:
        (WebCore::MouseRelatedEvent::computePageLocation):
        (WebCore::MouseRelatedEvent::computeRelativePosition):
        * dom/Touch.cpp:
        (WebCore::Touch::Touch):
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::setPositionFromPoint):
        * page/DragController.cpp:
        (WebCore::elementUnderMouse):
        * page/EventHandler.cpp:
        (WebCore::selectionExtentRespectingEditingBoundary):
        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
        * platform/graphics/LayoutPoint.h:
        (WebCore::roundedLayoutPoint): Deleted.
        * platform/graphics/LayoutSize.h:
        (WebCore::roundedLayoutSize): Deleted.
        * rendering/EllipsisBox.cpp:
        (WebCore::EllipsisBox::nodeAtPoint):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::selectionGapRectsForRepaint):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::mapLocalToContainer):
        (WebCore::RenderBox::positionLineBox):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
        * rendering/RenderEmbeddedObject.h:
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::localCaretRect):
        (WebCore::RenderInline::mapLocalToContainer):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::absoluteToContents):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderMultiColumnFlowThread.cpp:
        (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::mapLocalToContainer):
        * rendering/shapes/ShapeOutsideInfo.cpp:
        (WebCore::ShapeOutsideInfo::createShapeForImage):
        * rendering/svg/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::nodeAtFloatPoint):
        * rendering/svg/RenderSVGForeignObject.cpp:
        (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::nodeAtFloatPoint):
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::nodeAtFloatPoint):
        * testing/Internals.cpp:
        (WebCore::Internals::nodesFromRect):

2014-08-25  Zalan Bujtas  <zalan@apple.com>

        Rename RenderObject::showTree() and showTreeForThis() to showNodeTree*().
        https://bugs.webkit.org/show_bug.cgi?id=136238

        Reviewed by Simon Fraser.

        showNodeTree()/showNodeTreeForThis() reflects the functionality better.

        No change in functionality.

        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::showNodeTreeForThis):
        (showNodeTree):
        (WebCore::InlineBox::showTreeForThis): Deleted.
        (showTree): Deleted.
        * rendering/InlineBox.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::showNodeTreeForThis):
        (showNodeTree):
        (WebCore::RenderObject::showTreeForThis): Deleted.
        (showTree): Deleted.
        * rendering/RenderObject.h:

2014-08-25  Antti Koivisto  <antti@apple.com>

        Don't pass priority as parameter to ResourceLoadScheduler
        https://bugs.webkit.org/show_bug.cgi?id=136232

        Reviewed by Sam Weinig.

        It is part of the ResourceRequest which is also passed in.

        * WebCore.exp.in:
        * loader/ResourceLoadScheduler.cpp:
        (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
        (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
        (WebCore::ResourceLoadScheduler::scheduleLoad):
        * loader/ResourceLoadScheduler.h:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):

            Restore the original request priority when a delegate modifies the request.

2014-08-25  Beth Dakin  <bdakin@apple.com>

        Rubber-banding in overflow:scroll regions does not work correctly with direction:rtl
        https://bugs.webkit.org/show_bug.cgi?id=136176

        Reviewed by Sam Weinig.

        Use scrollPosition() instead of scrollXOffset() and scrollYOffset() which both add 
        in the scrollOrigin(). Other implementations of visibleContentRectInternal() do 
        not add in the scrollOrigin(), so RenderLayer's shouldn't either in order to be
        consistent. This makes rubber-banding work for RTL because 
        ScrollAnimatorMac::pinnedInDirection() and 
        ScrollAnimatorMac::absoluteScrollPosition() both return the expect values now.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::visibleContentRectInternal):

2014-08-25  Benjamin Poulain  <benjamin@webkit.org>

        Reduce style marking when using the pseudo class :placeholder-shown
        https://bugs.webkit.org/show_bug.cgi?id=136203

        Reviewed by Darin Adler.

        When the :placeholder-shown filter is hit, we were always marking the RenderStyle as unique.
        As a result, if :placeholder-shown was used without a more restrictive filter (e.g. "*:placeholder-shown"
        or simply ":placeholder-shown"), style sharing was disabled for the whole tree.

        This patch rescope the tree marking to any element that can be affected by a placeholder:
        any the subclass of HTMLTextFormControlElement. For other elements, any change in internal state
        would be irrelevant for "isPlaceholderVisible".

        Styling of :placeholder-shown is covered by the existing tests. Style sharing of :placeholder-shown
        is covered by LayoutTests/fast/css/placeholder-shown-basics.html.

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isPlaceholderShown): Deleted.
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
        (WebCore::SelectorCompiler::isPlaceholderShown):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
        (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted.

2014-08-25  Antti Koivisto  <antti@apple.com>

        Remove ResourceLoader::didChangePriority
        https://bugs.webkit.org/show_bug.cgi?id=136230

        Reviewed by Andreas Kling.

        It doesn't do anything on any platform.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didChangePriority): Deleted.
        * loader/ResourceLoader.h:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::setLoadPriority):
        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::didChangePriority): Deleted.
        * platform/network/ResourceHandle.h:

2014-08-24  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: rename Inspector::TypeBuilder to Inspector::Protocol
        https://bugs.webkit.org/show_bug.cgi?id=136031

        Reviewed by Timothy Hatcher.

        Rename TypeBuilder namespace to Protocol. Disambiguate where
        necessary. Also rename InspectorTypeBuilder to ProtocolTypes.

        * CMakeLists.txt:
        * DerivedSources.make:
        * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Removed.
        * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Removed.
        * WebCore.order:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * inspector/CommandLineAPIHost.cpp:
        (WebCore::CommandLineAPIHost::inspectImpl):
        * inspector/InspectorApplicationCacheAgent.cpp:
        (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
        (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
        (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
        (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
        (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
        * inspector/InspectorApplicationCacheAgent.h:
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
        (WebCore::InspectorCSSAgent::getInlineStylesForNode):
        (WebCore::InspectorCSSAgent::getComputedStyleForNode):
        (WebCore::InspectorCSSAgent::getAllStyleSheets):
        (WebCore::InspectorCSSAgent::getStyleSheet):
        (WebCore::InspectorCSSAgent::setStyleText):
        (WebCore::InspectorCSSAgent::setPropertyText):
        (WebCore::InspectorCSSAgent::toggleProperty):
        (WebCore::InspectorCSSAgent::setRuleSelector):
        (WebCore::InspectorCSSAgent::addRule):
        (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
        (WebCore::InspectorCSSAgent::getNamedFlowCollection):
        (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
        (WebCore::InspectorCSSAgent::collectStyleSheets):
        (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
        (WebCore::InspectorCSSAgent::detectOrigin):
        (WebCore::InspectorCSSAgent::buildObjectForRule):
        (WebCore::InspectorCSSAgent::buildArrayForRuleList):
        (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
        (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
        (WebCore::InspectorCSSAgent::buildArrayForRegions):
        (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
        * inspector/InspectorCSSAgent.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorDOMAgent::getDocument):
        (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
        (WebCore::InspectorDOMAgent::querySelectorAll):
        (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
        (WebCore::InspectorDOMAgent::getEventListenersForNode):
        (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
        (WebCore::InspectorDOMAgent::getSearchResults):
        (WebCore::InspectorDOMAgent::resolveNode):
        (WebCore::InspectorDOMAgent::getAttributes):
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
        (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
        (WebCore::InspectorDOMAgent::processAccessibilityChildren):
        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
        (WebCore::InspectorDOMAgent::didCommitLoad):
        (WebCore::InspectorDOMAgent::didInsertDOMNode):
        (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
        * inspector/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
        (WebCore::InspectorDOMStorageAgent::storageId):
        (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
        * inspector/InspectorDOMStorageAgent.h:
        * inspector/InspectorDatabaseAgent.cpp:
        (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
        * inspector/InspectorDatabaseAgent.h:
        * inspector/InspectorDatabaseResource.cpp:
        (WebCore::InspectorDatabaseResource::bind):
        * inspector/InspectorIndexedDBAgent.cpp:
        * inspector/InspectorLayerTreeAgent.cpp:
        (WebCore::InspectorLayerTreeAgent::layersForNode):
        (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
        (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
        (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
        (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
        * inspector/InspectorLayerTreeAgent.h:
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::resourceTypeJson):
        (WebCore::InspectorPageAgent::cachedResourceTypeJson):
        (WebCore::buildObjectForCookie):
        (WebCore::buildArrayForCookies):
        (WebCore::InspectorPageAgent::getCookies):
        (WebCore::InspectorPageAgent::getResourceTree):
        (WebCore::InspectorPageAgent::searchInResource):
        (WebCore::buildObjectForSearchResult):
        (WebCore::InspectorPageAgent::searchInResources):
        (WebCore::InspectorPageAgent::buildObjectForFrame):
        (WebCore::InspectorPageAgent::buildObjectForFrameTree):
        * inspector/InspectorPageAgent.h:
        * inspector/InspectorReplayAgent.cpp:
        (WebCore::buildInspectorObjectForPosition):
        (WebCore::buildInspectorObjectForInput):
        (WebCore::buildInspectorObjectForSession):
        (WebCore::buildInspectorObjectForSessionState):
        (WebCore::buildInspectorObjectForSegmentState):
        (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
        (WebCore::SerializeInputToJSONFunctor::operator()):
        (WebCore::buildInspectorObjectForSegment):
        (WebCore::InspectorReplayAgent::switchSession):
        (WebCore::InspectorReplayAgent::insertSessionSegment):
        (WebCore::InspectorReplayAgent::removeSessionSegment):
        (WebCore::InspectorReplayAgent::currentReplayState):
        (WebCore::InspectorReplayAgent::getAvailableSessions):
        (WebCore::InspectorReplayAgent::getSessionData):
        (WebCore::InspectorReplayAgent::getSegmentData):
        * inspector/InspectorReplayAgent.h:
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::buildObjectForTiming):
        (WebCore::buildObjectForResourceRequest):
        (WebCore::buildObjectForResourceResponse):
        (WebCore::buildObjectForCachedResource):
        (WebCore::InspectorResourceAgent::willSendRequest):
        (WebCore::InspectorResourceAgent::didReceiveResponse):
        (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
        (WebCore::InspectorResourceAgent::buildInitiatorObject):
        (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
        (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
        (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
        (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
        * inspector/InspectorResourceAgent.h:
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::buildSourceRangeObject):
        (WebCore::buildMediaObject):
        (WebCore::fillMediaListChain):
        (WebCore::InspectorStyle::buildObjectForStyle):
        (WebCore::InspectorStyle::buildArrayForComputedStyle):
        (WebCore::InspectorStyle::styleWithProperties):
        (WebCore::InspectorStyleSheet::create):
        (WebCore::InspectorStyleSheet::InspectorStyleSheet):
        (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
        (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
        (WebCore::selectorsFromSource):
        (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
        (WebCore::InspectorStyleSheet::buildObjectForRule):
        (WebCore::InspectorStyleSheet::buildObjectForStyle):
        (WebCore::InspectorStyleSheet::resourceStyleSheetText):
        (WebCore::InspectorStyleSheet::buildArrayForRuleList):
        (WebCore::InspectorStyleSheetForInlineStyle::create):
        (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
        * inspector/InspectorStyleSheet.h:
        (WebCore::InspectorStyleSheet::canBind):
        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::toProtocol):
        (WebCore::InspectorTimelineAgent::addRecordToTimeline):
        (WebCore::InspectorTimelineAgent::sendEvent):
        * inspector/PageRuntimeAgent.cpp:

2014-08-25  Brendan Long  <b.long@cablelabs.com>

        [GStreamer] ASSERT failure in WebKitWebSource in StreamingClient
        https://bugs.webkit.org/show_bug.cgi?id=136132

        adoptGRef() has an ASSERT failure if it's used on a floating pointer. For some reason,
        WebKitWebSrc* src in StreamingClient's constructor is floating. Since we
        don't construct this ourselves, I assume this is happening in Playbin.

        If we remove the ref and adopt, GRefPtr's constructor calls gst_object_ref_sink,
        which removes the floating reference and doesn't increment the reference count.
        This should work, but actually causes the page to either lock up or crash (different
        results for different testers).

        In this case, it seems like the adoptGRef / gst_object_ref was the correct thing to do,
        but adoptGRef won't actually let us do. Removing the ASSERT is a bad idea, because
        usually we don't want to adopt floating pointers.

        This is all a long way of saying that making m_src a raw pointer and manually
        calling gst_object_ref(), and calling gst_object_unref in the destructor is the
        best solution in this case, since it fixes the problem while leaving the ASSERT
        to protect us in the much more common case where adopting a floating reference is bad.

        Reviewed by Philippe Normand.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (StreamingClient::StreamingClient): Make m_src a raw pointer instead of a GRefPtr.
        (StreamingClient::~StreamingClient): Unref m_src.
        (StreamingClient::createReadBuffer): Replace m_src.get() with m_src, since it's a raw pointer now.
        (StreamingClient::handleResponseReceived): Same.
        (StreamingClient::handleDataReceived): Same.
        (StreamingClient::handleNotifyFinished): Same.
        (CachedResourceStreamingClient::notifyFinished): Same.
        (ResourceHandleStreamingClient::didFail): Same.
        (ResourceHandleStreamingClient::wasBlocked): Same.
        (ResourceHandleStreamingClient::cannotShowURL): Same.

2014-08-25  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Remove PopupMenuGtk, SearchPopupMenuGtk
        https://bugs.webkit.org/show_bug.cgi?id=136211

        Reviewed by Carlos Garcia Campos.

        Remove the two classes from the codebase. They're not used anymore
        after the WebKit1 layer of the GTK port was removed some time ago.

        * PlatformGTK.cmake:
        * platform/gtk/PopupMenuGtk.cpp: Removed.
        * platform/gtk/PopupMenuGtk.h: Removed.
        * platform/gtk/SearchPopupMenuGtk.cpp: Removed.
        * platform/gtk/SearchPopupMenuGtk.h: Removed.

2014-08-25  Shivakumar JM  <shiva.jm@samsung.com>

        Web Core: Fix unused parameter build warning.
        https://bugs.webkit.org/show_bug.cgi?id=136208

        Reviewed by Darin Adler.

        Fix unused build warning by removing parameter, which is not used.

        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):

2014-08-22  Sergio Villar Senin  <svillar@igalia.com>

        ASSERTION FAILED: !trackSizes.isEmpty() in WebCore::createGridTrackList
        https://bugs.webkit.org/show_bug.cgi?id=136149

        Reviewed by Darin Adler.

        The second argument of the repeat() function is a <track-list>
        that must have at least one <track-size>. Should it not be found,
        the declaration must be invalidated.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseGridTrackRepeatFunction):

2014-08-24  Zan Dobersek  <zdobersek@igalia.com>

        Move WebCore storage code to C++11 lambdas, std::function
        https://bugs.webkit.org/show_bug.cgi?id=126435

        Reviewed by Darin Adler.

        Use C++11 lambdas instead of WTF::bind and std::function<void ()>
        instead of WTF::Function<void ()> in StorageAreaSync, StorageSyncManager,
        StorageThread and StorageTracker classes.

        * storage/StorageAreaSync.cpp:
        (WebCore::StorageAreaSync::StorageAreaSync):
        (WebCore::StorageAreaSync::scheduleFinalSync):
        (WebCore::StorageAreaSync::syncTimerFired):
        * storage/StorageSyncManager.cpp:
        (WebCore::StorageSyncManager::dispatch):
        * storage/StorageSyncManager.h:
        * storage/StorageThread.cpp:
        (WebCore::StorageThread::dispatch):
        (WebCore::StorageThread::terminate):
        (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
        * storage/StorageThread.h:
        * storage/StorageTracker.cpp:
        (WebCore::StorageTracker::importOriginIdentifiers):
        (WebCore::StorageTracker::syncImportOriginIdentifiers):
        (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
        (WebCore::StorageTracker::setOriginDetails):
        (WebCore::StorageTracker::deleteAllOrigins):
        (WebCore::StorageTracker::deleteOrigin):

2014-08-24  Alexey Proskuryakov  <ap@apple.com>

        ASSERT(extractable()) when storing a non-extractable key in IndexedDB
        https://bugs.webkit.org/show_bug.cgi?id=136202
        rdar://problem/17993967

        Reviewed by Darin Adler.

        Test: crypto/subtle/rsa-indexeddb-non-exportable.html

        Removed the obsolete assertion.

        * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::exportData):
        * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::exportData):
        * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::exportData):

2014-08-24  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: Rename DOM.RGBA and remove workarounds in the bindings generator
        https://bugs.webkit.org/show_bug.cgi?id=136025

        Reviewed by Joseph Pecoraro.

        Rename DOM.RGBA to DOM.RGBAColor to avoid name clashes with headers on Windows CE.
        This workaround used to be special-cased in the bindings generator.

        Type names are not used in protocol messages, so this does not introduce legacy issues.

        * inspector/protocol/DOM.json:

2014-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Toggle buttons visually broken with GTK+ 3.13.7
        https://bugs.webkit.org/show_bug.cgi?id=136130

        Reviewed by Martin Robinson.

        No new tests. Hopefully covered by existing tests, and our tests only
        run with GTK+ 3.6 anyway.

        * platform/gtk/RenderThemeGtk3.cpp:
        (WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for
        GTK+ 3.13.7 and above to ensure toggle buttons display as toggled.

2014-08-23  Brady Eidson  <beidson@apple.com>

        Random Gamepad cleanup
        https://bugs.webkit.org/show_bug.cgi?id=136193

        Reviewed by Sam Weinig.

        No new tests (Not tested yet, and no change in behavior anyways)

        - Use DOMWindow WeakPtrs when iterating
        - More references instead of pointers

        * Modules/gamepad/GamepadEvent.cpp:
        (WebCore::GamepadEvent::GamepadEvent):
        * Modules/gamepad/GamepadEvent.h:
        (WebCore::GamepadEvent::create):

        * Modules/gamepad/GamepadManager.cpp:
        (WebCore::GamepadManager::platformGamepadDisconnected):
        (WebCore::GamepadManager::makeGamepadVisible):
        * Modules/gamepad/NavigatorGamepad.cpp:
        (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
        (WebCore::NavigatorGamepad::gamepadAtIndex): Deleted.
        * Modules/gamepad/NavigatorGamepad.h:

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::DOMWindow):
        * page/DOMWindow.h:

2014-08-23  Byungseon Shin  <sun.shin@lge.com>

        Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
        https://bugs.webkit.org/show_bug.cgi?id=109658

        Reviewed by Martin Robinson.
 
        Based on patch originally written by Tim Horton.
        Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
 
        * WebCore.exp.in:
        Adjust exports.
 
        * platform/graphics/GraphicsLayer.h:
        Move ContentsLayerPurpose enum up out of GraphicsLayer platform implmentations
        and into GraphicsLayer, so we can use it as a parameter.
        Add ContentsLayerForPlugin.
 
        (WebCore::GraphicsLayer::setContentsToPlatformLayer):
        Remove setContentsToMedia and setContentsToCanvas, and replace them
        with setContentsToPlatformLayer, which previously existed but was unused
        and simply called setContentsToMedia.
        setContentsToPlatformLayer takes a ContentsLayerPurpose, primarily
        so that GraphicsLayerCA can know whether it needs to setNeedsDisplay
        the layer when parenting it (canvas) or not (everything else).
 
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
        Rename function setContentsToMedia -> setContentsToPlatformLayer.
        Rename argument mediaLayer -> platformLayer.
        Store the passed-in ContentsLayerPurpose.
        Remove setContentsToCanvas.
 
        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
        (WebCore::GraphicsLayerCA::updateContentsPlatformLayer):
        Remove updateContentsMediaLayer and updateContentsCanvas layer,
        add updateContentsPlatformLayer.
 
        * platform/graphics/ca/GraphicsLayerCA.h:
        Do the same to the LayerChange enum.
 
        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
        (WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):
        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
        (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
        (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
        (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
        (WebCore::CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded):
        (WebCore::CoordinatedGraphicsLayer::createPlatformLayerIfNeeded):
        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
        Fold these together in the same way as elsewhere.
 
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
        Do the same to the LayerChange enum.
 
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
        (WebCore::CoordinatedGraphicsScene::createPlatformLayerIfNeeded):
        (WebCore::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
        (WebCore::CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded):
        (WebCore::CoordinatedGraphicsScene::setLayerState):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
        (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
        Rename canvasLayer -> platformLayer.
 
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration):
        Use the new setContentsToPlatformLayer, passing in the relevant ContentsLayerPurpose.

2014-08-23  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Do not copy large module source strings
        https://bugs.webkit.org/show_bug.cgi?id=136191

        Reviewed by Benjamin Poulain.

        * inspector/CommandLineAPIModule.cpp:
        (WebCore::CommandLineAPIModule::source):

2014-08-23  Zan Dobersek  <zdobersek@igalia.com>

        Remove uses of CrossThreadTask in ThreadableWebSocketChannelClientWrapper, WorkerThreadableWebSocketChannel
        https://bugs.webkit.org/show_bug.cgi?id=133954

        Reviewed by Darin Adler.

        Replace uses of CrossThreadTask with C++11 lambdas in the ThreadableWebSocketChannelClientWrapper
        and WorkerThreadableWebSocketChannel classes.

        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
        (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
        (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
        (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback): Deleted.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): Deleted.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): Deleted.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): Deleted.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback): Deleted.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): Deleted.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): Deleted.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): Deleted.
        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
        (WebCore::workerGlobalScopeDidSend): Deleted.
        (WebCore::workerGlobalScopeDidGetBufferedAmount): Deleted.
        (WebCore::workerGlobalScopeDidConnect): Deleted.
        (WebCore::workerGlobalScopeDidReceiveMessage): Deleted.
        (WebCore::workerGlobalScopeDidReceiveBinaryData): Deleted.
        (WebCore::workerGlobalScopeDidUpdateBufferedAmount): Deleted.
        (WebCore::workerGlobalScopeDidStartClosingHandshake): Deleted.
        (WebCore::workerGlobalScopeDidClose): Deleted.
        (WebCore::workerGlobalScopeDidReceiveMessageError): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend): Deleted.
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume): Deleted.
        * Modules/websockets/WorkerThreadableWebSocketChannel.h:

2014-08-23  Yusuke Suzuki  <utatane.tea@gmail.com>

        Clean up build warnings: control reaches end of non-void function
        https://bugs.webkit.org/show_bug.cgi?id=135889

        Reviewed by Alexey Proskuryakov.

        * bindings/js/JSCryptoAlgorithmDictionary.cpp:
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
        (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
        * crypto/CryptoKey.cpp:
        (WebCore::CryptoKey::type):

2014-08-23  Zan Dobersek  <zdobersek@igalia.com>

        [TexMap] Only notify of a required flush on the first layer property change
        https://bugs.webkit.org/show_bug.cgi?id=136104

        Reviewed by Martin Robinson.

        The GraphicsLayer's client should only be notified that a flush is required
        when the first change of one of the layer's properties is initiated, instead
        of requesting the flush on every such change.

        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::notifyChange):

2014-08-22  Dan Bernstein  <mitz@apple.com>

        Try to fix the Mac build using the internal SDK.

        * bindings/objc/PublicDOMInterfaces.h:

2014-08-22  Renato Nagy  <nagy.renato@stud.u-szeged.hu>

        Remove LevelDB.
        https://bugs.webkit.org/show_bug.cgi?id=136170

        Reviewed by Gyuyoung Kim.

        * CMakeLists.txt:
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::createIndex):
        * Modules/indexeddb/IDBTransactionCoordinator.cpp:
        (WebCore::IDBTransactionCoordinator::canRunTransaction):
        (WebCore::doScopesOverlap): Deleted.
        * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Removed.
        * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Removed.
        * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Removed.
        * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Removed.
        * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Removed.
        * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h: Removed.
        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed.
        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed.
        * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Removed.
        * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Removed.
        * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Removed.
        * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Removed.
        * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Removed.
        * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Removed.
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/DatabaseStrategy.cpp:
        (WebCore::DatabaseStrategy::createIDBFactoryBackend):
        * platform/leveldb/LevelDBComparator.h: Removed.
        * platform/leveldb/LevelDBDatabase.cpp: Removed.
        * platform/leveldb/LevelDBDatabase.h: Removed.
        * platform/leveldb/LevelDBIterator.h: Removed.
        * platform/leveldb/LevelDBSlice.h: Removed.
        * platform/leveldb/LevelDBTransaction.cpp: Removed.
        * platform/leveldb/LevelDBTransaction.h: Removed.
        * platform/leveldb/LevelDBWriteBatch.cpp: Removed.
        * platform/leveldb/LevelDBWriteBatch.h: Removed.

2014-08-22  KwangHyuk Kim  <hyuki.kim@samsung.com>

        [EFL] Fix build break caused by ENABLE_GAMEPAD_DEPRECATED.
        https://bugs.webkit.org/show_bug.cgi?id=136110

        Reviewed by Gyuyoung Kim.

        WebCore_INCLUDE_DIRECTORY for gamepad was removed from WK2 Efl in order to fix build break when ENABLE_GAMEPAD_DEPRECATED is on.

        No new tests because no functional changes.

        * PlatformEfl.cmake:

2014-08-22  Benjamin Poulain  <benjamin@webkit.org>

        Style invalidation does not work for adjacent node updates
        https://bugs.webkit.org/show_bug.cgi?id=136145

        Reviewed by Antti Koivisto.

        There were a bunch of cases in which the style would be in an inconsistent
        state until the style resolver kicks in for the entire document.

        For example, let's take the selector "foo.bar + target". When the class "bar"
        changes, the element foo is invalidated. The element target is untouched.

        Now, if the style of "target" is accessed, nodeOrItsAncestorNeedsStyleRecalc()
        returns false and the old style is accessed.

        At some point, when the style of the entire document is resolved, the node
        "foo" is styled, and "target" is invalidated.


        To fix the issue, this patch adds an extra flag keeping track of subtrees that
        have any node needing style recalc: DirectChildNeedsStyleRecalcFlag.

        When invalidating the node "foo", its parent is marked with
        DirectChildNeedsStyleRecalcFlag to note that one of the child nodes has an invalid style.

        When verifying the style state in nodeOrItsAncestorNeedsStyleRecalc(), we check that flag
        in addition to the siblings dependencies to find if the node is part of a subtree that may
        be invalid due to sibling selectors.

        Similarly, in the style resolver, we use the flag to clear the style on all elements
        that could potentially be invalid.


        This patch removes the changes introduced by r172721
        (The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element).
        That bug was just a special case of what is solved here.


        Tests: fast/selectors/attribute-direct-adjacent-style-update.html
               fast/selectors/attribute-sibling-style-update.html
               fast/selectors/class-direct-adjacent-style-update.html
               fast/selectors/class-sibling-style-update.html
               fast/selectors/first-child-direct-adjacent-style-update.html
               fast/selectors/first-child-sibling-style-update.html

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
        (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty): Deleted.
        * dom/ContainerNode.h:
        (WebCore::ContainerNode::directChildNeedsStyleRecalc):
        (WebCore::ContainerNode::setDirectChildNeedsStyleRecalc):
        Remove the special case for :empty.

        * dom/Document.cpp:
        (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
        * dom/Element.cpp:
        (WebCore::checkForEmptyStyleChange):
        (WebCore::checkForSiblingStyleChanges):
        (WebCore::Element::setStyleOfSiblingsAffectedByEmpty): Deleted.
        (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty): Deleted.
        * dom/Element.h:
        (WebCore::Element::styleOfSiblingsAffectedByEmpty): Deleted.
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::ElementRareData):
        (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty): Deleted.
        (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty): Deleted.
        * dom/Node.cpp:
        (WebCore::markAncestorsWithChildNeedsStyleRecalc):
        (WebCore::Node::setNeedsStyleRecalc):
        (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Deleted.
        * dom/Node.h:
        (WebCore::Node::clearChildNeedsStyleRecalc):
        * style/StyleResolveTree.cpp:
        (WebCore::Style::resetStyleForNonRenderedDescendants):

2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>

        Remove unused legacy InspectorFrontendHost methods
        https://bugs.webkit.org/show_bug.cgi?id=136186

        Reviewed by Andreas Kling.

        * bindings/js/JSInspectorFrontendHostCustom.cpp:
        (WebCore::JSInspectorFrontendHost::recordActionTaken): Deleted.
        (WebCore::JSInspectorFrontendHost::recordPanelShown): Deleted.
        (WebCore::JSInspectorFrontendHost::recordSettingChanged): Deleted.
        * inspector/InspectorFrontendHost.idl:

2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>

        Remove unnecessary WTFString creation in Dictionary getter
        https://bugs.webkit.org/show_bug.cgi?id=136184

        Reviewed by Benjamin Poulain.

        * bindings/js/Dictionary.cpp:
        (WebCore::Dictionary::getWithUndefinedOrNullCheck):
        * bindings/js/Dictionary.h:
        * bindings/js/JSDictionary.cpp:
        (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
        * bindings/js/JSDictionary.h:

2014-08-22  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r172866.
        https://bugs.webkit.org/show_bug.cgi?id=136177

        Broke iOS build (Requested by othermaciej on #webkit).

        Reverted changeset:

        "Replace use of WKCopyCFLocalizationPreferredName with
        NSLocale public API"
        https://bugs.webkit.org/show_bug.cgi?id=136082
        http://trac.webkit.org/changeset/172866

2014-08-22  David Hyatt  <hyatt@apple.com>

        Add proper support for letter-spacing to bopomofo Ruby
        https://bugs.webkit.org/show_bug.cgi?id=136171

        Reviewed by Sam Weinig.

        Added fast/ruby/bopomofo-letter-spacing.html

        * rendering/RenderRubyRun.cpp:
        (WebCore::RenderRubyRun::layout):
        Alter the layout of bopomofo ruby so that the distance between the base characters is the max of
        the letter-spacing between the characters and the minimum required width to hold two rows of
        Ruby.

        Push the bopomofo ruby into the letter-spacing to ensure that it comes right after the base character
        and not after all the letter-spacing.

2014-08-22  Simon Fraser  <simon.fraser@apple.com>

        Fix showing paint rects when selecting lines in the timeline
        https://bugs.webkit.org/show_bug.cgi?id=136173

        Reviewed by Joseph Pecoraro.

        Fix the condition used to decide when to show the overlay.

        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::shouldShowOverlay):

2014-08-22  Simon Fraser  <simon.fraser@apple.com>

        Use the correct rect for paint flashing
        https://bugs.webkit.org/show_bug.cgi?id=136169

        Reviewed by Sam Weinig.

        Use the rect we've converted to root document coordinates for paint flashing.

        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didPaint):

2014-08-22  Dean Jackson  <dino@apple.com>

        Google Canvas2D maps are too slow and uncontrollable with Safari with full screen mode
        https://bugs.webkit.org/show_bug.cgi?id=136168

        Reviewed by Tim Horton.

        When Google maps are using their 2D "lite" fallback and you're drawing in a huge
        window such as fullscreen 4K, we would drop back to unaccelerated mode, thinking
        that we'd exceeded the maximum IOSurface size.

        Remove the hardcoded limit on IOSurface sizes, and instead ask the system
        what it believe the maximum to be. This was significantly higher than our
        limit on the systems I tested.

        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::ImageBuffer): Include our IOSurface wrapper, which
        has a query for maximum size, and use that instead.

2014-08-22  Simon Fraser  <simon.fraser@apple.com>

        Maybe fix Windows.

        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::showPaintRect):

2014-08-22  Simon Fraser  <simon.fraser@apple.com>

        Implement paint flashing in the WK1 InspectorOverlay page
        https://bugs.webkit.org/show_bug.cgi?id=136138

        Reviewed by Sam Weinig, Joseph Pecoraro.

        Implement paint flashing for the WebKit1 InspectorOverlay via a second canvas in the overlay page.
        We avoid allocating backing store for this canvas until we have paint rects.
        
        Because this overlay page is weird and doesn't know how to paint itself, InspectorOverlay manages
        an array of rects, and pushes them to the page when they change, before forcing a paint.
        
        Because iOS doesn't use the InspectorOverlay page, stub out setShowPaintRects on its
        WebKit WebInspectorClient, but don't yet implement paint flashing there.

        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::InspectorOverlay):
        (WebCore::InspectorOverlay::shouldShowOverlay):
        (WebCore::InspectorOverlay::update):
        (WebCore::buildObjectForRect):
        (WebCore::InspectorOverlay::setShowingPaintRects):
        (WebCore::InspectorOverlay::showPaintRect):
        (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
        (WebCore::InspectorOverlay::drawPaintRects):
        (WebCore::InspectorOverlay::forcePaint):
        (WebCore::quadToPath): Deleted.
        (WebCore::drawOutlinedQuad): Deleted.
        (WebCore::InspectorOverlay::drawOutline): Deleted.
        * inspector/InspectorOverlay.h:
        * inspector/InspectorOverlayPage.html:
        * inspector/InspectorOverlayPage.js:
        (updatePaintRects):
        (reset):
        (_drawShapeHighlight):
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::setShowPaintRects):
        (WebCore::InspectorPageAgent::didPaint):

2014-08-22  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Cleanup media code
        https://bugs.webkit.org/show_bug.cgi?id=136163

        Reviewed by Jer Noble.

        No new tests, no functionality was changed.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_requestingPlay.
        (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Deleted.
        (WebCore::HTMLMediaElement::parseAttribute): Don't call parseMediaPlayerAttribute.
        (WebCore::HTMLMediaElement::playInternal): m_requestingPlay is dead, Jim.
        (WebCore::HTMLMediaElement::updatePlayState): Ditto.
        (WebCore::HTMLMediaElement::updatePlayState): Remove obsolete FIXME.
        * html/HTMLMediaElement.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::attributeChanged): Deleted.
        (WebCore::MediaPlayer::readyForPlayback): Deleted.
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::attributeChanged): Deleted.
        (WebCore::MediaPlayerPrivateInterface::readyForPlayback): Deleted.

2014-08-20  Maciej Stachowiak  <mjs@apple.com>

        Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
        https://bugs.webkit.org/show_bug.cgi?id=136082

        Reviewed by Alexey Proskuryakov.

        * platform/mac/Language.mm:
        (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
        with new WebCoreNSStringExtras helper.
        * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
        WKCopyCFLocalizationPreferredName.
        (preferredBundleLocalizationName): New helper - most preferred localization available
        in the main bundle, canonicalized the way we like it.
        (canonicalLocalizationName): Convert a lcalization name to a string with language and
        country code, using default if necessary (e.g. "en" maps to "en_US").
        * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
        * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
        * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
        * platform/mac/WebCoreSystemInterface.h: ditto
        * platform/mac/WebCoreSystemInterface.mm: ditto

2014-08-22  Daniel Bates  <dabates@apple.com>

        [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
        and ENABLE_XSLT when building with the iOS public SDK
        https://bugs.webkit.org/show_bug.cgi?id=135945

        Reviewed by Andy Estes.

        Towards bringing up the iOS WebKit port using the iOS public SDK, disable the proprietary
        iOS gesture and touch event code. For now we also temporarily disable ENABLE_TOUCH_EVENTS
        and ENABLE_XSLT while we focus to get the rest of the port built using the public SDK. We'll
        look to enable these features once we stabilize the build.

        * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
        and ENABLE_XSLT when building with the public SDK.
        * Configurations/WebCore.xcconfig:
        * DerivedSources.make: Conditionally generate derived sources for touch and gesture events as applicable and pass
        define WTF_USE_APPLE_INTERNAL_SDK when generating bindings (if applicable). Make the logic for determining
        whether WTF_PLATFORM_IOS is defined consistent with logic for determining whether WTF_USE_APPLE_INTERNAL_SDK and
        ENABLE_ORIENTATION_EVENTS are defined. We should look to further cleanup this code.
        * bindings/js/ios/TouchConstructors.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
        * bindings/objc/DOMEvents.h: Write preprocessor logic in terms of ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS.
        * bindings/objc/PublicDOMInterfaces.h: Include private header <WebKitAdditions/PublicDOMInterfacesIOS.h> when
        it exists as opposed to assuming it exists when building for iOS.
        * dom/Document.cpp:
        (WebCore::Document::Document): Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "ENABLE(TOUCH_EVENTS) && PLATFORM(IOS)".
        (WebCore::Document::prepareForDestruction): Ditto.
        (WebCore::Document::removeAllEventListeners): Ditto.
        * dom/Document.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
        * dom/Document.idl: Ditto.
        * dom/Touch.h: Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS)..
        * dom/TouchEvent.h: Ditto.
        * dom/TouchList.h: Ditto.
        * dom/ios/TouchEvents.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
        * history/CachedFrame.cpp: Add PLATFORM(IOS) guard.
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::SliderThumbElement): Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).
        (WebCore::SliderThumbElement::willDetachRenderers): Ditto.
        * html/shadow/SliderThumbElement.h: Ditto.
        * loader/EmptyClients.h: Ditto.
        * platform/ios/PlatformEventFactoryIOS.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
        Only include header <WebKitAdditions/PlatformTouchEventIOS.h> when building with ENABLE_TOUCH_EVENTS enabled.

2014-08-22  Simon Fraser  <simon.fraser@apple.com>

        Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
        https://bugs.webkit.org/show_bug.cgi?id=136136

        Reviewed by Sam Weinig, Joseph Pecoraro.

        Allow InspectorClient to have a custom implementation of showPaintRect(). For
        WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
        which are parented in a document overlay, with 0.25s fade-out animations.
        
        Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
        it makes no sense to paint the paint rects directly into the context of the web page.
        Now that the paint rects are painted into an overlay, the rectangles need to be converted
        to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
        
        Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
        be reimplemented in a later patch.

        * WebCore.exp.in:
        * inspector/InspectorClient.h:
        (WebCore::InspectorClient::showPaintRect):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didPaintImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didPaint):
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didPaint):
        * inspector/InspectorPageAgent.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::didPaintContents):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::paintContents):

2014-08-22  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r172844.
        https://bugs.webkit.org/show_bug.cgi?id=136164

        re-applying WEBCORE_EXPORTS patch (Requested by
        alexchristensen on #webkit).

        Reverted changeset:

        "Revert r172831, it broke the Windows build."
        http://trac.webkit.org/changeset/172844

2014-08-21  David Hyatt  <hyatt@apple.com>

        Implement rudimentary Bopomofo Ruby support (ruby-position:inter-character)
        https://bugs.webkit.org/show_bug.cgi?id=136137
        <rdar://problem/12567545>

        Reviewed by Sam Weinig.

        Added fast/ruby/bopomofo.html and fast/ruby/bopomofo-rl.html.

        * css/CSSParser.cpp:
        (WebCore::isValidKeywordPropertyAndValue):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator RubyPosition):
        * css/CSSPropertyNames.in:
        * css/CSSValueKeywords.in:
        Add support for the new inter-character value for ruby-position and also
        add support for a new font-size keyword, -webkit-ruby-text, that is used
        to set a smart initial font size based off the type of ruby being presented.

        * css/DeprecatedStyleBuilder.cpp:
        (WebCore::ApplyPropertyFontSize::determineRubyTextSizeMultiplier):
        (WebCore::ApplyPropertyFontSize::applyValue):
        Determine the Ruby text size multiplier when -webkit-ruby-text is specified
        as the font size. For ruby-position of before/after, we use 50% of the parent
        font size. For inter-character ruby, we default to 25% instead. If inter-character
        Ruby is nested, we assume it's to display tone marks, and we use 100% to ensure
        the tone mark is the same size and does not get smaller.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
        (WebCore::StyleResolver::applyMatchedProperties):
        * css/StyleResolver.h:
        ruby-position is now the highest priority CSS property, and it is resolved
        before all other properties to ensure that its value can be checked when
        determining a smart default font size. adjustStyleForInterCharacterRuby is a new
        function called to auto-adjust inter-character ruby text to be vertical writing mode when
        encountered inside horizontal documents.

        * css/html.css:
        (ruby > rt):
        Change the font-size from 50% to -webkit-ruby-text to allow us to customize it as
        needed depending on what kind of Ruby we want to show.

        * rendering/RenderRubyRun.cpp:
        (WebCore::RenderRubyRun::layout):
        * rendering/RenderRubyRun.h:
        Add layout code to properly position vertical ruby text relative to a horizontal base.

        * rendering/style/RenderStyleConstants.h:
        Add the new inter-character constant for ruby-position.

        * rendering/style/StyleRareInheritedData.h:
        Increase the number of storage bits for RubyPosition from 1 to 2 now that we support 3 values.

2014-08-22  Jon Lee  <jonlee@apple.com>

        Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
        https://bugs.webkit.org/show_bug.cgi?id=136157

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).

2014-08-22  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Add the Wayland protocol extension
        https://bugs.webkit.org/show_bug.cgi?id=136102

        Reviewed by Martin Robinson.

        Add the Wayland protocol extension that allows mapping GtkWidget
        objects (via an ID that's unique to that GtkWidget) to the
        corresponding Wayland surface objects. This way the nested
        compositor has the proper information about what GtkWidget has
        to be updated when surfaces are committed by the LayerTreeHost.

        * PlatformGTK.cmake:
        * platform/graphics/wayland: Added.
        * platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml: Added.

2014-08-21  Antti Koivisto  <antti@apple.com>

        Animated GIFs scrolled out of view still cause titlebar blur to update, on tumblr.com page
        https://bugs.webkit.org/show_bug.cgi?id=136139

        Reviewed by Simon Fraser.

        The mechanism for pausing GIF images outside the viewport did not work for subframes.

        Test: fast/repaint/no-animation-outside-viewport-subframe.html

        * WebCore.exp.in:
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollPositionChanged):
        (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):

            Add a function for resuming animations as needed in all subframes.
            This is used after scrolling instead of calling the RenderView function directly.

        * page/FrameView.h:
        * page/Page.cpp:
        (WebCore::Page::resumeAnimatingImages):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::newImageAnimationFrameAvailable):

            Determine the overall visible rect so that it is correct in subframes too.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollTo):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):

2014-08-21  Alex Christensen  <achristensen@webkit.org>

        More WEBCORE_EXPORT macros!
        https://bugs.webkit.org/show_bug.cgi?id=136146

        Reviewed by Benjamin Poulain.

        * Modules/geolocation/GeolocationClient.h:
        * Modules/mediastream/UserMediaClient.h:
        * Modules/mediastream/UserMediaRequest.h:
        * Modules/notifications/NotificationClient.h:
        * Modules/speech/SpeechSynthesis.h:
        * bindings/generic/RuntimeEnabledFeatures.h:
        * bindings/js/DOMWrapperWorld.h:
        * bindings/js/GCController.h:
        * bindings/js/IDBBindingUtilities.h:
        * bindings/js/JSDOMBinding.h:
        * bindings/js/JSNodeCustom.h:
        * bindings/js/JSNodeListCustom.h:
        * bindings/js/JSPluginElementFunctions.h:
        * bindings/js/ScriptController.h:
        * bindings/js/SerializedScriptValue.h:
        * crypto/SerializedCryptoKeyWrap.h:
        * css/LengthFunctions.h:
        * css/StyleProperties.h:
        * css/StyleSheetContents.h:
        * dom/DeviceOrientationClient.h:
        * dom/Range.h:
        * dom/ScriptExecutionContext.h:
        * dom/StyledElement.h:
        * dom/TreeScope.h:
        * dom/UIEventWithKeyState.h:
        * dom/UserGestureIndicator.h:
        * dom/UserTypingGestureIndicator.h:
        * dom/ViewportArguments.h:
        * editing/SmartReplace.h:
        * editing/TextIterator.h:
        * editing/VisiblePosition.h:
        * editing/VisibleSelection.h:
        * editing/VisibleUnits.h:
        * editing/cocoa/HTMLConverter.h:
        * editing/htmlediting.h:
        * editing/mac/TextAlternativeWithRange.h:
        * editing/mac/TextUndoInsertionMarkupMac.h:
        * editing/markup.h:
        * history/HistoryItem.cpp:
        * history/PageCache.h:
        * html/TimeRanges.h:
        * html/parser/HTMLParserIdioms.h:
        * inspector/InstrumentingAgents.h:
        * loader/FrameLoader.h:
        * loader/ResourceBuffer.h:
        * loader/ResourceLoadScheduler.h:
        * loader/ResourceLoader.h:
        (WebCore::ResourceLoader::originalRequest):
        * loader/SubframeLoader.h:
        * loader/SubresourceLoader.h:
        * loader/TextResourceDecoder.h:
        * loader/appcache/ApplicationCacheStorage.h:
        * loader/cache/MemoryCache.h:
        * loader/icon/IconDatabaseBase.h:
        * loader/ios/DiskImageCacheIOS.h:
        * page/Chrome.h:
        * page/SecurityOrigin.h:
        * page/SecurityPolicy.h:
        * page/Settings.h:
        * page/UserContentController.h:
        * page/UserContentURLPattern.h:
        * page/UserMessageHandlerDescriptor.h:
        * page/ViewportConfiguration.h:
        * page/VisitedLinkStore.h:
        * page/WheelEventDeltaTracker.h:
        * page/cocoa/UserAgent.h:
        * page/scrolling/ScrollingConstraints.h:
        * page/scrolling/ScrollingCoordinator.h:
        * page/scrolling/ScrollingStateFixedNode.h:
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingStateNode.h:
        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
        * page/scrolling/ScrollingStateScrollingNode.h:
        * page/scrolling/ScrollingStateStickyNode.h:
        * page/scrolling/ScrollingStateTree.h:
        * page/scrolling/ScrollingThread.h:
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ScrollingTreeOverflowScrollingNode.h:
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
        * page/scrolling/mac/ScrollingTreeFixedNode.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeStickyNode.h:
        * platform/Cursor.h:
        * platform/DragImage.h:
        * platform/FileSystem.h:
        * platform/Language.h:
        * platform/LinkHash.h:
        * platform/LocalizedStrings.h:
        * platform/Logging.h:
        * platform/MemoryPressureHandler.h:
        * platform/NotImplemented.h:
        * platform/PlatformStrategies.h:
        * platform/PublicSuffix.h:
        * platform/RuntimeApplicationChecks.h:
        * platform/RuntimeApplicationChecksIOS.h:
        * platform/SchemeRegistry.h:
        * platform/ScrollView.h:
        * platform/ScrollableArea.h:
        * platform/Scrollbar.h:
        * platform/ScrollbarTheme.h:
        * platform/SharedBuffer.h:
        * platform/ThreadCheck.h:
        * platform/ThreadGlobalData.h:
        * platform/Timer.h:
        * platform/URL.h:
        * platform/UUID.h:
        * platform/UserActivity.h:
        * platform/Widget.h:
        * platform/cf/CFURLExtras.h:
        * platform/cf/RunLoopObserver.h:
        * platform/cocoa/SystemVersion.h:
        * platform/graphics/Color.h:
        * platform/graphics/FloatRect.h:
        * platform/graphics/FontCache.h:
        * platform/graphics/GeometryUtilities.h:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/IntRect.h:
        * platform/graphics/LayoutRect.h:
        * platform/graphics/StringTruncator.h:
        * platform/graphics/TextRun.h:
        * platform/graphics/ca/TileController.h:
        * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
        * platform/graphics/cg/GraphicsContextCG.h:
        * platform/graphics/mac/ColorMac.h:
        * platform/graphics/transforms/TransformationMatrix.h:
        * platform/ios/FileSystemIOS.h:
        * platform/ios/PlatformEventFactoryIOS.h:
        * platform/ios/SelectionRect.h:
        * platform/ios/SystemMemory.h:
        * platform/ios/TileControllerMemoryHandlerIOS.h:
        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
        * platform/mac/PlatformEventFactoryMac.h:
        * platform/mac/ScrollbarThemeMac.h:
        * platform/mac/WebCoreNSURLExtras.h:
        * platform/mac/WebNSAttributedStringExtras.h:
        * platform/network/BlobRegistry.h:
        * platform/network/CookieStorage.h:
        * platform/network/DNS.h:
        * platform/network/NetworkStateNotifier.h:
        * platform/network/PlatformCookieJar.h:
        * platform/network/ProxyServer.h:
        * platform/network/ResourceErrorBase.h:
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceHandleClient.h:
        * platform/network/ResourceRequestBase.h:
        * platform/network/ResourceResponseBase.h:
        * platform/network/SynchronousLoaderClient.h:
        * platform/network/cf/ResourceError.h:
        * platform/network/cf/ResourceRequest.h:
        * platform/network/cf/ResourceResponse.h:
        * platform/network/ios/QuickLook.h:
        * platform/network/mac/AuthenticationMac.h:
        * platform/sql/SQLiteDatabase.cpp:
        * platform/text/LocaleToScriptMapping.h:
        * platform/text/TextBreakIterator.h:
        * platform/text/TextEncoding.h:
        (WebCore::TextEncoding::decode):
        * platform/text/TextEncodingRegistry.h:
        * platform/text/TextStream.h:
        * rendering/RenderBlock.h:
        * rendering/RenderBox.h:
        * rendering/RenderEmbeddedObject.h:
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.h:
        * rendering/RenderListItem.h:
        * rendering/RenderObject.h:
        * rendering/RenderText.h:
        * rendering/RenderTextControl.h:
        * rendering/RenderThemeIOS.h:
        * rendering/RenderTreeAsText.h:
        * rendering/RenderView.h:
        * rendering/RenderWidget.h:
        * rendering/ScrollBehavior.cpp:
        * rendering/break_lines.cpp:
        * rendering/style/RenderStyle.h:
        * replay/UserInputBridge.h:
        * storage/StorageEventDispatcher.h:
        * storage/StorageMap.h:
        * storage/StorageStrategy.h:
        * storage/StorageTracker.h:
        * testing/Internals.h:
        * workers/WorkerThread.h:
        Added more WEBCORE_EXPORT macros where needed.

2014-08-21  Tim Horton  <timothy_horton@apple.com>

        Revert r172831, it broke the Windows build.

2014-08-21  Ryuan Choi  <ryuan.choi@samsung.com>

        Unreviewed build fix when RUBBER_BANDING is not enabled.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::overhangAmount):
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):

2014-08-21  Brent Fulgham  <bfulgham@apple.com>

        [Win] WebCore.proj is not copying WebKit resource files.
        https://bugs.webkit.org/show_bug.cgi?id=136142
        <rdar://problem/17733682>

        Reviewed by Tim Horton.

        * WebCore.vcxproj/WebCore.proj: Copy missing resource files during
        post-build step.

2014-08-21  Simon Fraser  <simon.fraser@apple.com>

        Try to fix the 32-bit build by using wildcards in the exported non-virtual thunks
        for GraphicsLayerCA::platformCALayerAnimationStarted and GraphicsLayerCA::platformCALayerAnimationEnded.

        * WebCore.exp.in:

2014-08-21  Simon Fraser  <simon.fraser@apple.com>

        Add animationDidEnd callbacks on GraphicsLayer
        https://bugs.webkit.org/show_bug.cgi?id=136084

        Reviewed by Tim Horton.

        Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
        can add animations, and know when they finish.

        * WebCore.exp.in:
        * platform/graphics/GraphicsLayerClient.h:
        (WebCore::GraphicsLayerClient::notifyAnimationStarted):
        (WebCore::GraphicsLayerClient::notifyAnimationEnded):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
        (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/PlatformCALayerClient.h:
        (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
        (WebCore::PlatformCALayerClient::platformCALayerAnimationEnded):
        * platform/graphics/ca/mac/PlatformCALayerMac.h:
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        (-[WebAnimationDelegate animationDidStart:]):
        (-[WebAnimationDelegate animationDidStop:finished:]):
        (PlatformCALayerMac::animationStarted):
        (PlatformCALayerMac::animationEnded):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::notifyAnimationStarted):
        * rendering/RenderLayerBacking.h:

2014-08-21  Zalan Bujtas  <zalan@apple.com>

        Enable SATURATED_LAYOUT_ARITHMETIC.
        https://bugs.webkit.org/show_bug.cgi?id=136106

        Reviewed by Simon Fraser.

        SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
        (No measurable performance regression on Mac.)

        Test: fast/dynamic/saturated-layout-arithmetic.html

        * Configurations/FeatureDefines.xcconfig:

2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>

        New ruby parsing rule breaks some real web sites.
        https://bugs.webkit.org/show_bug.cgi?id=136062

        Reviewed by Ryosuke Niwa.

        An RP element should not auto close an RTC element.

        The HTML5.1 spec was changed:
        http://www.w3.org/html/wg/drafts/html/master/syntax.html#parsing-main-inbody
        This was done at the following commit:
        https://github.com/w3c/html/commit/c61397b989b28235ee2228f280aa8d475f3b9ebf

        This patch changed the RP element's behavior to follow the spec change.

        Test: fast/ruby/rp-inside-rtc.html

        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::processStartTagForInBody):

2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>

        REGRESSION: CSS not() selector does not work when it appears after or within @supports
        https://bugs.webkit.org/show_bug.cgi?id=136063

        Reviewed by Darin Adler.

        CSSParser changes its m_parsingMode to SupportsMode when it finds
        "@supports" token. However, the mode will be never changed to
        NormalMode. This changes parsing algorithm for "not" token forever,
        and it cannot parse not pseudo class selector.

        When we finish parsing @supports rule, we should change to normal
        mode.

        @media does the same thing. This patch changed CharacterEndMediaQuery
        to CharacterEndConditionQuery, and we change parsing mode from
        SupportsMode to NormalMode when the parser finished to parse
        @supports rule.

        Like "@-webkit-mediaquery", we cannot use '{' to
        "@-webkit-supports-condition". Changed "@-webkit-supports-condition"
        parsing rule and parseSupportsCondition() not to use '{'.

        Tests: css3/supports-not-selector-cssom.html
               css3/supports-not-selector.html

        * css/CSSGrammar.y.in:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseSupportsCondition):
        (WebCore::isCSSLetter):
        (WebCore::CSSParser::realLex):

2014-08-21  Beth Dakin  <bdakin@apple.com>

        overflow:scroll elements should support rubber-banding
        https://bugs.webkit.org/show_bug.cgi?id=91655

        Reviewed by Sam Weinig and Darin Adler.

        This patch enables rubber-banding in overflow regions and it keeps latching 
        working as currently implemented.

        We cannot return early here if there is no scroll delta. There won't be a scroll
        delta in most cases during event.phase() == PlatformWheelEventPhaseEnded, but that 
        phase is required to be processed in order for rubber-banding to work properly. 
        * dom/Element.cpp:
        (WebCore::Element::dispatchWheelEvent):
        * page/EventHandler.cpp:
        (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):

        Add a setting for this, which will default to true. This allows us to disable the 
        feature in WebKit1 for now. There is a bug about making it work.
        * page/Settings.in:

        allowsHorizontalStretching() and allowsVerticalStretching() now take the 
        PlatformWheelEvent as a parameter, so that ScrollElasticityAutomatic can use the 
        event to decide whether or not stretching should be allowed in this case. 
        ScrollElasticityAutomatic will not allow stretching if it is a brand new gesture 
        that would result in a rubber-band. We don't want to rubber-band in that case
        because we want the event to propagate up to a parent view. Also added some helper 
        functions just to make that code easier to read.
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::newGestureIsStarting):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::isAlreadyPinnedInDirectionOfGesture):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching):
        * platform/mac/ScrollAnimatorMac.h:
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::handleWheelEvent):
        (WebCore::newGestureIsStarting):
        (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
        (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
        (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
        * platform/mac/ScrollElasticityController.h:
        * platform/mac/ScrollElasticityController.mm:
        (WebCore::ScrollElasticityController::handleWheelEvent):

        To opt into rubber-banding, all we have to do is implement overhangAmount and set 
        scroll elasticity. We'll choose ScrollElasticityAutomatic which means that we'll
        only rubber-band in directions that can scroll and that we won't rubber-band for
        new gestures when we're already pinned to the edge.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::overhangAmount):
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):

2014-08-21  Alex Christensen  <achristensen@webkit.org>

        More WEBCORE_EXPORT macros.
        https://bugs.webkit.org/show_bug.cgi?id=136129

        Reviewed by Tim Horton.

        * Modules/geolocation/Geolocation.h:
        * Modules/geolocation/GeolocationController.h:
        * Modules/indexeddb/IDBDatabaseBackend.h:
        * Modules/indexeddb/IDBDatabaseMetadata.h:
        * Modules/indexeddb/IDBKey.h:
        * Modules/indexeddb/IDBKeyData.h:
        * Modules/indexeddb/IDBKeyPath.h:
        * Modules/indexeddb/IDBKeyRange.h:
        * Modules/indexeddb/IDBKeyRangeData.h:
        * Modules/notifications/Notification.h:
        * Modules/notifications/NotificationController.h:
        * bindings/js/GCController.h:
        * bridge/IdentifierRep.h:
        * css/StyleProperties.h:
        * dom/ExceptionCodePlaceholder.h:
        * dom/KeyboardEvent.h:
        * dom/MouseEvent.h:
        * dom/MouseRelatedEvent.h:
        * dom/Node.h:
        (WebCore::Node::hasEditableStyle):
        * dom/NodeTraversal.h:
        * dom/Position.h:
        (WebCore::Position::Position):
        * dom/Range.h:
        (WebCore::Range::startContainer)