ChangeLog-2015-07-23   [plain text]


2015-07-23  Alexey Proskuryakov  <ap@apple.com>

        Merge r186677, which is a follow-up fix to r186642.

    2015-07-10  Brady Eidson  <beidson@apple.com>

            ASSERT restoring from page cache as DocumentLoader reattaches to its Frame.
            <rdar://problem/21766282> and https://bugs.webkit.org/show_bug.cgi?id=146786

            Reviewed by NOBODY (Fixing obvious boneheaded mistake in r186642)

            No new tests (Covered by existing)

            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::attachToFrame): Bail if reattaching to the current Frame,
              which happens when restoring from the page cache.

2015-07-22  Babak Shafiei  <bshafiei@apple.com>

        Merge r187183.

    2015-07-22  Jeremy Jones  <jeremyj@apple.com>

            Fix fullscreen and PiP video animation and sizing regressions.
            https://bugs.webkit.org/show_bug.cgi?id=147189
            <rdar://problem/21930899>

            Reviewed by Jer Noble.

            Fixes WK1 specific regressions introduced by r187044. Flicker when entering fullscreen,
            wrong animation and missing initial animation rects.

            * platform/ios/WebVideoFullscreenControllerAVKit.mm:
            (elementRectInWindow): Added.
            (WebVideoFullscreenControllerContext::didSetupFullscreen): Clear background decreases flash.
            (WebVideoFullscreenControllerContext::fullscreenMayReturnToInline): Use consistent inline rect.
            (WebVideoFullscreenControllerContext::setVideoLayerFrame): 
            Clear the transform on the web thread instead of on the UI thread.
            (WebVideoFullscreenControllerContext::setUpFullscreen): Use consistent inline rect.
            (WebVideoFullscreenControllerContext::exitFullscreen): Use consistent inline rect.
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
            (-[WebAVPlayerLayer resolveBounds]): Clear transform after setting frame.

2015-07-22  Babak Shafiei  <bshafiei@apple.com>

        Merge r187181.

    2015-07-22  Jeremy Jones  <jeremyj@apple.com>

            Adopt AVKit's AVSimplePlayerLayerView change for PiP.
            https://bugs.webkit.org/show_bug.cgi?id=147186
            <rdar://problem/21928170>

            Reviewed by Jer Noble.

            Adopt AVKit changes by inheriting from UIView instead of from AVPictureInPicturePlayerLayerView.

            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (WebAVPlayerLayerView_layerClass): Style.
            (WebAVPlayerLayerView_playerController): Style.
            (WebAVPlayerLayerView_videoView): Style.
            (getWebAVPictureInPicturePlayerLayerViewClass): Inherit from UIView.

2015-07-21  Alexey Proskuryakov  <ap@apple.com>

        Merge r186980.

    2015-07-17  Simon Fraser  <simon.fraser@apple.com>

            Attempt to fix the build.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless):
            * html/HTMLMediaElement.h:

2015-07-21  Babak Shafiei  <bshafiei@apple.com>

        Merge r187128.

    2015-07-21  Tim Horton  <timothy_horton@apple.com>

            Placing video in fullscreen caused WebKit crash at WebCore::Range::textQuads
            https://bugs.webkit.org/show_bug.cgi?id=147166
            <rdar://problem/21928558>

            Reviewed by Simon Fraser.

            * editing/FrameSelection.cpp:
            (WebCore::FrameSelection::getClippedVisibleTextRectangles):
            Check the Range, as always.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187098. rdar://problem/21878275

    2015-07-20  Ada Chan  <adachan@apple.com>

            Follow-up to my earlier fix for r147085
            https://bugs.webkit.org/show_bug.cgi?id=147085

            Reviewed by Eric Carlson.

            * Modules/webaudio/AudioContext.cpp:
            (WebCore::AudioContext::isPlayingAudioDidChange):
            Null-check document() before dereferencing it in case the audio context's document is destroyed
            by the time the code block is called on the main thread.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187053. rdar://problem/21778212

    2015-07-20  Nan Wang  <n_wang@apple.com>

            AX: Selection change as a result of focusing an element may cause Safari to crash
            https://bugs.webkit.org/show_bug.cgi?id=147052
            <rdar://problem/21778212>

            Reviewed by Chris Fleizach.

            When focusing an element, it may trigger a deferred layout that invalidates the render
            element, which will cause axObjectCache() to be a nullptr, and lead to a crash. Fix that
            by using a RefPtr to hold the object and also caching the axObjectCache().

            Test: platform/mac/accessibility/focus-crash.html

            * accessibility/AccessibilityRenderObject.cpp:
            (WebCore::AccessibilityRenderObject::setFocused):
            (WebCore::AccessibilityRenderObject::setSelectedRows):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187044. rdar://problem/21661808

    2015-07-20  Jeremy Jones  <jeremyj@apple.com>

            Adopt AVPlayerLayerView
            https://bugs.webkit.org/show_bug.cgi?id=146862

            Reviewed by Jer Noble.

            The CALayerHost is replaced with WebLayerHostView to be compatible with UIView animations.
            Some animation is improved in the conversion.

            WebAVPlayerLayerView and WebAVPictureInPicturePlayerLayerView derive from AVKit and UIKit respectively.
            Because these frameworks are loaded at runtime, these classes must be generate using objc/runtime.h to
            register them from c functions at runtime. The most important part of these UIViews is that their
            backing layer is a WebAVPlayerLayer.

            WebCALayerHostWrapper and WebAVVideoLayer are combined into WebAVPlayerLayer to simplify the hierarchy.
            WebAVPlayerLayer is a stand-in for an AVPlayerLayer.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): -removeFromSuperlayer is redundant.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity): syncTextTrackBounds on change.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
            We never want animation here, since all animation will happen in UIViews.
            This is just for going into the final size after a transform based animation.

            * platform/ios/WebVideoFullscreenControllerAVKit.mm:
            (WebVideoFullscreenControllerContext::didSetupFullscreen): layer -> view
            (WebVideoFullscreenControllerContext::didCleanupFullscreen): layer -> view
            (WebVideoFullscreenControllerContext::setUpFullscreen): layer -> view

            (WebVideoFullscreenControllerContext::setVideoLayerFrame): layer -> view
            Use fence port to synchronize between the UIThread and the WebThread,
            the same way WebKit2 uses a fence port to synchronize between processes.

            (WebVideoFullscreenControllerContext::setVideoLayerGravity):
            No longer necessary to cache videoGravity at this level.

            * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

            (-[WebAVPlayerLayer init]):
            (-[WebAVPlayerLayer dealloc]):
            (-[WebAVPlayerLayer playerController]):
            (-[WebAVPlayerLayer setBounds:]):
            (-[WebAVPlayerLayer resolveBounds]):
            (-[WebAVPlayerLayer setVideoGravity:]):
            (-[WebAVPlayerLayer videoGravity]):
            (-[WebAVPlayerLayer videoRect]):
            (+[WebAVPlayerLayer keyPathsForValuesAffectingVideoRect]):
            Added class WebAVPlayerLayer, replacing WebAVVideoLayer and WebCALayerHostWrapper.

            (WebAVPictureInPicturePlayerLayerView_layerClass):
            (getWebAVPictureInPicturePlayerLayerViewClass):
            Added runtime class WebAVPictureInPicturePlayerLayerView

            (WebAVPlayerLayerView_layerClass):
            (WebAVPlayerLayerView_playerController):
            (WebAVPlayerLayerView_setPlayerController):
            (WebAVPlayerLayerView_videoView):
            (WebAVPlayerLayerView_setVideoView):
            (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
            (WebAVPlayerLayerView_stopRoutingVideoToPictureInPicturePlayerLayerView):
            (WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
            (getWebAVPlayerLayerViewClass):
            Added runtime class WebAVPlayerLayerView

            (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
            Dimensions are also stored in WebAVPlayerLayer so it can make decisions about
            animating the video layer.

            (WebVideoFullscreenInterfaceAVKit::setExternalPlayback):
            (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
            (WebVideoFullscreenInterfaceAVKit::didStopPictureInPicture):
            (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
            Straightforward layer to view conversion.

            (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
            Set view frame using the view hierarchy instead of assuming it is directly in a window.

            (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
            Set view frame using the view hierarchy instead of assuming it is directly in a window.
            dispatch_async before calling didExitFullscreen() to allows CATransactions to complete.

            (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
            Set view frame using the view hierarchy instead of assuming it is directly in a window.
            dispatch_async before calling didSetupFullscreen() to allows CATransactions to complete.

            (-[WebCALayerHostWrapper dealloc]): Deleted.
            (-[WebCALayerHostWrapper setVideoSublayer:]): Deleted.
            (-[WebCALayerHostWrapper videoSublayer]): Deleted.
            (-[WebCALayerHostWrapper setBounds:]): Deleted.
            (-[WebCALayerHostWrapper resolveBounds]): Deleted.
            Class WebCALayerHostWrapper deleted. Functionality rolled into WebAVPlayerLayer.

            (+[WebAVVideoLayer videoLayer]): Deleted.
            (-[WebAVVideoLayer init]): Deleted.
            (-[WebAVVideoLayer setPlayerViewController:]): Deleted.
            (-[WebAVVideoLayer setVideoSublayer:]): Deleted.
            (-[WebAVVideoLayer setBounds:]): Deleted.
            (-[WebAVVideoLayer setVideoLayerGravity:]): Deleted.
            (-[WebAVVideoLayer videoLayerGravity]): Deleted.
            (-[WebAVVideoLayer enterPIPModeRedirectingVideoToLayer:]): Deleted.
            (-[WebAVVideoLayer leavePIPMode]): Deleted.
            Class WebAVVideoLayer deleted. Functionality rolled into WebAVPlayerLayer.

            * platform/ios/WebVideoFullscreenModel.h:
            * platform/ios/WebVideoFullscreenModelVideoElement.h:
            * platform/ios/WebVideoFullscreenModelVideoElement.mm:
            No need to store frame and gravity in the model. It is stored in the UI where it is used.

            (WebVideoFullscreenModelVideoElement::videoLayerFrame): Deleted.
            (WebVideoFullscreenModelVideoElement::videoLayerGravity): Deleted.
            * platform/spi/cocoa/AVKitSPI.h: Add AVPlayerLayerView.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187039. rdar://problem/21474317

    2015-07-20  Tim Horton  <timothy_horton@apple.com>

            REGRESSION (r174287): Flash of black when opening a new web view or navigating to a new page
            https://bugs.webkit.org/show_bug.cgi?id=147127
            <rdar://problem/21474317>

            Reviewed by Simon Fraser.

            * rendering/RenderView.cpp:
            (WebCore::RenderView::paintBoxDecorations):
            Avoid using an invalid documentBackgroundColor, fall back to baseBackgroundColor
            like we did before r174287.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186910. rdar://problem/21863296

    2015-07-16  Benjamin Poulain  <bpoulain@apple.com>

            [Content extensions] Combine suffixes when generating NFAs
            https://bugs.webkit.org/show_bug.cgi?id=146961

            Reviewed by Alex Christensen.

            In this patch, I add a mechanism very similar to the prefix tree
            but for the suffix (called a reverse suffix tree here).

            The idea is here is to reuse the existing NFA nodes when generating
            a chain of suffix Term that were already generated previously.
            When generating a disjunction ending with the same suffix, we now
            have the same trailing NFA nodes for both sides of the disjunction.

            Mixing the prefix and suffix generation can be tricky, we do not want
            transitions from a pattern to creep into the suffix of an other.

            To avoid any conflict, the rules here are very simple:
            -Only use the reverse suffix tree for terms without actions
             up to a leaf term with actions.

             This rule ensure that no action will accidentally make its way
             to an other rule by resuing a vertex of the reverse suffix tree.

            -Only use the reverse suffix tree for chains of terms in which
             each term only has zero or one following term.

             With this condition, when taking any vertex of the reverse suffix
             tree, there is only one edge that move out of that vertex when reading
             from left to right.
             For any vertex, there is only one possible string generated
             left-to-right, a single suffix.

            This is overly restrictive but it is fast, easier to verify, and it works
            well in practice.
            For all the more complicated cases, we can count on the Minimizer to
            find a better solution.


            With all the simple suffixes merged, our NFAs are smaller, which
            let us combine more patterns.
            The DFAs are also smaller and faster to produce since their size
            is relative to the NFA sizes.

            Overall, I get the following gains:
            -Chris's test case:
                compile time -40%.
                bytecode size -14%.
            -Armand's test case:
                compile time -53%.
                bytecode size -13%.

            * WebCore.xcodeproj/project.pbxproj:
            * contentextensions/CombinedURLFilters.cpp:
            (WebCore::ContentExtensions::ActiveSubtree::ActiveSubtree):
            (WebCore::ContentExtensions::generateInfixUnsuitableForReverseSuffixTree):
            (WebCore::ContentExtensions::generateSuffixWithReverseSuffixTree):
            (WebCore::ContentExtensions::clearReverseSuffixTree):
            (WebCore::ContentExtensions::generateNFAForSubtree):
            * contentextensions/DFA.cpp:
            (WebCore::ContentExtensions::DFA::debugPrintDot):
            Forgot to close a tag, dot was not happy.

            * contentextensions/HashableActionList.h: Added.
            (WebCore::ContentExtensions::HashableActionList::HashableActionList):
            (WebCore::ContentExtensions::HashableActionList::isEmptyValue):
            (WebCore::ContentExtensions::HashableActionList::isDeletedValue):
            (WebCore::ContentExtensions::HashableActionList::operator==):
            (WebCore::ContentExtensions::HashableActionList::operator!=):
            (WebCore::ContentExtensions::HashableActionListHash::hash):
            (WebCore::ContentExtensions::HashableActionListHash::equal):
            We need a way to group reverse suffix tree by their terminal actions.
            This new hash structure lets us find unique vertex for a list of actions
            in any order.

            * contentextensions/ImmutableNFANodeBuilder.h:
            (WebCore::ContentExtensions::ImmutableNFANodeBuilder::isValid):
            (WebCore::ContentExtensions::ImmutableNFANodeBuilder::nodeId):
            (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addTransition):
            (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addEpsilonTransition):
            (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder): Deleted.
            (WebCore::ContentExtensions::ImmutableNFANodeBuilder::~ImmutableNFANodeBuilder): Deleted.
            (WebCore::ContentExtensions::ImmutableNFANodeBuilder::operator=): Deleted.
            * contentextensions/Term.h:
            (WebCore::ContentExtensions::Term::generateGraph):
            (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
            Node building changes a bit.

            Previously, it was assumed nodes are always built from left to right.
            Getting the node on the right was done by providing the left node and the term
            doing the transition.

            Now we have both left to right and right to left generation.

            The right-to-left has a specific property: no edge can be added after
            it's initial term (rule 2 of our reverse suffix tree). This simplifies
            things a bit since we can finalize all the nodes in the suffix tree.
            All we need is to keep their ID to be able to link new nodes
            to the reverse suffix tree.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186715. rdar://problem/21863296

    2015-07-11  Benjamin Poulain  <benjamin@webkit.org>

            Fix CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
            https://bugs.webkit.org/show_bug.cgi?id=146879

            Reviewed by Andreas Kling.

            Some of my recent changes broke CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING :(

            * contentextensions/CombinedURLFilters.cpp:
            (WebCore::ContentExtensions::prefixTreeVertexToString):
            (WebCore::ContentExtensions::recursivePrint):
            (WebCore::ContentExtensions::CombinedURLFilters::print):
            * contentextensions/ContentExtensionsDebugging.h:
            * contentextensions/DFA.cpp:
            (WebCore::ContentExtensions::DFA::debugPrintDot):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186955. rdar://problem/14489674

    2015-07-17  Mark Lam  <mark.lam@apple.com>

            Remove leak of objects between isolated worlds on custom events, message events, and pop state events.
            https://bugs.webkit.org/show_bug.cgi?id=118884

            Reviewed by Filip Pizlo and Mark Lam.
            Patch by Keith Miller  <keith_miller@apple.com>.

            Tests: fast/events/event-leak-objects.html
                   fast/events/event-properties-gc.html

            Fixes an issue where objects passed as certain properties of events could cross isolated worlds. This
            was fixed by checking that any object passed by an event must be serializable or originate from the same
            isolated world as the one it is currently being accessed in. In the case of MessageEvents and PopStateEvents we
            cache the values of the data and state properties, respectively, as they may be a deserialized object. In case
            an object was deserialized in a world with elevated privileges we also check the cached value is from the same
            world, if it is from a different world we recompute it. For testing purposes, I added a new function to Internals
            that determines whether a JSObject originated in the current world.

            * CMakeLists.txt:
            * WebCore.xcodeproj/project.pbxproj:
            * bindings/js/DOMWrapperWorld.h:
            (WebCore::worldForDOMObject):
            * bindings/js/JSBindingsAllInOne.cpp:
            * bindings/js/JSCustomEventCustom.cpp: Copied from Source/WebCore/dom/CustomEvent.cpp.
            (WebCore::JSCustomEvent::detail):
            * bindings/js/JSMessageEventCustom.cpp:
            (WebCore::JSMessageEvent::data):
            * bindings/js/JSPopStateEventCustom.cpp:
            (WebCore::JSPopStateEvent::state):
            * dom/CustomEvent.cpp:
            (WebCore::CustomEvent::initCustomEvent):
            (WebCore::CustomEvent::trySerializeDetail):
            * dom/CustomEvent.h:
            * dom/CustomEvent.idl:
            * dom/MessageEvent.cpp:
            (WebCore::MessageEvent::initMessageEvent):
            (WebCore::MessageEvent::trySerializeData):
            * dom/MessageEvent.h:
            * dom/PopStateEvent.cpp:
            (WebCore::PopStateEvent::trySerializeState):
            * dom/PopStateEvent.h:
            * testing/Internals.cpp:
            (WebCore::Internals::isFromCurrentWorld):
            * testing/Internals.h:
            * testing/Internals.idl:

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187035. rdar://problem/21712311

    2015-07-20  Andreas Kling  <akling@apple.com>

            Unreviewed assertion fix following r187031.

            Just have GenericEventQueue::resume() return early if the queue isn't suspended.
            Suspend/Resume calls are not always symmetrical in HTMLMediaElement.

            * dom/GenericEventQueue.cpp:
            (WebCore::GenericEventQueue::resume):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187031. rdar://problem/21712311

    2015-07-20  Andreas Kling  <akling@apple.com>

            Improve behavior of media elements in page cache.
            <https://webkit.org/b/147020>
            <rdar://problem/21712311>

            Reviewed by Chris Dumez.

            Make improvements for media elements when transitioning in/out of page cache:

            - Events that were scheduled when going into cache will now be delivered
              when the page is restored from cache.

            - Data buffering is turned off while in the cache. This reduces the memory
              cost of cached pages with media elements on iOS (where mediaserverd would
              keep upcoming video frames in memory for cached pages.)

            Test: media/restore-from-page-cache.html (amended)

            * dom/GenericEventQueue.h:
            * dom/GenericEventQueue.cpp:
            (WebCore::GenericEventQueue::enqueueEvent):
            (WebCore::GenericEventQueue::suspend):
            (WebCore::GenericEventQueue::resume):

                Add a simple suspend/resume mechanism to GenericEventQueue that can
                be used to support page caching.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::stop):
            (WebCore::HTMLMediaElement::suspend):
            (WebCore::HTMLMediaElement::resume):
            (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):

                Adapt to event queueing changes and add calls to setShouldBufferData().

            * html/HTMLSourceElement.h:
            * html/HTMLSourceElement.cpp:
            (WebCore::HTMLSourceElement::HTMLSourceElement):
            (WebCore::HTMLSourceElement::create):
            (WebCore::HTMLSourceElement::activeDOMObjectName):
            (WebCore::HTMLSourceElement::canSuspendForPageCache):
            (WebCore::HTMLSourceElement::suspend):
            (WebCore::HTMLSourceElement::resume):
            (WebCore::HTMLSourceElement::stop):

                Turn HTMLSourceElement into an ActiveDOMObject so it gets all the
                appropriate page cache notifications directly. Suspend the delayed
                error event delivery timer when cached.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187025. rdar://problem/21878275

    2015-07-18  Ada Chan  <adachan@apple.com>

            Fix deadlock between -[AVPlayerItem currentTime] and -[AVPlayer isExternalPlaybackActive]
            https://bugs.webkit.org/show_bug.cgi?id=147085
            <rdar://problem/21878275>

            Reviewed by Jer Noble.

            * Modules/webaudio/AudioContext.cpp:
            (WebCore::AudioContext::isPlayingAudioDidChange):
            Call Document::updateIsPlayingMedia() on the main thread, since we could be on the audio I/O
            thread here and the Document::updateIsPlayingMedia() call could block, causing a deadlock.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186991. rdar://problem/21643094

    2015-07-18  David Kilzer  <ddkilzer@apple.com>

            REGRESSION (r186976): Use piFloat instead of M_PI

            Attempt to fix the following build failure:

                PathUtilities.cpp(183): error C2065: 'M_PI' : undeclared identifier [...\Source\WebCore\WebCore.vcxproj\WebCore.vcxproj]

            * platform/graphics/PathUtilities.cpp:
            (WebCore::walkGraphAndExtractPolygon): Use piFloat since M_PI is
            not defined on Windows.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186990. rdar://problem/21643094

    2015-07-18  David Kilzer  <ddkilzer@apple.com>

            REGRESSION (r186976): Windows build broke due to missing definition of M_PI

            Attempt to fix the following build failure:

                PathUtilities.cpp(182): error C2065: 'M_PI' : undeclared identifier [...\Source\WebCore\WebCore.vcxproj\WebCore.vcxproj]

            * platform/graphics/PathUtilities.cpp: Include <wtf/MathExtras.h>.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186982. rdar://problem/21567820

    2015-07-17  Andy Estes  <aestes@apple.com>

            [iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
            https://bugs.webkit.org/show_bug.cgi?id=147044
            rdar://problem/21567820

            Reviewed by Brady Eidson.

            In addition to placing resources fetched with 'Content-Disposition: attachment' in a unique origin,
            this change does the following:

            - Switches the sandbox type from SandboxOrigin to SandboxAll, which enforces the same restrictions as <iframe sandbox>.
            - Disables processing of <meta http-equiv> elements.
            - Disables loading of cross-origin subframes.

            Tests: http/tests/contentdispositionattachmentsandbox/cross-origin-frames-disabled.html
                   http/tests/contentdispositionattachmentsandbox/form-submission-disabled.html
                   http/tests/contentdispositionattachmentsandbox/http-equiv-disabled.html
                   http/tests/contentdispositionattachmentsandbox/plugins-disabled.html
                   http/tests/contentdispositionattachmentsandbox/scripts-disabled.html

            * dom/Document.cpp:
            (WebCore::Document::processHttpEquiv): Switched to calling Document::httpEquivPolicy(). Logged an error to the console for policies other than Enabled.
            (WebCore::Document::initSecurityContext): Switched sandbox enforcement from SandboxOrigin to SandboxAll.
            (WebCore::Document::httpEquivPolicy): Returned a HttpEquivPolicy based on shouldEnforceContentDispositionAttachmentSandbox() and Settings::httpEquivEnabled().
            (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Returned true if Settings::contentDispositionAttachmentSandboxEnabled()
            and the document was fetched as an attachment.
            * dom/Document.h:
            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::canRequest): When requesting a subframe main resource when the parent frame enforces an attachment sandbox,
            only continue if the parent frame's SecurityOrigin allows the request.
            * page/Settings.in: Added contentDispositionAttachmentSandboxEnabled with an initial value of false.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186979. rdar://problem/19192076

    2015-07-17  Dean Jackson  <dino@apple.com>

            Picture in Picture interacts poorly with AirPlay/HDMI
            https://bugs.webkit.org/show_bug.cgi?id=147061
            <rdar://problem/19192076>

            Reviewed by Tim Horton.

            When we are actively playing to an external target, the
            picture in picture button should be hidden.

            Also, the availability of picture in picture is also
            dependent on AirPlay, so that we don't auto-pip when
            we're displaying on a TV.

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.configureInlineControls): Call the update function.
            (ControllerIOS.prototype.updatePictureInPictureButton): Add or remove a hidden class.
            * html/MediaElementSession.cpp:
            (WebCore::MediaElementSession::allowsPictureInPicture): Check Airplay status.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186978. rdar://problem/21643094

    2015-07-17  Tim Horton  <timothy_horton@apple.com>

            [iOS] TextIndicator has a large forehead when line-height > 1
            https://bugs.webkit.org/show_bug.cgi?id=147058
            <rdar://problem/21643094>

            Reviewed by Dean Jackson.

            * editing/FrameSelection.cpp:
            (WebCore::FrameSelection::getClippedVisibleTextRectangles):
            * editing/FrameSelection.h:
            Add a parameter controlling whether getClippedVisibleTextRectangles
            returns selection-height rects (including extra line-height) or text-height
            rects (including only the text height). Plumb it down.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithRange):
            (WebCore::TextIndicator::createWithSelectionInFrame):
            Use the tighter text-height rects on iOS, where there's no selection highlight to cover up.
            Remove an assertion that is no longer always true, and which is mostly obsoleted by the
            fact that we don't let FrameSnapshotting code arbitrarily decide the rect to snapshot anymore.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186976. rdar://problem/21643094

    2015-07-17  Tim Horton  <timothy_horton@apple.com>

            Improve rect shrink-wrapping algorithm
            https://bugs.webkit.org/show_bug.cgi?id=147037
            <rdar://problem/21643094>

            Reviewed by Simon Fraser.

            * platform/graphics/FloatPoint.h:
            (WebCore::areEssentiallyEqual):
            Added; implementation is the same as FloatSize's.

            * platform/graphics/PathUtilities.cpp:
            (WebCore::FloatPointGraph::FloatPointGraph):
            (WebCore::FloatPointGraph::~FloatPointGraph):
            (WebCore::FloatPointGraph::Node::Node):
            (WebCore::FloatPointGraph::Node::nextPoints):
            (WebCore::FloatPointGraph::Node::addNextPoint):
            (WebCore::FloatPointGraph::Node::isVisited):
            (WebCore::FloatPointGraph::Node::visit):
            (WebCore::FloatPointGraph::Node::reset):
            (WebCore::FloatPointGraph::reset):
            (WebCore::FloatPointGraph::findOrCreateNode):
            (WebCore::findLineSegmentIntersection):
            (WebCore::addIntersectionPoints):
            (WebCore::walkGraphAndExtractPolygon):
            (WebCore::findUnvisitedPolygonStartPoint):
            (WebCore::unitePolygons):
            (WebCore::edgesForRect):
            (WebCore::PathUtilities::pathWithShrinkWrappedRects):
            (WebCore::addShrinkWrapRightCorner): Deleted.
            (WebCore::addShrinkWrapLeftCorner): Deleted.
            (WebCore::addShrinkWrappedPathForRects): Deleted.
            (WebCore::rectsIntersectOrTouch): Deleted.
            (WebCore::findSetContainingRect): Deleted.
            Add a new implementation of shrink-wrap, which is significantly more
            generic than the old one, which assumed a top-down progression of rects.

            This version uses polygon intersection to find the path around the
            set of rects, and then follows said path and adds appropriately-sized
            arcs for the corners.

            The polygon intersection algorithm first finds all the intersection points
            between all of the rects, then builds a graph of edges outward from one point.
            It then traverses the graph, choosing at each point the next edge which
            has not been visited and has the greatest interior angle, recording the polygon as it goes.

            If at the end of the traversal we have not returned to the initial node,
            we give up on shrink-wrapping and just use a bounding box around the rects.

            If any of the original rects have not been visited at all, we repeat the traversal
            starting with that rect, making an additional polygon (since we removed completely contained
            rects before we started, having not visited the rect at all means that it's not connected
            to the others).

            Once we have a set of united polygons, we follow each one, determining the ideal (always
            equal in width and height, never more than half the length of either edge, so that we always
            have a smooth curve) arc radius and projecting it onto the edge, and then
            adding an arc between the end of the previous path and beginning of the next.

            Because the shrink-wrap algorithm is fairly expensive, if there are more than 20 rects,
            we fall back to a bounding box. Given the current use cases, this is more than enough
            rects, but can certainly be adjusted in the future if needed.

            * testing/Internals.cpp:
            (WebCore::Internals::pathWithShrinkWrappedRects):
            * testing/Internals.h:
            * testing/Internals.idl:
            Add a radius parameter.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186974. rdar://problem/21106945

    2015-07-17  Nan Wang  <n_wang@apple.com>

            AX: iframe within table cell is inaccessible to VoiceOver
            https://bugs.webkit.org/show_bug.cgi?id=147001
            <rdar://problem/21106945>

            Reviewed by Chris Fleizach.

            When a table cell is created before its parent table determines if it should be ignored or not,
            the table cell may cache the wrong role. Fix that by allowing each table cell to update its role
            after the table makes this determination.

            Test: accessibility/iframe-within-cell.html

            * accessibility/AccessibilityTable.cpp:
            (WebCore::AccessibilityTable::addChildren):
            (WebCore::AccessibilityTable::addChildrenFromSection):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186968. rdar://problem/21359811

    2015-07-17  Myles C. Maxfield  <mmaxfield@apple.com>

            Video posters disappear once media has loaded
            https://bugs.webkit.org/show_bug.cgi?id=147045

            Reviewed by Simon Fraser.

            After r184932, all video elements are composited. However, there is logic in
            RenderLayerBacking::updateConfiguration() which adds the video layer to the page
            if the video is composited, without checking first to see if it should actually
            do so.

            Test: compositing/video/poster.html

            * rendering/RenderLayerBacking.cpp:
            (WebCore::RenderLayerBacking::updateConfiguration):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186964. rdar://problem/21803781

    2015-07-17  Dan Bernstein  <mitz@apple.com>

            WebCore part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
            https://bugs.webkit.org/show_bug.cgi?id=147040

            Reviewed by Dean Jackson.

            Test: TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm

            * loader/FrameLoader.cpp:
            (WebCore::shouldOpenExternalURLsPolicyToApply): Pulled the logic out of
            applyShouldOpenExternalURLsPolicyToNewDocumentLoader into this new helper.
            (WebCore::FrameLoader::loadURL): When targeting a new frame, apply the external URLs policy
            to the action passed to checkNewWindowPolicy.
            (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader): Call the new
            helper function.
            (WebCore::createWindow): Include the external URL policy in the action passed to
            createWindow.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186957. rdar://problem/21867831

    2015-07-17  Benjamin Poulain  <bpoulain@apple.com>

            [Content Extensions] CSS-display-none rules are not working properly
            https://bugs.webkit.org/show_bug.cgi?id=147024

            Reviewed by Sam Weinig.

            There were 2 bugs prevening rules with css-display-none and a url-filter from working
            correctly.

            First, ContentExtensions::serializeActions() was merging selectors regardless of their
            trigger. All the CSS Selectors would be grouped together and applied regardless of which
            rule apply.

            That problem was fixed by grouping CSS rules by trigger. We want all the undistinguishable
            CSS rules to be merged. The trigger makes 2 rules dinstinguishable as one rule can apply
            on a page while the next rule does not. The simplest approach is to group by trigger.

            The second problem had to do with rules added before the document is created.
            When accumulating those rules, we were only keeping the last one. The reason was that
            DocumentLoader::addPendingContentExtensionDisplayNoneSelector() would only keep a single
            selector list by extension.

            This is fixed by keeping a vector of all the rules that apply.

            Tests: http/tests/contentextensions/css-display-none-with-different-case-sensitivity-are-not-merged.html
                   http/tests/contentextensions/css-display-none-with-different-triggers-are-not-merged.html
                   http/tests/contentextensions/two-distinguishable-css-display-none-rules-on-main-resource.html

            * contentextensions/ContentExtensionCompiler.cpp:
            (WebCore::ContentExtensions::serializeActions):
            * contentextensions/ContentExtensionRule.h:
            (WebCore::ContentExtensions::Trigger::isEmpty):
            (WebCore::ContentExtensions::TriggerHash::hash):
            (WebCore::ContentExtensions::TriggerHash::equal):
            (WebCore::ContentExtensions::TriggerHashTraits::constructDeletedValue):
            (WebCore::ContentExtensions::TriggerHashTraits::isDeletedValue):
            (WebCore::ContentExtensions::TriggerHashTraits::emptyValue):
            (WebCore::ContentExtensions::TriggerHashTraits::isEmptyValue):
            * contentextensions/ContentExtensionsBackend.cpp:
            (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad): Deleted.
            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::commitData):
            (WebCore::DocumentLoader::addPendingContentExtensionDisplayNoneSelector):
            * loader/DocumentLoader.h:

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186956. rdar://problem/21643094

    2015-07-17  Tim Horton  <timothy_horton@apple.com>

            iOS TextIndicators include text that is not supposed to be indicated
            https://bugs.webkit.org/show_bug.cgi?id=147028
            <rdar://problem/21643094>

            Reviewed by Sam Weinig.

            Paint the selection and background, but not other foregrounds, for iOS TextIndicators.

            * page/FrameSnapshotting.cpp:
            (WebCore::snapshotFrameRect):
            * page/FrameSnapshotting.h:
            Add a new snapshot option where we'll paint backgrounds and the selected
            foreground and nothing else.
            Pass the new snapshot option through as a paint behavior.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithRange):
            Implement the incantations necessary to make a temporary selection
            change not get sent to the UI process and actually have WebCore know about it
            and accurately respond to questions about it.

            (WebCore::TextIndicator::createWithSelectionInFrame):
            Paint selection and backgrounds on iOS.

            * rendering/PaintPhase.h:
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::paintLayerContents):
            * rendering/RenderElement.cpp:
            (WebCore::RenderElement::selectionColor):
            Add a new paint behavior, SelectionAndBackgroundsOnly, which behaves
            the same as selection only except it allows backgrounds to paint.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186916. rdar://problem/21643094

    2015-07-16  Tim Horton  <timothy_horton@apple.com>

            Add shrink-wrapped link highlights
            https://bugs.webkit.org/show_bug.cgi?id=147021
            <rdar://problem/21643094>

            Reviewed by Enrica Casucci.

            * WebCore.xcodeproj/project.pbxproj:
            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithRange):
            (WebCore::TextIndicator::createWithSelectionInFrame):
            * page/TextIndicator.h:
            Add a margin parameter to TextIndicator; this inflates each text rect
            by the given amount.

            Use snapshotFrameRect instead of snapshotSelection because we really
            want an image that exactly fits textBoundingRectInDocumentCoordinates,
            and snapshotSelection comes up with selection rects in different ways,
            especially on iOS (where it comes up with nothing!).

            For now, avoid forcing black text or painting only the selection on iOS.
            Eventually, we should have TextIndicator options for these things that
            are then respected at the presentation layer.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186912. rdar://problem/21866271

    2015-07-16  Alex Christensen  <achristensen@webkit.org>

            [Content Extensions] Cache domain actions
            https://bugs.webkit.org/show_bug.cgi?id=146817

            Reviewed by Benjamin Poulain.

            Right now we run regular expressions on the domain every time we have any rules that match with if-domain or unless-domain.
            This caches the results of running regular expressions on the domain of the main document's url so we only need to
            run those regular expressions when the main document changes domain.  We also spend less time adding unused actions into HashSets.

            All behavior is covered by existing api tests, but I added some to explicitly test if-domain and unless-domain with multiple load types.

            * contentextensions/ContentExtension.cpp:
            (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
            (WebCore::ContentExtensions::ContentExtension::cachedDomainActions):
            * contentextensions/ContentExtension.h:
            (WebCore::ContentExtensions::ContentExtension::identifier):
            (WebCore::ContentExtensions::ContentExtension::compiledExtension):
            * contentextensions/ContentExtensionsBackend.cpp:
            (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
            * contentextensions/DFABytecodeInterpreter.cpp:
            (WebCore::ContentExtensions::getJumpDistance):
            (WebCore::ContentExtensions::matchesDomain):
            (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
            (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
            (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
            (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithDomains):
            (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
            * contentextensions/DFABytecodeInterpreter.h:

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186890. rdar://problem/21643094

    2015-07-15  Tim Horton  <timothy_horton@apple.com>

            Move indicator rect uniting code to TextIndicatorWindow instead of TextIndicator
            https://bugs.webkit.org/show_bug.cgi?id=146992
            <rdar://problem/21643094>

            Reviewed by Daniel Bates.

            Having to unite all the rects if any overlap is an implementation
            detail of the Mac TextIndicatorWindow presentation, not a fundamental
            property of TextIndicator.

            Other TextIndicator presentations might be able to handle overlapping
            rects more effectively, so we shouldn't lose information unless we need to.

            This also avoids having a second copy of some constants!

            * page/TextIndicator.cpp:
            (WebCore::outsetIndicatorRectIncludingShadow): Deleted.
            (WebCore::textIndicatorsForTextRectsOverlap): Deleted.
            (WebCore::TextIndicator::TextIndicator): Deleted.
            * page/mac/TextIndicatorWindow.mm:
            (outsetIndicatorRectIncludingShadow):
            (textIndicatorsForTextRectsOverlap):
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186875. rdar://problem/21643094

    2015-07-15  Brent Fulgham  <bfulgham@apple.com>

            [Win] Another build fix after r186858.

            * html/canvas/DOMPath.h: Don't use WEBCORE_EXPORT on the
            overall class and the destructor declaration.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186867. rdar://problem/21643094

    2015-07-15  Brent Fulgham  <bfulgham@apple.com>

            [Win] Unreviewed build fix after r186858.

            Add missing DOMPath and PathUtilities files to project.

            * WebCore.vcxproj/WebCore.vcxproj:
            * WebCore.vcxproj/WebCore.vcxproj.filters:

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186863. rdar://problem/21715050

    2015-07-15  Brady Eidson  <beidson@apple.com>

            WebKit document.cookie mis-parsing.
            rdar://problem/21715050 and https://bugs.webkit.org/show_bug.cgi?id=146976

            Reviewed by Sam Weinig.

            * platform/network/mac/CookieJarMac.mm:
            (WebCore::setCookiesFromDOM): Use new CFNetwork SPI when available.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186858. rdar://problem/21643094

    2015-07-15  Tim Horton  <timothy_horton@apple.com>

            Factor rect shrink-wrapping code out of RenderThemeMac for future reuse
            https://bugs.webkit.org/show_bug.cgi?id=146973
            <rdar://problem/21643094>

            Reviewed by Anders Carlsson.

            Test: fast/shrink-wrap/rect-shrink-wrap.html

            * WebCore.xcodeproj/project.pbxproj:
            Add DOMPath.cpp and PathUtilities.{h, cpp}.

            * bindings/js/JSDOMBinding.h:
            (WebCore::NativeValueTraits<double>::nativeValue):
            Make it possible to use sequence<double> in IDL files.

            * bindings/scripts/CodeGeneratorJS.pm:
            Export JSDOMPath for use in Internals.

            * html/canvas/DOMPath.cpp: Added.
            (WebCore::DOMPath::~DOMPath):
            * html/canvas/DOMPath.h:
            Out-of-line the DOMPath destructor so as not to anger the bindings
            integrity checker (otherwise, the address of the DOMPath destructor
            is different in WebCoreTestSupport and WebCore, causing us to fail
            the vtable equality test).

            * platform/graphics/Path.h:
            Forward declare FloatRect instead of including it unnecessarily.
            Export ensurePlatformPath().

            * platform/graphics/PathUtilities.cpp: Added.
            (WebCore::addShrinkWrapRightCorner):
            (WebCore::addShrinkWrapLeftCorner):
            (WebCore::addShrinkWrappedPathForRects):
            These parts are extracted from RenderThemeMac, with two changes:
                + support for arbitrarily-aligned rects
                  (the other version assumed they were horizontally center-aligned)
                + support for overlapping rects
                  (the other version assumed they touched but did not overlap)

            There are still things missing:
                + support for a fallback when the shape is too hard to shrink-wrap

            And things broken:
                + if the distance between two edges is smaller than the corner radius,
                  we'll end up with a sharp edge in the path

            Both of these cases are covered in the layout test and can be improved.

            (WebCore::rectsIntersectOrTouch):
            Rect intersection with <= instead of <.

            (WebCore::contiguousRectGroupsFromRects):
            Given a set of rects, find all of the contiguous regions. We'll
            shrink-wrap each region independently.

            (WebCore::PathUtilities::pathWithShrinkWrappedRects):
            * platform/graphics/PathUtilities.h: Added.
            Add PathUtilities, where the shrink-wrapping code lives.

            * rendering/RenderThemeMac.mm:
            (WebCore::paintAttachmentTitleBackground):
            (WebCore::addAttachmentTitleBackgroundRightCorner): Deleted.
            (WebCore::addAttachmentTitleBackgroundLeftCorner): Deleted.
            Remove shrink-wrapping implementation and make use of the one in PathUtilities.

            * testing/Internals.cpp:
            (WebCore::Internals::pathWithShrinkWrappedRects):
            * testing/Internals.h:
            * testing/Internals.idl:
            Expose pathWithShrinkWrappedRects to tests via Internals.
            It takes a sequence<double> where every four values are the x, y, w, h
            of a rect, and returns a DOMPath which can be used with Canvas.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186854. rdar://problem/21840147

    2015-07-15  Eric Carlson  <eric.carlson@apple.com>

            [Mac] AirPlay route is not always set automatically
            https://bugs.webkit.org/show_bug.cgi?id=146969

            Reviewed by Jer Noble.

            * Modules/mediasession/WebMediaSessionManager.cpp:
            (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Return early if there are
              no clients. Make the first client in the vector automatically play to the target if there
              is no other match and there is an active route.
            (WebCore::WebMediaSessionManager::watchdogTimerFired): Call picker.invalidatePlaybackTargets,
              not stopMonitoringPlaybackTargets.

            * platform/graphics/MediaPlaybackTargetPicker.cpp:
            (WebCore::MediaPlaybackTargetPicker::invalidatePlaybackTargets): New.
            * platform/graphics/MediaPlaybackTargetPicker.h:

            * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
            * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
            (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Do nothing, AirPlay
              automatically stops monitoring when appropriate and release the picker also releases
              the output context, which drops the route.
            (WebCore::MediaPlaybackTargetPickerMac::invalidatePlaybackTargets): New.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186799. rdar://problem/20542574

    2015-07-13  Brent Fulgham  <bfulgham@apple.com>

            [Win] Unreviewed build fix.

            * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
            (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): Don't try to build
            the new Legible Output API features if they aren't available in the build
            environment.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186798. rdar://problem/20542574

    2015-07-13  Brent Fulgham  <bfulgham@apple.com>

            [Win] Update Media Player logic for new Legible Output API
            https://bugs.webkit.org/show_bug.cgi?id=146922
            <rdar://problem/20542574>

            Reviewed by Eric Carlson.

            * AVFoundationSupport.py: Check for updated AVFCF feature.
            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
            (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Update to call the
            new 'readNativeSampleBuffer' method.
            (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Added. This is a no-op
            on Windows if it has the new AVCF API. Otherwise, it contains the same implementation
            that has always been used in 'processNativeSamples'.
            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
            * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
            (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): Added. Use the new
            Legible Output API instead of the old CoreMedia solution if it is available.
            * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
            (WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
            * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
            (WebCore::InbandTextTrackPrivateLegacyAVCF::readNativeSampleBuffer): Add a stub implementation.
            * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::AVFWrapper::createPlayerItem): Use the new Legible Output API if it is available.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186911. rdar://problem/21822541

    2015-07-16  Simon Fraser  <simon.fraser@apple.com>

            Fix disappearing position:fixed elements in fixed layout mode
            https://bugs.webkit.org/show_bug.cgi?id=147019

            Reviewed by Tim Horton.

            Test: compositing/fixed-with-fixed-layout.html

            When in fixed layout mode, and being scaled down, viewportConstrainedVisibleContentRect() is
            the wrong thing to use to determine if position:fixed elements are clipped out. In this case,
            use the simpler document bounds (before scaling).

            In the long term,  there needs to be an equivalent of viewportConstrainedVisibleContentRect()
            that gives an appropriate rect that can be used here.

            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::requiresCompositingForPosition):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186895. rdar://problem/21692212

    2015-07-16  Brady Eidson  <beidson@apple.com>

            WebKit document.cookie mis-parsing.
            rdar://problem/21715050 and https://bugs.webkit.org/show_bug.cgi?id=146976

            Reviewed by Sam Weinig.

            * platform/network/cf/CookieJarCFNet.cpp:
            (WebCore::createCookies): Use new SPI if available.
            (WebCore::setCookiesFromDOM):
            * platform/spi/cf/CFNetworkSPI.h:

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186879. rdar://problem/21758704

    2015-07-15  Dean Jackson  <dino@apple.com>

            Tag WebGL layers with sRGB colorspace
            https://bugs.webkit.org/show_bug.cgi?id=146986
            <rdar://problem/21758704>

            Fix the build on older El Capitan releases.

            * platform/graphics/mac/WebGLLayer.mm:
            (-[WebGLLayer initWithGraphicsContext3D:]):
            * platform/spi/cocoa/QuartzCoreSPI.h:

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186878. rdar://problem/21758722

    2015-07-15  Sam Weinig  <sam@webkit.org>

            Color match plug-ins
            <rdar://problem/21758722>
            https://bugs.webkit.org/show_bug.cgi?id=146987

            Reviewed by Dean Jackson.

            * platform/spi/cocoa/QuartzCoreSPI.h:
            Add colorMatchUntaggedContent property.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186868. rdar://problem/21758704

    2015-07-15  Dean Jackson  <dino@apple.com>

            Tag WebGL layers with sRGB colorspace
            https://bugs.webkit.org/show_bug.cgi?id=146986
            <rdar://problem/21758704>

            Reviewed by Simon Fraser.

            Label a CAOpenGLLayer as using the sRGB colorspace,
            like the rest of our page content.

            Test: fast/canvas/webgl/match-page-color-space.html

            * platform/graphics/mac/WebGLLayer.mm:
            (-[WebGLLayer initWithGraphicsContext3D:]): Set the colorspace property on the layer.
            (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]):
            (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]):
            (-[WebGLLayer copyImageSnapshotWithColorSpace:]):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186865. rdar://problem/21823835

    2015-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>

            Scroll snapping to elements is broken for main frame scrolling
            https://bugs.webkit.org/show_bug.cgi?id=146957

            Reviewed by Brent Fulgham.

            Fixes the case of elements with scroll snap coordinates in a scroll snapping mainframe by changing
            RenderBox::findEnclosingScrollableContainer to return the body's RenderBox when all enclosing elements
            are not overflow scrollable but the mainframe can scroll.

            Test: css3/scroll-snap/scroll-snap-coordinate-mainframe.html

            * page/FrameView.h: Export isScrollable so that the Internals API can use it.
            * rendering/RenderBox.cpp: Include MainFrame.h.
            (WebCore::RenderBox::findEnclosingScrollableContainer): Changed to return the body's RenderBox if
                none of its parent elements are overflow scrolling.
            * testing/Internals.cpp:
            (WebCore::Internals::scrollSnapOffsets): Updated to return snap offsets for the body element,
                allowing us to call window.internals.scrollSnapOffsets(document.body).

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186857. rdar://problem/21840845

    2015-07-15  Enrica Casucci  <enrica@apple.com>

            [iOS] Should look for RTF and RTFD pasteboard types before plain text.
            https://bugs.webkit.org/show_bug.cgi?id=146971
            rdar://problem/21840845

            Reviewed by Sam Weinig.

            The list of pasteboard types returned by supportedPasteboardTypes
            determines the order in which WebKit looks for data in the pasteboard
            to create a fragment. The incorrect order could make plain text to
            be preferred over rich format.

            * platform/ios/PasteboardIOS.mm:
            (WebCore::Pasteboard::supportedPasteboardTypes):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186840. rdar://problem/21823681

    2015-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>

            Negative scroll snap repeat values cause web process to hang indefinitely
            https://bugs.webkit.org/show_bug.cgi?id=146953
            <rdar://problem/21823681>

            Reviewed by Simon Fraser.

            Fixed dangerous behavior caused by setting -scroll-snap-points-x or -y to negative or very small
            positive values. In the case of negative or 0 repeats, the web process would hang indefinitely. In
            the case of very small positive values, a massive amount of memory could potentially be allocated
            just to store snap offsets.

            Tests: css3/scroll-snap/scroll-snap-negative-repeat.html
                   css3/scroll-snap/scroll-snap-subpixel-repeat.html

            * css/CSSParser.cpp:
            (WebCore::CSSParser::parseNonElementSnapPoints): Changed to consider negative snap repeat values as invalid CSS.
            * page/scrolling/AxisScrollSnapOffsets.cpp:
            (WebCore::updateFromStyle): Changed to threshold non-negative snap repeat values to 1px.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186837. rdar://problem/21774358

    2015-07-14  Dean Jackson  <dino@apple.com>

            Placeholder colors should be system grays
            https://bugs.webkit.org/show_bug.cgi?id=146955
            <rdar://problem/21774358>

            Reviewed by Sam Weinig.

            Update the PiP and Airplay placards to use the correct shades
            of gray.

            * Modules/mediacontrols/mediaControlsApple.css: No need to specify the
            font here, nor have rules for Picture in Picture, which isn't available
            on OS X.
            (audio::-webkit-media-controls-time-remaining-display): We should specify
            font style here.
            (video:-webkit-full-screen::-webkit-media-controls-panel): Drive-by cleanup.
            (audio::-webkit-media-controls-wireless-playback-status): Use a gray background
            and system gray for text and artwork.
            (audio::-webkit-media-controls-wireless-playback-status.small): Ditto.
            (audio::-webkit-media-controls-picture-in-picture-button): Deleted (not on OS X).
            (audio::-webkit-media-controls-wireless-playback-text-top): Deleted use of background color.
            (audio::-webkit-media-controls-wireless-playback-text-bottom): Ditto..

            * Modules/mediacontrols/mediaControlsiOS.css: Use a gray background
            and system gray for text and artwork.
            (audio::-webkit-media-controls-wireless-playback-status):
            (audio::-webkit-media-controls-wireless-playback-text-top):
            (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186828. rdar://problem/19925709

    2015-07-14  Andreas Kling  <akling@apple.com>

            Don't persist history item tree for subframes across reloads.
            <https://webkit.org/b/146937>
            <rdar://problem/19925709>

            Reviewed by Brady Eidson.

            Throw away the subframe history items when reloading a page. This ensures that we
            don't accumulate outdated frame metadata when subframes change name across page loads.
            Since the history item tree is encoded in the UA session state and gets serialized to
            disk, it's important that we don't let it grow unbounded.

            * loader/HistoryController.cpp:
            (WebCore::HistoryController::updateForReload):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186827. rdar://problem/21736723

    2015-07-14  Antti Koivisto  <antti@apple.com>

            REGRESSION (r177876): store.apple.com profile and cart icons are missing
            https://bugs.webkit.org/show_bug.cgi?id=146894

            Reviewed by Myles C. Maxfield.

            If we had several @font-face rules for the same face covering overlapping ranges we
            would only try to get glyphs from the first one. If it didn't have the glyph we wouldn't
            try the other ones.

            Test: fast/css/font-face-multiple-missing-glyphs.html

            * platform/graphics/FontCascadeFonts.cpp:
            (WebCore::FontCascadeFonts::glyphDataForVariant):
            (WebCore::FontCascadeFonts::glyphDataForNormalVariant):

                Get GlyphData with one call.

            * platform/graphics/FontRanges.cpp:
            (WebCore::FontRanges::~FontRanges):
            (WebCore::FontRanges::glyphDataForCharacter):

                Check that we actually have a glyph in the font for the character before returning it.

            (WebCore::FontRanges::fontForCharacter):
            (WebCore::FontRanges::fontForFirstRange):
            * platform/graphics/FontRanges.h:
            (WebCore::FontRanges::size):
            (WebCore::FontRanges::rangeAt):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186807. rdar://problem/21782350

    2015-07-14  Alex Christensen  <achristensen@webkit.org>

            [Content Extensions] Fix if-domain and unless-domain when loading main documents.
            https://bugs.webkit.org/show_bug.cgi?id=146868

            Reviewed by Benjamin Poulain.

            Tests: http/tests/contentextensions/block-everything-if-domain.html
                   http/tests/contentextensions/block-everything-unless-domain-iframe.html
                   http/tests/contentextensions/block-everything-unless-domain-redirect.php
                   http/tests/contentextensions/block-everything-unless-domain.html

            * contentextensions/ContentExtensionsBackend.cpp:
            (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
            If we are loading a new main document, use that main document url as the main document url for domain comparison.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186786. rdar://problem/9222837

    2015-07-13  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
            https://bugs.webkit.org/show_bug.cgi?id=146918
            rdar://problem/9222837

            Reviewed by Tim Horton.

            Use as input to the viewport scaling algorithm a contents size from the FrameView
            that takes overflow on the viewport renderer into account. This prevents unexpected
            viewports scaling on pages that have content that overflows their expressed contents size,
            but apply overflow to the <body>.

            * page/FrameView.cpp:
            (WebCore::FrameView::contentsSizeRespectingOverflow): Look for overflow:hidden on each axis of
            the m_viewportRenderer, which is computed post-layout by calculateScrollbarModesForLayout()
            and is used for scrollbar logic on OS X. Clip unscaledDocumentRect on each axis, and then
            apply page scale.
            * page/FrameView.h:

2015-07-16  Lucas Forschler  <lforschler@apple.com>

        Merge r186764. rdar://problem/20923632

    2015-07-13  Eric Carlson  <eric.carlson@apple.com>

            [iOS] Cancel AirPlay explicitly when exiting from full screen
            https://bugs.webkit.org/show_bug.cgi?id=146902
            <rdar://problem/20923632>

            Reviewed by Brent Fulgham.

            * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit): Call setExternalPlayback(false)
              if playing to an external screen.

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186741.

    2015-07-12  Chris Fleizach  <cfleizach@apple.com>

            AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
            https://bugs.webkit.org/show_bug.cgi?id=146861

            Reviewed by Darin Adler.

            AttachmentViews exist only on WK1 so we need account for both platforms.

            Test: platform/ios-simulator/accessibility/iframe-access.html

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

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186712.

    2015-07-10  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK2] Scrolling issues on horizontally scrollable RTL pages
            https://bugs.webkit.org/show_bug.cgi?id=146872
            rdar://problem/7569416

            Reviewed by Sam Weinig.

            Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
            a gap down the right edge, and unreachable content on the left side, focussing
            form fields scrolled to the wrong location, and programmatic scrolls scrolled
            to the wrong place.

            Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
            and using it in various places. There are three main aspects to the patch:

            1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
               to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
               including zooming to focussed form elements.
            2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
               rather than just conjuring up a rect with a zero origin, which makes position:fixed
               work correctly.
            3. _interactionViewsContainerView (which hosts tap highlights) is positioned to 
               coincide with the origin of the documentRect (i.e. at the scroll origin, which
               may not be top-left). This allows tap highlights to show in the correct location.
            4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
               if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
               testing area.

            * platform/ios/ScrollViewIOS.mm:
            (WebCore::ScrollView::unobscuredContentRect):

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186707.

    2015-07-10  Chris Dumez  <cdumez@apple.com>

            [WK2] Diagnostic logging messages are causing too much IPC
            https://bugs.webkit.org/show_bug.cgi?id=146873
            <rdar://problem/21779205>

            Reviewed by Ryosuke Niwa.

            Move shouldLogAfterSampling() utility function to DiagnosticLoggingClient
            so it can be easily reused.

            * page/DiagnosticLoggingClient.h:
            (WebCore::DiagnosticLoggingClient::shouldLogAfterSampling):

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186684.

    2015-07-10  Zalan Bujtas  <zalan@apple.com>

            Crash at WebCore::WebPage::innerFrameQuad.
            https://bugs.webkit.org/show_bug.cgi?id=146843
            rdar://problem/21501819

            Reviewed by Andreas Kling.

            We may end up with a null rootEditableElement() after calling Document::updateLayout().

            Speculative fix. Not reproducible.

            * page/Frame.cpp: Some const cleanup.
            (WebCore::Frame::visiblePositionForPoint):
            * page/Frame.h:

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186683.

    2015-07-10  Brady Eidson  <beidson@apple.com>

            Crash in HistoryController::updateForCommit dereferencing a null HistoryItem.
            <rdar://problem/21371589> and https://bugs.webkit.org/show_bug.cgi?id=146842

            Reviewed by Chris Dumez.

            No new tests (Unknown how to reproduce).

            This patch basically rolls back part of http://trac.webkit.org/changeset/179472.

            r179472 changed HistoryController::setCurrentItem() to take a reference instead of a pointer.
            Unfortunately, we sometimes call setCurrentItem(nullptr).

            We'd like to *not* do that, and there are assertions in place to try to catch when we do,
            but in the meantime it is not valid to dereference nullptr.

            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::loadSameDocumentItem):

            * loader/HistoryController.cpp:
            (WebCore::HistoryController::updateForCommit):
            (WebCore::HistoryController::recursiveUpdateForCommit):
            (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
            (WebCore::HistoryController::setCurrentItem): Take a ptr instead of a ref.
            (WebCore::HistoryController::createItem):
            * loader/HistoryController.h:

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186718.

    2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>

            Update default link action sheets for app links
            https://bugs.webkit.org/show_bug.cgi?id=146658
            <rdar://problem/21221902>

            Reviewed by Dan Bernstein.

            * English.lproj/Localizable.strings:
            * platform/spi/ios/LaunchServicesSPI.h:

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186727.

    2015-07-11  Babak Shafiei  <bshafiei@apple.com>

            Unreviewed build fix.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):

2015-07-10  Matthew Hanson  <matthew_hanson@apple.com>

        Disable non-shipping features.

        * Configurations/FeatureDefines.xcconfig:

2015-07-09  Zalan Bujtas  <zalan@apple.com>

        Plugin create can end up destroying its renderer.
        https://bugs.webkit.org/show_bug.cgi?id=146824
        rdar://problem/18921429

        Reviewed by Andreas Kling.

        Plugins can run arbitrary code during initialization. If the plugin
        happens to destroy the associated node, its renderer becomes invalid.
        This patch checks whether the renderer survived the createPlugin() call.
        (This WeakPtr pattern is also used in RenderWidget to avoid dangling pointers.)

        Speculative fix. Not reproducible.

        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::loadPlugin):

2015-07-09  Dan Bernstein  <mitz@apple.com>

        WebCore part of Track and expose policies for external URL schemes and App Links separately
        https://bugs.webkit.org/show_bug.cgi?id=146822

        Reviewed by Anders Carlsson.

        * loader/FrameLoaderTypes.h: Added ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes,
        meaning external schemes are allowed but App Links are not. The opposite state doesn’t
        exist.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected): Opening a link in a new window
        or in the current window should never open it as an App Link.

2015-07-09  Daniel Bates  <dabates@apple.com>

        Fetching Content Security Policy report URL should respect same origin policy
        https://bugs.webkit.org/show_bug.cgi?id=146754
        <rdar://problem/18860259>

        Reviewed by Brady Eidson.

        Inspired by Blink r149791 (by Mike West <mkwst@chromium.org>):
        <https://src.chromium.org/viewvc/blink?revision=149791&view=revision>

        As per <http://www.w3.org/TR/2015/CR-CSP2-20150219/#send-violation-reports>, fetching the
        Content Security Policy report URL should include cookies if and only if the origin of
        the protected resource is equal to the origin of the report URL.

        Tests: http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.html
               http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.html
               http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.html
               http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html
               http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html
               http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.html

        * loader/PingLoader.cpp:
        (WebCore::PingLoader::sendViolationReport):

2015-07-09  Timothy Horton  <timothy_horton@apple.com>

        Use CoreAnimation fences instead of synchronous IPC to synchronize resize
        https://bugs.webkit.org/show_bug.cgi?id=146294
        <rdar://problem/21090193>

        Reviewed by Anders Carlsson.

        * platform/cocoa/MachSendRight.h:
        Export some constructors.

        * platform/spi/cocoa/QuartzCoreSPI.h:
        Add some SPI.

2015-07-09  Brady Eidson  <beidson@apple.com>

        Followup to r186647

        Reviewed by NOBODY.

        Thanks, EWS and commit-queue, for not catching this!

        * loader/DocumentLoader.h: Add a semi-colon.

2015-07-09  Dean Jackson  <dino@apple.com>

        REGRESSION: Inline media scrubbing always pauses the video
        https://bugs.webkit.org/show_bug.cgi?id=146819
        <rdar://problem/21572027>

        Reviewed by Eric Carlson. Joseph Pecoraro also was really
        helpful in diagnosing the problem.

        When we moved some code from a getter/setter in the child
        class to the base class, it was no longer being called due
        to the bad way we were implementing inheritance. The solution
        was to have the child class explicitly call into the base
        class.

        The much better solution would have been to rewrite everything
        to use ES6 classes or, as a smaller change, assign the __proto__
        directly on the child prototype. But I felt that was a bit
        too risky at this point.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.extend): Describe in a comment why the extend function
        is not suitable.
        * Modules/mediacontrols/mediaControlsiOS.js: Add a getter/setter for
        scrubbing that calls into the base Controller.

2015-07-09  Chris Fleizach  <cfleizach@apple.com>

        AX: <details> element should allow expand/close through AX API
        https://bugs.webkit.org/show_bug.cgi?id=146549

        Reviewed by Mario Sanchez Prada.

        Forgot this file with the original commit.

        * html/HTMLDetailsElement.cpp:
        (WebCore::HTMLDetailsElement::toggleOpen):

2015-07-09  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Add 3 byte jump size.
        https://bugs.webkit.org/show_bug.cgi?id=146425

        Reviewed by Darin Adler.

        * contentextensions/DFABytecode.h:
        (WebCore::ContentExtensions::smallestPossibleJumpSize):
        * contentextensions/DFABytecodeCompiler.cpp:
        (WebCore::ContentExtensions::appendZeroes):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
        * contentextensions/DFABytecodeInterpreter.cpp:
        (WebCore::ContentExtensions::jumpSizeInBytes):
        (WebCore::ContentExtensions::getJumpSize):
        (WebCore::ContentExtensions::getJumpDistance):
        Added DFABytecodeJumpSize::Int24.

2015-07-09  Brady Eidson  <beidson@apple.com>

        Add better ASSERTs to learn more about what is going wrong in DocumentLoader::detachFromFrame()
        https://bugs.webkit.org/show_bug.cgi?id=146816

        Reviewed by Alex Christensen.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::attachToFrame): Set the "has ever been attached" flag to true.
        (WebCore::DocumentLoader::detachFromFrame): ASSERT m_frame is non-null, but with a message 
          depending on the value of the "has ever been attached" flag.
        * loader/DocumentLoader.h:

2015-07-09  Brent Fulgham  <bfulgham@apple.com>

        [Mac, iOS] The mimeTypeCache should return a reference
        https://bugs.webkit.org/show_bug.cgi?id=146809

        Reviewed by Eric Carlson.

        No new tests: No change in functionality.

        Don't copy the mime type cache every time someone asks it a question. Return
        by reference instead.

        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::mimeTypeCache):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::mimeTypeCache):
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
        (WebCore::mimeTypeCache):

2015-07-09  Wenson Hsieh  <whsieh@berkeley.edu>

        Rubber banding is broken when using a Mighty Mouse
        https://bugs.webkit.org/show_bug.cgi?id=146693

        Reviewed by Tim Horton.

        Sets the "constrain content edge scrolling" flag to true by default, causing scrolling
        with a Mighty Mouse to not extend beyond the container's edges.

        Test: platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html

        * rendering/RenderLayer.cpp: Remove code that defaulted the flag to false.
        (WebCore::RenderLayer::RenderLayer): Deleted.
        * rendering/RenderMarquee.cpp: Added special case for marquees that allows content to scroll.
        (WebCore::RenderMarquee::RenderMarquee): See above.

2015-07-09  Brady Eidson  <beidson@apple.com>

        DocumentLoader::detachFromFrame() is being called with no current Frame set.
        <rdar://problem/21293082> and https://bugs.webkit.org/show_bug.cgi?id=146786 

        Reviewed by Sam Weinig.

        No new tests (Unknown how to reproduce).

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::attachToFrame):
        (WebCore::DocumentLoader::detachFromFrame): Null check m_frame before dereferencing it.
        (WebCore::DocumentLoader::setFrame): Deleted, renamed to attachToFrame(), and take's
          a Frame& instead of a Frame*.
        * loader/DocumentLoader.h:
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::initForSynthesizedDocument): setFrame is now attachToFrame.
        (WebCore::FrameLoader::setPolicyDocumentLoader): Ditto.
        (WebCore::FrameLoader::transitionToCommitted): Ditto.

2015-07-09  Matthew Daiter  <mdaiter@apple.com>

        Expose MediaStream methods to be used in the MediaStream Engine
        https://bugs.webkit.org/show_bug.cgi?id=146791
        <rdar://problem/21747589>

        Reviewed by Brent Fulgham.

        * Modules/mediastream/MediaStream.cpp: 
        (WebCore::MediaStream::getAudioTracks): Removed const
        (WebCore::MediaStream::getVideoTracks): Ditto
        * Modules/mediastream/MediaStream.h: Needed to change functions to
        override
        * platform/mediastream/MediaStreamPrivate.h: Added certain calls to
        PrivateClient that exposes methods to be used in the engine

2015-07-09  Devin Rousso  <drousso@apple.com>

        Web Inspector: Fix shape-highlight layout tests
        https://bugs.webkit.org/show_bug.cgi?id=146080

        Reviewed by Joseph Pecoraro.

        * inspector/InspectorOverlay.cpp:
        (WebCore::buildObjectForShapeOutside): Now properly returns the shape margin.

2015-07-09  Eric Carlson  <eric.carlson@apple.com>

        [Mac] AirPlay to password protected AppleTV fails
        https://bugs.webkit.org/show_bug.cgi?id=146812

        Reviewed by Dean Jackson.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Initialize previouslyRequestedPicker.
        (WebCore::WebMediaSessionManager::clientStateDidChange): Cleanup the logic and add a comment
          to make it slightly easier to follow. Don't begin playing to a device unless playback
          has just started (don't switch in mid-play).
        (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Use the last client to
          request the device picker as a fallback in case no other client is a canditate. Add more
          logging to make it possible to debug the selection logic.
        (WebCore::WebMediaSessionManager::scheduleDelayedTask): Fiddle with the logging.

2015-07-09  Matthew Daiter  <mdaiter@apple.com>

        Implementing platform-specific section of enumerateDevices
        https://bugs.webkit.org/show_bug.cgi?id=146461
        <rdar://problem/21614466>

        Reviewed by Darin Adler.

        * Modules/mediastream/MediaDeviceInfo.cpp: Changed access methods
        (WebCore::MediaDeviceInfo::audioInputType): Added AtomicString
        permanent refs
        (WebCore::MediaDeviceInfo::audioOutputType): Ditto
        (WebCore::MediaDeviceInfo::videoInputType): Ditto
        * Modules/mediastream/MediaDeviceInfo.h: Changed String refs to values
        (WebCore::MediaDeviceInfo::label): Ditto
        (WebCore::MediaDeviceInfo::deviceId): Ditto
        (WebCore::MediaDeviceInfo::groupId): Ditto
        (WebCore::MediaDeviceInfo::kind): Ditto
        * platform/mediastream/MediaDevicesPrivate.cpp: Implemented query for
        available devices
        (WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
        (WebCore::MediaDevicesPrivate::create):
        (WebCore::MediaDevicesPrivate::availableMediaDevices):
        * platform/mediastream/MediaDevicesPrivate.h:
        (WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Needed
        to tack on extra fields to hold data
        (WebCore::TrackSourceInfo::create):
        (WebCore::TrackSourceInfo::groupId):
        (WebCore::TrackSourceInfo::deviceId):
        (WebCore::TrackSourceInfo::TrackSourceInfo):
        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
        (WebCore::AVCaptureDeviceManager::getSourcesInfo):

2015-07-09  Per Arne Vollan  <peavo@outlook.com>

        [Win] Add memory pressure handler.
        https://bugs.webkit.org/show_bug.cgi?id=146685

        Reviewed by Brent Fulgham.

        Add memory pressure handler implementation on Windows.
        We check the memory usage at regular intervals with a timer.

        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseMemory):
        (WebCore::MemoryPressureHandler::install):
        (WebCore::MemoryPressureHandler::uninstall):
        (WebCore::MemoryPressureHandler::holdOff):
        * platform/win/MemoryPressureHandlerWin.cpp: Added.
        (WebCore::CheckMemoryTimer::CheckMemoryTimer):
        (WebCore::CheckMemoryTimer::fired):
        (WebCore::CheckMemoryTimer::handleMemoryLow):
        (WebCore::MemoryPressureHandler::platformReleaseMemory):
        (WebCore::memCheckTimer):
        (WebCore::MemoryPressureHandler::install):
        (WebCore::MemoryPressureHandler::uninstall):
        (WebCore::MemoryPressureHandler::holdOff):
        (WebCore::MemoryPressureHandler::respondToMemoryPressure):
        (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
        (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
        * platform/win/Win32Handle.h:
        (WebCore::Win32Handle::operator=):

2015-07-09  Matthew Daiter  <mdaiter@apple.com>

        Exposed AVVideoCaptureSource's bounds
        https://bugs.webkit.org/show_bug.cgi?id=146760
        <rdar://problem/21736772>

        Reviewed by Brent Fulgham.

        * platform/mediastream/mac/AVVideoCaptureSource.h:
        (WebCore::AVVideoCaptureSource::width): Needed access to video width
        (WebCore::AVVideoCaptureSource::height): Needed access to video height

2015-07-09  Karlen Simonyan  <szkarlen@gmail.com>

        [WinCairo] ClearType should be enabled on Cairo port
        https://bugs.webkit.org/show_bug.cgi?id=145492

        Reviewed by Brent Fulgham.

        * platform/graphics/win/FontPlatformDataCairoWin.cpp:
        (WebCore::FontPlatformData::FontPlatformData):
        Use CAIRO_ANTIALIAS_BEST instead of CAIRO_ANTIALIAS_GRAY.

2015-07-02  Chris Fleizach  <cfleizach@apple.com>

        AX: <details> element should allow expand/close through AX API
        https://bugs.webkit.org/show_bug.cgi?id=146549

        Reviewed by Mario Sanchez Prada.

        Allow AXExpanded to be writeable for <details> element, which, when set
        will toggle the opening and closing of the element. 
        Post a notification when that happens as well.

        Modified test: platform/mac/accessibility/details-summary.html

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::hierarchicalLevel):
        (WebCore::AccessibilityNodeObject::setIsExpanded):
        (WebCore::shouldUseAccessibilityObjectInnerText):
        * accessibility/AccessibilityNodeObject.h:
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::supportsPressAction):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::canSetExpandedAttribute):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
        (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
        * html/HTMLDetailsElement.cpp:
        (WebCore::HTMLDetailsElement::toggleOpen):

2015-07-09  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Prevent crashes with plugins.
        https://bugs.webkit.org/show_bug.cgi?id=146705
        rdar://problem/20855444

        Reviewed by Brady Eidson.

        * loader/NetscapePlugInStreamLoader.cpp:
        (WebCore::NetscapePlugInStreamLoader::create):
        Call addPlugInStreamLoader in ResourceLoader::willSendRequest to always add blocked loads.
        * loader/NetscapePlugInStreamLoader.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequest):
        Removed unnecessary early returns.
        * loader/ResourceLoader.h:
        (WebCore::ResourceLoader::isPlugInStreamLoader):

2015-07-09  Brent Fulgham  <bfulgham@apple.com>

        [Win] Honor CACFLayer content scale factor
        https://bugs.webkit.org/show_bug.cgi?id=146792

        Reviewed by Dean Jackson.

        * AVFoundationSupport.py: Check for the CACFLayerSet/GetContentsScale
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        (PlatformCALayerWin::PlatformCALayerWin): Use owner's scale factor (if
        present).
        (PlatformCALayerWin::contentsScale): Use CACFLayer API if present.
        (PlatformCALayerWin::setContentsScale): Ditto.
        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
        (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Use owner's scale
        factor (if present).
        (PlatformCALayerWinInternal::addTile): Use tile parent's scale factor.

2015-07-08  Matt Rajca  <mrajca@apple.com>

        Media Session: report to chrome client 'hasActiveMediaElements' changes
        https://bugs.webkit.org/show_bug.cgi?id=146745

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp: All updates to active media elements are now funneled through a helper
          method that will invoke the 'hasMediaSessionWithActiveMediaElementsDidChange' callback when necessary.
        (WebCore::MediaSession::removeMediaElement):
        (WebCore::MediaSession::changeActiveMediaElements):
        (WebCore::MediaSession::addActiveMediaElement):
        (WebCore::MediaSession::releaseSession):
        * Modules/mediasession/MediaSession.h:
        * Modules/mediasession/MediaSessionManager.cpp:
        (WebCore::MediaSessionManager::hasActiveMediaElements):
        * Modules/mediasession/MediaSessionManager.h:

2015-07-09  Darin Adler  <darin@apple.com>

        REGRESSION (r182866): repeated prompts for password on internal Apple website using workers
        https://bugs.webkit.org/show_bug.cgi?id=146769

        Reviewed by Sam Weinig.

        Not sure how to make a regression test for this. Sure would be nice to have one though.

        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Added. Calls through to the
        base class copy constructor to copy data members of the base class (the lack of this was
        the bug). Also initializes all the data members of this class.
        (WebCore::ThreadableLoaderOptions::isolatedCopy): Changed to call the constructor above.

        * loader/ThreadableLoader.h: Added new constructor.

2015-07-09  Chris Fleizach  <cfleizach@apple.com>

        AX: VoiceOver cannot get to any content in Yahoo Mail messages table
        https://bugs.webkit.org/show_bug.cgi?id=146674

        Reviewed by Darin Adler.

        A table row could have any number of parent elements in the render tree, but for the purposes
        of accessibility we only want to report the AXTable as the parent so that it looks like a sane
        data table.

        Test: accessibility/aria-table-with-presentational-elements.html

        * accessibility/AccessibilityARIAGridRow.cpp:
        (WebCore::AccessibilityARIAGridRow::disclosedByRow):
        (WebCore::AccessibilityARIAGridRow::parentObjectUnignored):
        (WebCore::AccessibilityARIAGridRow::parentTable):
        * accessibility/AccessibilityARIAGridRow.h:

2015-07-08  Sungmann Cho  <sungmann.cho@navercorp.com>

        [GTK] The "Missing Plug-in" buttons are not showing up on some flash contents.
        https://bugs.webkit.org/show_bug.cgi?id=146707

        Reviewed by Martin Robinson.

        Currently, WebKitGTK+ doesn't show the "Missing Plug-in" buttons if the plugin-related tags
        don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
        the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitGTK+,
        MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
        array of <extension, mime type>, looking for the mime type for the given extension.
        But |extensionMap| in MIMETypeRegistryGtk.cpp doesn't have the information for ".swf",
        so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
        not ObjectContentNetscapePlugin.

        * platform/gtk/MIMETypeRegistryGtk.cpp:

2015-07-08  Brady Eidson  <beidson@apple.com>

        Crash calling [WebView close] in didFinishLoadForFrame callback.
        <rdar://problem/21690765> and https://bugs.webkit.org/show_bug.cgi?id=146773

        Reviewed by David Kilzer.

        Added API Test "WebViewCloseInsideDidFinishLoadForFrame"

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame): After the delegate callback,
          don't use the local Page* variable from earlier, but instead refetch it from m_frame.

2015-07-08  Daniel Bates  <dabates@apple.com>

        Cleanup: Make ContentSecurityPolicy::ReportingStatus an enum class
        https://bugs.webkit.org/show_bug.cgi?id=146670

        Reviewed by Darin Adler.

        Make calling the ContentSecurityPolicy::allow* functions less error prone by making
        ContentSecurityPolicy::ReportingStatus an enum class. Among other benefits this will
        prevent a caller from inadvertently passing an enumerator of ContentSecurityPolicy::ReportingStatus
        as the boolean argument overridingContentSecurityPolicy, which is taken by the various
        ContentSecurityPolicy::allow* functions, by causing a compile-time error (since an enum class
        enumerator cannot be implicitly converted to an integral type).

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::initScript):
        * page/ContentSecurityPolicy.cpp:
        (WebCore::CSPDirectiveList::allowJavaScriptURLs):
        (WebCore::CSPDirectiveList::allowInlineEventHandlers):
        (WebCore::CSPDirectiveList::allowInlineScript):
        (WebCore::CSPDirectiveList::allowInlineStyle):
        (WebCore::CSPDirectiveList::allowEval):
        (WebCore::CSPDirectiveList::allowPluginType):
        (WebCore::CSPDirectiveList::allowScriptFromSource):
        (WebCore::CSPDirectiveList::allowObjectFromSource):
        (WebCore::CSPDirectiveList::allowChildFrameFromSource):
        (WebCore::CSPDirectiveList::allowImageFromSource):
        (WebCore::CSPDirectiveList::allowStyleFromSource):
        (WebCore::CSPDirectiveList::allowFontFromSource):
        (WebCore::CSPDirectiveList::allowMediaFromSource):
        (WebCore::CSPDirectiveList::allowConnectToSource):
        (WebCore::CSPDirectiveList::allowFormAction):
        (WebCore::CSPDirectiveList::allowBaseURI):
        (WebCore::ContentSecurityPolicy::didReceiveHeader):
        (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
        * page/ContentSecurityPolicy.h:
        * page/DOMSecurityPolicy.cpp:
        (WebCore::DOMSecurityPolicy::allowsEval):

2015-07-08  Matthew Daiter  <mdaiter@apple.com>

        Activate DOMURLMediaStream
        https://bugs.webkit.org/show_bug.cgi?id=146764
        <rdar://problem/21738101>

        Reviewed by Eric Carlson.

        * DerivedSources.make: Added DOMURLMediaStream.idl to list
        * WebCore.xcodeproj/project.pbxproj: Added DOMURLMediaStream.cpp and
        DOMURLMediaStream.h to compile

2015-07-08  Matthew Daiter  <mdaiter@apple.com>

        Make sure MediaStream uses blob protocol
        https://bugs.webkit.org/show_bug.cgi?id=146752
        <rdar://problem/21736057>

        Reviewed by Eric Carlson.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::selectNextSourceChild): Added MediaStream
        blob protocol

2015-07-08  Andreas Kling  <akling@apple.com>

        Videos on apple.com don't show up when restored from page cache.
        <https://webkit.org/b/146766>
        <rdar://problem/21712311>

        Reviewed by Darin Adler.

        Break out most of HTMLMediaElement::stop() (override of ActiveDOMObject::stop(), to be clear)
        into a stopWithoutDestroyingMediaPlayer() function that both stop() and suspend() can call.

        Before this change, suspend() would call stop() when moving into the page cache, killing the
        internal MediaPlayer object which caused the video to disappear from the page.

        Test: LayoutTests/media/restore-from-page-cache.html (amended)

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
        (WebCore::HTMLMediaElement::stop):
        (WebCore::HTMLMediaElement::suspend):
        * html/HTMLMediaElement.h:

2015-07-08  Matthew Daiter  <mdaiter@apple.com>

        Make MediaStream conform to its private client like MediaSource does
        https://bugs.webkit.org/show_bug.cgi?id=146756
        <rdar://problem/21736457>

        Reviewed by Brent Fulgham.

        MediaStream should be inheriting its PrivateClient's getters and
        setters for RefCounted, not inheriting its own.

        * Modules/mediastream/MediaStream.h: Changed MediaStream's inherit
        statements
        * platform/mediastream/MediaStreamPrivate.h: Changed
        MediaStreamPrivateClient to inherit RefCounted<MediaStreamPrivateClient>

2015-07-08  Matthew Daiter  <mdaiter@apple.com>

        Made AVMediaCaptureSource's session accessor public
        https://bugs.webkit.org/show_bug.cgi?id=146758
        <rdar://problem/21736651>

        Reviewed by Brent Fulgham.

        * platform/mediastream/mac/AVMediaCaptureSource.h:
        (WebCore::AVMediaCaptureSource::session): Changed to public

2015-07-08  Matthew Daiter  <mdaiter@apple.com>

        Make sure MediaStream engine loaded for interpreting MediaStreams
        https://bugs.webkit.org/show_bug.cgi?id=146748
        <rdar://problem/21735416>

        Reviewed by Brent Fulgham.

        Prevent the MediaSource engine from being used to process
        MediaStreams, since they are not compatible

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
        Changed MediaStream to never be loaded
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): 
        Changed MediaStream to never be loaded


2015-07-08  Benjamin Poulain  <bpoulain@apple.com>

        [Content Extensions] Fuse undistinguishable actions as much as possible
        https://bugs.webkit.org/show_bug.cgi?id=146762

        Reviewed by Alex Christensen.

        Our previous code that fused actions was based on test lists that were
        grouping similar actions in the input.

        The input we get from developers is more distributed. It is very common to
        have trigger flags all over the place, and "css-display-none" mixed with "block".

        This patch refines the merging code to merge those cases as much as possible.

        The size taken by the actions is negligible, but having different actions make
        nodes unkillable by the Minimizer. By merging many more actions, the minimizer
        no longer see those subtrees as distinguishable and can do a better job.

        On a large test list, this cuts the bytecode size by 2 megabytes.

        Tests: http/tests/contentextensions/css-display-none-after-ignore-previous-rules.html
               http/tests/contentextensions/single-css-display-none.html

        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
        (WebCore::ContentExtensions::serializeActions):

2015-07-08  Matthew Daiter  <mdaiter@apple.com>

        Cleared contentMIMETypes for MediaStreams
        https://bugs.webkit.org/show_bug.cgi?id=146750
        <rdar://problem/21735678>

        Reviewed by Brent Fulgham.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::load): Needed to clear contentMIMETypes

2015-07-08  Dean Jackson  <dino@apple.com>

        Audio elements with controls force their enclosing stacking context to composite
        https://bugs.webkit.org/show_bug.cgi?id=146751
        <rdar://problem/21466572>

        Reviewed by Simon Fraser.

        There were a number of issues with audio controls, on both iOS and OS X.

        - they used a blurry background which was not the intended design
        - they cause the page to composite, which causes a degradation in
          text rendering quality
        - they inserted 20px of padding above every audio element, which
          could break existing page designs.

        Removing the need for compositing and blending means that the
        colors used for control tints need to be adjusted for the non-blended
        case. Wherever I could, I kept as much as possible in a shared
        rule and made specific changes for audio or video.

        The controls were also unintentionally relying on the compositing
        to create stacking contexts and control the rendering order. Without
        them, I needed to add some explicit stacking.

        I also made some drive-by whitespace clean-ups.

        * Modules/mediacontrols/mediaControlsApple.css: Remove as much compositing
        as possible in audio controls.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.drawTimelineBackground): Use specific colors for audio.

        * Modules/mediacontrols/mediaControlsiOS.css: Remove as much need for compositing
        as possible.

2015-07-08  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Crash when appending an SVG <use> element dynamically which has animated SVG <path> element
        https://bugs.webkit.org/show_bug.cgi?id=146690
        <rdar://problem/20790376>

        Reviewed by Dean Jackson.

        Test: svg/animations/insert-animate-use-path-while-animation.svg

        The crashing call stack shows that
        SVGAnimatedListPropertyTearOff<SVGPathSegList>::m_animVal is null when
        trying to access it in synchronizeWrappersIfNeeded(). This happens because
        animationStarted() was not called for this animatedType.
        
        SVGAnimateElementBase::resetAnimatedType() calls
        SVGAnimatedPathAnimator::startAnimValAnimation() at the beginning of the
        animation. For the target element and all its instances, this function calls
        SVGAnimatedPathSegListPropertyTearOff::animationStarted() which calls
        SVGAnimatedListPropertyTearOff<SVGPathSegList>::animationStarted(). This
        last function allocates the member m_animVal when calling
        SVGAnimatedListPropertyTearOff<SVGPathSegList>::animVal(). 
        
        When adding a new instance of the same animating target element, 
        SVGAnimateElementBase::resetAnimatedType() just keeps calling
        SVGAnimatedPathAnimator::animValDidChange() for all the instances of the
        targetElement without ensuring that all of them have started their
        animations.
        
        The fix is to make SVGAnimatedPathAnimator::resetAnimValToBaseVal() ensure
        that animationStarted() is called for the targetElement and all its instances.

        * svg/SVGAnimatedPath.cpp:
        (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Move resetting
        the animation value and starting the animatedTypes code to a new overriding
        function which is named resetAnimValToBaseVal().
        
        (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal): Call the overriding
        function which calls buildSVGPathByteStreamFromSVGPathSegList() as before
        and ensure that all the animatedTypes have started their animations.
        
        * svg/SVGAnimatedPath.h:

2015-07-08  Brady Eidson  <beidson@apple.com>

        Move PingLoaders to the NetworkingProcess.
        <rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710

        Reviewed by Tim Horton.

        No new tests.
        There's no current solution for communicating back to a page that a ping load has reached its target.
        Until we have such a solution, any attempt at a layout test will be fragile at best.

        * WebCore.xcodeproj/project.pbxproj:
        
        * loader/LoaderStrategy.cpp:
        (WebCore::LoaderStrategy::createPingHandle): Default implementation is create the PingHandle directly.
        * loader/LoaderStrategy.h:

        PingLoader becomes a static class for now that crafts the ResourceRequest then passes it off
        to the LoaderStrategy:        
        * loader/PingLoader.cpp:
        (WebCore::PingLoader::loadImage):
        (WebCore::PingLoader::sendPing):
        (WebCore::PingLoader::sendViolationReport):
        (WebCore::PingLoader::startPingLoad):
        (WebCore::PingLoader::createPingLoader): Deleted.
        (WebCore::PingLoader::PingLoader): Deleted.
        (WebCore::PingLoader::~PingLoader): Deleted.
        * loader/PingLoader.h:
        (WebCore::PingLoader::timeoutTimerFired): Deleted.

        PingHandle does what PingLoader used to - It's a basic ResourceHandleClient that simply waits
        for any response/completion/failure and then deletes itself.
        * platform/network/PingHandle.h: Added.
        (WebCore::PingHandle::PingHandle):
        (WebCore::PingHandle::usesAsyncCallbacks):
        (WebCore::PingHandle::timeoutTimerFired):
        (WebCore::PingHandle::~PingHandle):

2015-07-08  Csaba Osztrogonác  <ossy@webkit.org>

        Add new sources to StyleAllInOne.cpp
        https://bugs.webkit.org/show_bug.cgi?id=146584

        Reviewed by Brent Fulgham.

        * WebCore.vcxproj/WebCore.vcxproj:
        * rendering/style/StyleAllInOne.cpp:

2015-07-08  Csaba Osztrogonác  <ossy@webkit.org>

        Add new sources to DOMAllInOne.cpp
        https://bugs.webkit.org/show_bug.cgi?id=146587

        Reviewed by Brent Fulgham.

        * WebCore.vcxproj/WebCore.vcxproj:
        * dom/DOMAllInOne.cpp:

2015-07-08  Csaba Osztrogonác  <ossy@webkit.org>

        Add new sources to AccessibilityAllInOne.cpp
        https://bugs.webkit.org/show_bug.cgi?id=146582

        Reviewed by Brent Fulgham.

        * WebCore.vcxproj/WebCore.vcxproj:
        * accessibility/AccessibilityAllInOne.cpp:

2015-07-08  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Two clicks required to enable AirPlay at youtube.com
        https://bugs.webkit.org/show_bug.cgi?id=146733
        <rdar://problem/21556356>

        Reviewed by Brent Fulgham.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::clientStateDidChange): Only log when state has changed.
          Don't steal the route if another client is actively playing to the device.
        (WebCore::WebMediaSessionManager::setPlaybackTarget): Set m_targetChanged.
        (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't consider the
          requestedPicker flag until after a target change.
        * Modules/mediasession/WebMediaSessionManager.h:

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Add logging.
        (WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget): Ditto.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Always log.

2015-07-08  Zalan Bujtas  <zalan@apple.com>

        Do not waste window server memory for placeholder windows initiated by ThemeMac.
        https://bugs.webkit.org/show_bug.cgi?id=146730
        rdar://problem/20321222

        Using defer:YES prevents us from wasting any window server resources for WebCoreThemeWindow(s).

        Patch by Darin Adler.
        Reviewed by Zalan Bujtas.

        Not testable.

        * platform/mac/ThemeMac.mm:
        (-[WebCoreThemeView window]):

2015-07-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [GTK] Deactivate GObject bindings for static methods
        https://bugs.webkit.org/show_bug.cgi?id=146717

        Reviewed by Carlos Garcia Campos.

        Static methods are currently not supported by GObject bindings so we deactivate them from the generation.

        Current tests suffice. Expectations updated.

        * bindings/scripts/CodeGeneratorGObject.pm:
        (SkipFunction): Skip isStatic functions.
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
        (webkit_dom_test_interface_implements_method4): Deleted.
        (webkit_dom_test_interface_supplemental_method4): Deleted.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
        (webkit_dom_test_obj_class_method): Deleted.
        (webkit_dom_test_obj_class_method_with_optional): Deleted.
        (webkit_dom_test_obj_overloaded_method1): Deleted.

2015-07-07  Benjamin Poulain  <bpoulain@apple.com>

        Remove the overflow checks from the important vectors used by the content extensions machines
        https://bugs.webkit.org/show_bug.cgi?id=146703

        Reviewed by Andreas Kling.

        Most of the overflow checks cannot be eliminated by clang. Removing them
        explicitly removes 400 ms from the compile time of a very large test list.

        * contentextensions/ContentExtensionsDebugging.h:
        * contentextensions/DFA.h:
        * contentextensions/DFACombiner.cpp:
        * contentextensions/DFAMinimizer.cpp:
        * contentextensions/ImmutableNFA.h:
        * contentextensions/MutableRangeList.h:
        * contentextensions/NFAToDFA.cpp:
        (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
        (WebCore::ContentExtensions::resolveEpsilonClosures):
        (WebCore::ContentExtensions::extendSetWithClosure):
        (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::convert):
        (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::extend):
        (WebCore::ContentExtensions::createCombinedTransition):
        (WebCore::ContentExtensions::getOrCreateDFANode):
        (WebCore::ContentExtensions::NFAToDFA::convert):

2015-07-07  Dean Jackson  <dino@apple.com>

        [iOS] MediaControls: Start Play and Can't Play buttons need to be cutout and blurred
        https://bugs.webkit.org/show_bug.cgi?id=146226

        Reviewed by Simon Fraser.

        This patch takes what Said Abou-Hallawa posted in an earlier revision and
        makes a few tweaks to workaround the bugs he's listed.

        Replicate the iOS System blur backdrop in pure CSS, so that the large
        start button looks more correct. Also add artwork for a failure state.

        * Modules/mediacontrols/mediaControlsiOS.css: New style rules for the start
        button, which now is a collection of elements rather than a <button>.
        (video::-webkit-media-controls-start-playback-button):
        (video::-webkit-media-controls-start-playback-background):
        (video::-webkit-media-controls-start-playback-tint):

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.createBase): Replace the <button> with the hierarchy of
        elements to replicate the blur. Give some of them a class attribute, so they
        can match selectors (see the bugs Said filed in the original bugzilla).
        (ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): Toggle classes on
        the hierarchy as needed.
        (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
        (ControllerIOS.prototype.updateStatusDisplay): Ditto.

2015-07-07  Zalan Bujtas  <zalan@apple.com>

        Crash when parent iframe is set to display none and the child frame is mutated the same time.
        https://bugs.webkit.org/show_bug.cgi?id=146699
        rdar://problem/16207881

        Reviewed by Andreas Kling.

        When the parent iframe is set to display: none, we destroy the associated renderer (RenderIFrame).
        However if the child frame is mutated the same time, during layout we try to access this RenderIFrame
        to check whether it needs frame flattening.
        This patch checks whether the parent render widget is still valid.

        Test: fast/frames/crash-display-none-iframe-during-onbeforeload.html

        * page/FrameView.cpp:
        (WebCore::FrameView::isInChildFrameWithFrameFlattening): rearrange early returns.

2015-07-06  Matt Rajca  <mrajca@apple.com>

        Media Session: remove seek forward/backward attributes
        https://bugs.webkit.org/show_bug.cgi?id=146645

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaRemoteControls.h:
        * Modules/mediasession/MediaRemoteControls.idl:

2015-07-07  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding word
        https://bugs.webkit.org/show_bug.cgi?id=146695
        <rdar://problem/21441466>

        Reviewed by Tim Horton.

        When we would currently use dictionary lookup to decide on our text selection, first check if we
        are targeting an editable field. If we are, use the original selection behavior. Otherwise, use
        the new "dictionary lookup" selection.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): Only use dictionary lookup
        when our target node is not editable.
        

2015-07-07  Brady Eidson  <beidson@apple.com>

        Another attempt to fix CURL/Soup builds after r186476

        Reviewed by NOBODY.

        * platform/network/curl/SocketStreamHandle.h:

        * platform/network/soup/SocketStreamHandle.h:

2015-07-07  Brady Eidson  <beidson@apple.com>

        Attempt to fix CURL/Soup builds after r186476

        Reviewed by NOBODY.

        * platform/network/curl/SocketStreamHandle.h:
        (WebCore::SocketStreamHandle::create):

        * platform/network/soup/SocketStreamHandle.h:
        (WebCore::SocketStreamHandle::create):

2015-07-07  Brady Eidson  <beidson@apple.com>

        HTTP Auth cached after disabling private browsing/reset.
        <rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654

        Reviewed by Tim Horton.

        Test: http/tests/security/private-browsing-http-auth.html

        - Change most static CredentialStorage methods to be instance methods instead.
        - Make a CredentialStorage objects be per-NetworkStorageSession.

        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::WebSocketChannel):
        (WebCore::WebSocketChannel::connect): Only start the web socket load if a networking
          context is available.

        * platform/network/CredentialStorage.cpp:
        (WebCore::CredentialStorage::defaultCredentialStorage): Returns the credential storage
          from the default NetworkStorageSession.
        (WebCore::CredentialStorage::set):
        (WebCore::CredentialStorage::get):
        (WebCore::CredentialStorage::remove):
        (WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
        (WebCore::CredentialStorage::clearCredentials):
        (WebCore::protectionSpaceToCredentialMap): Deleted.
        (WebCore::originsWithCredentials): Deleted.
        (WebCore::pathToDefaultProtectionSpaceMap): Deleted.
        (WebCore::findDefaultProtectionSpaceForURL): Deleted.
        (WebCore::CredentialStorage::setPrivateMode): Deleted. Was a no-op anyways.
        * platform/network/CredentialStorage.h:
        
        * platform/network/NetworkStorageSession.h:
        (WebCore::NetworkStorageSession::credentialStorage):
        
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::createCFURLConnection):
        (WebCore::ResourceHandle::willSendRequest):
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCredential):
        
        * platform/network/cf/SocketStreamHandle.h:
        (WebCore::SocketStreamHandle::create):
        * platform/network/cf/SocketStreamHandleCFNet.cpp:
        (WebCore::SocketStreamHandle::SocketStreamHandle):
        (WebCore::SocketStreamHandle::getStoredCONNECTProxyCredentials):
        (WebCore::getStoredCONNECTProxyCredentials): Deleted.
        
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCredential):
        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::applyAuthenticationToRequest):
        
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::createNSURLConnection):
        (WebCore::ResourceHandle::willSendRequest):
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCredential):
        
        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::applyAuthenticationToRequest):
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCredential):
        
2015-07-07  Zalan Bujtas  <zalan@apple.com>

        REGRESSION(169105): CSS Regions: renderer returns wrong selection root when it is inside a column flow.
        https://bugs.webkit.org/show_bug.cgi?id=146529
        rdar://problem/21613670

        Reviewed by Mihnea Ovidenie and David Kilzer.

        This patch ensures that RenderObject::selectionRoot() handles column flows properly while searching for the associated
        selection root.
        When the renderer is inside a column flow and the column flow is part of a named flow, we stop
        traversing the ancestor chain, searching for the selection root, when we reach the column flow.
        Since the column flow is not a selection root, we mistakenly fall back to the RenderView as selection root.
        Instead, we should check if the column is inside a named flow and return the selection root accordingly.
        Returning the wrong selection root confuses RenderView::splitSelectionBetweenSubtrees() logic and this particular
        RenderObject could end up in multiple selection trees.

        Test: fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::selectionRoot):

2015-07-07  Brent Fulgham  <bfulgham@apple.com>

        [Mac] REGRESSION (r184794): Play/Pause control doesn't update state in full screen
        https://bugs.webkit.org/show_bug.cgi?id=146689
        <rdar://problem/21393490>

        Reviewed by Dean Jackson.

        The changes in r184794 did not take full screen mode into account. This needed to be corrected.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.handlePanelTransitionEnd):
        (Controller.prototype.setPlaying):
        (Controller.prototype.showControls):

2015-07-07  Wenson Hsieh  <whsieh@berkeley.edu>
        
        Snap point regions containing X and Y snap points should do a better job animating
        https://bugs.webkit.org/show_bug.cgi?id=142523
        <rdar://problem/20100753>

        Reviewed by Brent Fulgham.

        Reimplemented snap point animations to use a single timer for both horizontal and
        vertical axes to better support 2D snap scrolling. Instead of making velocity
        dependent on progress to the snap point and handling 2D snapping with different
        timer update functions, this implementation uses a fixed animation time to coordinate
        the snapping animation across both axes.

        Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html

        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Refactored to use a single scroll snap timer.
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: See above.
        (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): See above.
        (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): See above.
        * platform/cocoa/ScrollController.h: Refactored to use a single scroll snap timer and update function to handle
            snapping in both axes. This entails removing the ScrollEventAxis parameter from various functions below. Also
            removed methods that computed "snap" and "glide" offsets.
        (WebCore::ScrollControllerClient::startScrollSnapTimer): See above.
        (WebCore::ScrollControllerClient::stopScrollSnapTimer): See above.
        * platform/cocoa/ScrollController.mm: See above.
        (WebCore::ScrollController::ScrollController): Added new constants used to compute animation offsets.
        (WebCore::ScrollController::snapRubberBandTimerFired):  Added a check to prevent the rubber band timer from firing
            alongside the scroll snap timer. This results in scroll snapping taking precedence over rubber banding when
            scrolling against the edge of a container in the case of 2D scrolling. We didn't run into this issue before
            because snapping wasn't working properly at the edges of a 2D scrolling container. In the future, we may want
            to unify both snap scrolling and rubber banding timers to solve this issue.
        (WebCore::ScrollController::isScrollSnapInProgress): Refactored to use a single scroll snap timer.
        (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Fixed an issue where wheel deltas were being pushed
            to the snap state incorrectly.
        (WebCore::ScrollController::processWheelEventForScrollSnap): Fixed an issue with 2D snapping where scrolling in 2 axes
            simultaneously would cause the vertical axis to override the horizontal axis. This is more like a sub-issue of fixing
            2D scrolling, and is required for 2D snap animations to work properly.
        (WebCore::ScrollController::startScrollSnapTimer): Refactored to use a single scroll snap timer.
        (WebCore::ScrollController::stopScrollSnapTimer): See above.
        (WebCore::ScrollController::scrollSnapTimerFired): This new method handles snap scroll updates on both axes.
        (WebCore::ScrollController::beginScrollSnapAnimation): Refactored to account for single scroll snap timer.
        (WebCore::ScrollController::endScrollSnapAnimation): See above.
        (WebCore::ScrollController::initializeScrollSnapAnimationParameters): New method that initializes parameters used to
            coordinate the animation state across horizontal and vertical axes.
        (WebCore::ScrollController::isSnappingOnAxis):  Checks whether or not a given axis is currently scroll snapping. This will
            return true in the case of active 2D scroll snapping.
        (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Deleted.
        (WebCore::ScrollController::horizontalScrollSnapTimerFired): Deleted.
        (WebCore::ScrollController::verticalScrollSnapTimerFired): Deleted.
        (WebCore::ScrollController::scrollSnapAnimationUpdate): Deleted.
        (WebCore::ScrollController::initializeGlideParameters): Deleted.
        (WebCore::snapProgress): Deleted.
        (WebCore::clampedSnapMagnitude): Deleted.
        (WebCore::ScrollController::computeSnapDelta): Deleted.
        (WebCore::snapGlide): Deleted.
        (WebCore::ScrollController::computeGlideDelta): Deleted.
        * platform/cocoa/ScrollSnapAnimatorState.h:  Added a new datastructure, ScrollSnapAnimationCurveState, which tracks
            the scroll snap animation state across both axes.
        * platform/cocoa/ScrollSnapAnimatorState.mm: Removed fields relevant to the former "gliding" model and renamed the
            initial wheel delta variable to reflect this.
        (WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta): Fixed an issue where wheel deltas were being pushed
            to the snap state incorrectly.
        (WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow): Tiny for loop incrementor style fix.
        (WebCore::ScrollSnapAnimatorState::isSnapping): Checks whether this state is in either snapping or gliding mode.
        (WebCore::ScrollSnapAnimatorState::canReachTargetWithCurrentInitialScrollDelta): Checks whether the scroll velocity is
            consistent with the initial and target offsets.
        (WebCore::ScrollSnapAnimatorState::interpolatedOffsetAtProgress): Interpolates the offset for a given progress value.
        (WebCore::ScrollSnapAnimationCurveState::ScrollSnapAnimationCurveState): New constants.
        (WebCore::ScrollSnapAnimationCurveState::initializeSnapProgressCurve): Abstracts out part of the initialization process.
        (WebCore::ScrollSnapAnimationCurveState::initializeInterpolationCoefficientsIfNecessary): Abstracts out part of the
            initialization process.
        (WebCore::ScrollSnapAnimationCurveState::interpolatedPositionAtProgress): Abstracts out curve interpolation.
        (WebCore::ScrollSnapAnimationCurveState::shouldCompleteSnapAnimationImmediatelyAtTime): Added.
        (WebCore::ScrollSnapAnimationCurveState::animationProgressAtTime): Added.
        
2015-07-07  Chris Dumez  <cdumez@apple.com>

        Unreviewed, attempt to fix iOS build.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen):

2015-07-07  Andreas Kling  <akling@apple.com>

        REGRESSION(r183706): HTMLImageElement sometimes fails to register as document named item.
        <https://webkit.org/b/146679>
        <rdar://problem/21613839>

        Reviewed by Antti Koivisto.

        After r183706, Element::hasName() no longer returns outdated information when called
        inside a parseAttribute() override. HTMLImageElement was relying on this to check
        if it *used* to have a name attribute before the currently parsing one was set.

        Since parseAttribute() only shows subclasses the new attribute value, I'm adding a
        flag to HTMLImageElement that remembers whether we had a name attribute or not.

        Test: fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash.html

        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseAttribute):
        * html/HTMLImageElement.h:

2015-07-07  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Remove ReadableStreamReader.read() custom binding
        https://bugs.webkit.org/show_bug.cgi?id=146643

        Reviewed by Darin Adler.

        Moved ReadableStreamReader.read handling from callbacks to promises.
        Introduced DOMPromiseIteratorWithCallback for that purpose: it takes resolve() to resolve a promise with a not-ending iterator value,
        resolveEnd() to resolve a promise with a terminating iterator value and reject().
        Added template helper routine to convert typed values to JS iterator wrapping the value.
        Removed ReadableStreamReader.read custom binding.

        Covered by rebased tests.

        * Modules/streams/ReadableStream.cpp: Updated code to use DOMPromiseIteratorWithCallback API.
        (WebCore::ReadableStream::releaseReader):
        (WebCore::ReadableStream::changeStateToErrored):
        (WebCore::ReadableStream::read):
        (WebCore::ReadableStream::resolveReadCallback):
        * Modules/streams/ReadableStream.h:
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::read):
        * Modules/streams/ReadableStreamReader.h:
        * Modules/streams/ReadableStreamReader.idl: Removed custom binding.
        * bindings/js/JSDOMBinding.h:
        (WebCore::toJSIterator): create JS iterator from typed value.
        (WebCore::toJSIteratorEnd): create JS end iterator.
        * bindings/js/JSDOMPromise.cpp:
        (WebCore::DeferredWrapper::globalObject): Added globaObject getter and removed promise getter.
        * bindings/js/JSDOMPromise.h:
        (WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback):
        (WebCore::Error>::resolve):
        (WebCore::Error>::resolveEnd):
        (WebCore::Error>::reject):
        * bindings/js/JSReadableStreamReaderCustom.cpp: Removed custom binding.

2015-07-06  Zalan Bujtas  <zalan@apple.com>

        REGRESSION: Slider thumb does not render properly (image tests with <input type="range">)
        https://bugs.webkit.org/show_bug.cgi?id=146669
        rdar://problem/21677831

        Reviewed by Simon Fraser.

        Draw NSSliderCell's knob only when slider's thumb paint is requested.

        Covered by existing tests.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintSliderThumb):

2015-07-06  Csaba Osztrogonác  <ossy@webkit.org>

        Move shouldIgnoreAttributeCase inline function to Element.h
        https://bugs.webkit.org/show_bug.cgi?id=146588

        Reviewed by Andreas Kling.

        * dom/Element.cpp:
        (WebCore::shouldIgnoreAttributeCase): Deleted.
        * dom/Element.h:
        (WebCore::shouldIgnoreAttributeCase):
        * dom/NamedNodeMap.cpp:
        (WebCore::shouldIgnoreAttributeCase): Deleted.

2015-07-06  Brent Fulgham  <bfulgham@apple.com>

        Ensure media playback is stopped during page close
        https://bugs.webkit.org/show_bug.cgi?id=146554
        <rdar://problem/18033944>

        Reviewed by Brady Eidson.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::WebAudio::hostingDocument): Added.
        * Modules/webaudio/AudioContext.h:
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::hostingDocument): Added.
        * dom/Document.cpp:
        (WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
        * platform/audio/PlatformMediaSession.h:
        Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
        Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
        playback on elements that match the provided document.
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
        on all elements in the current process.
        * platform/audio/PlatformMediaSessionManager.h:

2015-07-06  Daniel Bates  <dabates@apple.com>

        Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
        should be exempt from Content Security Policy
        https://bugs.webkit.org/show_bug.cgi?id=144830
        <rdar://problem/18860261>

        Inadvertently omitted argument overrideContentSecurityPolicy in calls to ContentSecurityPolicy::allowEval()
        that explicitly specified a report status. And the report status, which is an enum, was being implicitly
        converted to bool.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::initScript):
        * page/DOMSecurityPolicy.cpp:
        (WebCore::DOMSecurityPolicy::allowsEval):

2015-07-06  Commit Queue  <commit-queue@webkit.org>

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

        crashes 3 webaudio tests in debug builds (Requested by
        alexchristensen on #webkit).

        Reverted changeset:

        "Ensure media playback is stopped during page close"
        https://bugs.webkit.org/show_bug.cgi?id=146554
        http://trac.webkit.org/changeset/186385

2015-07-06  Andreas Kling  <akling@apple.com>

        Crash when setting text direction via MakeTextWritingDirection* editing commands.
        <https://webkit.org/b/146665>
        <rdar://problem/20835477>

        Reviewed by Ryosuke Niwa.

        Fix two buggy clients of enclosingBlock(node) that would fail if the returned
        element is the same as the node passed in.

        Test: editing/style/change-text-direction-crash.html

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
        (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):

2015-07-06  Simon Fraser  <simon.fraser@apple.com>

        Revert use of  SVG <mask> elements for -webkit-mask-image (r176798, r177494)
        https://bugs.webkit.org/show_bug.cgi?id=146653

        Reviewed by Dean Jackson.

        Fixes rdar://problem/21435233.

        r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
        was not being maintained, so revert it.

        This patch reverts r176798.

        * CMakeLists.txt:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSValue.cpp:
        (WebCore::CSSValue::cssText): Deleted.
        (WebCore::CSSValue::destroy): Deleted.
        * css/CSSValue.h:
        (WebCore::CSSValue::isWebKitCSSResourceValue): Deleted.
        * css/StyleBuilderConverter.h:
        (WebCore::maskImageValueFromIterator): Deleted.
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::State::clear): Deleted.
        * css/StyleResolver.h:
        (WebCore::StyleResolver::State::maskImagesWithPendingSVGDocuments): Deleted.
        * css/WebKitCSSResourceValue.cpp: Removed.
        * css/WebKitCSSResourceValue.h: Removed.
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::addCachedResource): Deleted.
        * loader/cache/CachedResourceLoader.h:
        * loader/cache/CachedSVGDocument.cpp:
        (WebCore::CachedSVGDocument::finishLoading):
        (WebCore::CachedSVGDocument::CachedSVGDocument): Deleted.
        * loader/cache/CachedSVGDocument.h:
        * loader/cache/CachedSVGDocumentReference.cpp:
        (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
        (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
        (WebCore::CachedSVGDocumentReference::load):
        * loader/cache/CachedSVGDocumentReference.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::containsSVGDocument): Deleted.
        * page/FrameView.h:
        * page/Page.cpp:
        (WebCore::Page::createPageFromBuffer): Deleted.
        * page/Page.h:
        * platform/ScrollView.h:
        (WebCore::ScrollView::containsSVGDocument): Deleted.
        * platform/graphics/MaskImageOperation.cpp: Removed.
        * platform/graphics/MaskImageOperation.h: Removed.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderLayerFilterInfo.cpp:
        * rendering/RenderLayerFilterInfo.h:
        * rendering/RenderLayerMaskImageInfo.h: Removed.
        * rendering/style/FillLayer.cpp:
        (WebCore::FillLayer::operator==):
        (WebCore::FillLayer::cullEmptyLayers):
        (WebCore::layerImagesIdentical):
        (WebCore::FillLayer::FillLayer): Deleted.
        (WebCore::FillLayer::operator=): Deleted.
        (WebCore::FillLayer::hasNonEmptyMaskImage): Deleted.
        (WebCore::FillLayer::imagesAreLoaded): Deleted.
        * rendering/style/FillLayer.h:
        (WebCore::FillLayer::maskImage): Deleted.
        (WebCore::FillLayer::imageOrMaskImage): Deleted.
        (WebCore::FillLayer::setMaskImage): Deleted.
        (WebCore::FillLayer::clearMaskImage): Deleted.
        (WebCore::FillLayer::hasMaskImage): Deleted.
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::applyResource):
        (WebCore::RenderSVGResourceMasker::applySVGMask): Deleted.
        (WebCore::RenderSVGResourceMasker::drawMaskForRenderer): Deleted.
        * rendering/svg/RenderSVGResourceMasker.h:
        * svg/SVGMaskElement.cpp:
        (WebCore::SVGMaskElement::createElementRenderer):
        (WebCore::SVGMaskElement::addClientRenderLayer): Deleted.
        (WebCore::SVGMaskElement::removeClientRenderLayer): Deleted.
        * svg/SVGMaskElement.h:
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::updateExternalDocument):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):

2015-07-06  Simon Fraser  <simon.fraser@apple.com>

        Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
        https://bugs.webkit.org/show_bug.cgi?id=146653

        Reviewed by Dean Jackson.

        Fixes rdar://problem/21435233.

        r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
        was not being maintained, so revert it.

        This patch reverts r177494.

        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseFillProperty):
        (WebCore::CSSParser::parseMaskImage): Deleted.
        * css/CSSParser.h:
        * css/CSSPropertyNames.in:
        * css/CSSValue.h:
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertMaskImageOperations): Deleted.
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::loadPendingSVGDocuments):
        (WebCore::StyleResolver::loadPendingImages):
        (WebCore::StyleResolver::adjustStyleForMaskImages): Deleted.
        (WebCore::StyleResolver::applyMatchedProperties): Deleted.
        * css/StyleResolver.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::containsSVGDocument):
        * page/FrameView.h:
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
        (WebCore::blendFunc): Deleted.
        (WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper): Deleted.
        (WebCore::MaskImagePropertyWrapper::equals): Deleted.
        * platform/ScrollView.h:
        (WebCore::ScrollView::containsSVGDocument):
        * platform/graphics/MaskImageOperation.cpp:
        (WebCore::MaskImageOperation::~MaskImageOperation): Deleted.
        (WebCore::MaskImageOperation::operator==): Deleted.
        * platform/graphics/MaskImageOperation.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::maskClipRect):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::updateFillImages):
        (WebCore::RenderElement::~RenderElement): Deleted.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::~RenderLayer): Deleted.
        (WebCore::RenderLayer::calculateClipRects): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderLayerMaskImageInfo.cpp: Removed.
        * rendering/style/FillLayer.h:
        (WebCore::FillLayer::image):
        (WebCore::FillLayer::imageOrMaskImage):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::setMaskImage): Deleted.
        * rendering/style/RenderStyle.h:

2015-07-06  Simon Fraser  <simon.fraser@apple.com>

        Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
        https://bugs.webkit.org/show_bug.cgi?id=146653
        
        Fixes rdar://problem/21435233.

        This patch reverts r186180, but keeps the layout test.

        This feature caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
        was not being maintained, so revert it.
        
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource): Deleted.
        * loader/cache/CachedResourceRequest.h:
        (WebCore::CachedResourceRequest::acceptOverride): Deleted.
        (WebCore::CachedResourceRequest::setAcceptOverride): Deleted.
        * loader/cache/CachedSVGDocumentReference.cpp:
        (WebCore::CachedSVGDocumentReference::load): Deleted.
        * loader/cache/CachedSVGDocumentReference.h:
        (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType): Deleted.
        * platform/graphics/MaskImageOperation.cpp:
        (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
        (WebCore::MaskImageOperation::notifyFinished):

2015-07-06  Daniel Bates  <dabates@apple.com>

        Fix the Windows build following <https://trac.webkit.org/changeset/186388>
        (https://bugs.webkit.org/show_bug.cgi?id=144830)

        As we for for Mac in WebCoreAVFResourceLoader::startLoading(), instantiate ResourceLoaderOptions
        with ContentSecurityPolicyImposition::DoPolicyCheck.

        * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
        (WebCore::WebCoreAVCFResourceLoader::startLoading):

2015-07-06  Daniel Bates  <dabates@apple.com>

        Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
        should be exempt from Content Security Policy
        https://bugs.webkit.org/show_bug.cgi?id=144830
        <rdar://problem/18860261>

        Reviewed by Geoffrey Garen.

        Make scripts that run in an isolated world be subject to the Content Security Policy (CSP) of the page
        and exempt features implemented using a user agent shadow DOM. As a side effect of this change,
        Safari Content Extensions will respect the CSP policy of the page when loading subresources (e.g. an image).

        Tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3.html
               http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html
               http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp.html

        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
        * css/CSSCanvasValue.h:
        (WebCore::CSSCanvasValue::loadSubimages): Modified to take argument ResourceLoaderOptions (unused).
        * css/CSSCrossfadeValue.cpp:
        (WebCore::CSSCrossfadeValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
        pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
        the cross fade is applied to an element in a user agent shadow tree.
        (WebCore::CSSCrossfadeValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
        as appropriate.
        (WebCore::CSSCrossfadeValue::image): Explicitly instantiate default ResourceLoaderOptions and pass it
        when requesting a cached image. Added FIXME comment to skip Content Security Policy check when the cross
        fade is applied to an element in a user agent shadow tree.
        * css/CSSCrossfadeValue.h:
        * css/CSSCursorImageValue.cpp:
        (WebCore::CSSCursorImageValue::cachedImage): Take a ResourceLoaderOptions as an argument and passes it
        as appropriate.
        * css/CSSCursorImageValue.h:
        * css/CSSFilterImageValue.cpp:
        (WebCore::CSSFilterImageValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
        pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
        the cross fade is applied to an element in a user agent shadow tree.
        (WebCore::CSSFilterImageValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
        as appropriate.
        (WebCore::CSSFilterImageValue::loadSubimages): Explicitly instantiate default ResourceLoaderOptions and pass
        pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
        the cross fade is applied to an element in a user agent shadow tree.
        (WebCore::CSSFilterImageValue::image):
        * css/CSSFilterImageValue.h:
        * css/CSSFontFaceSrcValue.cpp:
        (WebCore::CSSFontFaceSrcValue::cachedFont): Take a boolean, isInitiatingElementInUserAgentShadowTree,
        so as to determine the appropriate CSP imposition. In particular, we skip the CSP check when the initiating element
        (e.g. SVG font-face element) is in a user agent shadow tree.
        * css/CSSFontFaceSrcValue.h:
        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::addFontFaceRule): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
        it as appropriate.
        * css/CSSFontSelector.h:
        * css/CSSGradientValue.h:
        (WebCore::CSSGradientValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
        as appropriate.
        * css/CSSImageGeneratorValue.cpp:
        (WebCore::CSSImageGeneratorValue::loadSubimages): Ditto.
        (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
        * css/CSSImageGeneratorValue.h:
        * css/CSSImageSetValue.cpp:
        (WebCore::CSSImageSetValue::cachedImageSet): Deleted.
        * css/CSSImageSetValue.h:
        * css/CSSImageValue.cpp:
        (WebCore::CSSImageValue::cachedImage): Deleted.
        * css/CSSImageValue.h:
        * css/RuleSet.cpp:
        (WebCore::RuleSet::addChildRules): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
        it as appropriate.
        (WebCore::RuleSet::addRulesFromSheet): Added FIXME comment to skip Content Security Policy check when
        when stylesheet is in a user agent shadow tree.
        * css/RuleSet.h:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::StyleResolver): Determine whether the SVG font-face element is in a user agent shadow tree
        and pass the appropriate value when calling CSSFontSelector::addFontFaceRule(). Also, modernized code; used C++11 range
        -based for-loop instead of const_iterator idiom.
        (WebCore::StyleResolver::loadPendingSVGDocuments): Skip CSP check when requesting subresources as a byproduct of
        resolving style for an element in a user agent shadow tree.
        (WebCore::StyleResolver::loadPendingImage): Ditto.
        (WebCore::StyleResolver::loadPendingShapeImage): Ditto.
        * css/StyleRuleImport.cpp:
        (WebCore::StyleRuleImport::requestStyleSheet): Added FIXME comment to skip Content Security Policy check when
        when stylesheet is in a user agent shadow tree.
        * dom/Element.h:
        * dom/InlineStyleSheetOwner.cpp:
        (WebCore::InlineStyleSheetOwner::createSheet): Skip CSP check for an inline <style> that is in a user agent shadow tree.
        * dom/Node.cpp:
        (WebCore::Node::isInUserAgentShadowTree): Added.
        * dom/Node.h:
        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::requestScript): Skip CSP check for an external JavaScript script in a user agent shadow tree.
        (WebCore::ScriptElement::executeScript): Skip CSP check for an inline JavaScript script that is in a user agent shadow tree.
        * dom/StyledElement.cpp:
        (WebCore::StyledElement::styleAttributeChanged): Skip CSP check when modifying the inline style of an element in a user
        agent shadow tree.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::isSafeToLoadURL): Skip CSP check for a <audio>, <video> in a user agent shadow tree.
        (WebCore::HTMLMediaElement::outOfBandTrackSources): Ditto.
        * html/HTMLTrackElement.cpp:
        (WebCore::HTMLTrackElement::canLoadURL): Ditto.
        * html/track/LoadableTextTrack.cpp:
        (WebCore::LoadableTextTrack::loadTimerFired): Determine whether the <track> is in a user agent shadow tree
        and pass the appropriate value when calling TextTrackLoader::load().
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::startLoadingMainResource): Do CSP check when loading a resource by default.
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::updateFromElement): Skip CSP check for an image that is in a user agent shadow tree.
        * loader/MediaResourceLoader.cpp:
        (WebCore::MediaResourceLoader::start): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
        This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
        * loader/NetscapePlugInStreamLoader.cpp:
        (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added FIXME comment to skip Content Security Policy check
        when when associated plugin element is in a user agent shadow tree.
        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::checkNavigationPolicy): Skip CSP check for a <iframe> in a user agent shadow tree.
        * loader/ResourceLoaderOptions.h: Defined enum class ContentSecurityPolicyImposition with explicit type uint8_t so
        as to provide a hint to the compiler (for better packing) when it computes the memory layout for struct that
        contains an instance of this class.
        (WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added argument contentSecurityPolicyImposition.
        (WebCore::ResourceLoaderOptions::contentSecurityPolicyImposition): Added.
        (WebCore::ResourceLoaderOptions::setContentSecurityPolicyImposition): Added.
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::pluginIsLoadable): Skip CSP check for a plugin element that is in a user agent shadow tree.
        (WebCore::SubframeLoader::createJavaAppletWidget): Skip CSP check for an applet element that is in a user agent shadow tree.
        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::load): Take a boolean, isInitiatingElementInUserAgentShadowTree, and sets the appropriate
        Content Security Policy imposition for the text track request.
        * loader/TextTrackLoader.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Skip CSP check for a user-specified stylesheet.
        (WebCore::CachedResourceLoader::canRequest): Only check the CSP of the page if specified in the resource loader options for the request.
        (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Add ContentSecurityPolicyImposition::DoPolicyCheck to the default
        resource loader options so that do check the CSP policy of the page before performing a resource request by default.
        * loader/cache/CachedSVGDocumentReference.cpp:
        (WebCore::CachedSVGDocumentReference::load): Take a ResourceLoaderOptions as an argument and passes it as appropriate.
        * loader/cache/CachedSVGDocumentReference.h:
        * loader/icon/IconLoader.cpp:
        (WebCore::IconLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
        This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
        * page/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Take an argument called overrideContentSecurityPolicy (defaults to false). When
        overrideContentSecurityPolicy := true, this function unconditionally returns true.
        (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
        (WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
        (WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
        (WebCore::ContentSecurityPolicy::allowEval): Ditto.
        (WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
        (WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
        (WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
        (WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
        * page/ContentSecurityPolicy.h:
        * page/DOMSecurityPolicy.cpp:
        * page/EventSource.cpp:
        (WebCore::EventSource::create): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
        (WebCore::WebCoreAVFResourceLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
        This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::requestImageResource): Skip CSP check for a SVG FEImage element in a user agent shadow tree.
        * svg/SVGFontFaceUriElement.cpp:
        (WebCore::SVGFontFaceUriElement::loadFont): Skip CSP check for a SVG font-face-uri element in a user agent shadow tree.
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::updateExternalDocument): Skip CSP check for a SVG use element in a user agent shadow tree.
        * testing/Internals.cpp:
        (WebCore::Internals::ensureUserAgentShadowRoot): Added.
        * testing/Internals.h:
        * testing/Internals.idl: Added declaration for ensureUserAgentShadowRoot().
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::open): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().

2015-07-06  Brent Fulgham  <bfulgham@apple.com>

        Ensure media playback is stopped during page close
        https://bugs.webkit.org/show_bug.cgi?id=146554
        <rdar://problem/18033944>

        Reviewed by Brady Eidson.

        * Modules/webaudio/AudioContext.h:
        (WebCore::WebAudio::hostingDocument): Added.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::hostingDocument): Added.
        * dom/Document.cpp:
        (WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
        * platform/audio/PlatformMediaSession.h:
        Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
        Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
        playback on elements that match the provided document.
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
        on all elements in the current process.
        * platform/audio/PlatformMediaSessionManager.h:

2015-07-06  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Remove memory page reporting
        https://bugs.webkit.org/show_bug.cgi?id=146659

        Reviewed by Benjamin Poulain.

        * contentextensions/CompiledContentExtension.cpp:
        (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
        (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
        * contentextensions/CompiledContentExtension.h:
        * contentextensions/ContentExtension.cpp:
        (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
        * contentextensions/ContentExtension.h:
        (WebCore::ContentExtensions::ContentExtension::compiledExtension):
        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
        * contentextensions/DFABytecodeInterpreter.cpp:
        (WebCore::ContentExtensions::getBits):
        (WebCore::ContentExtensions::getInstruction):
        (WebCore::ContentExtensions::jumpSizeInBytes):
        (WebCore::ContentExtensions::getJumpSize):
        (WebCore::ContentExtensions::getJumpDistance):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
        * contentextensions/DFABytecodeInterpreter.h:
        Don't keep track of memory page usage.  It wasn't even correct anyways.

2015-07-06  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Increase maxNFASize
        https://bugs.webkit.org/show_bug.cgi?id=146656

        Reviewed by Benjamin Poulain.

        Because of memory improvements in r186375, r186374, and r186079,
        we can now increase the maximum number of NFA nodes in order to avoid
        long compile times of some large, complicated content blockers.
        This also improves the interpreting time of content blockers.

        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::compileRuleList):
        Increase maxNFASize to 75000 to avoid long compile times.

2015-07-06  Dean Jackson  <dino@apple.com>

        Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
        https://bugs.webkit.org/show_bug.cgi?id=146652
        <rdar://problem/21567767>

        Follow-up fix.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):

2015-07-06  Dean Jackson  <dino@apple.com>

        Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
        https://bugs.webkit.org/show_bug.cgi?id=146652
        <rdar://problem/21567767>

        Reviewed by Brent Fulgham.

        The expression "(numVertex + 1) * 4 * sizeof(GC3Dfloat)" could potentially
        overflow. Make it use checked arithmetic.

        I couldn't make a test case that reliably exercised this.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Used Checked<GC3Dsizeiptr>
        for calculating the size of the buffer.

2015-07-06  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [Mac] REGRESSION: (r181403) Enter/Exit full screen on 1x secondary display plugged into 2x Mac displays WebView as 1/4 size during transition
        https://bugs.webkit.org/show_bug.cgi?id=146651

        Reviewed by Simon Fraser.

        * platform/mac/WebCoreFullScreenPlaceholderView.mm: set layerContentsPlacement
        to NSViewLayerContentsPlacementScaleProportionallyToFit so AppKit resizes the
        content CALayer to fit in the WebView.

2015-07-06  Benjamin Poulain  <benjamin@webkit.org>

        Reduce the memory usage of the prefix tree
        https://bugs.webkit.org/show_bug.cgi?id=146615

        Reviewed by Sam Weinig.

        This patch introduces two little changes that reduces the size
        of the prefix tree by about 40%.

        First, the Terms are interned. The new class CombinedFiltersAlphabet
        takes care of keeping a unique version of each term for use
        by the CombinedURLFilters.

        Since each Term is fairly big but we have a small number of
        unique term, we significantly reduce the edge size.

        Second, the actions are no longer stored on each Vertex.
        They are now stored on the side, in a HashMap indexed by
        their Vertex.

        This works well because the Actions are sparse over the tree.
        Typically, only the leaves have actions. Internal vertices
        sometime get actions but that's uncommon.

        ---

        The next step to reduce the memory footprint would be to
        make PrefixTreeVertex into a custom packed structure instead
        of using a Vector.

        Such change is very invasive and more error prone so I decided
        against it for this patch.

        * WebCore.xcodeproj/project.pbxproj:
        * contentextensions/CombinedFiltersAlphabet.cpp: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
        (WebCore::ContentExtensions::TermCreatorTranslator::hash):
        (WebCore::ContentExtensions::TermCreatorTranslator::equal):
        (WebCore::ContentExtensions::TermCreatorTranslator::translate):
        (WebCore::ContentExtensions::CombinedFiltersAlphabet::interned):
        (WebCore::ContentExtensions::CombinedFiltersAlphabet::memoryUsed):
        * contentextensions/CombinedFiltersAlphabet.h: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
        (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::hash):
        (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::equal):
        * contentextensions/CombinedURLFilters.cpp:
        (WebCore::ContentExtensions::recursiveMemoryUsed):
        (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
        (WebCore::ContentExtensions::prefixTreeVertexToString):
        (WebCore::ContentExtensions::recursivePrint):
        (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
        (WebCore::ContentExtensions::generateNFAForSubtree):
        (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
        * contentextensions/CombinedURLFilters.h:
        * contentextensions/ContentExtensionsDebugging.h:
        * contentextensions/Term.h:
        (WebCore::ContentExtensions::Term::isValid):
        (WebCore::ContentExtensions::Term::destroy):
        (WebCore::ContentExtensions::Term::memoryUsed):
        (WebCore::ContentExtensions::Term::toString): Deleted.
        (WebCore::ContentExtensions::TermHash::hash): Deleted.
        (WebCore::ContentExtensions::TermHash::equal): Deleted.
        (WebCore::ContentExtensions::Term::Term): Deleted.
        (WebCore::ContentExtensions::Term::isKnownToMatchAnyString): Deleted.
        (WebCore::ContentExtensions::Term::hasFixedLength): Deleted.
        (WebCore::ContentExtensions::Term::operator==): Deleted.
        (WebCore::ContentExtensions::Term::hash): Deleted.
        (WebCore::ContentExtensions::Term::isDeletedValue): Deleted.
        (WebCore::ContentExtensions::Term::isUniversalTransition): Deleted.
        (WebCore::ContentExtensions::Term::generateSubgraphForAtom): Deleted.

2015-07-06  Benjamin Poulain  <benjamin@webkit.org>

        [Content Extensions] Make the DFA transitions ranges instead of characters
        https://bugs.webkit.org/show_bug.cgi?id=146575

        Reviewed by Alex Christensen.

        This patch changes the DFA and code using the DFA to use ranges
        to represent the transitions between any two nodes.

        This patch builds on top of the tools introduced in r186079.

        The DFA structure is basically the same as ImmutableNFA but without
        any epsilon transitions.

        This patch introduces a transition iterator to make the DFA
        compatible with the existing algorithms.

        ---

        The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions
        of two nodes is one by merging the range list of each not into a common
        MutableRangeList.
        The data converter takes care of creating the signature of the combination.

        The code got simpler since MutableRangeList does most of the work now. It is also
        much faster.

        ---

        The minimizer is more intersting.

        With the current algorithm, we cannot resolve overlaps between ranges. On the other
        hand, the minimizer does not care about the symbol of the transitions if we are careful
        to partition transitions of the same symbol together.

        What I did was to turn the minimizer into a pure transition based one, BUT each
        "symbol" is actually an unbreakable range.

        The first step is to go over all the transitions of all the nodes and find the largest
        ranges such that the alphabet of interest is covered but there is not a single intersection
        between any two nodes (what I called "singular transitions" in the code). 

        This can be done efficiently with MutableRangeList.
        A little trick there is that I also used the converter to count how many real transition
        overlaps any singular transition.

        Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet
        is simply the position of the singular transition in the list.

        The partition of transition is created by populating each set with all the transition that
        overlaps the symbols.
        Note that since the partition is created on the fly, the Transition structure used for
        repartitioning only contains the source of the transitions.

        Once our transition parition has been carefuly created, we can completely forget about
        the symbols and only work with subsets.

        Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer
        will find the minimial solution for well formed input.

        * WebCore.xcodeproj/project.pbxproj:
        * contentextensions/DFA.cpp:
        (WebCore::ContentExtensions::DFA::memoryUsed):
        (WebCore::ContentExtensions::printTransitions):
        (WebCore::ContentExtensions::DFANode::actions): Deleted.
        (WebCore::ContentExtensions::DFANode::transitions): Deleted.
        (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted.
        (WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted.
        (WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted.
        (WebCore::ContentExtensions::DFANode::containsTransition): Deleted.
        (WebCore::ContentExtensions::DFANode::kill): Deleted.
        (WebCore::ContentExtensions::DFA::debugPrintDot): Deleted.
        * contentextensions/DFA.h:
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::range):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::target):
        (WebCore::ContentExtensions::DFANode::RangeIterator::range):
        (WebCore::ContentExtensions::DFANode::RangeIterator::target):
        (WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget):
        * contentextensions/DFABytecodeCompiler.cpp:
        (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
        (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
        * contentextensions/DFACombiner.cpp:
        (WebCore::ContentExtensions::DFAMerger::TargetConverter::convert):
        (WebCore::ContentExtensions::DFAMerger::TargetConverter::extend):
        (WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature):
        (WebCore::ContentExtensions::DFAMerger::merge):
        (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
        (WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted.
        (WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted.
        (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted.
        (WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted.
        (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted.
        * contentextensions/DFAMinimizer.cpp:
        (WebCore::ContentExtensions::DFAMinimizer::minimize):
        * contentextensions/DFANode.cpp: Added.
        (WebCore::ContentExtensions::DFANode::actions):
        (WebCore::ContentExtensions::DFANode::containsTransition):
        (WebCore::ContentExtensions::DFANode::kill):
        (WebCore::ContentExtensions::DFANode::canUseFallbackTransition):
        (WebCore::ContentExtensions::DFANode::bestFallbackTarget):
        * contentextensions/DFANode.h:
        (WebCore::ContentExtensions::CharRange::size):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::first):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::last):
        (WebCore::ContentExtensions::DFANode::ConstRangeIterator::data):
        (WebCore::ContentExtensions::DFANode::IterableConstRange::begin):
        (WebCore::ContentExtensions::DFANode::IterableConstRange::end):
        (WebCore::ContentExtensions::DFANode::transitions):
        (WebCore::ContentExtensions::DFANode::RangeIterator::operator*):
        (WebCore::ContentExtensions::DFANode::RangeIterator::operator==):
        (WebCore::ContentExtensions::DFANode::RangeIterator::operator!=):
        (WebCore::ContentExtensions::DFANode::RangeIterator::operator++):
        (WebCore::ContentExtensions::DFANode::RangeIterator::first):
        (WebCore::ContentExtensions::DFANode::RangeIterator::last):
        (WebCore::ContentExtensions::DFANode::RangeIterator::data):
        (WebCore::ContentExtensions::DFANode::IterableRange::begin):
        (WebCore::ContentExtensions::DFANode::IterableRange::end):
        (WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted.
        (WebCore::ContentExtensions::DFANode::transitionsLength): Deleted.
        (WebCore::ContentExtensions::DFANode::transitionsStart): Deleted.
        (WebCore::ContentExtensions::DFANode::resetTransitions): Deleted.
        (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted.
        * contentextensions/ImmutableNFA.h:
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted.
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted.
        * contentextensions/ImmutableNFANodeBuilder.h:
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted.
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted.
        * contentextensions/MutableRange.h:
        (WebCore::ContentExtensions::MutableRange::size): Deleted.
        * contentextensions/MutableRangeList.h:
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::first):
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::last):
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::data):
        (WebCore::ContentExtensions::MutableRangeList::extend):
        (WebCore::ContentExtensions::MutableRangeList::size):
        (WebCore::ContentExtensions::MutableRangeList::initializeFrom):
        * contentextensions/NFAToDFA.cpp:
        (WebCore::ContentExtensions::NFAToDFA::convert):
        (WebCore::ContentExtensions::canUseFallbackTransition): Deleted.
        (WebCore::ContentExtensions::findBestFallbackTarget): Deleted.

2015-07-06  Timothy Hatcher  <timothy@apple.com>

        Fix ASSERT causing crashes in Inspector tests on the bots.

        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::enable): Reset stopwatch before starting it.

2015-07-06  Brady Eidson  <beidson@apple.com>

        Remove unused "m_isPrivate" flag on NetworkStorageSession.
        https://bugs.webkit.org/show_bug.cgi?id=146648

        Reviewed by Alex Christensen.

        No new tests (No behavior change).

        * platform/network/NetworkStorageSession.h:
        (WebCore::NetworkStorageSession::isPrivateBrowsingSession): Deleted.

        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
        (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
        (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.

        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
        (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.

2015-07-04  Timothy Hatcher  <timothy@apple.com>

        Web Inspector: Add a dedicated Network tab that is always live
        https://bugs.webkit.org/show_bug.cgi?id=146568

        Make sure the executionStopwatch is always started and never stops so resource loads
        always get timestamps, even when Timeline is not recording.

        Reviewed by Joseph Pecoraro.

        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::enable): Start executionStopwatch.
        (WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
        (WebCore::InspectorTimelineAgent::internalStop): Ditto.

2015-07-02  Timothy Hatcher  <timothy@apple.com>

        Update the localized strings file.

        * English.lproj/Localizable.strings: Updated with the script.

2015-07-06  Zalan Bujtas  <zalan@apple.com>

        Crash: LayoutState root's container is nullptr when the layout root is detached.
        https://bugs.webkit.org/show_bug.cgi?id=146646
        rdar://problem/21371544

        Reviewed by Simon Fraser.

        This is a speculative fix to ensure that when the root of the LayoutState is detached
        we don't try to access its container (nullptr).
        This is related to trac.webkit.org/r185484.

        Not reproducible.

        * rendering/LayoutState.cpp:
        (WebCore::LayoutState::LayoutState):
        * rendering/LayoutState.h:
        (WebCore::LayoutState::LayoutState): Deleted.

2015-07-06  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Inactive AirPlay route should automatically timeout
        https://bugs.webkit.org/show_bug.cgi?id=146642
        <rdar://problem/21602955>

        Automatically clear a media element's AirPlay connection after it has been paused
        for 60 minutes, or after 8 minutes if it played to the end before pausing.

        Reviewed by Brent Fulgham.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::WebMediaSessionManager): Initialize m_watchdogTimer.
        (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule watchdog timer configuration
          if the client started playing or paused.
        (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Schedule watchdog timer configuration.
        (WebCore::WebMediaSessionManager::toString): Print watchdog configuration flag.
        (WebCore::WebMediaSessionManager::taskTimerFired): Call configureWatchdogTimer.
        (WebCore::WebMediaSessionManager::configureWatchdogTimer): New, start or stop watchdog timer.
        (WebCore::WebMediaSessionManager::watchdogTimerFired): Stop monitoring for targets, which 
          clears the route.
        * Modules/mediasession/WebMediaSessionManager.h:

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaState): Set DidPlayToEnd when appropriate.

        * page/MediaProducer.h: Add DidPlayToEnd.

        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Clear m_client, call
          stopMonitoringPlaybackTargets.
        (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Send a neutered 
          MediaPlaybackTarget when m_outputDeviceMenuController is NULL.
        (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Add logging.
        (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Clear the menu
          controller to cancel the route.

2015-07-06  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Fix build errors with OpenGL ES
        https://bugs.webkit.org/show_bug.cgi?id=146626

        Reviewed by Carlos Garcia Campos.

        * platform/graphics/ANGLEWebKitBridge.h: Include <GLES2/gl2.h>
        when building with OpenGL ES 2 support enabled.
        (WebCore::ANGLEShaderSymbol::isSampler): Don't test for
        OpenGL-specific GL_SAMPLER_2D_RECT_ARB value when OpenGL ES 2
        support is enabled.

2015-07-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Remove ReadableStream custom constructor
        https://bugs.webkit.org/show_bug.cgi?id=146547

        Reviewed by Darin Adler.

        Removed custom binding.
        Made use of Dictionary in lieu of JSObject to reduce readable stream constructor parameter parsing.
        Added support for passing ExecState to construtor within binding generator.

        No change in behavior.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::create):
        * Modules/streams/ReadableStream.h:
        (WebCore::ReadableStream::create):
        * Modules/streams/ReadableStream.idl:
        * bindings/js/JSDictionary.cpp:
        (WebCore::JSDictionary::convertValue):
        * bindings/js/JSDictionary.h:
        * bindings/js/JSReadableStreamCustom.cpp:
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::create):
        (WebCore::ReadableJSStream::ReadableJSStream):
        * bindings/js/ReadableJSStream.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateConstructorDefinition):
        * bindings/scripts/IDLAttributes.txt:

2015-07-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Promise-returning functions should reject promises if the callee is not of the expected type
        https://bugs.webkit.org/show_bug.cgi?id=146585

        Reviewed by Darin Adler.

        Updated binding generator to reject promise in case the casting of the thisValue is not working properly
        (i.e. the callee is not wrapping a DOM object of the expected class.

        Covered by rebased test and binding expectations.

        * bindings/js/JSDOMPromise.h:
        (WebCore::callPromiseFunction): Removed wrapper class parameter.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        * bindings/scripts/test/JS/JSTestObj.cpp: Updated binding expectations.
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):

2015-07-05  Chris Dumez  <cdumez@apple.com>

        [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
        https://bugs.webkit.org/show_bug.cgi?id=146625
        <rdar://problem/21585268>

        Reviewed by Gavin Barraclough.

        Export HistoryController:saveScrollPositionAndViewStateToItem()
        so that it can be called from WebKit2.

        * loader/HistoryController.h:

2015-07-05  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r180582): background-attachment: local; does not scroll the background image when scrolling the the element's contents
        https://bugs.webkit.org/show_bug.cgi?id=146623

        Reviewed by Zalan Bujtas.
        
        r180582 erroneously asserted that m_destOrigin in BackgroundImageGeometry was unused.
        However, it is needed to compute the correct phase when the destination rect is
        altered by clipping.

        Test: fast/backgrounds/background-attachment-local.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
        * rendering/RenderBoxModelObject.h:
        (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
        (WebCore::BackgroundImageGeometry::relativePhase):
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):

2015-07-05  Chris Dumez  <cdumez@apple.com>

        [WK2] WebBackForwardListItems' pageState is not kept up-to-date
        https://bugs.webkit.org/show_bug.cgi?id=146614
        <rdar://problem/21585268>

        Reviewed by Gavin Barraclough.

        WebBackForwardListItems' pageState on UIProcess-side were not kept
        up-to-date when it was updated on WebContent process side. This meant
        that we were losing the scroll position (among other things) when
        transferring the session state over from one view to another.

        We now call notifyHistoryItemChanged(item) after saving the scroll
        position and the view state on the HistoryItem. As a result, the
        WebBackForwardListProxy will send the updated pageState to the
        UIProcess.

        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::notifyChanged):
        * history/HistoryItem.h:
        * loader/HistoryController.cpp:
        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):

2015-07-04  Chris Dumez  <cdumez@apple.com>

        Unreviewed Windows build fix after r186279.

        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::AVFWrapper::destroyVideoLayer):
        * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
        (WebCore::CACFLayerTreeHost::destroyRenderer):

2015-07-04  Chris Dumez  <cdumez@apple.com>

        Drop RefPtr::clear() method
        https://bugs.webkit.org/show_bug.cgi?id=146556

        Reviewed by Brady Eidson.

        Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

2015-07-03  Dan Bernstein  <mitz@apple.com>

        Fixed the iOS 8 build.

        * editing/cocoa/HTMLConverter.mm:

2015-07-03  Chris Dumez  <cdumez@apple.com>

        REGRESSION (r178097): HTMLSelectElement.add(option, undefined) prepends option to the list of options; should append to the end of the list of options
        https://bugs.webkit.org/show_bug.cgi?id=146566
        <rdar://problem/21663919>

        Reviewed by Ryosuke Niwa.

        HTMLSelectElement.add(X, undefined) is supposed to be equivalent to
        HTMLSelectElement.add(X) which should *append* X. The same is true
        for HTMLOptionsCollection.add(X, undefined).

        However, due to a bug in our bindings generator for overloaded
        operations, the actual behavior was not the expected one. The
        second overload would be chosen: add(X, index) and undefined would
        be converted as 0-index, which would *prepend* X.

        This patch fixes the bindings generator so that undefined is allowed
        for optional parameters of an overload operation, when doing the
        overload resolution.

        Tests:
        - fast/dom/HTMLSelectElement/add.html
        - fast/dom/HTMLSelectElement/options-collection-add.html
        - http/tests/websocket/tests/hybi/undefined-protocol.html

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateParametersCheckExpression):
        Allow undefined value for optional parameters when doing the overload
        resolution.

        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
        * bindings/scripts/test/TestObj.idl:
        Add bindings tests coverage and rebaseline.

2015-07-03  Dan Bernstein  <mitz@apple.com>

        Fixed the Mavericks build after r186236.

        * loader/cache/CachedResource.h:
        (WebCore::CachedResource::url): Removed the export macro from this inline function.

2015-07-03  Dan Bernstein  <mitz@apple.com>

        Tried to fix the iOS build.

        * bridge/objc/objc_class.mm:
        (JSC::Bindings::ObjcClass::fieldNamed):

2015-07-03  Dan Bernstein  <mitz@apple.com>

        Tried to fix the iOS build.

        * editing/cocoa/HTMLConverter.mm:

2015-07-03  Dan Bernstein  <mitz@apple.com>

        Tried to fix the iOS build.

        * page/FrameView.cpp:
        (WebCore::FrameView::calculateExtendedBackgroundMode):

2015-07-03  Dan Bernstein  <mitz@apple.com>

        [Xcode] Update some build settings as recommended by Xcode 7
        https://bugs.webkit.org/show_bug.cgi?id=146597

        Reviewed by Sam Weinig.

        * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE,
        GCC_WARN_UNDECLARED_SELECTOR, and GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.

        * WebCore.xcodeproj/project.pbxproj: Updated LastUpgradeCheck. Disabled -Wunreachable-code
        for two bison-generated source files. Updated for rename of WebScriptObject.h.

        * bindings/objc/WebScriptObject.mm:
        (-[WebUndefined dealloc]): Removed unreachable code and suppressed warning about not calling
        super.
        * bridge/objc/WebScriptObject.h: Renamed to WebScriptObjectProtocol.h to enabled inlcuding
        the other WebScriptObject.h.
        * bridge/objc/WebScriptObjectProtocol.h: Renamed from WebScriptObject.h.

        * bridge/objc/objc_class.mm: Updated for rename and included WebScriptObject.h because we
        use selectors declared in that file.

        * bridge/objc/objc_instance.mm: Ditto.
        (ObjCRuntimeMethod::create): Resolved ambiguity between JSC::JSValue and the Objective-C
        JSValue class.
        (ObjCRuntimeMethod::createStructure): Ditto.
        (ObjcInstance::invokeMethod): Ditto.
        (ObjcInstance::invokeObjcMethod): Ditto.
        (ObjcInstance::invokeDefaultMethod): Ditto.
        (ObjcInstance::setValueOfUndefinedField): Ditto.
        (ObjcInstance::getValueOfUndefinedField): Ditto.
        (ObjcInstance::defaultValue): Ditto.
        (ObjcInstance::stringValue): Ditto.
        (ObjcInstance::numberValue): Ditto.
        (ObjcInstance::booleanValue): Ditto.
        (ObjcInstance::valueOf): Ditto,

        * bridge/objc/objc_runtime.h: Moved definition of isFallbackMethod() from here to the
        implementation.
        * bridge/objc/objc_runtime.mm: Updated for rename and included WebScriptObject.h because we
        use selectors declared in that file.
        (JSC::Bindings::ObjcMethod::isFallbackMethod): Moved definition from the header to here.

        * bridge/objc/objc_utility.mm: Updated for rename.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addScrollbarPseudoClassType): Removed unreachable code.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        Added declarations to the WebCoreMovieObserver interface.
        (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Suppressed
        -Wundeclared-selector around invocation of a selector that is not declared anywhere.

2015-07-03  Kyounga Ra  <kyounga@alticast.com>

        Memory leak for a protected Element having pending events in ImageLoader. 
        https://bugs.webkit.org/show_bug.cgi?id=146538

        Reviewed by Brady Eidson.

        If ImageLoader is destroyed before an active derefElementTimer is fired, protected element's refCount never be zero..

        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::~ImageLoader):
        (WebCore::ImageLoader::updateFromElement):
        (WebCore::ImageLoader::updateRenderer):
        (WebCore::ImageLoader::updatedHasPendingEvent):
        (WebCore::ImageLoader::timerFired):
        * loader/ImageLoader.h:

2015-07-03  Daniel Bates  <dabates@apple.com>

        REGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo Mail
        https://bugs.webkit.org/show_bug.cgi?id=146515
        <rdar://problem/21348421>

        Reviewed by Chris Dumez.

        Fixes an issue where extra arguments passed to a Web IDL overloaded function, whose implementation
        is generated by the bindings generator script, are not ignored as per the note in section "Interface object [[Call]] method"
        of the Web IDL spec, <http://www.w3.org/TR/2012/CR-WebIDL-20120419/> (19 April 2012).

        Currently for an overloaded function the JavaScript bindings generator script emits code to
        throw a TypeError when it cannot find a candidate function that takes the same number of
        arguments as passed by a caller. Prior to the change made in bug #139179 (r178097), the
        bindings code for HTMLSelectElement.add() was written by hand and ignored extra arguments
        that were passed to it. Following this change, the bindings code for HTMLSelectElement.add()
        is generated by the bindings generator script. Therefore, we throw a TypeError when Yahoo Mail
        calls HTMLSelectElement.add() with extra arguments because the code emitted by the bindings
        generator script does not ignore them.

        * bindings/scripts/CodeGeneratorJS.pm:
        (LengthOfLongestFunctionParameterList): Added. Computes the length of longest overload parameter list.
        (GenerateOverloadedFunction): Emit code that ignores more arguments than LengthOfLongestFunctionParameterList().
        (GenerateOverloadedConstructorDefinition): Ditto.
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): Added; expected result for an overloaded
        function that takes a variadic number of Blob elements.
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Update expected result. The added
        if-conditional expression for the IDL declaration overloadedMethod(Blob... blobArgs) is empty
        because we do not support overloading of functions with variadic arguments.
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5): Added; expected
        result for an overloaded constructors that takes a variadic number of long arguments.
        (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors): Update expected
        result. The added if-conditional expression for the IDL declaration Constructor(long... longArgs) is empty
        because we do not support overloading of constructors with variadic arguments.
        * bindings/scripts/test/TestObj.idl: Added declaration overloadedMethod(Blob...). Also fixed
        typo in license block text.
        * bindings/scripts/test/TestOverloadedConstructors.idl: Added declaration Constructor(long... longArgs).
        Also fixed typo in license block text.

2015-07-03  Mario Sanchez Prada  <mario@endlessm.com>

        Crash on xLarge memory allocation using bmalloc on 32bit systems
        https://bugs.webkit.org/show_bug.cgi?id=146440

        Reviewed by Gustavo Noronha Silva.

        Disable the gcc's -ftree-sra optimization (automatically enabled
        with -O1 and higher levels) for WebCore and 32bit Intel architectures,
        as that causes the crash in bmalloc when allocating large amounts of
        memory from the texture mapper's tiled backing store implementation.

        * CMakeLists.txt: Pass -fno-free-sra to gcc on 32bit Intel architectures.

2015-07-03  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the !ENABLE(VIDEO) build after r186054
        https://bugs.webkit.org/show_bug.cgi?id=146592

        Reviewed by Eric Carlson.

        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseCriticalMemory):

2015-07-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Remove ReadableStream and Reader cancel() custom binding
        https://bugs.webkit.org/show_bug.cgi?id=146458

        Reviewed by Darin Adler.

        Removed stream and reader cancel custom binding.
        Updated binding generator to correctly handle promise-based APIs with optional parameters.

        No behavior changes.

        * Modules/streams/ReadableStream.idl: Removed custom
        * Modules/streams/ReadableStreamReader.idl: Ditto.
        * bindings/js/JSReadableStreamCustom.cpp:
        (WebCore::JSReadableStream::cancel): Deleted.
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::cancel): Deleted.
        * bindings/scripts/CodeGeneratorJS.pm: Handling of promise parameter in case of optional arguments.
        (GenerateParametersCheck):
        (GenerateReturnParameters): Utility function to generate return parameters (exception and promise).
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
        * bindings/scripts/test/TestObj.idl:


2015-07-02  Doug Russell  <d_russell@apple.com>

        AX: Selection change as a result of focusing an element should include that 
        information in the intent
        https://bugs.webkit.org/show_bug.cgi?id=146533

        Reviewed by Chris Fleizach.

        Added focusChange flag to AXTextStateChangeIntent.
        Added intent support to selection logic called by Element::updateFocusAppearance().
        Added NSAccessibilityTextSelectionChangedFocus to mac notifications.

        Test: platform/mac/accessibility/selection-notification-focus-change.html

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::postTextStateChangeNotification):
        * accessibility/AXTextStateChangeIntent.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::setTextSelectionIntent):
        (WebCore::AccessibilityRenderObject::setFocused):
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
        * dom/Element.cpp:
        (WebCore::Element::updateFocusAppearance):
        * dom/Element.h:
        (WebCore::Element::defaultFocusTextStateChangeIntent):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::moveWithoutValidationTo):
        (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
        (WebCore::FrameSelection::selectAll):
        * editing/FrameSelection.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::updateFocusAppearance):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::updateFocusAppearance):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::select):
        (WebCore::HTMLTextFormControlElement::setSelectionRange):
        (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
        * html/HTMLTextFormControlElement.h:
        * page/EventHandler.cpp:
        (WebCore::setInitialKeyboardSelection):
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocusInDocumentOrder):

2015-07-02  Przemek Piorkowski  <piorkowskiprzemyslaw@gmail.com>

        [EFL] test_ewk2_application_cache_manager has been failed since r185527
        https://bugs.webkit.org/show_bug.cgi?id=146016

        Reviewed by Gyuyoung Kim.

        In order to handle properly WebApplicationCacheManagerProxy implementation which use
        WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL. 
        Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.

        * PlatformEfl.cmake: PublicSuffixSoup.cpp added to source files.

2015-07-02  Commit Queue  <commit-queue@webkit.org>

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

        caused crashes in webaudio tests (Requested by cdumez on
        #webkit).

        Reverted changeset:

        "Ensure media playback is stopped during page close"
        https://bugs.webkit.org/show_bug.cgi?id=146554
        http://trac.webkit.org/changeset/186251

2015-07-02  Brent Fulgham  <bfulgham@apple.com>

        Ensure media playback is stopped during page close
        https://bugs.webkit.org/show_bug.cgi?id=146554
        <rdar://problem/18033944>

        Reviewed by Zalan Bujtas.

        Add new method to Page class to stop all media playback. It just uses the process
        MediaSessionManager singleton to inform all hosted in a particular document to stop.

        * Modules/webaudio/AudioContext.h:
        (WebCore::WebAudio::hostingDocument): Added.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::hostingDocument): Added.
        * dom/Document.cpp:
        (WebCore::Document::commonTeardown): Call the new PlatformMediaSessionManager::stopAllMediaPlaybackForDocument
        method on document cleanup.
        * platform/audio/PlatformMediaSession.h:
        Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
        Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
        playback on elements that match the provided document.
        * platform/audio/PlatformMediaSessionManager.h:

2015-07-02  Dean Jackson  <dino@apple.com>

        Tapping a video in Safari causes the video to flash gray for a quick moment
        https://bugs.webkit.org/show_bug.cgi?id=146570
        <rdar://problem/21325181>

        Reviewed by Brent Fulgham.

        On iOS, video elements should not show the tap highlight.

        * css/html.css:
        (video):

2015-07-02  Dean Jackson  <dino@apple.com>

        WebKit should use 80% white background for PiP indicator
        https://bugs.webkit.org/show_bug.cgi?id=146444
        <rdar://problem/21555726>

        Reviewed by Brent Fulgham.

        The designers wanted 80% white, not 80% black (r186104).
        I've also reverted the AirPlay background back to black.

        * Modules/mediacontrols/mediaControlsiOS.css:
        (audio::-webkit-media-controls-wireless-playback-status):
        (audio::-webkit-media-controls-wireless-playback-status.small):
        (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):

2015-07-02  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Clear current AirPlay source before setting another
        https://bugs.webkit.org/show_bug.cgi?id=145959

        Reviewed by Brent Fulgham.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::clientStateDidChange): Don't make a client begin playing 
          to the target just because it has paused.
        (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Always select a client that
          requrested the picker, and never consider paused clients when choosing a client to begin
          playing to the targer. Call setShouldPlayToPlaybackTarget(true) after all of the other 
          clients have been told to stop playing to the target.

2015-07-02  Beth Dakin  <bdakin@apple.com>

        Allow the UIDelegate to customize an image preview
        https://bugs.webkit.org/show_bug.cgi?id=146557
        -and corresponding-
        rdar://problem/21657424

        Reviewed by Tim Horton.

        Add WEBCORE_EXPORT to use this in WK2.
        * loader/cache/CachedResource.h:
        (WebCore::CachedResource::url):

2015-07-02  Brady Eidson  <beidson@apple.com>

        Add preference to disable all http-equiv.
        <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553

        Reviewed by Sam Weinig.

        No new tests (Covered by existing test)

        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        * page/Settings.in:

2015-07-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Remove ReadableStreamController.enqueue() custom binding
        https://bugs.webkit.org/show_bug.cgi?id=146455

        Reviewed by Darin Adler.

        Made enqueue not custom. Updated error to use Default=Undefined in IDL.

        No change in behavior.

        * Modules/streams/ReadableStreamController.h:
        (WebCore::ReadableStreamController::error): Removed unneeded variation of error.
        (WebCore::ReadableStreamController::enqueue): Calling ReadableJSStream enqueue method.
        * Modules/streams/ReadableStreamController.idl: Updated error with Default=Undefined and made enqueue not custom.
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::createDOMException): Adding support for RangeError exceptions.
        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::constructJSReadableStreamController): Deleted.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::error): Updated to pass error value as parameter.
        (WebCore::ReadableJSStream::enqueue): Added exception throwing through ExceptionCode.
        (WebCore::ReadableJSStream::retrieveChunkSize): Ditto.
        * bindings/js/ReadableJSStream.h:
        * dom/ExceptionCode.h: Adding RangeError.

2015-07-02  Brady Eidson  <beidson@apple.com>

        [Content Extensions] Block synchronous XMLHTTPRequest.
        <rdar://problem/21573006> and https://bugs.webkit.org/show_bug.cgi?id=146271

        Reviewed by Alex Christensen.

        Test: http/tests/contentextensions/sync-xhr-blocked.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadResourceSynchronously): If content blocked, set up an error, clear
          the response, and clear the response data.

2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Aggregate profile call information on the backend to drastically reduce profile sizes
        https://bugs.webkit.org/show_bug.cgi?id=146536

        Reviewed by Timothy Hatcher.

        * inspector/TimelineRecordFactory.cpp:
        (WebCore::buildAggregateCallInfoInspectorObject):
        (WebCore::buildInspectorObject):
        Replace the array of Call objects with a single aggregated call info object.

2015-07-01  Brent Fulgham  <bfulgham@apple.com>

        [Win] REGRESSION (r185124) CACFLayer handling broken
        https://bugs.webkit.org/show_bug.cgi?id=146530
        <rdar://problem/21642241>

        Reviewed by Tim Horton.

        At some point in the past, the set of LayerChange flags
        overflowed the default MSVC enum type of 'int'. This caused
        Windows rendering code to not receive various update notifications.

        Zalan's change moved the DebugIndicatorsChanged flag into that
        overflow set, which made it obvious that something was wrong.

        The fix is to tell the compiler to use a compatible base type
        for the enum.

        * platform/graphics/ca/GraphicsLayerCA.h: Prevent overflow.

2015-07-01  Alex Christensen  <achristensen@webkit.org>

        Reduce resolution of performance.now.
        https://bugs.webkit.org/show_bug.cgi?id=146531
        rdar://problem/20116796

        Reviewed by Simon Fraser.

        Test: http/tests/misc/webtiming-resolution.html

        * page/Performance.cpp:
        (WebCore::Performance::now):
        Floor the time returned by performance.now to the nearest 5 microseconds.

2015-07-01  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Build fix

        Reviewed by Brent Fulgham.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVVideoLayer enterPIPModeRedirectingVideoToLayer:]): Renamed from enterOptimizedFullScreenModeRedirectingVideoToLayer.
        (-[WebAVVideoLayer leavePIPMode]): Renamed from leaveOptimizedFullScreenMode.
        (-[WebAVVideoLayer enterOptimizedFullScreenModeRedirectingVideoToLayer:]): Deleted.
        (-[WebAVVideoLayer leaveOptimizedFullScreenMode]): Deleted.

2015-07-01  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Support bold and thin italicized system fonts
        https://bugs.webkit.org/show_bug.cgi?id=146463
        <rdar://problem/20948885>

        Reviewed by Darin Adler.

        Add the italicized attribute to font descriptors.

        Test: fast/text/weighted-italicized-system-font.html

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::createCTFontWithFamilyNameAndWeight):
        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::fontWithFamilySpecialCase):
        (WebCore::fontWithFamily):
        * platform/spi/cocoa/CoreTextSPI.h:

2015-07-01  Alex Christensen  <achristensen@webkit.org>

        Fix ANGLE Windows build after r186169.
        https://bugs.webkit.org/show_bug.cgi?id=146532

        Reviewed by Brent Fulgham.

        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        Don't compile OpenGLShims.cpp or Extensions3DOpenGL.cpp on Windows 
        because Windows uses OpenGLES through ANGLE, not OpenGL.
        * platform/graphics/ANGLEWebKitBridge.h:
        Use OpenGLESShims.h on Windows instead of OpenGLShims.h.
        * platform/graphics/OpenGLESShims.h:
        Added needed definitions from OpenGL to compile successfully.
        * platform/graphics/win/GL/glext.h: Removed.

2015-07-01  Dean Jackson  <dino@apple.com>

        Disable the experimental WebGL2 implementation
        https://bugs.webkit.org/show_bug.cgi?id=146526
        <rdar://problem/21641235>

        Reviewed by Myles Maxfield.

        Add (and disable) an ENABLE_WEBGL2 flag. Also protect
        anything that is specific to WebGL2.

        Covered by running the WebGL 1.0.2 conformance suite
        and our LayoutTests.

        * Configurations/FeatureDefines.xcconfig:
        * bindings/js/JSCanvasRenderingContextCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSWebGL2RenderingContextCustom.cpp:
        * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
        (WebCore::toJS):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::is3dType):
        * html/canvas/WebGL2RenderingContext.cpp:
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGL2RenderingContext.idl:
        * html/canvas/WebGLFramebuffer.cpp:
        (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
        * html/canvas/WebGLGetInfo.cpp:
        * html/canvas/WebGLGetInfo.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::create):
        * html/canvas/WebGLVertexArrayObject.cpp:
        * html/canvas/WebGLVertexArrayObject.h:
        * html/canvas/WebGLVertexArrayObject.idl:

2015-07-01  Chris Dumez  <cdumez@apple.com>

        Regression(183998): Disqus comments take a very long time to load
        https://bugs.webkit.org/show_bug.cgi?id=146522
        <rdar://problem/21590601>

        Reviewed by Simon Fraser.

        Stop throttling requestAnimationFrame() in iframes that are not visible
        due to them being zero-sized or display:none. Those are usually utility
        iframes and throttling them is risky.

        Se still throttle requestAnimationFrame() in iframes that would be
        visible in theory but are currently not noticeable because they are
        outside the viewport.

        Test:
        - fast/animation/request-animation-frame-throttle-subframe.html
        - fast/animation/request-animation-frame-throttle-subframe-display-none.html
        - fast/animation/request-animation-frame-throttle-subframe-zero-size.html

        * page/FrameView.cpp:
        (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):

2015-06-30  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted Japanese text
        https://bugs.webkit.org/show_bug.cgi?id=146492

        Reviewed by Darin Adler.

        The bug was caused by WebKit serializing the used line-height size (e.g. 18px) in the copied content
        instead of string "normal" and removeStyleFromRulesAndContext failing to strip it down when text with
        a font that influences the line height got pasted. This is because the used value of line-height
        property of the context and the pasted content doesn't match when the context doesn't use the same font.

        Fixed the bug by not considering line-height as a list of editing properties we try to preserve. This is
        fine because we don't provide editing operations to directly manipulate line-height.

        Test: editing/pasteboard/cjk-line-height.html

        * editing/EditingStyle.cpp:
        (WebCore::editingProperties): Removed CSSPropertyLineHeight.

2015-06-30  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION (r184296): View keeps scrolling upward
        https://bugs.webkit.org/show_bug.cgi?id=146497
        <rdar://problem/21524942>

        Reviewed by Darin Adler.

        Avoid improperly triggering the ScrollController wheel event handling
        logic when the wheel event deltaX/deltaY are zero. On certain sites,
        this caused a programmatic JavaScript scroll to be triggered unexpectedly,
        scrolling the page back to some initial state.

        This bug was introduced while trying to make sure scrollbars were notified
        when the wheel event had come to an end. Revise that change so that we still
        follow the right code path for non-stretchable regions. However, make sure
        that for zero-delta wheel events we make sure to properly handle the wheel
        event phase. 

        * platform/mac/ScrollAnimatorMac.h:
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent): New helper function
        to reduce the complexity of the logic in handleWheelEvent.
        (WebCore::ScrollAnimatorMac::handleWheelEvent): When wheel events should be forwarded
        to the parent scroll view, if the event was handled or has no change in position
        trigger the 'handleWheelEventPhase' logic so that scrollbars are hidden, etc.

2015-06-30  Dean Jackson  <dino@apple.com>

        Hide the inline controls when going into PiP
        https://bugs.webkit.org/show_bug.cgi?id=146487
        <rdar://problem/19881159>

        Reviewed by Eric Carlson.

        When the presentation mode is PiP, toggle a class
        on the container element so that we can completely
        hide the control toolbar. The placard should still
        remain visible.

        * Modules/mediacontrols/mediaControlsiOS.css:
        (video::-webkit-media-controls-panel-container.picture-in-picture): Add
        a rule that hides the toolbar when PiP is active.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.showControls):
        (ControllerIOS.prototype.handlePresentationModeChange): Toggle a
        class. Also fix a bug I noticed where exiting from PiP was
        not auto-hiding the controls until the user tapped.

2015-07-01  Matthew Daiter  <mdaiter@apple.com>

        Enable MEDIA_STREAM flag
        https://bugs.webkit.org/show_bug.cgi?id=145947
        <rdar://problem/21365829>

        Reviewed by Eric Carlson.

        * Configurations/FeatureDefines.xcconfig: Added MEDIA_STREAM flag
        * Modules/mediastream/MediaStreamTrack.h:
        * WebCore.xcodeproj/project.pbxproj: Changed project headers to
        private headers
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/mac/AVAudioCaptureSource.mm:
        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
        (WebCore::refreshCaptureDeviceList): Deleted.
        * platform/mediastream/mac/AVMediaCaptureSource.mm:
        (WebCore::AVMediaCaptureSource::startProducingData):
        (WebCore::AVMediaCaptureSource::stopProducingData):

2015-07-01  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION (r185016): Intermittent crash in WebCore::TextTrackList::remove
        https://bugs.webkit.org/show_bug.cgi?id=146493
        <rdar://problem/21511122>

        Reviewed by Eric Carlson.

        The m_textTracks member is frequently null checked during other operations, but
        was not checked during track removal. This needs to be corrected.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::removeTextTrack): Check that m_textTracks is
        not null before using it during track removal.

2015-07-01  Antti Koivisto  <antti@apple.com>

        PNG mask images are loaded with Accept:image/svg+xml
        https://bugs.webkit.org/show_bug.cgi?id=146509
        rdar://problem/21584740

        Reviewed by Simon Fraser.

        For some strange reason MaskImageOperation code loads all mask images, including non-SVG ones
        using CachedSVGDocument. Resulting bad accept header may cause server to reject the request.

        This is far from ideal but as a quick fix we can override the accept header for mask images to
        allow any image type.

        Test: http/tests/misc/mask-image-accept.html

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * loader/cache/CachedResourceRequest.h:
        (WebCore::CachedResourceRequest::acceptOverride):
        (WebCore::CachedResourceRequest::setAcceptOverride):
        * loader/cache/CachedSVGDocumentReference.cpp:
        (WebCore::CachedSVGDocumentReference::load):
        * loader/cache/CachedSVGDocumentReference.h:
        (WebCore::CachedSVGDocumentReference::loadRequested):
        (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType):
        (WebCore::CachedSVGDocumentReference::document):
        * platform/graphics/MaskImageOperation.cpp:
        (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):

2015-07-01  Jer Noble  <jer.noble@apple.com>

        [MSE] Failures on W3C media-source tests regarding MIME types
        https://bugs.webkit.org/show_bug.cgi?id=146499

        Reviewed by Eric Carlson.

        Tests: http/tests/media/media-source/SourceBuffer-abort-readyState.html
               http/tests/media/media-source/SourceBuffer-abort-removed.html
               http/tests/media/media-source/SourceBuffer-abort-updating.html
               http/tests/media/media-source/SourceBuffer-abort.html

        Multiple failures in the W3C media-source test suite due to two failures in isTypeSupported MIME type handling:
        - MIME types without codec strings were being rejected.
        - MIME types with codec strings which are rejected by the system are being reported as supported.

        For the first, stop rejecting MIME types with non-existent codec strings. For MIME types which do have non-empty
        codec strings, treat a "Maybe" response as unsupported.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::isTypeSupported):

2015-06-30  Alex Christensen  <achristensen@webkit.org>

        Update ANGLE to b11e2483742db884bd0af41f78f528240577356b.
        https://bugs.webkit.org/show_bug.cgi?id=145010

        Reviewed by Dean Jackson.

        * CMakeLists.txt:
        * platform/graphics/ANGLEWebKitBridge.cpp:
        (WebCore::appendSymbol):
        (WebCore::getStructInfo):
        (WebCore::getSymbolInfo):
        (WebCore::ANGLEWebKitBridge::cleanupCompilers):
        (WebCore::ANGLEWebKitBridge::compileShaderSource):
        (WebCore::getValidationResultValue): Deleted.
        * platform/graphics/ANGLEWebKitBridge.h:
        (WebCore::ANGLEShaderSymbol::isSampler):
        * platform/graphics/GraphicsContext3D.h:
        (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
        * platform/graphics/mac/GraphicsContext3DMac.mm:
        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::checkVaryingsPacking):
        (WebCore::GraphicsContext3D::precisionsMatch):
        Update WebCore to reflect changes in ANGLE.

2015-06-30  Zalan Bujtas  <zalan@apple.com>

        Frame flattening: Hit-testing an iframe could end up destroying the associated inline tree context.
        https://bugs.webkit.org/show_bug.cgi?id=146447
        rdar://problem/20613501

        Reviewed by Simon Fraser.

        This patch ensures that the render tree associated with the document on which
        the hit-test is initiated does not get laid out, unless it was directly mutated prior to the hittest.

        Hit-test requirements:
        1. A clean the render tree before hit-testing gets propagated to the renderers.
        Document::updateLayout() ensures it by calling both updateStyleIfNeeded() and layout() not only on the current tree, but also
        on the ancestors if needed.

        2. No render tree mutation while hit-testing the renderers.

        When an iframe is being hit-tested, this hit-test could bubble down to the child frame's render view.
        In order to ensure #1, we call Document::updateLayout() on the current (subframe) document.
        If updateStyleIfNeeded() mutates the render tree, we mark it dirty for layout(). However frame flattening also
        marks the parent renderer (RenderIFrame) dirty.
        While calling layout() to clean the current render tree, we end up laying out the parent tree too.
        Laying out the parent tree could end up destroying the inline tree context from where the
        hittest just bubbled down. (InlineFlowBox -> RenderWidget -> RenderView).

        This patch protects the render tree from such unintentional inline tree mutation during hittesting.
        After the initial layout we set a layout disallow flag on the frame view to defer subsequent layouts.
        This patch only changes behavior when frame flattening is enabled, but in future we may always want to enable this.

        Test: fast/frames/flattening/hittest-iframe-while-style-changes-crash.html

        * page/FrameView.cpp:
        (WebCore::FrameView::layout):
        (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded): Deleted. -> Assertion in no longer valid.
        * page/FrameView.h:
        * rendering/RenderView.cpp:
        (WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower):
        (WebCore::FrameFlatteningLayoutDisallower::~FrameFlatteningLayoutDisallower):
        (WebCore::RenderView::hitTest): Protect the render tree from subsequent layouts.

2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>

        Implement ECMAScript Internationalization API
        https://bugs.webkit.org/show_bug.cgi?id=90906

        Reviewed by Benjamin Poulain.

        Test: js/intl.html

        * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag

2015-06-30  Wenson Hsieh  <whsieh@berkeley.edu>

        scroll-snap-points do not work very well with mechanical scroll wheel events
        https://bugs.webkit.org/show_bug.cgi?id=142501
        <rdar://problem/20093511>

        Reviewed by Brent Fulgham.

        Stateless scroll events generated by scrolling with a mechanical mouse wheel now trigger scroll
        snapping after a fixed delay.

        Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html

        * platform/cocoa/ScrollController.h: Added member to track stateless scrolling.
        * platform/cocoa/ScrollController.mm: Added constant for delay for stateless scroll snapping.
        (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Triggers timer upon stateless scroll events.
        (WebCore::ScrollController::horizontalScrollSnapTimerFired): Timer now handles stateless scrolling updates.
        (WebCore::ScrollController::verticalScrollSnapTimerFired): See above.
        (WebCore::ScrollController::beginScrollSnapAnimation): Handles stateless scroll snapping.

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        Try to fix Gtk and EFL builds.

        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
        (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
        * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
        (WebCore::CompositingCoordinator::flushPendingLayerChanges):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        [iOS] Missing tiles inside position:fixed on scrolling
        https://bugs.webkit.org/show_bug.cgi?id=146485
        rdar://problem/21226861

        Reviewed by Tim Horton.

        Layer flushing adjusts the coverage rect for tiled layers, but does so at times
        when position:fixed layers are moved around by the scrolling tree. The computed
        coverage rect then doesn't reflect the layer's on-screen position, causing missing
        tiles.

        Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
        that state into the layer flush. When not in a stable state, flushing doesn't change
        the visible and coverage rects for layers that are viewport-constrained.

        * page/FrameView.cpp:
        (WebCore::FrameView::reset):
        * page/FrameView.h: Remove some velocity-related data members that were unused.
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::flushCompositingState):
        (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::flushCompositingState):
        (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
        (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): If this is a viewport-constrained
        layer, and the viewport is not stable, don't touch the rects.
        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
        * platform/graphics/ca/GraphicsLayerCA.h:
        (WebCore::GraphicsLayerCA::CommitState::CommitState):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        Rename GraphicsLayer's allowsBackingStoreDetachment to isViewportConstrained
        https://bugs.webkit.org/show_bug.cgi?id=146483

        Reviewed by Tim Horton.

        What GraphicsLayer really needs to know is whether some other thread/process
        is moving its platform layers around behind its back, and this is is better
        expressed as "isViewportConstrained" rather than "allowsBackingStoreDetachment".
        
        The sense of the flag is flipped, and boolean logic adjusted accordingly.

        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::setIsViewportConstrained):
        (WebCore::GraphicsLayer::isViewportConstrained):
        (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment): Deleted.
        (WebCore::GraphicsLayer::allowsBackingStoreDetachment): Deleted.
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
        (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):

2015-06-30  Dean Jackson  <dino@apple.com>

        CABackdropFilter should set windowServerAware to false
        https://bugs.webkit.org/show_bug.cgi?id=146469
        <rdar://problem/21618614>

        Reviewed by Simon Fraser.

        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (PlatformCALayerCocoa::PlatformCALayerCocoa): Set windowServerAware
        to false on Mac (it's not available on iOS).

2015-06-30  Chris Dumez  <cdumez@apple.com>

        Rolling out r175171
        https://bugs.webkit.org/show_bug.cgi?id=146470
        <rdar://problem/21349934>

        Unreviewed, rolling out <http://trac.webkit.org/changeset/175171>. It
        wasn't a huge win and Brady says it caused crash at
        <rdar://problem/21349934>.

        * platform/network/cf/ResourceRequest.h:
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):

2015-06-30  Matt Baker  <mattbaker@apple.com>

        Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
        https://bugs.webkit.org/show_bug.cgi?id=146168

        Reviewed by Brian Burg.

        Added Inspector instrumentation for measuring CoreAnimation compositing time. We mark the start of a composite
        event when the LayerFlushScheduler triggers a scheduled layer flush. InspectorController now exports a function
        for marking the end of the composite event, which should be called during the CA transaction post-commit phase
        (based on platform support). Lacking platform support, the event is considered complete after CoreAnimation
        runloop observers have run.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::didComposite):
        * inspector/InspectorController.h:
        New export for instrumentation in WebKit2.

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willCompositeImpl):
        (WebCore::InspectorInstrumentation::didCompositeImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::willComposite):
        (WebCore::InspectorInstrumentation::didComposite):
        Plumbing for new instrumentation.

        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::internalStart):
        (WebCore::InspectorTimelineAgent::internalStop):
        (WebCore::InspectorTimelineAgent::willComposite):
        (WebCore::InspectorTimelineAgent::didComposite):
        (WebCore::toProtocol):
        * inspector/InspectorTimelineAgent.h:
        New Composite event type and instrumentation.

        * page/FrameView.cpp:
        (WebCore::FrameView::flushCompositingStateIncludingSubframes):
        Hook for start of compositing.

        * platform/spi/cocoa/QuartzCoreSPI.h:
        New header include and interface declaration.

2015-06-30  Beth Dakin  <bdakin@apple.com>

        The bounds on InteractionInformationAtPosition should be more precise
        https://bugs.webkit.org/show_bug.cgi?id=146468
        -and corresponding-
        rdar://problem/20739834

        Reviewed by Enrica Casucci and Simon Fraser.

        Export absoluteContentQuad().
        * rendering/RenderBox.h:

2015-06-30  Zalan Bujtas  <zalan@apple.com>

        Addressing post-review comments in r185756.

        * html/RubyTextElement.cpp:
        (WebCore::RubyTextElement::createElementRenderer):

2015-06-30  Zalan Bujtas  <zalan@apple.com>

        Addressing post-review comments in r185916

        * platform/LayoutUnit.h:
        (WebCore::roundToDevicePixel):

2015-06-30  Matt Rajca  <mrajca@apple.com>

        MediaSession: Use setSessionInternal to set the default media session in HTMLMediaElement's constructor
        https://bugs.webkit.org/show_bug.cgi?id=146465

        Reviewed by Eric Carlson.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):

2015-06-30  Matt Rajca  <mrajca@apple.com>

        Media Session: implement algorithm for updating a media element's session (6.1)
        https://bugs.webkit.org/show_bug.cgi?id=146460

        Reviewed by Darin Adler.

        In addition to storing a pointer to the new media session, we now:

        - pause the media element if it is 'active' in the current media session
        - remove the media element from the current media session
        - release the current media session if there are no more active media elements
        - set the default media session if the new media session is null
        - update the 'kind' attribute to match the kind of the new media session

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::isMediaElementActive):
        (WebCore::MediaSession::hasActiveMediaElements):
        * Modules/mediasession/MediaSession.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::setSession):
        (WebCore::HTMLMediaElement::setSessionInternal):
        * html/HTMLMediaElement.h:

2015-06-29  Anders Carlsson  <andersca@apple.com>

        Get rid of unused WKSI functions
        https://bugs.webkit.org/show_bug.cgi?id=146443

        Reviewed by Tim Horton.

        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::platformAddPathForRoundedRect):
        Just call CGPathAddRoundedRect directly.

        * platform/ios/WebCoreSystemInterfaceIOS.mm:
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:

2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [Streams API] Finish pulling must always be done asynchronously as it is the expected promise behavior (according to the spec)
        https://bugs.webkit.org/show_bug.cgi?id=146408

        Reviewed by Darin Adler.

        Current tests cover the case already.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::pull): Call finishPull() in a postTask to delay it and simulate the promise
        resolution.

2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [Streams API] Synced bad strategy test with reference implementation
        https://bugs.webkit.org/show_bug.cgi?id=146411

        Reviewed by Darin Adler.

        Current tests cover the case.

        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::retrieveChunkSize): Check for negative size then running the JavaScript function.

2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Remove ReadableStream.getReader() custom binding
        https://bugs.webkit.org/show_bug.cgi?id=146404

        Reviewed by Darin Adler.

        Covered by existing tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::getReader): Updated to take an exception.
        * Modules/streams/ReadableStream.h:
        * Modules/streams/ReadableStream.idl: Updated to remove custom binding.
        * bindings/js/JSReadableStreamCustom.cpp:
        (WebCore::JSReadableStream::getReader): Deleted.
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::constructJSReadableStreamReader): Updated to pass an exception to getReader.

2015-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableStreamReader.closed should use DOMPromise
        https://bugs.webkit.org/show_bug.cgi?id=146406

        Reviewed by Darin Adler.

        Added storage of ClosedPromise as Optional of ReadableStream.
        Updated code accordingly.

        Covered by existing tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::clearCallbacks):
        (WebCore::ReadableStream::releaseReader):
        (WebCore::ReadableStream::changeStateToErrored):
        (WebCore::ReadableStream::closed):
        * Modules/streams/ReadableStream.h:
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::closed):
        * Modules/streams/ReadableStreamReader.h:
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::closed):

2015-06-29  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] WKWebViews in Facebook app start off black
        https://bugs.webkit.org/show_bug.cgi?id=146445
        rdar://problem/21600433

        Reviewed by Tim Horton.

        If -isOpaque is toggled on a WKWebView, we failed to make the page tiles non-opaque
        for a while. After r183775, RenderLayerCompositor::rootBackgroundTransparencyChanged() was called,
        but only considered the computed document background color, and not the view transparency.
        
        Fix by having rootBackgroundTransparencyChanged() simply use viewHasTransparentBackground(),
        which checks the FrameView transparency. Now we just need to store a transparency bool rather
        than the old color (we only checked its alpha anyway).

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):

2015-06-29  Dean Jackson  <dino@apple.com>

        WebKit should use 80% black background for PiP indicator
        https://bugs.webkit.org/show_bug.cgi?id=146444
        <rdar://problem/21555726>

        Reviewed by Sam Weinig.

        Change the black background to a slightly less black background.
        This also involved making the placard artwork white, in order
        to keep it visible against the new grey.

        * Modules/mediacontrols/mediaControlsiOS.css:
        (audio::-webkit-media-controls-wireless-playback-status):
        (audio::-webkit-media-controls-wireless-playback-status.small):
        (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):

2015-06-29  Brady Eidson  <beidson@apple.com>

        Flag sync XHRs from the network process so they can be handled appropriately.
        <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441

        Reviewed by Darin Adler.

        * platform/network/ResourceHandleClient.h:
        (WebCore::ResourceHandleClient::loadingSynchronousXHR): Added so clients of asynchronous
          loads can signal they should be treated like synchronous loads at the platform level.

        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.

2015-06-29  Chris Fleizach  <cfleizach@apple.com>

        AX: PlatformSpeechSynthesizer code doesn't catch Objective-C exceptions
        https://bugs.webkit.org/show_bug.cgi?id=146419

        Reviewed by Simon Fraser.

        Make sure ObjC exception resulting from calling into the platform cause problems in WebKit.

        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
        (-[WebSpeechSynthesisWrapper speakUtterance:]):
        (-[WebSpeechSynthesisWrapper pause]):
        (-[WebSpeechSynthesisWrapper resume]):
        (-[WebSpeechSynthesisWrapper cancel]):
        (-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
        (WebCore::PlatformSpeechSynthesizer::pause):

2015-06-29  Matt Rajca  <mrajca@apple.com>

        Removing an element from a media session should also remove it from the sets of active participating elements
        https://bugs.webkit.org/show_bug.cgi?id=146420

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::removeMediaElement):

2015-06-29  Dean Jackson  <dino@apple.com>

        Temporarily disable PICTURE_SIZES
        https://bugs.webkit.org/show_bug.cgi?id=146435
        <rdar://problem/21087013>

        Reviewed by Tim Horton.

        Temporarily disable PICTURE_SIZES because it causes problems with out
        of date <picture> polyfills.

        * Configurations/FeatureDefines.xcconfig:

2015-06-29  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * editing/cocoa/HTMLConverter.mm:
        * platform/spi/cocoa/NSAttributedStringSPI.h:

2015-06-29  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * platform/spi/cocoa/NSAttributedStringSPI.h:

2015-06-29  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * platform/spi/cocoa/NSAttributedStringSPI.h:

2015-06-27  Ryosuke Niwa  <rniwa@webkit.org>

        Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
        https://bugs.webkit.org/show_bug.cgi?id=146379

        Reviewed by Darin Adler.

        The bug was caused by WebKit not updating the font panel when the typing style changes.
        There was also a bug that WebKit never updated font attributes on OS X.

        Fixed the bugs by always updating the font panel after applying style instead of only
        when the selection changes and setting the font attributes.

        I tried really had to write a WebKit API test but I couldn't get it to work so there are
        no new tests :(

        * WebCore.xcodeproj/project.pbxproj:
        * editing/Editor.cpp:
        (WebCore::Editor::applyStyle):
        (WebCore::Editor::shouldApplyStyle):
        (WebCore::Editor::applyParagraphStyle):
        (WebCore::Editor::applyStyleToSelection):
        (WebCore::Editor::applyParagraphStyleToSelection):
        (WebCore::Editor::selectionStartHasStyle):
        (WebCore::Editor::document):
        (WebCore::Editor::styleForSelectionStart): Deleted.
        * editing/Editor.h:
        * editing/cocoa/EditorCocoa.h: Added. Shares the declaration for NSUnderlineStyle in iOS.
        * editing/cocoa/EditorCocoa.mm: Added.
        (WebCore::Editor::styleForSelectionStart): Moved from Editor.cpp
        (WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle): Extracted from iOS's
        fontAttributesForSelectionStart implementation.
        * editing/cocoa/HTMLConverter.mm:
        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::fontAttributesForSelectionStart):
        * editing/mac/EditorMac.mm:
        (WebCore::Editor::fontAttributesForSelectionStart):
        * loader/EmptyClients.h:
        * page/EditorClient.h:

2015-06-29  Matt Rajca  <mrajca@apple.com>

        MediaSession: use a HashSet for the collection of participating elements
        https://bugs.webkit.org/show_bug.cgi?id=146421

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::addMediaElement):
        (WebCore::MediaSession::removeMediaElement):
        * Modules/mediasession/MediaSession.h:

2015-06-29  Dean Jackson  <dino@apple.com>

        Setting to enable/disable media controls sizing on page zoom
        https://bugs.webkit.org/show_bug.cgi?id=146423
        <rdar://problem/18379634>

        Reviewed by Eric Carlson.

        Add a new setting "MediaControlsScaleWithPageZoom" that can disable
        the behaviour we currently implement on iOS, where the media controls
        attempt to remain at a fixed size independent of page zoom.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Do not
        set this value to true if the new setting is disabled.
        * page/Settings.cpp:
        * page/Settings.in: Add the new setting.

2015-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>

        WebRTC: Update the MediaStream API
        https://bugs.webkit.org/show_bug.cgi?id=146313

        Reviewed by Eric Carlson.

        Update the MediaStream API (MediaStream, MediaStreamTrack and
        RealtimeMediaSource) to match the Media Capture and Stream
        specification [1]. Notable changes:

        Updated event handling to synchronously update corresponding
        state/attributes as events are dispatched.

        Removed 'new' state from MediaStreamTrack. A track is either 'live' or
        'ended'. As a consequence 'started' event is also removed.

        MediaStreamTrack always has a source (disconnected source concept was
        removed from the spec). Therefore, more state can be kept at the source
        without going away.

        Calculate MediaStream.active internally, from the track set, instead of
        setting it externally.

        Updated RealtimeMediaSource Observer interface.

        Replaced MediaStream's separate audio and video track lists with a
        single track set (more aligned with spec).

        Updated MediaStream constructor to adopt instead of clone track
        arguments (or tracks from MediaStream argument).

        Removed MediaStreamTrack.getSources() and corresponding test (removed
        from spec).

        Test status: 3 added, 8 existing enabled (some updated) and 1 removed.

        [1] http://w3c.github.io/mediacapture-main/archives/20150523/getusermedia.html

        Tests: fast/mediastream/MediaStreamTrack-clone.html
               fast/mediastream/MediaStreamTrack-kind.html
               fast/mediastream/MediaStreamTrack-stop.html

        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::create):
        (WebCore::MediaStream::MediaStream):
        (WebCore::MediaStream::clone):
        (WebCore::MediaStream::addTrack):
        (WebCore::MediaStream::removeTrack):
        (WebCore::MediaStream::getTrackById):
        (WebCore::MediaStream::getAudioTracks):
        (WebCore::MediaStream::getVideoTracks):
        (WebCore::MediaStream::getTracks):
        (WebCore::MediaStream::contextDestroyed):
        (WebCore::MediaStream::trackDidEnd):
        (WebCore::MediaStream::activeStatusChanged):
        (WebCore::MediaStream::didAddTrackToPrivate):
        (WebCore::MediaStream::didRemoveTrackFromPrivate):
        (WebCore::MediaStream::internalAddTrack):
        (WebCore::MediaStream::internalRemoveTrack):
        (WebCore::MediaStream::scheduleActiveStateChange):
        (WebCore::MediaStream::activityEventTimerFired):
        (WebCore::MediaStream::trackVectorForType):
        (WebCore::MediaStream::~MediaStream): Deleted.
        (WebCore::MediaStream::registry): Deleted.
        (WebCore::MediaStream::addObserver): Deleted.
        (WebCore::MediaStream::removeObserver): Deleted.
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStream.idl:
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::~MediaStreamTrack):
        (WebCore::MediaStreamTrack::kind):
        (WebCore::MediaStreamTrack::id):
        (WebCore::MediaStreamTrack::label):
        (WebCore::MediaStreamTrack::enabled):
        (WebCore::MediaStreamTrack::setEnabled):
        (WebCore::MediaStreamTrack::muted):
        (WebCore::MediaStreamTrack::readonly):
        (WebCore::MediaStreamTrack::remote):
        (WebCore::MediaStreamTrack::readyState):
        (WebCore::MediaStreamTrack::ended):
        (WebCore::MediaStreamTrack::clone):
        (WebCore::MediaStreamTrack::stopProducingData):
        (WebCore::MediaStreamTrack::states):
        (WebCore::MediaStreamTrack::getCapabilities):
        (WebCore::MediaStreamTrack::applyConstraints):
        (WebCore::MediaStreamTrack::trackEnded):
        (WebCore::MediaStreamTrack::trackMutedChanged):
        (WebCore::MediaStreamTrack::stop):
        (WebCore::MediaStreamTrack::getConstraints): Deleted.
        (WebCore::MediaStreamTrack::addObserver): Deleted.
        (WebCore::MediaStreamTrack::removeObserver): Deleted.
        (WebCore::MediaStreamTrack::configureTrackRendering): Deleted.
        (WebCore::MediaStreamTrack::activeDOMObjectName): Deleted.
        (WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/mediastream/MediaStreamTrack.idl:
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::didCreateStream):
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::create):
        (WebCore::MediaStreamPrivate::MediaStreamPrivate):
        (WebCore::MediaStreamPrivate::tracks):
        (WebCore::MediaStreamPrivate::updateActiveState):
        (WebCore::MediaStreamPrivate::addTrack):
        (WebCore::MediaStreamPrivate::removeTrack):
        * platform/mediastream/MediaStreamPrivate.h:
        (WebCore::MediaStreamPrivate::active): Deleted.
        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::create):
        (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
        (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
        (WebCore::MediaStreamTrackPrivate::label):
        (WebCore::MediaStreamTrackPrivate::setEnabled):
        (WebCore::MediaStreamTrackPrivate::endTrack):
        (WebCore::MediaStreamTrackPrivate::clone):
        (WebCore::MediaStreamTrackPrivate::type):
        (WebCore::MediaStreamTrackPrivate::applyConstraints):
        (WebCore::MediaStreamTrackPrivate::sourceStopped):
        (WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
        (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
        (WebCore::MediaStreamTrackPrivate::muted): Deleted.
        (WebCore::MediaStreamTrackPrivate::readonly): Deleted.
        (WebCore::MediaStreamTrackPrivate::remote): Deleted.
        (WebCore::MediaStreamTrackPrivate::constraints): Deleted.
        (WebCore::MediaStreamTrackPrivate::states): Deleted.
        (WebCore::MediaStreamTrackPrivate::capabilities): Deleted.
        * platform/mediastream/MediaStreamTrackPrivate.h:
        (WebCore::MediaStreamTrackPrivate::id):
        (WebCore::MediaStreamTrackPrivate::ended):
        (WebCore::MediaStreamTrackPrivate::enabled):
        (WebCore::MediaStreamTrackPrivate::setClient):
        (WebCore::MediaStreamTrackPrivate::source): Deleted.
        (WebCore::MediaStreamTrackPrivate::client): Deleted.
        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::RealtimeMediaSource):
        (WebCore::RealtimeMediaSource::reset):
        (WebCore::RealtimeMediaSource::setMuted):
        (WebCore::RealtimeMediaSource::readonly):
        (WebCore::RealtimeMediaSource::stop):
        (WebCore::RealtimeMediaSource::requestStop):
        (WebCore::RealtimeMediaSource::addObserver): Deleted.
        (WebCore::RealtimeMediaSource::removeObserver): Deleted.
        * platform/mediastream/RealtimeMediaSource.h:
        (WebCore::RealtimeMediaSource::stopped):
        (WebCore::RealtimeMediaSource::id): Deleted.
        (WebCore::RealtimeMediaSource::muted): Deleted.
        (WebCore::RealtimeMediaSource::setReadonly): Deleted.
        * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
        (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Deleted.
        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
        (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Deleted.

2015-06-29  Benjamin Poulain  <benjamin@webkit.org>

        Make the NFA transitions range-based
        https://bugs.webkit.org/show_bug.cgi?id=146338

        Reviewed by Alex Christensen.

        Change the NFA to use range based transition for any kind of transition.
        The fallback transition is also absorbed as ranges.

        Previously, the NFA would only have single transitions and a fallback
        transition for all cases not covered by single transitions.

        The problem with that design was that character ranges (e.g. [a-z]) were
        extended as individual transitions. Something like [^a] would cover
        most of the alphabet with transitions.
        When converting the NFA to DFA, the time is proportional to the number of states
        multiplied by the number of transitions. With many individual transitions,
        the run time was an order of magnitude higher than what we want.

        This patch changes the NFA to only handle ranges of characters. A single transition
        becomes a range with the character as first and last character in the range
        ('a' becomes 'a' to 'a').
        Ranges of characters are handled direclty (e.g. [a-z] becomes a single 'a' to 'z' transition).

        In the context of the state machines, ranges have identifies (the target of the transitions).
        When two ranges collide, they have to be split such that each part retain its target
        except the intersection that gets the union of the targets.

        Handling the union of ranges efficiently is critical because we have to do
        it for every NFA node in any subset when building the DFA. The helper
        class that does that is MutableRange.

        The union of ranges is done efficiently because of preconditions on our list of ranges:
        -The ranges must be sorted.
        -No range in a list can intersect any other range in the same list.

        To merge two ranges, we can go over them in order and split them part by part.
        It is easy to find what goes where because they are both sorted and we can
        compare the characters of each to know how to move forward.
        The time to merge 2 range list is proportional to O(n+m) where 'n' and 'm' are
        the number of ranges in each list.

        Since taking the union of two lists usually create new ranges, we have to allocate
        those somewhere efficiently. To do that, MutableRange support an inline capacity,
        which is used for the NFAToDFA Convertion.

        ---

        With ranges, the NFA-to-DFA conversion changes very little:
        -Each NFA nodes contains a list of ranges and each range has a list of targets.
        -The subset construction select any number of NFA nodes corresponding to
         a single deterministic state.
        -For the subset, we can use MutableRange to merge the ranges of every
         NFA node in the set. The resulting list has rangeis with targets corresponding
         to the union of all the transitions.
        -We go over all the ranges the same way we used to go over the transitions.
         Since the DFA does not support ranges, the ranges are spread as individual
         transitions + fallback transition.

        ---

        With the efficient merging solved, we still need the actual NFA to use ranges
        instead of individual transitions.

        I could have used MutableRange for that but it is not the most compact
        way to represent ranges that do not need merging.

        Instead, the NFA uses a custom structure: ImmutableNFA. It is basically
        the same thing, but in that one you cannot change a list of range
        after creating it.

        Consequently, the sorted ranges in ImmutableNFA are also subsequent
        in memory, which is really nice to go over them efficiently
        when merging ranges in the NFA-to-DFA conversion. :)

        When building the NFA, we don't know all the transitions when creating
        each node, BUT we know that we have very few node "unfinished" at any
        time. Since we build by going depth-first in the prefix-tree, we only
        have the max-depth of live nodes in the worst case.

        To help building the NFA out of the prefix tree, we have
        ImmutableNFANodeBuilder. It keeps all the informations about a NFA node,
        but in a non-compact, mutable form. When a ImmutableNFANodeBuilder
        is destroyed, it serialize the information into the immutable NFA.

        * WebCore.xcodeproj/project.pbxproj:
        * contentextensions/CombinedURLFilters.cpp:
        (WebCore::ContentExtensions::generateNFAForSubtree):
        (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::compileRuleList):
        * contentextensions/DFA.cpp:
        (WebCore::ContentExtensions::DFA::empty):
        * contentextensions/DFA.h:
        * contentextensions/ImmutableNFA.h: Added.
        (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator*):
        (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator->):
        (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator==):
        (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator!=):
        (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator++):
        (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::begin):
        (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::end):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator==):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator!=):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator++):
        (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
        (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::begin):
        (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::end):
        (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::debugPrint):
        (WebCore::ContentExtensions::ImmutableNFA::transitionsForNode):
        (WebCore::ContentExtensions::ImmutableNFA::root):
        (WebCore::ContentExtensions::ImmutableNFA::finalize):
        (WebCore::ContentExtensions::ImmutableNFA::memoryUsed):
        * contentextensions/ImmutableNFANodeBuilder.h: Added.
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::~ImmutableNFANodeBuilder):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addTransition):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addEpsilonTransition):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::setActions):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::operator=):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::finalize):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkActions):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkTransitions):
        (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkEpsilonTransitions):
        * contentextensions/MutableRange.h: Added.
        (WebCore::ContentExtensions::MutableRange::MutableRange):
        (WebCore::ContentExtensions::MutableRange::operator=):
        (WebCore::ContentExtensions::MutableRange::size):
        * contentextensions/MutableRangeList.h: Added.
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator*):
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator->):
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator==):
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator!=):
        (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator++):
        (WebCore::ContentExtensions::MutableRangeList::begin):
        (WebCore::ContentExtensions::MutableRangeList::end):
        (WebCore::ContentExtensions::MutableRangeList::appendRange):
        (WebCore::ContentExtensions::MutableRangeList::extend):
        (WebCore::ContentExtensions::MutableRangeList::isEmpty):
        (WebCore::ContentExtensions::MutableRangeList::clear):
        (WebCore::ContentExtensions::MutableRangeList::debugPrint):
        (WebCore::ContentExtensions::MutableRangeList::insertBetween):
        (WebCore::ContentExtensions::MutableRangeList::initializeFrom):
        * contentextensions/NFA.cpp:
        (WebCore::ContentExtensions::NFA::debugPrintDot):
        (WebCore::ContentExtensions::NFA::NFA): Deleted.
        (WebCore::ContentExtensions::NFA::createNode): Deleted.
        (WebCore::ContentExtensions::NFA::memoryUsed): Deleted.
        (WebCore::ContentExtensions::NFA::addTransition): Deleted.
        (WebCore::ContentExtensions::NFA::addEpsilonTransition): Deleted.
        (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter): Deleted.
        (WebCore::ContentExtensions::NFA::setActions): Deleted.
        (WebCore::ContentExtensions::NFA::graphSize): Deleted.
        (WebCore::ContentExtensions::NFA::restoreToGraphSize): Deleted.
        (WebCore::ContentExtensions::printRange): Deleted.
        (WebCore::ContentExtensions::printTransitions): Deleted.
        * contentextensions/NFA.h:
        (WebCore::ContentExtensions::NFA::root): Deleted.
        (WebCore::ContentExtensions::NFA::addRuleId): Deleted.
        * contentextensions/NFANode.h:
        * contentextensions/NFAToDFA.cpp:
        (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
        (WebCore::ContentExtensions::resolveEpsilonClosures):
        (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
        (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
        (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::convert):
        (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::extend):
        (WebCore::ContentExtensions::createCombinedTransition):
        (WebCore::ContentExtensions::canUseFallbackTransition):
        (WebCore::ContentExtensions::findBestFallbackTarget):
        (WebCore::ContentExtensions::getOrCreateDFANode):
        (WebCore::ContentExtensions::NFAToDFA::convert):
        (WebCore::ContentExtensions::populateTransitions): Deleted.
        * contentextensions/NFAToDFA.h:
        * contentextensions/Term.h:
        (WebCore::ContentExtensions::Term::Term):
        (WebCore::ContentExtensions::Term::generateGraph):
        (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
        (WebCore::ContentExtensions::Term::Term::generateGraph): Deleted.

2015-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Binding generator should allow using JSC::Value for "any" parameter in lieu of ScriptValue
        https://bugs.webkit.org/show_bug.cgi?id=146403

        Reviewed by Darin Adler.

        Covered by existing tests.

        Enabling new APIs to use JSC::JSValue by using implicit case from ScriptValue to JSC::JSValue.
        Updated binding generator to include ScruptValue header in the needed JSXX.cpp files.
        Applied approach to ReadableStreamController.error.

        * Modules/streams/ReadableStreamController.h:
        (WebCore::ReadableStreamController::error):
        * Modules/streams/ReadableStreamController.idl:
        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::constructJSReadableStreamController): Deleted.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::error):
        * bindings/js/ReadableJSStream.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (JSValueToNative):
        * bindings/scripts/test/JS/JSTestObj.cpp:

2015-06-29  Anders Carlsson  <andersca@apple.com>

        Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
        https://bugs.webkit.org/show_bug.cgi?id=146413
        rdar://problem/21295036

        Reviewed by Andreas Kling.

        Replace SPI with API.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        (WebCore::MemoryPressureHandler::install):
        * platform/mac/WebCoreSystemInterface.h:
        * platform/spi/cocoa/DispatchSPI.h: Removed.

2015-06-29  Andreas Kling  <akling@apple.com>

        [iOS] Pausing a media element should discard buffered data immediately if under memory pressure.
        <https://webkit.org/b/146410>
        <rdar://problem/20366883>

        Reviewed by Darin Adler.

        When moving a media element into paused state, call purgeBufferedDataIfPossible()
        right away if the system is under memory pressure.

        This ensures that mediaserverd drops its forward-looking frame queue right
        away instead of waiting for a new pressure notification.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::pauseInternal):

2015-06-29  Matt Rajca  <mrajca@apple.com>

        Media Session: Media elements should report a null session for Default sessions
        https://bugs.webkit.org/show_bug.cgi?id=146373

        Reviewed by Eric Carlson.

        If a media element's current session is a 'Default' media session, its session property should report null in
        the JavaScript API.

        * Modules/mediasession/MediaSession.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::session):

2015-06-29  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [Mac] Disable QTKit by default.
        https://bugs.webkit.org/show_bug.cgi?id=146352

        Reviewed by Darin Adler.
        
        Fix the the requirement for enabling QTKit and AVFoundation.

        * page/Settings.cpp:
        (WebCore::invalidateAfterGenericFamilyChange): Remove the requirement
        for enabling QTKit and AVFoundation. The initial state of QTKit should
        be disabled on all OS X ports. And the initial state of AVFoundation
        should be enabled  on all OS X ports.

2015-06-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        [EFL] Purge unused favicons from IconDatabase after 30 days.
        https://bugs.webkit.org/show_bug.cgi?id=146334

        Reviewed by Gyuyoung Kim.

        We need purge unused favicons from IconDatabase for database size control.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::performURLImport):

2015-06-26  Matt Rajca  <mrajca@apple.com>

        Add support for 'Default' media session types
        https://bugs.webkit.org/show_bug.cgi?id=146355

        Reviewed by Darin Adler.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::MediaSession): Added a new constructor for creating 'Default' media sessions.
        (WebCore::MediaSession::kind): 'Default' media sessions are represented by an empty string.
        * Modules/mediasession/MediaSession.h:
        * dom/Document.cpp:
        (WebCore::Document::defaultMediaSession): Lazily construct the default media session.
        * dom/Document.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): New media elements are assigned to the 'Default' media session.

2015-06-28  Andreas Kling  <akling@apple.com>

        [iOS] Drop buffered data in paused media elements on memory pressure.
        <https://webkit.org/b/146369>
        <rdar://problem/20366883>

        Reviewed by Eric Carlson.

        To avoid getting crushed under mediaserverd memory growth when viewing
        a page with multiple media elements, add a step to the memory pressure
        handler that drops buffered data from all media elements that are
        not currently playing.

        On a test page with a bunch of embedded YouTube videos, this pass frees
        up ~4MB per paused video when the system memory pressure hits.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::allMediaElements):
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
        * html/HTMLMediaElement.h:
        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseCriticalMemory):

2015-06-28  Chris Dumez  <cdumez@apple.com>

        Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::CachedFrameBase::restore + 333
        https://bugs.webkit.org/show_bug.cgi?id=146388
        <rdar://problem/21567343>

        Reviewed by Darin Adler.

        Pages that are currently loading are not supposed to go into the
        PageCache. However, PageCache::canCache() only checks if the
        FrameLoader's documentLoader is loading. If the subframe is in
        provisional load stage, we would fail to detect that the frame is
        actually loading because the FrameLoader active documentLoader would
        be the provisional documentLoader, not the regular documentLoader.
        Therefore, the page would get added to the PageCache and the frame
        would keep loading while in the PageCache.

        On http://www.audiusa.com/models, this is what was happening. It was
        crashing because the subframe would finish loading while in the
        PageCache, in which case we would fire the 'load' event and the
        content 'load' event handler would then proceed to remove the iframe.
        Upon restoring the PageCache entry, we would run into trouble as we
        would have a CachedFrame whose Frame has been removed.

        The solution proposed is to prevent page-caching if a subframe is in
        provisional load stage.

        Test: http/tests/navigation/page-cache-iframe-provisional-load.html

        * history/PageCache.cpp:
        (WebCore::logCanCacheFrameDecision):
        (WebCore::PageCache::canCachePageContainingThisFrame):
        * page/DiagnosticLoggingKeys.cpp:
        (WebCore::DiagnosticLoggingKeys::provisionalLoadKey):
        * page/DiagnosticLoggingKeys.h:

2015-06-28  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Add support for chunks with customized sizes
        https://bugs.webkit.org/show_bug.cgi?id=146312

        Reviewed by Darin Adler.

        Covered by rebased tests.

        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::read): Decrement totalQueueSize with the chunk specific size.
        (WebCore::ReadableJSStream::enqueue): Calls retrieveSize, enqueue chunk with its size and increment totalQueueSize.
        (WebCore::ReadableJSStream::retrieveChunkSize): Calls size JS callback and convert it to double.
        * bindings/js/ReadableJSStream.h:

2015-06-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API]Remove ReadableStreamController.close custom binding
        https://bugs.webkit.org/show_bug.cgi?id=146380

        Reviewed by Darin Adler.

        No change in behavior.

        * Modules/streams/ReadableStreamController.h:
        (WebCore::ReadableStreamController::close): Calling ReadableJSStream close method.
        * Modules/streams/ReadableStreamController.idl: Removed Custom.
        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::JSReadableStreamController::close): Deleted.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::close): Moved custom binding code here.
        * bindings/js/ReadableJSStream.h:

2015-06-27  Chris Fleizach  <cfleizach@apple.com>

        AX: implement @aria-roledescription
        https://bugs.webkit.org/show_bug.cgi?id=146274

        Reviewed by Darin Adler.

        Add support for aria-roledescription.

        Test: accessibility/aria-roledescription.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::hasHighlighting):
        (WebCore::AccessibilityObject::roleDescription):
        (WebCore::nodeHasPresentationRole):
        * accessibility/AccessibilityObject.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
        (-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
        (-[WebAccessibilityObjectWrapper accessibilityLabel]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper roleDescription]):

2015-06-27  Darin Adler  <darin@apple.com>

        Fix the build.

        * platform/network/cf/ResourceErrorCF.cpp:
        (WebCore::ResourceError::cfError): Take out log statement. Add FIXME comment
        that explains part of the reason we may get null here.
        * platform/network/mac/ResourceErrorMac.mm:
        (WebCore::createNSErrorFromResourceErrorBase): Ditto.

2015-06-27  David Kilzer  <ddkilzer@apple.com>

        Crash in WebCore::ResourceError::cfError() after provisional load failed
        <http://webkit.org/b/146384>

        Reviewed by Darin Adler.

        This is a speculative fix based on the crashing stack.

        * platform/network/cf/ResourceErrorCF.cpp:
        (WebCore::ResourceError::cfError): Add NULL check.
        * platform/network/mac/ResourceErrorMac.mm:
        (WebCore::createNSErrorFromResourceErrorBase): Add nil check in
        case we ever turn off USE(CFNETWORK) for iOS.

2015-06-27  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Only flag a video element as eligible for auto-play to AppleTV one time
        https://bugs.webkit.org/show_bug.cgi?id=146386

        Reviewed by Brent Fulgham.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Drive-by fix - early 
          return when there are no clients.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::pendingActionTimerFired): Set m_failedToPlayToWirelessTarget if the
          media engine is still unable to play to the wireless target.
        (WebCore::HTMLMediaElement::prepareForLoad): Clear m_failedToPlayToWirelessTarget.
        (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate flag
          if m_failedToPlayToWirelessTarget is true.
        * html/HTMLMediaElement.h:

2015-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Implement ReadableStreamController.desiredSize property
        https://bugs.webkit.org/show_bug.cgi?id=146311

        Reviewed by Darin Adler.

        Covered by rebased tests.

        * Modules/streams/ReadableStreamController.h: Adding desiredSize getter.
        (WebCore::ReadableStreamController::desiredSize): Ditto.
        * Modules/streams/ReadableStreamController.idl: Added desiredSize attribute.

2015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][SOUP] Implement WebCore::PublicSuffix for soup and enable PUBLIC_SUFFIX_LIST for GTK+
        https://bugs.webkit.org/show_bug.cgi?id=146318

        Reviewed by Sergio Villar Senin.

        This is covered by unit tests.

        * PlatformGTK.cmake:
        * platform/soup/PublicSuffixSoup.cpp: Added.
        (WebCore::isPublicSuffix):
        (WebCore::topPrivatelyControlledDomain):

2015-06-26  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] AppleGothic has been superseded by Apple SD Gothic Neo
        https://bugs.webkit.org/show_bug.cgi?id=146372
        <rdar://problem/21574004>

        Reviewed by Dean Jackson.

        Test: fast/text/hangul-generic-font-families.html

        * page/mac/SettingsMac.mm:
        (WebCore::Settings::initializeDefaultFontFamilies):

2015-06-26  Matt Daiter  <mdaiter@apple.com>

        Supporting getStartDate and added tests
        https://bugs.webkit.org/show_bug.cgi?id=145676
        <rdar://problem/20876076>

        Reviewed by Brent Fulgham.

        Test: http/tests/media/hls/video-controller-getStartDate.html

        * bindings/js/JSDOMBinding.cpp:
        (WebCore::jsDateOrNaN):
        * bindings/js/JSDOMBinding.h:
        * bindings/scripts/CodeGeneratorJS.pm: Added features to return 
        NaN for Date
        * bindings/scripts/CodeGeneratorGObject.pm: Needed to add
        type checking code for GObject (no date)
        (NativeToJSValue):
        * bindings/scripts/IDLAttributes.txt: 
        * html/HTMLMediaElement.cpp: Added getStartDate function
        (WebCore::HTMLMediaElement::getStartDate):
        * html/HTMLMediaElement.h: Needed to add declarations
        * html/HTMLMediaElement.idl: Needed to modify for returning NaN
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::getStartDate):
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h: Added in Mac-specific platform
        (WebCore::MediaPlayerPrivateInterface::getStartDate):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::getStartDate):

2015-06-26  Beth Dakin  <bdakin@apple.com>

        WebPage::getPositionInformation() should not copy an image that is larger than the  
        screen
        https://bugs.webkit.org/show_bug.cgi?id=146367

        Reviewed by Tim Horton.

        Export the rect version of this function too.
        * platform/graphics/GraphicsContext.h:

2015-06-26  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Muted videos should not automatically play to AppleTV
        https://bugs.webkit.org/show_bug.cgi?id=146366

        Reviewed by Dean Jackson.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_initiallyMuted.
        (WebCore::HTMLMediaElement::scheduleDelayedAction): Support CheckMediaState.
        (WebCore::HTMLMediaElement::setReadyState): Set m_initiallyMuted to true if the element is
          muted or the volume is less than 5%.
        (WebCore::HTMLMediaElement::setMuted): Update media state asynchronously so multiple state
          changes can be coalesced.
        (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto.
        (WebCore::HTMLMediaElement::setPlaying): Ditto.
        (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
        (WebCore::HTMLMediaElement::removeEventListener): Ditto.
        (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
        (WebCore::HTMLMediaElement::updateMediaState): Update after a timer when passed UpdateMediaState::Asynchronously.
        (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate flag if
          m_initiallyMuted is true.
        * html/HTMLMediaElement.h:
        * html/HTMLMediaElementEnums.h:

2015-06-26  Daniel Bates  <dabates@apple.com>

        Rolling out r184660
        https://bugs.webkit.org/show_bug.cgi?id=145200

        Reverting r184660 because it caused a regression.

        * English.lproj/Localizable.strings:
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::createAutoFillButton): Deleted.
        * platform/LocalizedStrings.cpp:
        (WebCore::AXAutoFillButtonText): Deleted.
        * platform/LocalizedStrings.h:
        * platform/efl/LocalizedStringsEfl.cpp:
        (WebCore::AXAutoFillButtonText): Deleted.
        * platform/gtk/LocalizedStringsGtk.cpp:
        (WebCore::AXAutoFillButtonText): Deleted.

2015-06-26  Daniel Bates  <dabates@apple.com>

        Rolling out r185881
        https://bugs.webkit.org/show_bug.cgi?id=146243
        And
        r185828
        https://bugs.webkit.org/show_bug.cgi?id=145241

        Reverting r185881 and r185828 because the latter caused a regression.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Deleted.
        (WebCore::AccessibilityRenderObject::accessibilityHitTest): Deleted.
        * accessibility/AccessibilityRenderObject.h:

2015-06-26  Dean Jackson  <dino@apple.com>

        No audio on animated page with the attached fixed layout epub
        https://bugs.webkit.org/show_bug.cgi?id=146365

        Reviewed by Eric Carlson.

        The new restriction RequireUserGestureForAudioRateChange conflicted
        with existing clients who expected RequireUserGestureForRateChange
        to allow autoplaying audio. Update the logic to ensure that
        RequireUserGestureForRateChange covers all media when set to
        false.

        This may require a revisit once we're using RequireUserGestureForAudioRateChange
        in production, because the global setting will trump that, and
        most clients have the global setting to false. We'll need to come
        up with a way to allow legacy clients to preserve their behaviour.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Only restrict audio
        if RequireUserGestureForRateChange is also false.

2015-06-25  Anders Carlsson  <andersca@apple.com>

        Get rid of ScrollbarThemeClient now that it's unused
        https://bugs.webkit.org/show_bug.cgi?id=146327

        Reviewed by Beth Dakin.

        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::scrollbarOverlayStyle): Deleted.
        (WebCore::Scrollbar::isScrollableAreaActive): Deleted.
        (WebCore::Scrollbar::isScrollViewScrollbar): Deleted.
        (WebCore::Scrollbar::root): Deleted.
        * platform/Scrollbar.h:
        (WebCore::Scrollbar::isCustomScrollbar):
        (WebCore::Scrollbar::orientation):
        (WebCore::Scrollbar::value):
        (WebCore::Scrollbar::currentPos):
        (WebCore::Scrollbar::visibleSize):
        (WebCore::Scrollbar::totalSize):
        (WebCore::Scrollbar::maximum):
        (WebCore::Scrollbar::controlSize):
        (WebCore::Scrollbar::lineStep):
        (WebCore::Scrollbar::pageStep):
        (WebCore::Scrollbar::pressedPart):
        (WebCore::Scrollbar::hoveredPart):
        (WebCore::Scrollbar::enabled):
        (WebCore::Scrollbar::styleChanged):
        (WebCore::Scrollbar::isAlphaLocked):
        (WebCore::Scrollbar::setIsAlphaLocked):
        * platform/ScrollbarTheme.h:
        * platform/ScrollbarThemeClient.h: Removed.
        (WebCore::ScrollbarThemeClient::~ScrollbarThemeClient): Deleted.
        * platform/mac/ScrollbarThemeMac.mm:
        (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
        * rendering/RenderScrollbarTheme.cpp:

2015-06-26  Chris Dumez  <cdumez@apple.com>

        Prevent new loads while in PageCache (or being added to PageCache)
        https://bugs.webkit.org/show_bug.cgi?id=146299
        <rdar://problem/21523788>

        Reviewed by Darin Adler.

        Generalize the change in r185337 to prevent new loads while in the
        PageCache (or being added to the PageCache), instead of merely
        preventing new loads in pagehide event handlers. We should never
        have any pages that are still loading inside the PageCache.

        The fix in r185337 was apparently insufficient to address the
        problem so generalizing the check / policy will hopefully catch
        more cases where content is able to start loads while being added
        to the PageCache. This patch also removes some of the complexity
        added in r185337 as it is no longer needed.

        No new tests, already covered by:
        http/tests/navigation/image-load-in-pagehide-handler.html
        http/tests/navigation/subframe-pagehide-handler-starts-load.html
        http/tests/navigation/subframe-pagehide-handler-starts-load2.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::stopLoading):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::stopAllLoaders):
        (WebCore::FrameLoader::handleBeforeUnloadEvent):
        (WebCore::FrameLoader::FrameLoader): Deleted.
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
        * loader/ImageLoader.cpp:
        (WebCore::pageIsBeingDismissed):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestImage):
        * page/Page.cpp:
        (WebCore::Page::inPageCache):
        * page/Page.h:
        (WebCore::Page::group): Deleted.

2015-06-26  Simon Fraser  <simon.fraser@apple.com>

        [OS X] Change the layer tiling threshold from 2000 to 2048 pixels
        https://bugs.webkit.org/show_bug.cgi?id=146353

        Reviewed by Tim Horton.

        Programmers love powers of two.

        * platform/graphics/ca/GraphicsLayerCA.cpp:

2015-06-26  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Sans-serif generic font family should map to PingFang
        https://bugs.webkit.org/show_bug.cgi?id=146333
        <rdar://problem/21521217>

        Reviewed by Alexey Proskuryakov.

        Also performs a little bit of cleanup.

        Test: fast/text/han-generic-font-families.html

        * page/mac/SettingsMac.mm:
        (WebCore::sansSerifTraditionalHanFontFamily):
        (WebCore::sansSerifSimplifiedHanFontFamily):
        (WebCore::Settings::initializeDefaultFontFamilies):

2015-06-26  Per Arne Vollan  <peavo@outlook.com>

        [Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return type.
        https://bugs.webkit.org/show_bug.cgi?id=146343

        Reviewed by Brent Fulgham.

        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::calculateWebTimingInformations):
        (WebCore::headerCallback):
        (WebCore::ResourceHandleManager::initializeHandle):
        (WebCore::ResourceHandleManager::initCookieSession):
        (WebCore::sockoptfunction): Deleted.

2015-06-26  Chris Fleizach  <cfleizach@apple.com>

        iOS speech synthesizer should expose names
        https://bugs.webkit.org/show_bug.cgi?id=146319

        Reviewed by Mario Sanchez Prada.

        Use newer API to get the name and identifier of each voice asset.

        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):

2015-06-26  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] Remove unnecessary overriden methods from ScrollBarEfl
        https://bugs.webkit.org/show_bug.cgi?id=146342

        Reviewed by Gyuyoung Kim.

        * platform/efl/ScrollbarEfl.cpp:
        (WebCore::ScrollbarEfl::setParent): Deleted.
        (WebCore::ScrollbarEfl::setFrameRect): Deleted.
        (WebCore::ScrollbarEfl::frameRectsChanged): Deleted.
        (WebCore::ScrollbarEfl::invalidate): Deleted.
        * platform/efl/ScrollbarEfl.h:

2015-06-26  Csaba Osztrogonác  <ossy@webkit.org>

        Convert some of WebCore/dom over to range-for loops
        https://bugs.webkit.org/show_bug.cgi?id=126250

        Reviewed by Darin Adler.

        Based on the original patch of Sam Weinig <sam@webkit.org>.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::replaceChild):
        (WebCore::willRemoveChildren):
        (WebCore::ContainerNode::appendChild):
        * dom/MutationObserver.cpp:
        (WebCore::MutationObserver::disconnect):
        (WebCore::MutationObserver::getObservedNodes):
        (WebCore::MutationObserver::deliver):
        * dom/MutationObserverInterestGroup.cpp:
        (WebCore::MutationObserverInterestGroup::isOldValueRequested):
        (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
        * dom/MutationObserverRegistration.cpp:
        (WebCore::MutationObserverRegistration::clearTransientRegistrations):
        (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
        * dom/Node.cpp:
        (WebCore::Node::dumpStatistics):
        (WebCore::collectMatchingObserversForMutation):
        (WebCore::Node::notifyMutationObserversNodeWillDetach):

2015-06-25  Lucas Forschler  <lforschler@apple.com>

        Unreviewed build fix.
        
        * platform/audio/VectorMath.cpp:
        (WebCore::VectorMath::vsmul):
        (WebCore::VectorMath::vadd):
        (WebCore::VectorMath::vmul):
        (WebCore::VectorMath::zvmul):

2015-06-25  Stephanie Lewis  <slewis@apple.com>

        Build fix.

        Unreviewed.

        * platform/audio/DirectConvolver.cpp:
        (WebCore::DirectConvolver::process):

2015-06-25  Chris Fleizach  <cfleizach@apple.com>

        AX: improve list heuristics (presentational use versus actual lists)
        https://bugs.webkit.org/show_bug.cgi?id=134187

        Rolling this change back in. 
        It was taken out to allow clients to have time to update their expectations of what is a list vs. a group

        Test: accessibility/list-detection2.html

        * accessibility/AccessibilityList.cpp:
        (WebCore::AccessibilityList::isDescriptionList):
        (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
        (WebCore::AccessibilityList::determineAccessibilityRole):
        * accessibility/AccessibilityList.h:

2015-06-25  Brent Fulgham  <bfulgham@apple.com>

        Unreviewed build fix after r185964.

        Correct a few pointers-that-should-be-references-now errors.

        * platform/win/PopupMenuWin.cpp:
        (WebCore::AccessiblePopupMenu::accLocation):
        (WebCore::AccessiblePopupMenu::accHitTest):

2015-06-25  Doug Russell  <d_russell@apple.com>

        Bug 146300 AX: AccessibilityObject focus events that don't cause a selection 
        change can leave m_isSynchronizingSelection set to true
        https://bugs.webkit.org/show_bug.cgi?id=146300

        Reviewed by Chris Fleizach.

        Added a clearTextSelectionIntent() convenience function to be used after any
        event that can, but isn't guaranteed to result in a selection change. Matches
        calls to setTextSelectionIntent() convenience function.
        Added support for tests listening for focus change notifications.

        Test: platform/mac/accessibility/focus-setting-selection-syncronizing-not-clearing.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::clearTextSelectionIntent):
        (WebCore::AccessibilityRenderObject::setSelectedTextRange):
        (WebCore::AccessibilityRenderObject::setFocused):
        (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):

2015-06-25  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Add a way to match a domain but not subdomains
        https://bugs.webkit.org/show_bug.cgi?id=146241
        rdar://problem/21557754

        Reviewed by Darin Adler.

        This patch makes it possible to have a trigger with an if-domain apply to sub2.sub1.webkit.org
        but not sub1.webkit.org by making the domains default to only applying to the domain and not subdomains.
        To make a domain apply to a domain and any subdomains, the domain must begin with a '*'.

        * contentextensions/CombinedURLFilters.cpp:
        (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
        (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
        Make domains apply only to the exact domain unless there is a * at the beginning,
        in which case they apply to the domain and any subdomains.

2015-06-25  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
        https://bugs.webkit.org/show_bug.cgi?id=146329
        rdar://problem/21233010

        Reviewed by Tim Horton.

        Have the Compositing log channel dump the visible rect used for layer flushing.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):

2015-06-25  Brent Fulgham  <bfulgham@apple.com>

        [WIN] Enable WEB_TIMING API
        https://bugs.webkit.org/show_bug.cgi?id=146330
        <rdar://problem/21530765>

        Reviewed by Dean Jackson.

        Tested by internal HLS tests.

        Enable WEB_TIMING features on Windows by activating the feature flag,
        and correcting some build errors.

        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::start): "setCollectionTimingData" is only
        defined for PLATFORM(COCOA).
        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
        The 'ResourceHandle::getConnectionTimingData' method is only defined
        for PLATFORM(COCOA).

2015-06-25  Dean Jackson  <dino@apple.com>

        Inline media controls disappear when returning a video to inline
        https://bugs.webkit.org/show_bug.cgi?id=146328
        <rdar://problem/21142862>

        Reviewed by Tim Horton.

        We were getting into a state where the controls were being
        hidden via a timer while we were in fullscreen or on
        another tab. Meanwhile, we could exit from such
        a condition to a point where the controls were
        not visible, but not completely removed from the DOM, confusing
        the logic that decided whether to show them on tap.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.hideControls): If we are in the act of hiding
        controls, we can clear any existing timers that are going to try
        to hide them again.
        (Controller.prototype.resetHideControlsTimer): Make sure we null
        out the hideTimer object, since we look at its value often to
        decide whether or not a timer exists.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handlePlayButtonTouchEnd): If the user
        taps play, then we should call showControls, which resets the hide
        timers amongst other things. We need to do this due to the next change,
        so that a timer started before we pressed play doesn't cause the
        controls to instantly disappear as soon as we start playing.
        (ControllerIOS.prototype.handleWrapperTouchStart): We can get into
        the state where controls are invisible but still in the tree. Since the
        controlsAreHidden() logic only looks for the latter, we need to also
        look for invisible when the user taps for the controls. Yes, this
        naming doesn't make much sense :(

2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
        https://bugs.webkit.org/show_bug.cgi?id=146324

        Reviewed by Timothy Hatcher.

        * inspector/InspectorFrontendClient.h:
        * inspector/InspectorFrontendClientLocal.h:
        Do nothing or pass it up to the the frontend client.

        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::startWindowDrag):
        Add a new host function to get native window dragging behavior.

2015-06-25  Tim Horton  <timothy_horton@apple.com>

        Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
        https://bugs.webkit.org/show_bug.cgi?id=146322
        <rdar://problem/21413884>

        Reviewed by Simon Fraser.

        * page/FrameView.cpp:
        (WebCore::FrameView::viewportSizeForCSSViewportUnits):
        Use the fixed layout size, if enabled, instead of the visibleContentRect,
        for the viewport unit size. This ensures that viewport units take up the whole
        fixed-layout viewport, not just the size of the view scaled by the page scale
        (which visibleContentRect provides).

2015-06-25  Eric Carlson  <eric.carlson@apple.com>

        [Mac] AirPlay menu button still doesn't always show on page load
        https://bugs.webkit.org/show_bug.cgi?id=146325

        Reviewed by Dean Jackson.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaState): A player that can't currently play to a wireless 
          target does require target monitoring if an availability event listner has been registered,
          otherwise we may not register for availability change notifications.

2015-06-25  Anders Carlsson  <andersca@apple.com>

        Stop using ScrollbarThemeClient and just use Scrollbar directly
        https://bugs.webkit.org/show_bug.cgi?id=146320

        Reviewed by Tim Horton.

        * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
        (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::setScrollbarOverlayStyle):
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::Scrollbar):
        (WebCore::Scrollbar::~Scrollbar):
        (WebCore::Scrollbar::offsetDidChange):
        (WebCore::Scrollbar::updateThumb):
        (WebCore::Scrollbar::paint):
        (WebCore::thumbUnderMouse):
        (WebCore::Scrollbar::autoscrollPressedPart):
        (WebCore::Scrollbar::startTimerIfNeeded):
        (WebCore::Scrollbar::moveThumb):
        (WebCore::Scrollbar::setHoveredPart):
        (WebCore::Scrollbar::setPressedPart):
        (WebCore::Scrollbar::mouseMoved):
        (WebCore::Scrollbar::mouseUp):
        (WebCore::Scrollbar::mouseDown):
        (WebCore::Scrollbar::setEnabled):
        * platform/ScrollbarTheme.h:
        (WebCore::ScrollbarTheme::updateEnabledState):
        (WebCore::ScrollbarTheme::paint):
        (WebCore::ScrollbarTheme::hitTest):
        (WebCore::ScrollbarTheme::updateScrollbarOverlayStyle):
        (WebCore::ScrollbarTheme::invalidateParts):
        (WebCore::ScrollbarTheme::invalidatePart):
        (WebCore::ScrollbarTheme::paintTickmarks):
        (WebCore::ScrollbarTheme::shouldCenterOnThumb):
        (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin):
        (WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb):
        (WebCore::ScrollbarTheme::thumbPosition):
        (WebCore::ScrollbarTheme::thumbLength):
        (WebCore::ScrollbarTheme::trackPosition):
        (WebCore::ScrollbarTheme::trackLength):
        (WebCore::ScrollbarTheme::registerScrollbar):
        (WebCore::ScrollbarTheme::unregisterScrollbar):
        * platform/ScrollbarThemeComposite.cpp:
        (WebCore::ScrollbarThemeComposite::paint):
        (WebCore::ScrollbarThemeComposite::hitTest):
        (WebCore::ScrollbarThemeComposite::invalidatePart):
        (WebCore::ScrollbarThemeComposite::splitTrack):
        (WebCore::usedTotalSize):
        (WebCore::ScrollbarThemeComposite::thumbPosition):
        (WebCore::ScrollbarThemeComposite::thumbLength):
        (WebCore::ScrollbarThemeComposite::minimumThumbLength):
        (WebCore::ScrollbarThemeComposite::trackPosition):
        (WebCore::ScrollbarThemeComposite::trackLength):
        (WebCore::ScrollbarThemeComposite::thumbRect):
        * platform/ScrollbarThemeComposite.h:
        (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
        (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
        (WebCore::ScrollbarThemeComposite::paintScrollbarBackground):
        (WebCore::ScrollbarThemeComposite::paintTrackBackground):
        (WebCore::ScrollbarThemeComposite::paintTrackPiece):
        (WebCore::ScrollbarThemeComposite::paintButton):
        (WebCore::ScrollbarThemeComposite::paintThumb):
        (WebCore::ScrollbarThemeComposite::constrainTrackRectToTrackPieces):
        * platform/efl/ScrollbarThemeEfl.h:
        * 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):
        (WebCore::ScrollbarThemeGtk::thumbRect):
        (WebCore::ScrollbarThemeGtk::paintTrackBackground):
        (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
        (WebCore::ScrollbarThemeGtk::paintThumb):
        (WebCore::ScrollbarThemeGtk::paintButton):
        (WebCore::ScrollbarThemeGtk::paint):
        (WebCore::ScrollbarThemeGtk::shouldCenterOnThumb):
        (WebCore::ScrollbarThemeGtk::buttonSize):
        (WebCore::ScrollbarThemeGtk::minimumThumbLength):
        * platform/gtk/ScrollbarThemeGtk.h:
        (WebCore::ScrollbarThemeGtk::hasButtons):
        * platform/ios/ScrollbarThemeIOS.h:
        * platform/ios/ScrollbarThemeIOS.mm:
        (WebCore::ScrollbarThemeIOS::registerScrollbar):
        (WebCore::ScrollbarThemeIOS::unregisterScrollbar):
        (WebCore::ScrollbarThemeIOS::hasButtons):
        (WebCore::ScrollbarThemeIOS::hasThumb):
        (WebCore::ScrollbarThemeIOS::backButtonRect):
        (WebCore::ScrollbarThemeIOS::forwardButtonRect):
        (WebCore::ScrollbarThemeIOS::trackRect):
        (WebCore::ScrollbarThemeIOS::minimumThumbLength):
        (WebCore::ScrollbarThemeIOS::shouldCenterOnThumb):
        (WebCore::ScrollbarThemeIOS::paint):
        * platform/mac/ScrollAnimatorMac.mm:
        (scrollbarPainterForScrollbar):
        (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
        (-[WebScrollbarPartAnimation startAnimation]):
        (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
        (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
        (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
        (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
        (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
        (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
        (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
        (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
        (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
        (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
        (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
        (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
        (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
        (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
        (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
        (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
        (WebCore::ScrollAnimatorMac::updateScrollerStyle):
        * platform/mac/ScrollbarThemeMac.h:
        * platform/mac/ScrollbarThemeMac.mm:
        (WebCore::ScrollbarThemeMac::registerScrollbar):
        (WebCore::ScrollbarThemeMac::unregisterScrollbar):
        (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
        (WebCore::ScrollbarThemeMac::painterForScrollbar):
        (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
        (WebCore::ScrollbarThemeMac::hasButtons):
        (WebCore::ScrollbarThemeMac::hasThumb):
        (WebCore::ScrollbarThemeMac::backButtonRect):
        (WebCore::ScrollbarThemeMac::forwardButtonRect):
        (WebCore::ScrollbarThemeMac::trackRect):
        (WebCore::ScrollbarThemeMac::minimumThumbLength):
        (WebCore::ScrollbarThemeMac::shouldCenterOnThumb):
        (WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb):
        (WebCore::ScrollbarThemeMac::updateEnabledState):
        (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
        (WebCore::ScrollbarThemeMac::paint):
        * platform/mock/ScrollbarThemeMock.cpp:
        (WebCore::ScrollbarThemeMock::trackRect):
        (WebCore::ScrollbarThemeMock::paintTrackBackground):
        (WebCore::ScrollbarThemeMock::paintThumb):
        * platform/mock/ScrollbarThemeMock.h:
        (WebCore::ScrollbarThemeMock::hasButtons): Deleted.
        (WebCore::ScrollbarThemeMock::hasThumb): Deleted.
        (WebCore::ScrollbarThemeMock::backButtonRect): Deleted.
        (WebCore::ScrollbarThemeMock::forwardButtonRect): Deleted.
        (WebCore::ScrollbarThemeMock::maxOverlapBetweenPages): Deleted.
        (WebCore::ScrollbarThemeMock::isMockTheme): Deleted.
        * platform/win/ScrollbarThemeSafari.cpp:
        (WebCore::ScrollbarThemeSafari::hasButtons):
        (WebCore::ScrollbarThemeSafari::hasThumb):
        (WebCore::ScrollbarThemeSafari::backButtonRect):
        (WebCore::ScrollbarThemeSafari::forwardButtonRect):
        (WebCore::ScrollbarThemeSafari::trackRect):
        (WebCore::ScrollbarThemeSafari::minimumThumbLength):
        (WebCore::ScrollbarThemeSafari::shouldCenterOnThumb):
        (WebCore::ScrollbarThemeSafari::paintTrackBackground):
        (WebCore::ScrollbarThemeSafari::paintButton):
        (WebCore::ScrollbarThemeSafari::paintThumb):
        * platform/win/ScrollbarThemeSafari.h:
        * platform/win/ScrollbarThemeWin.cpp:
        (WebCore::ScrollbarThemeWin::hasThumb):
        (WebCore::ScrollbarThemeWin::backButtonRect):
        (WebCore::ScrollbarThemeWin::forwardButtonRect):
        (WebCore::ScrollbarThemeWin::trackRect):
        (WebCore::ScrollbarThemeWin::shouldCenterOnThumb):
        (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
        (WebCore::ScrollbarThemeWin::paintTrackBackground):
        (WebCore::ScrollbarThemeWin::paintTrackPiece):
        (WebCore::ScrollbarThemeWin::paintButton):
        (WebCore::paintGripper):
        (WebCore::ScrollbarThemeWin::paintThumb):
        * platform/win/ScrollbarThemeWin.h:
        * rendering/RenderScrollbar.h:
        (isType):
        * rendering/RenderScrollbarPart.cpp:
        (WebCore::RenderScrollbarPart::styleDidChange):
        (WebCore::RenderScrollbarPart::imageChanged):
        * rendering/RenderScrollbarTheme.cpp:
        (WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis):
        (WebCore::RenderScrollbarTheme::hasButtons):
        (WebCore::RenderScrollbarTheme::hasThumb):
        (WebCore::RenderScrollbarTheme::minimumThumbLength):
        (WebCore::RenderScrollbarTheme::backButtonRect):
        (WebCore::RenderScrollbarTheme::forwardButtonRect):
        (WebCore::RenderScrollbarTheme::trackRect):
        (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
        (WebCore::RenderScrollbarTheme::willPaintScrollbar):
        (WebCore::RenderScrollbarTheme::didPaintScrollbar):
        (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
        (WebCore::RenderScrollbarTheme::paintTrackBackground):
        (WebCore::RenderScrollbarTheme::paintTrackPiece):
        (WebCore::RenderScrollbarTheme::paintButton):
        (WebCore::RenderScrollbarTheme::paintThumb):
        (WebCore::RenderScrollbarTheme::paintTickmarks):
        * rendering/RenderScrollbarTheme.h:

2015-06-24  Matt Rajca  <mrajca@apple.com>

        MediaSession: fall back to "content" kind when an unsupported media session kind is passed in
        https://bugs.webkit.org/show_bug.cgi?id=146293

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::parseKind): Parse the media session kind to one of the four supported types.
        (WebCore::MediaSession::MediaSession):
        (WebCore::MediaSession::kind): Format the value as a string (which the JS bindings expect).
        * Modules/mediasession/MediaSession.h: The media session kind is now stored as an enum rather than a string
          since we only support a small, fixed number of values.

2015-06-25  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Crash in WebCore::MediaPlayer::canPlayToWirelessPlaybackTarget
        https://bugs.webkit.org/show_bug.cgi?id=146317

        Reviewed by Brent Fulgham.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaState): NULL-check m_player before using it.

2015-06-25  Commit Queue  <commit-queue@webkit.org>

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

        Causes massive crashes on test bots (Requested by bfulgham on
        #webkit).

        Reverted changeset:

        "Enabling MEDIA_STREAM"
        https://bugs.webkit.org/show_bug.cgi?id=145947
        http://trac.webkit.org/changeset/185956

2015-06-25  Brent Fulgham  <bfulgham@apple.com>

        [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
        https://bugs.webkit.org/show_bug.cgi?id=146302
        <rdar://problem/19726553>

        Reviewed by Eric Carlson.

        Tested by existing media tests.

        Update the AVFoundationCF version of 'supportsType' to more closely match the AVFoundation
        version. Use this new code when the necessary AVFoundationCF functions are present.

        * AVFoundationSupport.py: Check for presence of AVCFURLAssetIsPlayableExtendedMIMEType.
        (fileContains): Added helper function.
        * WebCore.vcxproj/WebCoreGenerated.vcxproj: Add AVFoundationSupport.py to project file to make
        maintenance easier.
        * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Ditto.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType): Moved from ObjC version.
        (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Ditto.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration.
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::avfMIMETypes): Added CF version of AVFoundation code.
        (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Update to use new AVCF
        method if it is available.
        (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack): Handle case of a
        null language locale. This is a drive-by fix of a bug found during testing.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::isUnsupportedMIMEType): Deleted.
        (WebCore::staticMIMETypeList): Deleted.

2015-06-25  Matthew Daiter  <mdaiter@apple.com>

        Enabling MEDIA_STREAM
        https://bugs.webkit.org/show_bug.cgi?id=145947
        <rdar://problem/21365829>

        Reviewed by Brent Fulgham.

        * Configurations/FeatureDefines.xcconfig:
        * Modules/mediastream/UserMediaClient.h:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/mac/AVAudioCaptureSource.mm:
        * platform/mock/UserMediaClientMock.h:

2015-06-25  Zalan Bujtas  <zalan@apple.com>

        Do not send touch events to the slider's thumb when it does not have a renderer.
        https://bugs.webkit.org/show_bug.cgi?id=146307
        rdar://problem/21539399

        Reviewed by Simon Fraser.

        Bail out early if either the touch target or the renderer() is null.

        Test: fast/events/touch/input-range-with-thumb-display-none-crash.html

        * html/shadow/SliderThumbElement.cpp:
        (WebCore::findTouchWithIdentifier):
        (WebCore::SliderThumbElement::handleTouchStart):
        (WebCore::SliderThumbElement::handleTouchMove):
        (WebCore::SliderThumbElement::handleTouchEndAndCancel):

2015-06-25  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Implement HighWaterMark
        https://bugs.webkit.org/show_bug.cgi?id=146235

        Reviewed by Darin Adler.

        Retrieval of HighWaterMark parameter from arguments passed to the ReadableStream JS constructor.
        Retrieval of size function callback from arguments passed to the ReadableStream JS constructor.
        Calling doPull() if buffer size is below HighWaterMark.

        Covered by rebased tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::pull): Adding precise check for HWM.
        * Modules/streams/ReadableStream.h: Introducing hasEnoughValues.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::getHighWaterMark): Utility routine to get properly HWM value.
        (WebCore::ReadableJSStream::create): Retrieval of HWM and size function.
        (WebCore::ReadableJSStream::ReadableJSStream):
        * bindings/js/ReadableJSStream.h: Adding hasEnoughValues and desiredSize prototypes.

2015-06-25  Tim Horton  <timothy_horton@apple.com>

        Try to fix the iOS EWS build.

        * platform/spi/cocoa/SecuritySPI.h:

2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Empty gtk-font-name setting causes WebProcess crash rendering pages
        https://bugs.webkit.org/show_bug.cgi?id=146246

        Reviewed by Sergio Villar Senin.

        Return early if system font is empty.

        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::updateCachedSystemFontDescription):

2015-06-24  Chris Dumez  <cdumez@apple.com>

        Unreviewed, EFL build fix after r185940.

        Members were initialized in wrong order.

        * Modules/mediastream/MediaDeviceInfo.cpp:
        (WebCore::MediaDeviceInfo::MediaDeviceInfo):

2015-06-24  Chris Dumez  <cdumez@apple.com>

        Unreviewed, Build fix after r185940.

        Move implementation inside WebCore namespace.

        * Modules/mediastream/MediaDeviceInfo.cpp:

2015-06-24  Chris Dumez  <cdumez@apple.com>

        Unreviewed, speculative GTK build fix after 185940.

        Add new cpp file to CMakeLists.txt.

        * CMakeLists.txt:

2015-06-24  Matt Daiter  <mdaiter@apple.com>

        Building MediaDeviceInfo for enumerateDevices
        https://bugs.webkit.org/show_bug.cgi?id=146257
        <rdar://problem/21513462>

        Reviewed by Eric Carlson.

        MediaDeviceInfo necessary for enumerateDevices

        * CMakeLists.txt: Added MediaDevicesInfo.idl
        * DerivedSources.make: Added MediaDevicesInfo.idl
        * Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
        (WebCore::MediaDeviceInfo::create): Allocates class
        (WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
        (WebCore::MediaDeviceInfo::~MediaDeviceInfo): 
        (WebCore::MediaDeviceInfo::label):
        (WebCore::MediaDeviceInfo::deviceId):
        (WebCore::MediaDeviceInfo::groupId):
        (WebCore::MediaDeviceInfo::kind):
        * Modules/mediastream/MediaDeviceInfo.idl:
        * WebCore.xcodeproj/project.pbxproj:

2015-06-24  Anders Carlsson  <andersca@apple.com>

        Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
        https://bugs.webkit.org/show_bug.cgi?id=146301

        Reviewed by Tim Horton.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/spi/cocoa/SecuritySPI.h:

2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Add a new color -apple-wireless-playback-target-active
        https://bugs.webkit.org/show_bug.cgi?id=146269
        <rdar://problem/21465189>

        Reviewed by Dean Jackson.

        At the moment we use -apple-system-blue to indicate an Airplay route is
        active. This might not always be blue, so we need to add another system
        color with a name that will allow us to change the underlying color.
        Initially -apple-wireless-playback-target-active will be an alias to
        -apple-system-blue.

        Existing tests are modified to include the new color value.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.updateWirelessTargetPickerButton):
        * Modules/mediacontrols/mediaControlsiOS.css:
        (video::-webkit-media-controls-wireless-playback-picker-button.playing):
        Use the new color value in the media controls.
        
        * css/CSSParser.cpp:
        (WebCore::isAppleLegacyCssValueKeyword): Returns true if the value keyword
        has an '-apple' prefix which has to be replaced by '-webkit'
        
        (WebCore::cssValueKeywordID): Call a new function which handles all the
        '-apple' legacy keywords.
        
        * css/CSSValueKeywords.in: Define the new color keyword.
        
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::systemColor):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor):
        Define the value of the new color keyword to be an alias of systemBlueColor.

2015-06-24  Matt Rajca  <mrajca@apple.com>

        MediaSession: propagate MediaSessionMetadata to WebPageProxy
        https://bugs.webkit.org/show_bug.cgi?id=146282

        Reviewed by Darin Adler and Tim Horton.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::setMetadata):

2015-06-24  Chris Dumez  <cdumez@apple.com>

        Null dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
        https://bugs.webkit.org/show_bug.cgi?id=146286
        <rdar://problem/21523788>

        Reviewed by Sam Weinig.

        Add null check for the Page in areAllLoadersPageCacheAcceptable()
        to fix this top crasher until I can investigate how this can happen.

        * loader/DocumentLoader.cpp:
        (WebCore::areAllLoadersPageCacheAcceptable):

2015-06-24  Anders Carlsson  <andersca@apple.com>

        Move PluginMainThreadScheduler to WebKit/win
        https://bugs.webkit.org/show_bug.cgi?id=146289

        Reviewed by Tim Horton.

        * CMakeLists.txt:
        * Configurations/WebCore.xcconfig:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * plugins/PluginMainThreadScheduler.cpp:
        (WebCore::PluginMainThreadScheduler::scheduler): Deleted.
        (WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler): Deleted.
        (WebCore::PluginMainThreadScheduler::scheduleCall): Deleted.
        (WebCore::PluginMainThreadScheduler::registerPlugin): Deleted.
        (WebCore::PluginMainThreadScheduler::unregisterPlugin): Deleted.
        (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Deleted.
        (WebCore::PluginMainThreadScheduler::dispatchCalls): Deleted.
        (WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
        * plugins/PluginMainThreadScheduler.h:
        (WebCore::PluginMainThreadScheduler::Call::Call): Deleted.
        (WebCore::PluginMainThreadScheduler::Call::performCall): Deleted.

2015-06-24  Dean Jackson  <dino@apple.com>

        Better fix for Element with blur backdrop-filter shows edge duplication and dark edges
        https://bugs.webkit.org/show_bug.cgi?id=146287
        <rdar://problem/21530437>

        Reviewed by Simon Fraser.

        There is no need to carry around a bit in FilterOperations indicating what
        type of source property the object came from. Whether or not to clip to the
        bounds of the filter region is purely a property of the type of CALayer
        we are applying the filter to.

        This basically reverts r185846.

        Covered by the test for the previous commit.

        * css/CSSPropertyNames.in:
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): Deleted.
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFilterOperations): Deleted.
        * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Set the normalized
        edges property if we are a CABackdropLayer.
        * platform/graphics/filters/FilterOperations.cpp:
        (WebCore::FilterOperations::operator==):
        (WebCore::FilterOperations::operationsMatch):
        (WebCore::FilterOperations::operator=): Deleted.
        * platform/graphics/filters/FilterOperations.h:
        (WebCore::FilterOperations::isUsedForBackdropFilters): Deleted.
        (WebCore::FilterOperations::setUsedForBackdropFilters): Deleted.

2015-06-24  Doug Russell  <d_russell@apple.com>

        Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject 
        when posting a selection notification when on the border between two accessibilityObjects
        https://bugs.webkit.org/show_bug.cgi?id=146177

        Reviewed by Darin Adler.

        Add support for position to be passed for selection changes to allow checking.
        for boundaries in the case of ignored elements.
        Add support for searching for unignored siblings of AccessibilityObjects.
        Include AccessibilityObject wrappers in notifications for tests.

        Test: platform/mac/accessibility/selection-element-tabbing-to-link.html

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::postTextStateChangeNotification):
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::previousSiblingUnignored):
        (WebCore::AccessibilityObject::nextSiblingUnignored):
        * accessibility/AccessibilityObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (isValueTypeSupported):
        (arrayRemovingNonSupportedTypes):
        (dictionaryRemovingNonSupportedTypes):
        (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
        * editing/mac/FrameSelectionMac.mm:
        (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):

2015-06-24  Anders Carlsson  <andersca@apple.com>

        Enable -Winconsistent-missing-override when building with Xcode
        https://bugs.webkit.org/show_bug.cgi?id=146288

        Reviewed by Sam Weinig.

        * Configurations/Base.xcconfig:
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/webdatabase/DatabaseTask.h:
        * html/DateTimeLocalInputType.h:
        * page/scrolling/ios/ScrollingCoordinatorIOS.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.h:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        (WebCore::MediaPlayerPrivateAVFoundation::platformLayer): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::fileSize): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::engineDescription): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Deleted.
        * platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
        (WebCore::VideoTrackPrivateAVF::trackIndex): Deleted.
        * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
        (WebCore::CDMSessionAVFoundationObjC::type): Deleted.
        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
        (WebCore::CDMSessionMediaSourceAVFObjC::type): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsAcceleratedRendering): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Deleted.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Deleted.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Deleted.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Deleted.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Deleted.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::networkState): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::readyState): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::maximumDurationToCacheMediaTime): Deleted.
        (WebCore::MediaPlayerPrivateQTKit::engineDescription): Deleted.
        * platform/mac/ScrollAnimatorMac.h:
        * platform/mac/SerializedPlatformRepresentationMac.h:
        (WebCore::SerializedPlatformRepresentationMac::platformType): Deleted.
        * platform/mac/ThemeMac.h:
        (WebCore::ThemeMac::controlRequiresPreWhiteSpace): Deleted.
        * testing/MockCDM.cpp:
        (WebCore::MockCDMSession::setClient): Deleted.

2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Improve JSDOMPromise callPromiseFunction naming
        https://bugs.webkit.org/show_bug.cgi?id=146280

        Unreviewed.

        No change in behavior.

        * bindings/js/JSDOMPromise.h:
        (WebCore::callPromiseFunction):

2015-06-24  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
        <rdar://problem/21525376>

        Reviewed by Sam Weinig.

        * page/TextIndicator.cpp:
        (WebCore::TextIndicator::createWithRange):
        Null check.

2015-06-24  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: roundToDevicePixel() snaps to wrong value.
        https://bugs.webkit.org/show_bug.cgi?id=146273
        rdar://problem/18509840

        Reviewed by Simon Fraser.

        Due to the floating point approximate representation, we can't always produce
        the correct snap value. This patch addresses the issue by removing redundant kFixedPointDenominator multiplication
        and by changing the rounding in roundToDevicePixel() from float to double.

        API test is added.

        * platform/LayoutUnit.h:
        (WebCore::roundToDevicePixel):

2015-06-23  Matt Rajca  <mrajca@apple.com>

        MediaSession: Support setting of metadata
        https://bugs.webkit.org/show_bug.cgi?id=146253

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::MediaSession): Store a reference to the document so we can use it in setMetadata.
        (WebCore::MediaSession::setMetadata): Implemented as described in the Media Session spec.
        * Modules/mediasession/MediaSession.h:
        * Modules/mediasession/MediaSession.idl: Added the setMetadata method.
        * Modules/mediasession/MediaSessionMetadata.h:
        (WebCore::MediaSessionMetadata::MediaSessionMetadata): Added to keep track of media session metadata.
        (WebCore::MediaSessionMetadata::title):
        (WebCore::MediaSessionMetadata::artist):
        (WebCore::MediaSessionMetadata::album):
        (WebCore::MediaSessionMetadata::artworkURL):
        * WebCore.xcodeproj/project.pbxproj: Added MediaSessionMetadata.h.

2015-06-24  Daniel Bates  <dabates@apple.com>

        Content Security Policy error message when frame load is blocked does not read well
        https://bugs.webkit.org/show_bug.cgi?id=146279

        Reviewed by Csaba Osztrogonác.

        Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
        emitted when the Content Security Policy of the page blocks a frame load.

        * page/ContentSecurityPolicy.cpp:
        (WebCore::CSPDirectiveList::checkSourceAndReportViolation):

2015-06-11  Sergio Villar Senin  <svillar@igalia.com>

        intrinsic size keywords don't work for heights
        https://bugs.webkit.org/show_bug.cgi?id=113610

        Reviewed by Darin Adler.

        Based on Blink's r148314 & r150355 by <cbiesinger@chromium.org>.

        Adds intrinsic values support to heigh & min/max-height. This involves the
        following changes:
        - RenderBox needs to pass the content height through to computeLogicalHeight and
        related functions, which needs it to resolve max-content, et. al.
        - Make the callers pass the content height to this function. Some callers pass
        logicalHeight() (adjusted for border/padding) which works because if
        logicalHeight is not the content height, then it is the height we ended up using,
        so the constrain* functions will just constrain to that value again.
        - Parsing code needs to be adjusted to support intrinsic values for heights.

        Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
               fast/css-intrinsic-dimensions/height-css-tables.html
               fast/css-intrinsic-dimensions/height-flexbox.html
               fast/css-intrinsic-dimensions/height-positioned-replaced.html
               fast/css-intrinsic-dimensions/height-positioned.html
               fast/css-intrinsic-dimensions/height-replaced.html
               fast/css-intrinsic-dimensions/height-tables-collapsed.html
               fast/css-intrinsic-dimensions/height-tables.html
               fast/css-intrinsic-dimensions/height.html

        * css/CSSParser.cpp:
        (WebCore::CSSParser::isValidSize): Refactored from validateWidth and
        validateHeight.
        (WebCore::CSSParser::parseValue):
        (WebCore::CSSParser::validateWidth): Deleted.
        (WebCore::CSSParser::validateHeight): Deleted.
        * css/CSSParser.h:
        * platform/Length.h:
        (WebCore::Length::isFillAvailable):
        (WebCore::Length::isFitContent):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::constrainLogicalHeightByMinMax):
        (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
        (WebCore::RenderBox::computeLogicalHeight):
        (WebCore::RenderBox::computeLogicalHeightUsing):
        (WebCore::RenderBox::computeContentLogicalHeight):
        (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
        (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
        (WebCore::RenderBox::computePercentageLogicalHeight):
        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
        (WebCore::RenderBox::availableLogicalHeight):
        (WebCore::RenderBox::availableLogicalHeightUsing):
        (WebCore::RenderBox::computePositionedLogicalHeight):
        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
        * rendering/RenderBox.h:
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
        (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
        * rendering/RenderFlowThread.cpp:
        (WebCore::RenderFlowThread::addForcedRegionBreak):
        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
        (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
        * rendering/RenderMultiColumnSet.cpp:
        (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::hasReplacedLogicalHeight):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
        (WebCore::RenderTable::layout):

2015-06-24  Commit Queue  <commit-queue@webkit.org>

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

        MSVC doesn't yet provide a const-qualified std::array<T,
        N>::size(), failing to compile the static_assert (Requested by
        zdobersek on #webkit).

        Reverted changeset:

        "Improve the source code generated by make_names.pl"
        https://bugs.webkit.org/show_bug.cgi?id=146208
        http://trac.webkit.org/changeset/185906

2015-06-24  Zan Dobersek  <zdobersek@igalia.com>

        Improve the source code generated by make_names.pl
        https://bugs.webkit.org/show_bug.cgi?id=146208

        Reviewed by Darin Adler.

        Clean up and optimize the output that's generated by the make_names.pl script
        when generating large sets of DOM names for attributes and tags.

        The GenerateStrings() function in the StaticString.pm module is split into
        GenerateStringData() and GenerateASCIILiteral() so that the two new functions
        can be used independently, with the original function still being called when
        generating font names.

        Tags and attributes have the corresponding static QualifiedName globals defined
        as before. After that, two static const std::array<> objects are defined for
        both types -- the first is an ordered array of addresses of the QualifiedName
        objects (corresponding to the C array that was defined in getHTMLTags(),
        getSVGAttrs() etc.), and the second is an ordered array of StringImpl::StaticASCIILiteral
        objects that replaces separately defined StringImpl::StaticASCIILiteral objects
        and the additional tables that contained pairs of QualifiedName object addresses
        and the corresponding StaticASCIILiteral object references in the init() function.
        This is all generated by the printStaticData() function in make_names.pl.

        The printQualifiedNameCreation() function generates a static_assert() that ensures
        that the corresponding std::array<QualifiedName*> and std::array<StaticASCIILiteral>
        objects have the same amount of items, and then sets up a loop that walks through
        the two arrays and properly constructs the QualifiedName objects from the static
        literal data.

        On the GTK port, this shaves off ~54kB from the final stripped shared library
        on a 64-bit build, and ~21kB on a 32-bit build.

        * bindings/scripts/StaticString.pm:
        (GenerateStringData):
        (GenerateASCIILiteral):
        (GenerateStrings):
        * dom/make_names.pl:
        (printCppHead):
        (printNamesCppFile):
        (printStaticData):
        (printQualifiedNameCreation):
        (printInit): Deleted.
        (printDefinitions): Deleted.

2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Refactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and legacy webkitGetUserMedia
        https://bugs.webkit.org/show_bug.cgi?id=146237

        Reviewed by Darin Adler.

        Covered by existing tests, no change in behavior.

        * Modules/mediastream/MediaConstraintsImpl.cpp:
        (WebCore::MediaConstraintsImpl::create): Simplified error handling by removing exception code parameter.
        * Modules/mediastream/MediaConstraintsImpl.h: Ditto.
        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::getUserMedia): Removed code now in UserMediaRequest::start.
        * Modules/mediastream/NavigatorUserMedia.cpp:
        (WebCore::NavigatorUserMedia::webkitGetUserMedia): Ditto.
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::parseOptions): Simplified error handling by removing exception code parameter.
        (WebCore::UserMediaRequest::start): Renamed create in start and added common code.
        * Modules/mediastream/UserMediaRequest.h:

2015-06-23  Andreas Kling  <akling@apple.com>

        Should reduce tile coverage for the first paint after a tab switch.
        <https://webkit.org/b/146252>
        <rdar://problem/19821583>

        Reviewed by Darin Adler.

        Reduce the number of tiles we need to paint after switching tabs,
        to shorten the time it takes before we can flush pixels to screen.

        We accomplish this by piggybacking on the "speculative tiling enabled"
        mode of FrameView, which was previously only used to throttle painting
        and layer flushes during page load.

        When a FrameView becomes visible, which is what happens when you
        switch to its tab, we revert the speculative tiling optimization to
        its initial state, and reset the "scrolled by user" flag.

        In practice this means that after switching tabs, we only generate
        enough tiles to fill the viewport. Then, after 500ms has passed
        or the user scrolls the page, we go back to the usual speculative
        tiling mode.

        * page/FrameView.cpp:
        (WebCore::FrameView::show):

2015-06-23  Anders Carlsson  <andersca@apple.com>

        Remove windowResizerRect code, nobody is using it anymore
        https://bugs.webkit.org/show_bug.cgi?id=146265

        Reviewed by Beth Dakin.

        * loader/EmptyClients.h:
        * page/Chrome.cpp:
        (WebCore::Chrome::windowResizerRect): Deleted.
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::windowResizerRect): Deleted.
        * page/FrameView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::ScrollView): Deleted.
        (WebCore::ScrollView::windowResizerRectChanged): Deleted.
        (WebCore::ScrollView::containsScrollbarsAvoidingResizer): Deleted.
        (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): Deleted.
        (WebCore::ScrollView::setParent): Deleted.
        * platform/ScrollView.h:
        (WebCore::ScrollView::windowResizerRect): Deleted.
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::Scrollbar): Deleted.
        (WebCore::Scrollbar::setFrameRect): Deleted.
        (WebCore::Scrollbar::setParent): Deleted.
        * platform/Scrollbar.h:

2015-06-23  Dean Jackson  <dino@apple.com>

        Media controls are missing the white backdrop in UIWebViews
        https://bugs.webkit.org/show_bug.cgi?id=146251
        <rdar://problem/20181345>

        Reviewed by Simon Fraser.

        Implement two new CALayer subclasses that explicitly set
        something that resembles the system appearance for
        media-controls-dark-bar-background and media-controls-light-bar-background.
        This way, WebKit1 clients get a visible result.

        Creating the actual system recipes is tracked by:
        https://bugs.webkit.org/show_bug.cgi?id=146250

        * WebCore.xcodeproj/project.pbxproj: Add new files.
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
        the appropriate layer types.
        * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
        * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
        (-[WebLightSystemBackdropLayer init]):
        (-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
        (-[WebDarkSystemBackdropLayer init]):
        (-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.

2015-06-18  Matt Rajca  <mrajca@apple.com>

        Support releasing media sessions
        https://bugs.webkit.org/show_bug.cgi?id=146132

        Reviewed by Darin Adler.

        * Modules/mediasession/MediaSession.cpp: Implemented as described in the Media Session spec.
        (WebCore::MediaSession::releaseSession):
        (WebCore::MediaSession::releaseInternal):
        * Modules/mediasession/MediaSession.h:

2015-06-23  Chris Fleizach  <cfleizach@apple.com>

        AX: iOS: VoiceOver and ARIA: has popup property not announced
        https://bugs.webkit.org/show_bug.cgi?id=146188

        Reviewed by Darin Adler.

        Expose the existing "has popup" property to the iOS Accessibility API.

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

2015-06-23  Javier Fernandez  <jfernandez@igalia.com>

        [CSS Grid Layout] Performance optimization: avoid computing overflow alignment if not needed
        https://bugs.webkit.org/show_bug.cgi?id=146231

        Reviewed by Sergio Villar Senin.

        We don't need to apply any overflow handling if alignment value don't have a potential
        risk of data loss, as it's the case of 'start' value.

        This patch avoid computing the overflow in all the cases, since it adds an unneeded
        overhead which affects performance.

        New code improves performance around 3%-8%, depending on the grid tests.

        No new tests, no new funcitonality.

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::rowPositionForChild):
        (WebCore::RenderGrid::columnPositionForChild):

2015-06-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
        https://bugs.webkit.org/show_bug.cgi?id=146200

        Reviewed by Darin Adler.

        Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
        Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
        Removed MediaDevices.getUserMedia custom binding.

        Covered by existing tests.

        * CMakeLists.txt: Removing custom binding.
        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
        * Modules/mediastream/MediaDevices.h: Ditto.
        * Modules/mediastream/MediaDevices.idl: Removing custom binding.
        * Modules/mediastream/NavigatorUserMedia.cpp:
        (WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::create): Moving from callback to promise.
        (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
        (WebCore::UserMediaRequest::didCreateStream): Ditto.
        (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
        (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
        * Modules/mediastream/UserMediaRequest.h: Ditto.
        * bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
        (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
        (WebCore::Error>::resolve):
        (WebCore::Error>::reject):
        * bindings/js/JSMediaDevicesCustom.cpp: Removed.
        * bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.

2015-06-23  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Implement ReadableStream js source "'cancel" callback
        https://bugs.webkit.org/show_bug.cgi?id=146204

        Reviewed by Darin Adler.

        Calling "cancel" JS function when web app is cancelling a JS readable stream.
        Handling of promise returned value in case of async cancel.

        Covered by rebased tests.

        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::invoke): Refactoring to pass cancel reason or controller to the JS function.
        (WebCore::ReadableJSStream::doStart): Ditto.
        (WebCore::startReadableStreamAsync): Renaming readableStream as protectedStream.
        (WebCore::createPullResultFulfilledFunction): Ditto.
        (WebCore::ReadableJSStream::doPull): Refactoring to pass cancel reason or controller to the JS function.
        (WebCore::createCancelResultFulfilledFunction): Cancel promise fullfil callback.
        (WebCore::createCancelResultRejectedFunction): Cancel promise reject callback.
        (WebCore::ReadableJSStream::doCancel): Calling cancel JS callback and handling promise returned value.
        * bindings/js/ReadableJSStream.h: Refactoring to pass cancel reason or controller to the JS function.

2015-06-22  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Hyphenation is not supported
        https://bugs.webkit.org/show_bug.cgi?id=89830

        Reviewed by Gyuyoung Kim.

        Share libHyphen backend of GTK port.

        Rebased fast/text/hyphenate-*.html

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * platform/efl/FileSystemEfl.cpp:
        (WebCore::listDirectory): Deleted because of lack of functionality.
        eina_file_ls returns full directory path so fnmatch fails to check dict file.
        This patch reuse Posix implementation instead of EFL port specific function.
        * platform/posix/FileSystemPOSIX.cpp: Ditto.
        * platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
        * platform/text/hyphen/HyphenationLibHyphen.cpp:
        Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
        (WebCore::scanTestDictionariesDirectoryIfNecessary):
        Added PLATFORM guard and EFL implementation for the test directory

2015-06-22  Chris Dumez  <cdumez@apple.com>

        [WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
        https://bugs.webkit.org/show_bug.cgi?id=146228
        <rdar://problem/15179262>

        Reviewed by Daniel Bates.

        Add Geolocation::resetIsAllowed() API that merely resets
        m_allowGeolocation to Unknown, so that we will request the permission
        again the next time a position is requested.

        * Modules/geolocation/Geolocation.h:
        (WebCore::Geolocation::resetIsAllowed):

2015-06-22  Simon Fraser  <simon.fraser@apple.com>

        ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
        https://bugs.webkit.org/show_bug.cgi?id=146225

        Reviewed by Zalan Bujtas.

        Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
        been updated; this happens to work most of the time because painting updates them,
        but if incremental rendering is suppressed, we may not have painted yet.
        
        Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::hitTest):
        (WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
        dirty bits is cheaper than calling isStackingContext().

2015-06-22  Dean Jackson  <dino@apple.com>

        Rename PlatformCA*Mac to PlatformCA*Cocoa
        https://bugs.webkit.org/show_bug.cgi?id=146224
        <rdar://problem/21497182>

        Reviewed by Simon Fraser.

        Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
        to the more accurate Cocoa suffix.

        * WebCore.xcodeproj/project.pbxproj:
        * page/mac/ServicesOverlayController.mm:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        * platform/graphics/ca/PlatformCAAnimation.h:
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
        * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
        * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
        * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
        * platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
        * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
        * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
        * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
        * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        * platform/graphics/ca/mac/WebTiledBackingLayer.mm:

2015-06-22  Alex Christensen  <achristensen@webkit.org>

        [cssjit] Disable compiling scrollbar pseudoclass selectors
        https://bugs.webkit.org/show_bug.cgi?id=146220

        Reviewed by Benjamin Poulain.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
        Don't compile selectors with scrollbar pseudoclasses.

2015-06-22  Simon Fraser  <simon.fraser@apple.com>

        -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
        https://bugs.webkit.org/show_bug.cgi?id=146218
        rdar://problem/21127840

        Reviewed by Zalan Bujtas.

        The clip path is computed using the RenderLayer's bounding box, so needs to be offset
        by the offsetFromRenderer when set on the mask layer.

        Test: compositing/masks/compositing-clip-path-origin.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

2015-06-22  Michael Catanzaro  <mcatanzaro@igalia.com>

        Web sockets should be treated as active mixed content
        https://bugs.webkit.org/show_bug.cgi?id=140624

        Reviewed by Sam Weinig.

        Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
               http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html

        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
        emit the onerror event after doing so.
        * platform/SchemeRegistry.cpp:
        (WebCore::secureSchemes): Add wss:// to the list of secure schemes.

2015-06-22  Dean Jackson  <dino@apple.com>

        Element with blur backdrop-filter shows edge duplication and dark edges
        https://bugs.webkit.org/show_bug.cgi?id=146215
        <rdar://problem/20367695>

        Reviewed by Tim Horton.

        The input images to backdrop filters should duplicate their edge pixels
        outwards, rather than using transparent pixels. This is a flag we
        set on the Gaussian blur, but means we have to remember if the
        FilterOperations list came from a regular filter or a backdrop filter.

        Test: css3/filters/backdrop/blur-input-bounds.html

        * css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
        that sets the backdrop flag, but is otherwise the same as a normal filter
        convertor.
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
        inputs has it.
        * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
        key on the CAFilter if necessary.
        * platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
        these operations are intended for backdrops.
        (WebCore::FilterOperations::operator=):
        (WebCore::FilterOperations::operator==):
        * platform/graphics/filters/FilterOperations.h:
        (WebCore::FilterOperations::isUsedForBackdropFilters):
        (WebCore::FilterOperations::setUsedForBackdropFilters):

2015-06-22  Tim Horton  <timothy_horton@apple.com>

        [TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
        https://bugs.webkit.org/show_bug.cgi?id=146214
        <rdar://problem/20782970>

        Reviewed by Dean Jackson.

        * page/mac/TextIndicatorWindow.mm:
        (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
        (WebCore::TextIndicatorWindow::setTextIndicator):
        (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
        When the WebView is at a nonintegral position, we can end up needing a TextIndicator
        with a nonintegral position. We need to round the window position, so we need to apply
        the fractional part to the indicator layers inside, not to the window.

2015-06-22  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Arabic text styled with Georgia is rendered as boxes
        https://bugs.webkit.org/show_bug.cgi?id=145681
        <rdar://problem/21169844>

        Reviewed by Darin Adler.

        Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
        TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
        of using TimesNewRomanPSMT, we will simply just use GeezaPro.

        Test: fast/text/arabic-times-new-roman.html

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::FontCache::systemFallbackForCharacters):
        * platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::fontFamilyShouldNotBeUsedForArabic):

2015-06-22  Alex Christensen  <achristensen@webkit.org>

        Unreviewed non-mac debug build fix after r185840.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequest):
        Added enable flag around assertion.

2015-06-20  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Add SPI to reload without content blocking.
        https://bugs.webkit.org/show_bug.cgi?id=146128
        rdar://problem/20351903

        Reviewed by Sam Weinig.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::loadResource):
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequest):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::open):
        * page/Page.h:
        (WebCore::Page::userContentController):
        (WebCore::Page::userContentExtensionsEnabled):
        (WebCore::Page::setUserContentExtensionsEnabled):
        (WebCore::Page::group):
        * page/UserContentController.cpp:
        (WebCore::UserContentController::removeAllUserContentExtensions):
        (WebCore::UserContentController::processContentExtensionRulesForLoad):
        (WebCore::UserContentController::actionsForResourceLoad):
        * page/UserContentController.h:

2015-06-22  Zalan Bujtas  <zalan@apple.com>

        REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
        https://bugs.webkit.org/show_bug.cgi?id=146116
        rdar://problem/20959369

        Reviewed by Brent Fulgham.

        This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.

        When multiple selection roots are present we need to ensure that a RenderObject
        only shows up in one of them.
        RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
        selection and sets the selection range (start/end) on each selection root.
        However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
        based on visible selection and that could end up collecting renderers as selection start/end
        from another selection subtree.
        RenderObject's holds the last selection state (RenderObject::setSelectionState).
        If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
        we can't clean up selections properly when this object gets destroyed.
        One of the roots ends up with a dangling RenderObject pointer.

        Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html

        * rendering/SelectionSubtreeRoot.cpp:
        (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):

2015-06-22  Jeremy Jones  <jeremyj@apple.com>

        Do not exit fullscreen when starting PiP since this is done automatically.
        https://bugs.webkit.org/show_bug.cgi?id=144871

        Reviewed by Darin Adler.

        Since we don't explicitly exit fullscreen, update state in shouldExitFullscreenWithReason()

        * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare shouldExitFullscreenWithReason().
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Forward to WebVideoFullscreenInterfaceAVKit.
        (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Added.
        (WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Remove enter fullscreen code.
        * platform/spi/cocoa/AVKitSPI.h: Add missing enums.

2015-06-22  Daniel Bates  <dabates@apple.com>

        AX: UI Automation cannot find AutoFill or search cancel buttons
        https://bugs.webkit.org/show_bug.cgi?id=145241
        <rdar://problem/21051411>

        Reviewed by Chris Fleizach.

        Add support for hit testing the search cancel button and AutoFill button so that
        they can be accessed by UI Automation.

        Currently the accessibility hit test machinery ignores nodes in a shadow tree.
        So, it neither finds the <input type="search"> cancel button nor the AutoFill button
        when it performs a hit test. Therefore these buttons cannot be accessed using
        UI Automation.

        Tests: accessibility/hit-test-input-auto-fill-button.html
               accessibility/hit-test-input-search-cancel-button.html
               accessibility/input-search-cancel-button.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Added; returns
        the AccessibilityObject for the search cancel button or AutoFill text field decoration as applicable.
        (WebCore::AccessibilityRenderObject::accessibilityHitTest): Check whether the hit node
        is a text field decoration.

2015-06-22  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Streams API] Implement ReadableStream cancel (abstract part)
        https://bugs.webkit.org/show_bug.cgi?id=146111

        Reviewed by Darin Adler.

        This patch implements ReadableStream and ReadableStreamReader cancel.
        The reader delegates cancellation to its stream.

        This patch also ensures that controller.close() will not throw in case cancellation is on-going.

        A follow-up patch will implement the calling of 'cancel' JS callback for JS sources.

        Covered by rebased tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::cancel): Checks whether locked or not before cancelling.
        (WebCore::ReadableStream::cancelNoCheck): Cancel without lock check.
        (WebCore::ReadableStream::notifyCancelSucceeded): Async cancel callback.
        (WebCore::ReadableStream::notifyCancelFailed): Ditto.
        * Modules/streams/ReadableStream.h:
        * Modules/streams/ReadableStream.idl: Cleaned up IDL.
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::cancel):
        * Modules/streams/ReadableStreamReader.h:
        * Modules/streams/ReadableStreamReader.idl: Cleaned up IDL
        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::JSReadableStreamController::close):
        * bindings/js/JSReadableStreamCustom.cpp:
        (WebCore::JSReadableStream::cancel):
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::cancel):
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::doCancel):
        * bindings/js/ReadableJSStream.h:

2015-06-22  Adam Bergkvist  <adam.bergkvist@ericsson.com>

        WebRTC: Navigator.webkitGetUserMedia() requires three arguments
        https://bugs.webkit.org/show_bug.cgi?id=146022

        Reviewed by Eric Carlson.

        Updated custom binding to make the third error callback argument
        mandatory. Updated and unskipped three tests (for the GTK+ port).

        * bindings/js/JSNavigatorCustom.cpp:
        (WebCore::JSNavigator::webkitGetUserMedia):

2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r185818.

        Actually rollout r185320.

        * platform/network/soup/DNSSoup.cpp:
        (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
        (WebCore::DNSResolveQueue::platformResolve):
        (WebCore::gotProxySettingsCallback): Deleted.
        (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.

2015-06-16  Gavin Barraclough  <barraclough@apple.com>

        Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
        https://bugs.webkit.org/show_bug.cgi?id=146198

        Unreviewed rollout.

        * platform/network/DNSResolveQueue.cpp:
        (WebCore::DNSResolveQueue::DNSResolveQueue):
        (WebCore::DNSResolveQueue::isUsingProxy):
        (WebCore::DNSResolveQueue::add):
        (WebCore::DNSResolveQueue::timerFired):
        * platform/network/DNSResolveQueue.h:
        * platform/network/cf/DNSCFNet.cpp:
        (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
        (WebCore::clientCallback):
        (WebCore::DNSResolveQueue::platformResolve):
        (WebCore::proxyIsEnabledInSystemPreferences): Deleted.
        (WebCore::isUsingProxy): Deleted.
        (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
        * platform/network/soup/DNSSoup.cpp:

2015-06-21  Alexey Proskuryakov  <ap@apple.com>

        REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
        https://bugs.webkit.org/show_bug.cgi?id=146121
        rdar://problem/21395180

        Reviewed by Darin Adler.

        Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.

        * platform/mac/Language.mm:
        (WebCore::httpStyleLanguageCode):
        (WebCore::platformUserPreferredLanguages):
        * platform/spi/cf/CFBundleSPI.h:

2015-06-19  Andy Estes  <aestes@apple.com>

        Give Node::didNotifySubtreeInsertions() a better name
        https://bugs.webkit.org/show_bug.cgi?id=146170

        Reviewed by Darin Adler.

        didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.

        This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
        (i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::notifyChildInserted):
        * dom/ContainerNodeAlgorithms.h:
        (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
        (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
        * dom/Element.cpp:
        (WebCore::Element::addShadowRoot):
        * dom/Node.h:
        (WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * dom/ScriptElement.h:
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::insertedInto):
        (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * html/HTMLFrameElementBase.h:
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::insertedInto):
        (WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * html/HTMLScriptElement.h:
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::insertedInto):
        (WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * svg/SVGFEImageElement.h:
        * svg/SVGMPathElement.cpp:
        (WebCore::SVGMPathElement::insertedInto):
        (WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * svg/SVGMPathElement.h:
        * svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::insertedInto):
        (WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * svg/SVGScriptElement.h:
        * svg/SVGTRefElement.cpp:
        (WebCore::SVGTRefElement::insertedInto):
        (WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * svg/SVGTRefElement.h:
        * svg/SVGTextPathElement.cpp:
        (WebCore::SVGTextPathElement::insertedInto):
        (WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * svg/SVGTextPathElement.h:
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::insertedInto):
        (WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
        (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
        * svg/animation/SVGSMILElement.h:

2015-06-21  Philip Chimento  <philip.chimento@gmail.com>

        libwebkit2gtk fails to link without opengl
        https://bugs.webkit.org/show_bug.cgi?id=138332

        Reviewed by Carlos Garcia Campos.

        * CMakeLists.txt: The third-party ANGLE directories need to be
        included even if ENABLE(GRAPHICS_CONTEXT_3D) is false. They must
        be included after the OpenGL headers as the comment says.
        * platform/graphics/texmap/BitmapTexturePool.cpp: Remove
        reference to no longer existent header file.

2015-06-20  Tim Horton  <timothy_horton@apple.com>

        Deselection of text causes a noticeable jump on force touch machines
        https://bugs.webkit.org/show_bug.cgi?id=146173
        <rdar://problem/20992842>

        Reviewed by Sam Weinig.

        When we have a TextIndicator of type Crossfade, we end up putting
        a layer with the blue highlight + text painted into it on top of the
        content, and cross-fading that layer to the yellow-highlighted text.

        This is necessary for BounceAndCrossfade TextIndicators, because the
        blue highlight has to bounce, but is not necessary for Crossfade-only
        ones; we can just fade in the yellow highlight on top of the
        existing blue page highlight, and all is well.

        So, get rid of the Crossfade TextIndicator type and use FadeIn, separately
        keeping track of whether or not we can add a margin (we still can't
        add a margin to TextIndicators that indicate the page's current selection,
        because the blue highlight cannot have the margin applied to it, and we
        want the bounds to match exactly).

        * page/TextIndicator.cpp:
        (WebCore::TextIndicator::createWithRange):
        If the range is the same as the selection, turn off the margin.
        We were previously doing this based on the presentation transition, but now
        there's no difference in presentation transition in this case.

        (WebCore::TextIndicator::createWithSelectionInFrame):
        (WebCore::TextIndicator::wantsBounce):
        (WebCore::TextIndicator::wantsContentCrossfade):
        (WebCore::TextIndicator::wantsFadeIn):
        (WebCore::TextIndicator::wantsManualAnimation):
        * page/TextIndicator.h:
        Get rid of TextIndicatorPresentationTransition::Crossfade.

        (WebCore::TextIndicator::setWantsMargin):
        (WebCore::TextIndicator::wantsMargin):
        Keep track of whether we want a margin.

        * page/mac/TextIndicatorWindow.mm:
        (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
        Determine if we should use a margin based on wantsMargin instead of the
        presentation transition.

2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
        https://bugs.webkit.org/show_bug.cgi?id=146171

        Reviewed by Gyuyoung Kim.

        * platform/efl/EflInspectorUtilities.cpp:
        (WebCore::inspectorResourcePath): Only used WEB_INSPECTOR_DIR which CMake decides properly.

2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix absolute value warning in LocalizedStringsGtk.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145919

        Reviewed by Martin Robinson.

        Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
        warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
        to an int is silly.

        * platform/gtk/LocalizedStringsGtk.cpp:
        (WebCore::localizedMediaTimeDescription):

2015-06-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: Highlight currently edited CSS selector
        https://bugs.webkit.org/show_bug.cgi?id=145658

        Reviewed by Joseph Pecoraro.

        Test: inspector/dom/highlight-multiple-shapes.html

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::buildObjectForHighlightedNode):
        * inspector/InspectorController.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::highlightSelector): Gets a list of all nodes matching a given selector string and highlights each of them.
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::hideHighlight):
        (WebCore::InspectorOverlay::highlightNodeList): Loops through a given NodeList to create highlightObjects for each of them.
        (WebCore::InspectorOverlay::shouldShowOverlay):
        (WebCore::buildObjectForElementData): Don't show flow fragments when highlighting multiple nodes.
        (WebCore::InspectorOverlay::buildHighlightObjectForNode):
        (WebCore::InspectorOverlay::buildObjectForHighlightedNode): Now returns an array containing the highlightObject for each highligthed node.
        (WebCore::InspectorOverlay::drawNodeHighlight): Now sends an array to the InspectorOverlayPage.js to provide support for highlighting multiple nodes.
        * inspector/InspectorOverlay.h:
        * inspector/InspectorOverlayPage.js: Now expects an array as its parameter and loops through it to highlight each node given.
        If the parameter array contains more than one element, do not draw the textbox containing info on that node.
        (drawNodeHighlight):

2015-06-19  Joseph Pecoraro  <pecoraro@apple.com>

        Crash under WebCore::PageConsoleClient::addMessage attempting to log insecure content message in ImageDocument
        https://bugs.webkit.org/show_bug.cgi?id=146096

        Reviewed by Timothy Hatcher.

        Was able to reproduce this using a user stylesheet with an http css font
        on a pdf (ImageDocument) main document loaded over https. Was unable to
        create a reliable test for this scenario.

        * page/PageConsoleClient.cpp:
        (WebCore::getParserLocationForConsoleMessage):
        The scriptableDocumentParser could be null, such as in an ImageDocument.

2015-06-19  Dean Jackson  <dino@apple.com>

        Extremely large canvas crashes on pre-El Capitan machines
        https://bugs.webkit.org/show_bug.cgi?id=146169
        <rdar://problem/21410046>

        Reviewed by Tim Horton.

        On machines before El Capitan, make the maximum canvas size
        8k by 8k.

        Covered by existing tests.

        * html/HTMLCanvasElement.cpp:

2015-06-19  Tim Horton  <timothy_horton@apple.com>

        Selection services cannot be invoked when force click is enabled
        https://bugs.webkit.org/show_bug.cgi?id=146166
        <rdar://problem/21468362>

        Reviewed by Darin Adler.

        * page/mac/ServicesOverlayController.h:
        Turn Highlight::Type into something we can use for dirty flags.

        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::Highlight::createForSelection):
        (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
        (WebCore::ServicesOverlayController::ServicesOverlayController):
        (WebCore::ServicesOverlayController::selectionRectsDidChange):
        (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
        (WebCore::ServicesOverlayController::invalidateHighlightsOfType):
        (WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
        (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
        (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
        (WebCore::ServicesOverlayController::buildSelectionHighlight):
        (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
        (WebCore::ServicesOverlayController::determineActiveHighlight):
        (WebCore::ServicesOverlayController::didScrollFrame):
        (WebCore::ServicesOverlayController::handleClick):
        Coalesce highlight rebuilding so that things (like TextIndicator creation)
        that change the selection and then reset it immediately don't cause us
        to lose the active highlight.

        This also means that if the selection changes multiple times in a runloop
        (easily possible from script), we won't waste a lot of time rebuilding highlights.

        (WebCore::ServicesOverlayController::didRebuildPotentialHighlights):
        Merged into buildPotentialHighlightsIfNeeded.

2015-06-19  Matt Baker  <mattbaker@apple.com>

        Web Inspector: TimelineAgent needs to handle nested runloops
        https://bugs.webkit.org/show_bug.cgi?id=145090

        Reviewed by Joseph Pecoraro.

        Previously nested run loops caused InspectorTimelineAgent to prematurely pop the current run loop record. This
        patch adds a counter to track the run loop nesting level, and rendering frame records are only pushed/popped
        when the nesting level is zero. Run loop entry/exit notifications received while the debugger is paused do not
        affect the nesting level.

        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::internalStart):
        (WebCore::InspectorTimelineAgent::internalStop):
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
        * inspector/InspectorTimelineAgent.h:

2015-06-19  Brent Fulgham  <bfulgham@apple.com>

        Follow-up fix to r185766.
        https://bugs.webkit.org/show_bug.cgi?id=22132

        Reviewed by Zalan Bujtas.

        Suggested by Darin Adler in the bug.

        * platform/graphics/filters/FETile.cpp:
        (WebCore::FETile::platformApplySoftware): Use WTF::move when passing
        the new tileImageCopy RefPtr.

2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>

        [SOUP] Fix return-type-c-linkage warning after r185553
        https://bugs.webkit.org/show_bug.cgi?id=146014

        Reviewed by Martin Robinson.

        * platform/network/soup/WebKitSoupRequestGeneric.cpp:
        (webkitSoupRequestGenericGetRequest): Return a pointer rather than a reference.
        * platform/network/soup/WebKitSoupRequestGeneric.h: webkitSoupRequestGenericGetRequest now
        returns a pointer rather than a reference.

2015-06-19  Dean Jackson  <dino@apple.com>

        Played <audio> looks invisible against the gray background
        https://bugs.webkit.org/show_bug.cgi?id=146164
        <rdar://problem/21014284>

        Reviewed by Brent Fulgham.

        The plus-darker blend mode was not allowing any white to
        show through in the rendering. We don't need this for
        audio controls, where we draw on an opaque grey background.

        * Modules/mediacontrols/mediaControlsiOS.css:
        (audio::-webkit-media-controls-panel): Darken the color of the controls a
        little to make white stand out more.
        (audio::-webkit-media-controls-timeline): Remove the plus-darker blending.
        (video::-webkit-media-controls-timeline): Apply blending only to video.

2015-06-19  Andy Estes  <aestes@apple.com>

        Various assertion failures occur when executing script in the midst of DOM insertion
        https://bugs.webkit.org/show_bug.cgi?id=132482

        Reviewed by Darin Adler.

        Prior to this change, when an element containing a <script> child was inserted into a document, the script was
        executed in ScriptElement::insertedInto(). That script can access nodes that follow it in the newly-inserted
        hierarchy but are not yet fully inserted, leading to at least the following problems:

            - The script could remove a node that is not yet marked as in the document.
            - The script could remove a named <map> that has yet to be added to TreeScope::m_imageMapsByName.
            - The script could remove a form control that has yet to be added to FormController::m_formElementsWithState.

        These scenarios all result in assertion failures. This change ensures that each node in the newly-inserted
        hierarchy is fully inserted before executing any scripts.

        Tests: fast/dom/element-removed-while-inserting-parent-crash.html
               fast/dom/named-map-removed-while-inserting-parent-crash.html
               fast/forms/form-control-removed-while-inserting-parent-crash.html
               svg/dom/element-removed-while-inserting-parent-crash.html

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::shouldNotifySubtreeInsertions): Renamed from insertedInto().
        Returned true in the case where insertedInto() would've called prepareScript().
        (WebCore::ScriptElement::didNotifySubtreeInsertions): Called prepareScript().
        (WebCore::ScriptElement::insertedInto): Renamed to shouldNotifySubtreeInsertions().
        * dom/ScriptElement.h:
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::insertedInto): If shouldNotifySubtreeInsertions() is true, returned InsertionShouldCallDidNotifySubtreeInsertions.
        Otherwise, returned InsertionDone.
        (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
        * html/HTMLScriptElement.h:
        * svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::insertedInto): Did the same as HTMLScriptElement::insertedInto().
        (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
        * svg/SVGScriptElement.h:

2015-06-19  Brent Fulgham  <bfulgham@apple.com>

        All calls of ImageBuffer::create should null check the return value
        https://bugs.webkit.org/show_bug.cgi?id=22132

        Reviewed by Zalan Bujtas.

        ImageBuffer::create returns nullptr for a number of reasons, and should be
        expected to do so. We missed this check in a few places, resulting in
        crashes on some systems. Likewise, ImageBuffer::copyImage may return nullptr
        in normal use and should be checked.

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::drawPattern): Add nullptr check for create and copyImage. Remove
        extra call to 'setImageObserver'.
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::drawPattern): Add nullptr check for copyImage.
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::drawPattern): Add nullptr checks for copyImage.
        * platform/graphics/filters/FETile.cpp:
        (WebCore::FETile::platformApplySoftware): Add nullptr check for copyImage.
        * platform/graphics/filters/FilterEffect.cpp:
        (WebCore::FilterEffect::asImageBuffer): Add nullptr check for create.
        (WebCore::FilterEffect::openCLImageToImageBuffer): Ditto.
        * platform/graphics/texmap/BitmapTexture.cpp:
        (WebCore::BitmapTexture::updateContents): Add nullptr checks for create and copyImage.
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::drawPatternForContainer): Add nullptr check for copyImage.

2015-06-19  Jeremy Jones  <jeremyj@apple.com>

        Get CAContext directly for CALayer instead of walking the layer tree.
        https://bugs.webkit.org/show_bug.cgi?id=146138
        <rdar://problem/21455974>

        Reviewed by Darin Adler.

        This will get the context directly from the CALayer instead of getting all CAContexts, walking the layer tree 
        to the root and comparing that against each CAContext's root layer.

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

2015-06-18  Brent Fulgham  <bfulgham@apple.com>

        [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
        https://bugs.webkit.org/show_bug.cgi?id=145318
        <rdar://problem/21081501>

        Reviewed by Simon Fraser.

        Use the ScrollController in iOS to track the scroll snap point state.
        We do not need the animation implementation or timers since the actual
        animation is handled by UIKit.

        This change lets us communicate the current offset into the scroll snap
        offset vector between the WebProcess and RemoteScrollingTree so that
        both sides stay in sync regardless of whether user gestures or style
        updates have caused us to shift to a different snap point.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Set the
        current horizontal and vertical scroll snap offset indices.
        (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
        * page/scrolling/AsyncScrollingCoordinator.h: Mark the setActiveScrollSnapIndices
        for export so that it can be reached by the UIProcess.
        * page/scrolling/ScrollingCoordinator.h: Keep track of horizontal and
        vertical scroll snap offset indices.
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
        (WebCore::ScrollingStateScrollingNode::setCurrentVerticalSnapPointIndex): Added.
        * page/scrolling/ScrollingStateScrollingNode.h:
        (WebCore::ScrollingStateScrollingNode::currentHorizontalSnapPointIndex): Added.
        (WebCore::ScrollingStateScrollingNode::currentVerticalSnapPointIndex): Added.
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Update the scroll snap
        point offset indices if either has changed.
        * page/scrolling/ScrollingTreeScrollingNode.h:
        (WebCore::ScrollingTreeScrollingNode::currentHorizontalSnapPointIndex): Added.
        (WebCore::ScrollingTreeScrollingNode::currentVerticalSnapPointIndex): Added.
        (WebCore::ScrollingTreeScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
        (WebCore::ScrollingTreeScrollingNode::setCurrentVerticalSnapPointIndex): Added.
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange): New method
        to handle notifications about scroll snap index changes from the UIProcess.
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/ios/ScrollingTreeIOS.cpp:
        (WebCore::ScrollingTreeIOS::currentSnapPointIndicesDidChange): New method
        to handle notifications about scroll snap index changes from the UIProcess.
        * page/scrolling/ios/ScrollingTreeIOS.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Update scroll
        snap point current offset indices if they have changed.
        (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Remove unneeded
        PLATFORM(MAC) macro.
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::ScrollAnimator): We have a ScrollController if we are
        supporting scroll snap points or rubber banding.
        (WebCore::ScrollAnimator::processWheelEventForScrollSnap): This method is not needed
        for iOS builds.
        (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): Enable this on iOS.
        (WebCore::ScrollAnimator::updateScrollSnapState): Renamed from 'updateScrollAnimatorsAndTimers'
        and enabled on iOS.
        (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Deleted.
        * platform/ScrollAnimator.h: Enable some scroll snap methods on iOS.
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::handleWheelEvent): Enable scroll snap index bookkeeping on iOS, too.
        (WebCore::ScrollableArea::updateScrollSnapState): Revise to call 'updateScrollSnapState' instead
        of 'updateScrollAnimatorsAndTimers'.
        * platform/cocoa/ScrollController.h: Enable some methods on iOS. Reorder methods to
        reduce the number of macros needed to do so.
        * platform/cocoa/ScrollController.mm:
        (systemUptime): Only build for Mac.
        (WebCore::ScrollController::ScrollController): Disable rubber band-specific members on iOS.
        (WebCore::ScrollController::handleWheelEvent): Only build this on Mac.
        (WebCore::ScrollController::isRubberBandInProgress): Always return 'false' on iOS.
        (WebCore::ScrollController::startSnapRubberbandTimer): Only build this on Mac.
        (WebCore::ScrollController::shouldRubberBandInHorizontalDirection): Ditto.
        (WebCore::ScrollController::scrollSnapPointState): Enable on iOS.
        (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Only build on Mac.
        (WebCore::ScrollController::updateScrollSnapState): renamed from 'updateScrollAnimatorsAndTimers'
        (WebCore::ScrollController::startScrollSnapTimer): Only build on Mac.
        (WebCore::ScrollController::initializeGlideParameters): Ditto.
        (WebCore::ScrollController::activeScrollSnapIndexForAxis): Enable on iOS.
        (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Ditto.
        (WebCore::ScrollController::beginScrollSnapAnimation): Only build on Mac.
        (WebCore::ScrollController::computeGlideDelta): Ditto.
        (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Deleted.
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Capture any changes in scroll
        snap offset indices.

2015-06-19  Jeremy Jones  <jeremyj@apple.com>

        Fullscreen view should not update bounds of video when in PiP.
        https://bugs.webkit.org/show_bug.cgi?id=146134

        Reviewed by Darin Adler.

        Don't update bounds on video layer when it is not a child.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVVideoLayer setBounds:]):

2015-06-19  Zalan Bujtas  <zalan@apple.com>

        RenderRubyText requires RenderRubyRun parent.
        https://bugs.webkit.org/show_bug.cgi?id=146148
        rdar://problem/21423319

        Reviewed by Simon Fraser.

        RenderRubyText expects its parent to be RenderRubyRun and since a
        a non-block <rt> requires anonymous wrapper, we should check whether
        the display type is actually block.

        Test: fast/ruby/crash-when-ruby-rt-is-non-block.html

        * html/RubyTextElement.cpp:
        (WebCore::RubyTextElement::createElementRenderer):

2015-06-19  Jeremy Jones  <jeremyj@apple.com>

        cancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
        https://bugs.webkit.org/show_bug.cgi?id=146140

        Reviewed by Eric Carlson.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebCALayerHostWrapper dealloc]): Added.
        (-[WebAVVideoLayer dealloc]): Deleted.

2015-06-19  Per Arne Vollan  <peavo@outlook.com>

        [WinCairo] Null pointer crash in BitmapTexture::updateContents.
        https://bugs.webkit.org/show_bug.cgi?id=146147

        Reviewed by Brent Fulgham.

        Added null pointer check.

        * platform/graphics/texmap/BitmapTexture.cpp:
        (WebCore::BitmapTexture::updateContents):

2015-06-19  Anders Carlsson  <andersca@apple.com>

        Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=146124
        rdar://problem/21449395

        Reviewed by Geoffrey Garen.

        * platform/spi/cg/CoreGraphicsSPI.h:

2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>

        Remove unnecessary svn:executable flags
        https://bugs.webkit.org/show_bug.cgi?id=146107

        Reviewed by Alexey Proskuryakov.

        * html/canvas/CanvasRenderingContext2D.cpp: Removed property svn:executable.
        * mathml/MathMLMencloseElement.cpp: Removed property svn:executable.
        * mathml/MathMLMencloseElement.h: Removed property svn:executable.
        * platform/efl/RenderThemeEfl.cpp: Removed property svn:executable.
        * rendering/mathml/RenderMathMLMenclose.cpp: Removed property svn:executable.
        * rendering/mathml/RenderMathMLMenclose.h: Removed property svn:executable.

2015-06-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Bindings generator should generate code to catch exception and reject promises for Promise-based APIs
        https://bugs.webkit.org/show_bug.cgi?id=146060

        Reviewed by Darin Adler.

        The binding generator splits the function that binds JS to the DOM class implementation in two for functions returning promise.
        The first function, called from JS, is responsible of casting this to the expected JSXXX class.
        If casting fails, an exception is raised. Otherwise, it calls the second function.
        After calling the second function, it checks whether an exception is raised, in which case it returns a rejected promise.
        The second function is responsible of argument conversion and calling the DOM class function.

        Covered by expectations and AudioContext promise still working.
        A test case is added for a promise returning function taking a typed argument as input (if argument value cannot be typed, the promise is rejected).
        A second test case is a promise-returning function that can raise an exception. In that case the DOMException is used as rejection value.

        As can be seen from generated code, this generalized code adds a mandatory check (is there an exception?) at the end of the function.
        This check is done even in cases we know there will be no exception.
        This may be covered by another patch if this optimization is thought useful enough.

        * bindings/js/JSDOMPromise.cpp:
        (WebCore::rejectPromiseWithExceptionIfAny): Utility method for the binding code.
        (WebCore::callPromiseFunction): Ditto.
        * bindings/js/JSDOMPromise.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        (GenerateFunctionCastedThis): Extracted from GenerateImplementationFunctionCall to reuse it in case of promise-returning functions.
        (GenerateImplementationFunctionCall):
        (GenerateCallbackImplementation): Deleted.
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
        * bindings/scripts/test/TestObj.idl:

2015-06-18  Jeremy Jones  <jeremyj@apple.com>

        Disable UIWindow for fullscreen video for selected clients.
        https://bugs.webkit.org/show_bug.cgi?id=145852

        Reviewed by Simon Fraser.

        Disable UIWindow for fullscreen video doesn't work everywhere (rdar://problem/21315993), so just disable it when creating a UIWindow won't work.
        Fix some interface hiding and layout problems that showed up in the non UIWindow code path.

        * platform/RuntimeApplicationChecksIOS.h:
        * platform/RuntimeApplicationChecksIOS.mm: Remove iAD bundle identifier.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Opt out of UIWindow when hosted in another process. And fix view parenting for non-window case.
        (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Fix for AVKit exit fullscreen complaining about -needsLayout.

        (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
        (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
        (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
        These hide and show the view controller where we hide and show the window.

2015-06-18  Dean Jackson  <dino@apple.com>

        Provide a way for web developers to draw a Theme-specific Wireless Playback icon
        https://bugs.webkit.org/show_bug.cgi?id=146123
        <rdar://problem/21119287>

        Reviewed by Simon Fraser.

        Implement a -webkit-named-image() CSS <image> generator that allows a site to
        request artwork by name and get the platform variant. At the moment
        we only support "wireless-playback" which returns a generic image everywhere
        but Cocoa platforms, where we render the AirPlay icon.

        In order to do this I added a ThemeCocoa to share any Theme code between
        Mac and iOS.

        Test: fast/css/named-icons.html

        * WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.

        * css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
        (WebCore::CSSImageGeneratorValue::image):
        (WebCore::CSSImageGeneratorValue::isFixedSize):
        (WebCore::CSSImageGeneratorValue::isPending):
        (WebCore::CSSImageGeneratorValue::knownToBeOpaque):

        * css/CSSNamedImageValue.cpp: New class. Just holds a name String.
        (WebCore::CSSNamedImageValue::customCSSText):
        (WebCore::CSSNamedImageValue::image):
        (WebCore::CSSNamedImageValue::equals):
        * css/CSSNamedImageValue.h:
        (WebCore::CSSNamedImageValue::create):
        (WebCore::CSSNamedImageValue::isFixedSize):
        (WebCore::CSSNamedImageValue::isPending):
        (WebCore::CSSNamedImageValue::CSSNamedImageValue):

        * css/CSSParser.cpp:
        (WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
        (WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
        (WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
        * css/CSSParser.h:

        * css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
        (WebCore::CSSValue::equals):
        (WebCore::CSSValue::cssText):
        (WebCore::CSSValue::destroy):
        * css/CSSValue.h:
        (WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.

        * platform/Theme.cpp:
        (WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
        * platform/Theme.h: Add drawNamedImage.

        * platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
        (WebCore::fitContextToBox):
        (WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
        * platform/cocoa/ThemeCocoa.h:

        * platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.

        * platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.

        * platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
        (WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
        (WebCore::NamedImageGeneratedImage::draw):
        (WebCore::NamedImageGeneratedImage::drawPattern):
        * platform/graphics/NamedImageGeneratedImage.h:

        * platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
        * platform/mac/ThemeMac.h: Ditto.

2015-06-18  KyungTae Kim  <ktf.kim@samsung.com> and Myles C. Maxfield  <mmaxfield@apple.com>

        [CSS3] Add support for the word-break:keep-all CSS property
        https://bugs.webkit.org/show_bug.cgi?id=123782

        Reviewed by Darin Adler.

        Add support for word-break:keep-all CSS property by CSS3 spec:
        http://www.w3.org/TR/2013/WD-css-text-3-20131010/#word-break-property

        Test: fast/text/word-break-keep-all.html

        * css/CSSParser.cpp:
        (WebCore::isValidKeywordPropertyAndValue):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator EWordBreak):
        * css/CSSValueKeywords.in:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::computePreferredLogicalWidths):
        * rendering/break_lines.h:
        (WebCore::nextBreakablePositionKeepingAllWords):
        (WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP):
        (WebCore::isBreakable):
        * rendering/line/BreakingContext.h:
        (WebCore::BreakingContext::handleText):
        (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
        * rendering/style/RenderStyleConstants.h:

2015-06-18  Jon Lee  <jonlee@apple.com>

        Update AVKit usage of pip
        https://bugs.webkit.org/show_bug.cgi?id=146095
        <rdar://problem/21386853>

        Reviewed by Eric Carlson.

        - Rename enum VideoFullscreenModeOptimized to VideoFullscreenModePictureInPicture
        - Rename MediaElementSession::allowsAlternateFullscreen to allowsPictureInPicture
        - Rename Settings::allowsAlternateFullscreen to allowsPictureInPictureMediaPlayback
        - Update AVKit calls and AVKitSPI.h
        - Rename WebVideoFullscreenInterfaceAVKit delegate functions and member variables

        * html/HTMLMediaElement.cpp:
        * html/HTMLVideoElement.cpp:
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::allowsPictureInPicture): Renamed.
        (WebCore::MediaElementSession::allowsAlternateFullscreen): Deleted.
        * html/MediaElementSession.h:
        * page/Settings.cpp:
        * page/Settings.in:
        * platform/graphics/MediaPlayerEnums.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove unused setIsOptimized.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        * platform/spi/cocoa/AVKitSPI.h: Remove unused typedef.
        * platform/spi/mac/AVFoundationSPI.h:

2015-06-18  Jeremy Jones  <jeremyj@apple.com>

        Fix crash when entering fullscreen during exit fullscreen animation.
        https://bugs.webkit.org/show_bug.cgi?id=146117

        Reviewed by Simon Fraser.

        Because enterFullscreen can be called during exitFullscreen animation, the exit fullscreen teardown
        should not imply a fullscreen state change on video element.

        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (WebVideoFullscreenControllerContext::exitFullscreen): May be called from mainThread
        (-[WebVideoFullscreenController exitFullscreen]): May be called from mainThread
        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
        (WebVideoFullscreenModelVideoElement::setVideoElement): 
        Changing associated video element does not imply fullscreen mode change.

2015-06-18  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: improve generated types for objects passed to backend commands
        https://bugs.webkit.org/show_bug.cgi?id=146091

        Reviewed by Joseph Pecoraro.

        Update type signatures for backend command implementations. In a few cases, clean
        up relevant helper function signatures and copy data out of parameter objects where
        the code previously held onto a reference.

        No new tests, no behavior changed.

        * inspector/InspectorCSSAgent.cpp:
        (WebCore::computePseudoClassMask):
        (WebCore::InspectorCSSAgent::setStyleText):
        (WebCore::InspectorCSSAgent::setRuleSelector):
        (WebCore::InspectorCSSAgent::forcePseudoState):
        * inspector/InspectorCSSAgent.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::parseColor):
        (WebCore::parseConfigColor):
        (WebCore::parseQuad):
        (WebCore::InspectorDOMAgent::performSearch):
        (WebCore::InspectorDOMAgent::setSearchingForNode):
        (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
        (WebCore::InspectorDOMAgent::setInspectModeEnabled):
        (WebCore::InspectorDOMAgent::highlightRect):
        (WebCore::InspectorDOMAgent::highlightQuad):
        (WebCore::InspectorDOMAgent::innerHighlightQuad):
        (WebCore::InspectorDOMAgent::highlightNode):
        (WebCore::InspectorDOMAgent::highlightFrame):
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
        (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
        (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
        (WebCore::InspectorDOMStorageAgent::findStorageArea):
        * inspector/InspectorDOMStorageAgent.h:
        * inspector/InspectorIndexedDBAgent.cpp:
        (WebCore::InspectorIndexedDBAgent::requestData):
        * inspector/InspectorIndexedDBAgent.h:
        * inspector/InspectorReplayAgent.cpp:
        (WebCore::InspectorReplayAgent::replayToPosition):
        * inspector/InspectorReplayAgent.h:
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::willSendRequest):
        (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
        Clean up extraHTTPHeaders to copy header key/values out of the InspectorObject, rather
        than retaining the protocol object indefinitely. This matches the ownership scheme used
        everywhere else.

        * inspector/InspectorResourceAgent.h:
        * inspector/InspectorStyleSheet.h:
        (WebCore::InspectorCSSId::InspectorCSSId):
        * inspector/InspectorWorkerAgent.cpp:
        (WebCore::InspectorWorkerAgent::sendMessageToWorker):
        * inspector/InspectorWorkerAgent.h:

2015-06-18  Anders Carlsson  <andersca@apple.com>

        Remove shouldInterruptJavaScript
        https://bugs.webkit.org/show_bug.cgi?id=146118

        Reviewed by Antti Koivisto.

        The WebKit SPI methods for deciding whether JavaScript execution should be interrupted hasn't been used
        for many releases. Furthermore, they don't make sense in the multi-process architecture since it's still possible
        to interrupt execution (by closing the browser tab or window) from the UI process.

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::shouldInterruptScript):
        * loader/EmptyClients.h:
        * page/Chrome.cpp:
        (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
        * page/Chrome.h:
        * page/ChromeClient.h:

2015-06-18  Benjamin Poulain  <bpoulain@apple.com>

        [CSS JIT][ARMv7] The pseudo element early exit trashes r6
        https://bugs.webkit.org/show_bug.cgi?id=146078

        Reviewed by Alex Christensen.

        The pseudo element early failure runs before we generate the prologue.
        The reason is that we can often exit immediately on function entry, before
        we even touch any memory.

        On ARMv7, we don't have many spare registers so the MacroAssembler
        uses r6 as a scratch register and the client code is expected to save
        it.

        In the early failure case, we were not pushing r6 before using the MacroAssembler
        and its value could be trashed.

        This patch push the macro assembler registers separately from the prologue.

        For restoring the registers, a new function generateFunctionEnding() encapsulate
        the pop() and ret().

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::pushMacroAssemblerRegisters):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::popMacroAssemblerRegisters):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

        * cssjit/StackAllocator.h:
        (WebCore::StackAllocator::operator=):
        We have a new case for the stack allocator: some stack changes are conditional
        at compile time instead of runtime. This is easy to deal with by overriding
        the stack if a path is not taken at compile time.

2015-06-17  Conrad Shultz  <conrad_shultz@apple.com>

        REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
        https://bugs.webkit.org/show_bug.cgi?id=144399

        Reviewed by Darin Adler.

        Earlier work made the array of web-visible plug-ins dynamic, but allowed DOMPlugin (and, indirectly by extension,
        DOMMimeType) to continue keeping a reference to a plug-in in terms of an index into that array. This superficially
        appeared correct since DOMPlugin immutably holds onto a PluginData instance, which in turn immutably holds onto a
        Page instance. PluginStrategy::getWebVisiblePluginInfo() is passed this Page, which is used to determine the contents
        of the plugin array. The expectation was that keeping an index would still be safe since the Page is not changing,
        but this is not strictly correct since relevant attributes of the Page and/or the available plugins may still change.

        It's not entirely clear why the test failures are intermittent and occur only on certain configurations, but address
        them by eliminating the incorrect storage of indexes in favor of keeping copies of the relevant plugin info itself.

        * plugins/DOMMimeType.cpp:
        (WebCore::DOMMimeType::DOMMimeType):
        Instead of storing the MIME type index, retrieve and store the MIME class info and plugin info.
        (WebCore::DOMMimeType::type):
        Directly access the m_mimeClassInfo member.
        (WebCore::DOMMimeType::suffixes):
        Ditto.
        (WebCore::DOMMimeType::description):
        Ditto.
        (WebCore::DOMMimeType::enabledPlugin):
        Directly access the m_pluginInfo member.
        (WebCore::DOMMimeType::mimeClassInfo): Deleted.

        * plugins/DOMMimeType.h:
        Update member variables.

        * plugins/DOMPlugin.cpp:
        (WebCore::DOMPlugin::DOMPlugin):
        Instead of storing the plugin index, store the plugin info directly.
        (WebCore::DOMPlugin::name):
        Directly access m_pluginInfo.
        (WebCore::DOMPlugin::filename):
        Ditto.
        (WebCore::DOMPlugin::description):
        Ditto.
        (WebCore::DOMPlugin::length):
        Ditto.
        (WebCore::DOMPlugin::item):
        Access m_pluginInfo directly; find the matching plug-in based on matching PluginInfo (for which an overloaded
        comparator is supplied below).
        (WebCore::DOMPlugin::pluginInfo): Deleted.

        * plugins/DOMPlugin.h:
        Update member variables.
        (WebCore::DOMPlugin::create):
        Accept a PluginInfo instead of a plugin index.

        * plugins/DOMPluginArray.cpp:
        (WebCore::DOMPluginArray::item):
        (WebCore::DOMPluginArray::namedItem):

        * plugins/PluginData.h:
        (WebCore::operator==):
        Added; compare PluginInfo structs on the basis of member equality.

2015-06-17  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Log blocked loads to the WebInspector console
        https://bugs.webkit.org/show_bug.cgi?id=146089

        Reviewed by Joseph Pecoraro.

        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
        (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
        Log which URLs are blocked and the URL of the page they are blocked from.

2015-06-18  Joseph Pecoraro  <pecoraro@apple.com>

        Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
        https://bugs.webkit.org/show_bug.cgi?id=146093

        Reviewed by Timothy Hatcher.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
        The console could be null so null check its use.

2015-06-18  Csaba Osztrogonác  <ossy@webkit.org>

        Suppress null-conversion warnings in ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=145125

        Reviewed by Alex Christensen.

        * CMakeLists.txt:

2015-06-18  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [Streams API] Implement ReadableStreamReader.releaseLock
        https://bugs.webkit.org/show_bug.cgi?id=145299

        Reviewed by Darin Adler.

        Covered by rebased tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::close): Moving some close code to newly added releaseReader.
        (WebCore::ReadableStream::releaseReader): Implements reader release and callbacks finalization.
        (WebCore::ReadableStream::changeStateToErrored): Calls releaseReader.
        * Modules/streams/ReadableStream.h:
        (WebCore::ReadableStream::hasReadPendingRequests): Added to enable reader.releaseLock throwing if read requests are pending.
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::releaseLock): Implementation of releaseLock
        * Modules/streams/ReadableStreamReader.h:
        * Modules/streams/ReadableStreamReader.idl:
        (WebCore::releaseLock): Deleted.

2015-06-18  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        GObject and ObjC bindings generator should not generate code for promise-based APIs
        https://bugs.webkit.org/show_bug.cgi?id=146059

        Reviewed by Darin Adler.

        Covered by rebased expectations.

        * bindings/scripts/CodeGeneratorGObject.pm:
        (SkipFunction): Disabling GObject DOM binding for functions returning promises.
        * bindings/scripts/CodeGeneratorObjC.pm:
        (SkipFunction): Disabling ObjC DOM binding for functions returning promises.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
        (webkit_dom_test_obj_get_read_only_long_attr): Deleted.
        (webkit_dom_test_obj_get_read_only_string_attr): Deleted.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
        * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
        * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
        (core): Deleted.

2015-06-17  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
        https://bugs.webkit.org/show_bug.cgi?id=146075

        Reviewed by Carlos Garcia Campos.

        Since r185553, CustomProtocolManager sends StartLoading message to UIProcess
        with request of SoupGenericRequest instead of request itself.
        But, request of SoupGenericRequest is nullptr in EFL port because EFL port
        does not use m_initiatingPageID.

        This patch updates request of SoupGenericRequest although m_initiatingPageID is null.

        * platform/network/soup/ResourceRequestSoup.cpp: 
        (WebCore::ResourceRequest::updateSoupRequest):

2015-06-17  Daniel Bates  <dabates@apple.com>

        Client may receive began editing callback for already focused text field
        https://bugs.webkit.org/show_bug.cgi?id=146074
        <rdar://problem/21293562>

        Reviewed by Darin Adler.

        Fixes an issue where the client would be notified that began editing in a text field
        for each programmatic DOM focus event dispatched at the text field regardless of
        whether the field was focused. The client should only be notified that began editing
        exactly once when a text field becomes focused (either programmatically or by user interaction).

        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::forwardEvent): Move logic to dispatch editing began callback from here...
        (WebCore::TextFieldInputType::handleFocusEvent): to here. This function is called when the
        text field becomes newly focused.
        * html/TextFieldInputType.h:

2015-06-17  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Fail to parse invalid arrays
        https://bugs.webkit.org/show_bug.cgi?id=146079
        rdar://problem/21422649

        Reviewed by Benjamin Poulain.

        Covered by new and corrected API tests.

        * contentextensions/ContentExtensionParser.cpp:
        (WebCore::ContentExtensions::loadTrigger):
        Fail to parse invalid arrays for if-domain, unless-domain, resource-type, and load-type arrays.

2015-06-16  Jon Honeycutt  <jhoneycutt@apple.com>

        Position::findParent() should take a reference
        https://bugs.webkit.org/show_bug.cgi?id=146038

        Reviewed by Darin Adler.

        * dom/Position.cpp:
        (WebCore::Position::containerNode):
        (WebCore::Position::parentAnchoredEquivalent):
        Pass a reference; there is already a null check.
        (WebCore::Position::previous):
        Add a missing null check. Code below this expects that node is non-null.
        (WebCore::Position::next):
        Ditto.
        (WebCore::Position::atStartOfTree):
        (WebCore::Position::atEndOfTree):
        Pass a reference.
        (WebCore::Position::findParent):
        Changed to take a reference.

        * dom/Position.h:
        Ditto.

2015-06-17  Brent Fulgham  <bfulgham@apple.com>

        Overflow regions with scroll snap points are not reliably rubber banding
        https://bugs.webkit.org/show_bug.cgi?id=142522
        <rdar://problem/20100726>

        Reviewed by Darin Adler.

        When computing the target scroll destination, update the nearest snap point index
        and other bookkeeping, but keep the original gesture target if it would have taken
        us beyond either limit of the scroll container.

        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtents): Add new method
        to support client API.
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::scrollExtents): Add new method to support client API.
        * platform/ScrollAnimator.h:
        * platform/cocoa/ScrollController.h:
        (WebCore::ScrollControllerClient::scrollExtents): Added new pure virtual method to API.
        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::beginScrollSnapAnimation): Hold onto original user gesture
        target, and use that instead of our nearest snap point if the gesture takes us past
        either extreme of the scroll container.

2015-06-17  Tim Horton  <timothy_horton@apple.com>

        Swipe gesture can get stuck, preventing scrolling and other gestures
        https://bugs.webkit.org/show_bug.cgi?id=146088
        <rdar://problem/16056087>

        Reviewed by Darin Adler.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/spi/mac/NSEventSPI.h: Added.
        Add an SPI header.

2015-06-16  Matt Rajca  <mrajca@apple.com>

        MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
        https://bugs.webkit.org/show_bug.cgi?id=146028

        Reviewed by Darin Adler.

        * Modules/mediasession/MediaRemoteControls.idl: Added nexttrack/previoustrack event handlers.
        * Modules/mediasession/MediaSession.cpp: Dispatch the nexttrack/previoustrack events.
        (WebCore::MediaSession::skipToNextTrack):
        (WebCore::MediaSession::skipToPreviousTrack):
        * Modules/mediasession/MediaSession.h:
        * Modules/mediasession/MediaSessionManager.cpp: Skip to the next/previous track as described in the media session spec.
        (WebCore::MediaSessionManager::skipToNextTrack):
        (WebCore::MediaSessionManager::skipToPreviousTrack):
        * Modules/mediasession/MediaSessionManager.h:
        * dom/EventNames.h: Added the nexttrack/previoustrack event names.
        * page/Page.cpp: Tell MediaSessionManager to handle the new track-skipping events.
        (WebCore::Page::handleMediaEvent):

2015-06-17  Chris Fleizach  <cfleizach@apple.com>

        AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
        https://bugs.webkit.org/show_bug.cgi?id=146066

        Reviewed by Darin Adler.

        Allow the region role to identify as a landmark type.

        Updated test: platform/ios-simulator/accessibility/landmark-types.html

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

2015-06-17  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
        https://bugs.webkit.org/show_bug.cgi?id=146073
        rdar://problem/21022203

        Reviewed by Tim Horton.

        Text controls (text inputs and textareas) need backing store even when empty, because
        they need to be able to paint a caret.

        Test: compositing/backing/form-controls-backing.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):

2015-06-17  Zalan Bujtas  <zalan@apple.com>

        Selection cache produces invalid result when ancestor has float element.
        https://bugs.webkit.org/show_bug.cgi?id=146042
        rdar://problem/20604592

        Reviewed by Ryosuke Niwa.

        Selection cache already takes floats into account, however it's not enough to check current
        block against floats. Any of the ancestor's float starting from the selection root block
        can impact the selection offsets.

        Test: fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html

        * rendering/LogicalSelectionOffsetCaches.h:
        (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
        (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
        (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block):
        (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache):
        (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads):
        (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):

2015-06-17  Joanmarie Diggs  <jdiggs@igalia.com>

        AX: [ATK] Expose element tag name as an object attribute
        https://bugs.webkit.org/show_bug.cgi?id=146062

        Reviewed by Mario Sanchez Prada.

        Expose the element tag name as an object attribute with name "tag" and
        value being the lowercase tag name, both being what Gecko does for ATK.

        No new tests. We already have sufficient coverage for AtkObject attributes.
        These tests have been updated to reflect the addition of the new attribute.

        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleGetAttributes):

2015-06-17  Antti Koivisto  <antti@apple.com>

        iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
        https://bugs.webkit.org/show_bug.cgi?id=146072
        rdar://problem/21149759

        Reviewed by Simon Fraser

        There are some scenarios where we end up drawing without web lock due to client or system issues.
        This can cause crashes.

        * platform/ios/LegacyTileLayer.mm:
        (-[LegacyTileLayer setNeedsDisplayInRect:]):
        (-[LegacyTileLayer drawInContext:]):

            Ensure we have the web lock when called in main thread (even though we should have it already).

2015-06-17  Brent Fulgham  <bfulgham@apple.com>

        CSS scroll snap: defining snap points on axis that does not scroll does not work properly
        https://bugs.webkit.org/show_bug.cgi?id=146043
        <rdar://problem/20125511>

        Reviewed by Simon Fraser.

        Tested by css3/scroll-snap/scroll-snap-mismatch.html

        We always seed the set of scroll snap points with the start and end of the scroll container. This is not
        the right behavior if there are no scroll points defined, because we end up creating a snap for the start
        and end of the container, and any scroll gesture just takes us across the entire element.
        
        Instead, when we do not find any scroll snap points, we should clear the snap point state for the container.

        * page/scrolling/AxisScrollSnapOffsets.cpp:
        (WebCore::updateFromStyle): If we did not find any snap points (i.e., the snapOffsets container
        only holds '0', return an empty Vector. 
        (WebCore::updateSnapOffsetsForScrollableArea): If the set of snap points produced by 'updateFromStyle' is empty,
        clear the horizontal (or vertical) snap offsets for the scroll area.
        

2015-06-17  Chris Fleizach  <cfleizach@apple.com>

        AX: input role="spinbutton" gets skipped in voiceover
        https://bugs.webkit.org/show_bug.cgi?id=145514

        Reviewed by Mario Sanchez Prada.

        SpinButton role was added, but left out of iOS.
        To prevent this from happening again, explicitly list every role in the switch statement that
        determines accessible visibility.

        Test: platform/ios-simulator/accessibility/spinbutton.html

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

2015-06-17  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableJSStream should handle promises returned by JS source pull callback
        https://bugs.webkit.org/show_bug.cgi?id=145965

        Reviewed by Darin Adler.

        Implemented asynchronous pulling.
        In particular, ensuring that doPull is not called as long as previous call to doPull is finished.
        Storing whether to pull automatically when the current pull is finished. 

        Covered by rebased tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::pull): stores whether to pull again.
        (WebCore::ReadableStream::finishPulling): called when pulling finishes.
        * Modules/streams/ReadableStream.h:
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::createPullResultFulfilledFunction): The promise resolve callback.
        (WebCore::ReadableJSStream::doPull): Handling of promise.
        * bindings/js/ReadableJSStream.h:

2015-06-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        WebProcess crashes after too many redirect error when there's an active NPAPI plugin
        https://bugs.webkit.org/show_bug.cgi?id=146019

        Reviewed by Darin Adler.

        This happens with the GTK+ port after a navigation action ends up
        in an infinite redirection and the ResourceHandle fails with too
        many redirections error. I should actually happen after any error
        is reported by the ResourceHnalder before the load is
        committed. But tt only happens if there's an active NPAPI
        plugin. The problem is that FrameLoader::receivedMainResourceError()
        is called recursively because DocumentLoader::stopLoading() ends up
        calling mainReceivedError() that calls FrameLoader::receivedMainResourceError()
        again. DocumentLoader::stopLoading() checks if the document is
        still loading, which can happen if the main resource is loading,
        if there's any subresource loading or if there's a plugin
        loading. So, in case of being loading, those cases are handled
        individually to cancel the main resource, or set an error in the
        document loader and cancel subresources and plugins, except for
        this case of plugins, that mainReceivedError is called instead of
        setting cancelled error on the document loader.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::stopLoading): If the document is still
        loading because there are active plugins, set the cancelled error
        on the document instead of calling mainReceivedError again.

2015-06-16  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [Streams API] Implement ReadableStream locked property
        https://bugs.webkit.org/show_bug.cgi?id=146023

        Reviewed by Darin Adler.

        Covered by rebased tests.

        * Modules/streams/ReadableStream.h:
        (WebCore::ReadableStream::locked): Renamed isLocked by locked.
        * Modules/streams/ReadableStream.idl: Adding locked.
        * bindings/js/JSReadableStreamCustom.cpp:
        (WebCore::JSReadableStream::getReader): Using isLocked.
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::constructJSReadableStreamReader): Using isLocked.

2015-06-16  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION(r184899): [Cocoa] font-variant: small-caps is not honored with web fonts
        https://bugs.webkit.org/show_bug.cgi?id=145873
        <rdar://problem/21314282>

        Reviewed by Dean Jackson.

        When font-variant: small-caps is applied, we create a smaller version of the original font
        and draw capital characters in that smaller font. CGFontRefs do not have an intrinsic size,
        and web fonts historically only had a CGFontRef, which means that there was no need to
        convert the CGFontRef to be smaller (as opposed to regular fonts, which had a CTFontRef and
        therefore needed the conversion). Instead, we just changed m_size, which represents
        the size that the text should be drawn in.

        However, r184899 gave CTFontRefs to web fonts. This means that now the FontPlatformData's
        m_size variable disagreed with the CTFontRef member. The solution here is to unify the web
        font and regular font codepaths, and treat them the same throughout.

        Note that this patch removes the last use of the m_isCustomFont variable. As soon as we
        entirely migrate to CORETEXT_WEB_FONTS, we should delete this variable.

        Test: fast/text/small-caps-web-font.html

        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::platformCreateScaledFont): Treat web fonts the same as regular fonts.
        * platform/text/TextFlags.h: Add a comment regarding teh deletion of m_isCustomFont.

2015-06-16  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Implement branch compaction for DFA bytecode.
        https://bugs.webkit.org/show_bug.cgi?id=145619

        Reviewed by Benjamin Poulain.

        This patch adds another pass to the DFABytecodeCompiler which finds where the bytecode from each node
        would be if it were compiled with no branch compaction, then uses that as a worst-case value to determine
        how many bytes are needed to store the relative jump distance.  Then when linking, it will fill in the 
        value as it already did, but with a variable size jump.  The jumps are also now signed distances relative to
        where the jump is stored.

        This patch is covered by existing tests, which have many jumps that are near the -128/127 byte boundary,
        and the switch from 16-bit jumps to 32-bit jumps near the -65536/65535 byte boundary is analogous.

        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::compileRuleList):
        * contentextensions/DFABytecode.h:
        (WebCore::ContentExtensions::smallestPossibleJumpSize):
        (WebCore::ContentExtensions::instructionSizeWithArguments):
        * contentextensions/DFABytecodeCompiler.cpp:
        (WebCore::ContentExtensions::append):
        (WebCore::ContentExtensions::appendZeroes):
        (WebCore::ContentExtensions::setBits):
        (WebCore::ContentExtensions::appendActionBytecodeSize):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
        (WebCore::ContentExtensions::DFABytecodeCompiler::longestPossibleJump):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compiledNodeMaxBytecodeSize):
        (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
        (WebCore::ContentExtensions::DFABytecodeCompiler::checkForRangeMaxBytecodeSize):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
        (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
        (WebCore::ContentExtensions::set32Bits): Deleted.
        * contentextensions/DFABytecodeCompiler.h:
        * contentextensions/DFABytecodeInterpreter.cpp:
        (WebCore::ContentExtensions::getBits):
        (WebCore::ContentExtensions::getInstruction):
        (WebCore::ContentExtensions::jumpSizeInBytes):
        (WebCore::ContentExtensions::getJumpSize):
        (WebCore::ContentExtensions::getJumpDistance):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
        * loader/ResourceLoadInfo.h:

2015-06-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
        https://bugs.webkit.org/show_bug.cgi?id=145701

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        When building both targets, we have to include the wayland-egl
        headers in order to build the Wayland target. This causes that
        EGLNativePixmapType and EGLNativeWindowType get defined as
        different types than when building only the X11 target.

        By type casting them to the ones that are expected, we are able
        to build both targets at the same time.

        I have done tests (building each target alone as also both targets
        at the same time), and everything seems to works as expected.

        Once built for both targets, if you try to launch the MiniBrowser
        from inside a Wayland compositor (Weston on top of X for example),
        it will trigger the X11 target if the DISPLAY environment variable
        is set and the environment variable GDK_BACKEND is not set to wayland,
        otherwise it will trigger the Wayland target.

        * platform/graphics/GLContext.cpp:
        (WebCore::GLContext::createContextForWindow): Add type casts. We have
        to consider here two different type casts depending on the type of
        GLNativeWindowType to avoid a build failure on 32-bits platforms.
        The static_cast one was already beeing done as an implicit cast
        (from uint64_t to XID), the reinterpret_cast is the new one that
        we need to do only when building on both platforms.
        * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
        building both targets that is required for defining DefaultRootWindow().
        (WebCore::GLContextEGL::createPixmapContext): Add type cast.

2015-06-15  Jon Honeycutt  <jhoneycutt@apple.com>

        [iOS] Crash long pressing on <input type=file>
        https://bugs.webkit.org/show_bug.cgi?id=146009
        <rdar://problem/21234453>

        Reviewed by Ryosuke Niwa.

        * dom/Position.cpp:
        (WebCore::Position::atStartOfTree):
        (WebCore::Position::atEndOfTree):
        Null check the container node before passing it to findParent().

2015-06-15  Chris Fleizach  <cfleizach@apple.com>

        AX:  iOS accessibility tests are not running because we need WKTR support
        https://bugs.webkit.org/show_bug.cgi?id=145991

        Reviewed by Daniel Bates.

        Make some minor modifications to support notification handling in WKTR.

        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::postPlatformNotification):
        (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
        (-[WebAccessibilityObjectWrapper description]):
        (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
        (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.

2015-06-16  Mark Lam  <mark.lam@apple.com>

        Use NakedPtr<Exception>& to return exception results.
        https://bugs.webkit.org/show_bug.cgi?id=145870

        Reviewed by Anders Carlsson and Filip Pizlo.

        No new WebCore tests because this functionality is already covered by existing tests.
        API tests added for WTF::NakedPtr.

        * bindings/js/JSCallbackData.cpp:
        (WebCore::JSCallbackData::invokeCallback):
        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
        * bindings/js/JSErrorHandler.cpp:
        (WebCore::JSErrorHandler::handleEvent):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * bindings/js/JSMainThreadExecState.cpp:
        (WebCore::JSMainThreadExecState::didLeaveScriptContext):
        (WebCore::functionCallHandlerFromAnyThread):
        (WebCore::evaluateHandlerFromAnyThread):
        * bindings/js/JSMainThreadExecState.h:
        (WebCore::JSMainThreadExecState::currentState):
        (WebCore::JSMainThreadExecState::call):
        (WebCore::JSMainThreadExecState::evaluate):
        * bindings/js/JSMutationCallback.cpp:
        (WebCore::JSMutationCallback::call):
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::executeFunctionInContext):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluateInWorld):
        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):
        (WebCore::WorkerScriptController::setException):
        * bindings/js/WorkerScriptController.h:
        (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::importScripts):

2015-06-16  Brent Fulgham  <bfulgham@apple.com>

        CSS Scroll Snap - support snapping to nested elements
        https://bugs.webkit.org/show_bug.cgi?id=145843
        <rdar://problem/21339581>

        Reviewed by Darin Adler.

        Tested by css3/scroll-snap/nested-elements.html

        The Scroll Snap Point implementation was not properly handling nested elements.
        This could be resolved by recursively calling 'appendChildSnapOffsets', but this
        seemed like an inefficient approach, especially considering how often this method
        is called during various scaling and other operations.
        
        Instead, do the following:
        (1) Add a new HashSet to RenderView that holds a collection of RenderElements that
            have scroll-snap-coordinates.
        (2) During RenderElement::styleWillChange, register all elements that have the
            scroll-snap-coordinates style with the RenderView.
        (3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
            subset of these entries relevant to the current scrolling container, and build up the
            set of scroll-snap-coordinates needed for the current scrolling container.

        * page/scrolling/AxisScrollSnapOffsets.cpp:
        (WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
        for the RenderView to find all elements that are children of the current scrolling container.
        Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
        * rendering/RenderElement.cpp:
        (WebCore::findEnclosingScrollableContainer): New helper function.
        (WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
        defined, remember it for later so we can use it with the relevant scrolling container
        after layout completes.
        (WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
        RenderView.
        (WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
        scrolling container for the current object.
        * rendering/RenderElement.h:
        * rendering/RenderView.cpp:
        (WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
        (WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
        * rendering/RenderView.h:

2015-06-16  Brady Eidson  <beidson@apple.com>

        [IndexedDB] array index keys are concatenated across cursor lifetime
        <rdar://problem/19684902> and https://bugs.webkit.org/show_bug.cgi?id=138504

        Reviewed by Brady Eidson, patch by Mark Dixon <mark@lowla.io>

        Tested by:
        storage/indexeddb/keypath-arrays.html

        IDBKeyData and IDBKeyPath need to clear any existing array values before calling
        decodeObjects to update the value of an existing object.
        
        * Modules/indexeddb/IDBKeyData.cpp:
        (WebCore::IDBKeyData::decode):
        * Modules/indexeddb/IDBKeyPath.cpp:
        (WebCore::IDBKeyPath::decode):

2015-06-16  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Canvas dimensions should be limited to 4096x4096 pixels on iOS devices.
        https://bugs.webkit.org/show_bug.cgi?id=145998

        Reviewed by Darin Adler.

        The value of MaxCanvasArea should depend on the platform. If the platform
        is iOS, the limit should be 64M. Otherwise the limit should be 1G.

        Test: fast/canvas/pattern-too-large-to-create-2.html

        * html/HTMLCanvasElement.cpp: Change MaxCanvasArea value based on the platform. 
        
        * rendering/svg/RenderSVGShape.h:
        (WebCore::RenderSVGShape::graphicsElement): Remove un-implemented constructor.

2015-06-16  Chris Dumez  <cdumez@apple.com>

        REGRESSION(r185012): chat frame in Gmail now says "Something's not right"
        https://bugs.webkit.org/show_bug.cgi?id=146025
        <rdar://problem/21391412>

        Reviewed by Darin Adler.

        Only throttle timers in non-visible iframes once they've reached the
        max nesting level to avoid throttling critical one-shot timers. This is
        consistent with the default DOMTimer throttling behavior that is
        defined in the specification.

        Power-wise, we are mostly interested in DOMTimers that fire frequently
        and cause high CPU usage over an extended period of time anyway.

        * dom/Document.cpp:
        (WebCore::Document::setTimerThrottlingEnabled):
        (WebCore::Document::timerAlignmentInterval):
        * dom/Document.h:
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::timerAlignmentInterval):
        * dom/ScriptExecutionContext.h:
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::alignedFireTime):

2015-06-16  sylvain-galineau  <galineau@adobe.com>

        Incorrect order of arguments in initial-letter property
        https://bugs.webkit.org/show_bug.cgi?id=139667

        Reviewed by Sam Weinig.

        The CSS specification swapped the order of the initial-letters numeric values.
        The drop cap's height now comes first, followed by its optional vertical position.
        See http://www.w3.org/TR/css-inline/#sizing-drop-initials.
         
        No new tests. Existing tests updated.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.

2015-06-16  Alex Christensen  <achristensen@webkit.org>

        Remove some unused values.
        https://bugs.webkit.org/show_bug.cgi?id=145997

        Reviewed by Gyuyoung Kim.

        This patch should have no change in behavior.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::computeBestScrollOffset):
        (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
        (WebCore::AccessibilityObject::scrollToGlobalPoint):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::validateTexFuncData):
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::validateTexFuncData):
        * platform/graphics/StringTruncator.cpp:
        (WebCore::leftTruncateToBuffer):
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::localSelectionRect):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::anchorRect):
        * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
        (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
        * rendering/svg/SVGTextQuery.cpp:
        (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
        Remove unused values.

2015-06-16  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [Streams API] Calling controller.error() should trigger storing an undefined error
        https://bugs.webkit.org/show_bug.cgi?id=145976

        Reviewed by Darin Adler.

        Covered by rebased test.

        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::JSReadableStreamController::error): Storing undefined if no error value passed.
        * bindings/js/ReadableJSStream.cpp: Removed storeError(ExecState*).
        (WebCore::ReadableJSStream::ReadableJSStream):

2015-06-16  Chris Dumez  <cdumez@apple.com>

        Purge StyledElement's presentation attribute cache on memory pressure
        https://bugs.webkit.org/show_bug.cgi?id=145999
        <rdar://problem/21359252>

        Reviewed by Andreas Kling.

        Purge StyledElement's presentation attribute cache on memory pressure.

        * dom/StyledElement.cpp:
        (WebCore::presentationAttributeCache):
        (WebCore::presentationAttributeCacheCleaner):
        (WebCore::StyledElement::clearPresentationAttributeCache):
        * dom/StyledElement.h:
        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):

2015-06-15  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION(r175251, Mavericks Only): Playback may stall
        https://bugs.webkit.org/show_bug.cgi?id=145989
        <rdar://problem/21271919>

        Unreviewed post-review correction.

        Dave Kilzer pointed out that the macro around the waitForVideoOutputMediaDataWillChange
        call was incorrect. This patch corrects this error.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Correct the
        macro definition.

2015-06-15  Chris Fleizach  <cfleizach@apple.com>

        AX: Changing state of radio buttons causes VoiceOver to go busy for a short time.
        https://bugs.webkit.org/show_bug.cgi?id=145933

        Reviewed by Dean Jackson.

        When radio buttons animate the new focus selection state, the thread activity looks a lot like short burst of
        activity to draw, then wait on CoreAnimation to apply those changes.

        Since those periods of activity during animation are so short, VoiceOver is not able to query for all the
        attributes it needs, and gets stuck in the queue behind rendering.

        The fix here is to turn off button state animations while VoiceOver is running.

        * platform/mac/ThemeMac.mm:
        (WebCore::updateStates):

2015-06-15  Zalan Bujtas  <zalan@apple.com>

        RootInlineBox::m_lineBreakObj becomes invalid when a child renderer is removed and the line does not get marked dirty.
        https://bugs.webkit.org/show_bug.cgi?id=145988
        rdar://problem/20959137

        Reviewed by David Hyatt.

        This patch ensures that we find the right first inline box so that we can dirty the
        the appropriate line boxes.
        With marking the right line boxes dirty, now we can update RootInlineBox::m_lineBreakObj at the next layout.

        Test: fast/inline/crash-when-child-renderer-is-removed-and-line-stays-clean.html

        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::culledInlineFirstLineBox):
        (WebCore::RenderInline::culledInlineLastLineBox):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::setLineBreakInfo): Deleted. Remove misleading assert and comment.

2015-06-15  Matt Rajca  <mrajca@apple.com>

        Media Session: Improve the safety of playback toggling
        https://bugs.webkit.org/show_bug.cgi?id=145986

        Reviewed by Darin Adler.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::togglePlayback): Improved the safety of the loop so that we don't re-visit elements that
          may have been deleted underneath us.
        * Modules/mediasession/MediaSession.h: Added a pointer to the set of iterated active participating elements so
          we can remove any elements that are deleted from the underlying "real" set.

2015-06-15  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION(r175251, Mavericks Only): Playback may stall
        https://bugs.webkit.org/show_bug.cgi?id=145989
        <rdar://problem/21271919>

        Reviewed by Dean Jackson.

        Revert r175251 for Mavericks build targets.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

2015-06-15  Darin Adler  <darin@apple.com>

        REGRESSION (r182215): Reproducible crash at drawsvg.org due to reentrant layout
        https://bugs.webkit.org/show_bug.cgi?id=145964

        Reviewed by Simon Fraser.

        Test: svg/as-object/mutate-on-load.html

        * page/FrameView.cpp:
        (WebCore::FrameView::forceLayoutParentViewIfNeeded): Don't do a synchronous layout here,
        because it can lead indirectly to unwanted layout reentrancy. Instead schedule a layout.

2015-06-15  Matt Rajca  <mrajca@apple.com>

        Media Session: Active participating elements can change while being iterated 
        https://bugs.webkit.org/show_bug.cgi?id=145978

        Reviewed by Alex Christensen.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::togglePlayback): Iterate through a copy of m_activeParticipatingElements since its contents
          can be modified in the loop.

2015-06-15  Chris Fleizach  <cfleizach@apple.com>

        AX: no accessibility support for details element
        https://bugs.webkit.org/show_bug.cgi?id=131111

        Reviewed by Darin Adler.

        Add accessibility support for Mac for details element by:
           1) Returning new subroles for <details> and <summary>
           2) Exposing isExpanded property for <details> element.

        Test: platform/mac/accessibility/details-summary.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::supportsARIAPressed):
        (WebCore::AccessibilityObject::supportsExpanded):
        (WebCore::AccessibilityObject::isExpanded):
        (WebCore::AccessibilityObject::supportsARIAExpanded): Deleted.
        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityObject::canvasHasFallbackContent):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
        (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
        (createAccessibilityRoleMap):
        (-[WebAccessibilityObjectWrapper subrole]):
        * html/HTMLDetailsElement.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

2015-06-15  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Limit number of rules.
        https://bugs.webkit.org/show_bug.cgi?id=145663

        Reviewed by Benjamin Poulain.

        Added an API test to make sure that parsing fails when there are too many rules.

        * contentextensions/ContentExtensionError.cpp:
        (WebCore::ContentExtensions::contentExtensionErrorCategory):
        * contentextensions/ContentExtensionError.h:
        * contentextensions/ContentExtensionParser.cpp:
        (WebCore::ContentExtensions::loadEncodedRules):
        Fail to parse a content extension with more than 50000 rules.

2015-06-12  Alexey Proskuryakov  <ap@apple.com>

        -[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
        https://bugs.webkit.org/show_bug.cgi?id=145900

        Reviewed by Sam Weinig.

        * English.lproj/Localizable.strings:

2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Custom URI schemes don't work for requests containing a fragment identifier
        https://bugs.webkit.org/show_bug.cgi?id=145969

        Reviewed by Sergio Villar Senin.

        For URIs like foo:bar#baz, what the custom protocol manager
        receives in the UI process is foo:bar, so the user can't handle fragments.

        * platform/network/soup/ResourceRequestSoup.cpp:
        (WebCore::ResourceRequest::updateSoupRequest): If the SoupRequest
        is a WebKitSoupRequestGeneric, call
        webkitSoupRequestGenericSetRequest with the ResourceRequest.
        * platform/network/soup/WebKitSoupRequestGeneric.cpp:
        (webkitSoupRequestGenericSetRequest):
        (webkitSoupRequestGenericGetRequest):
        * platform/network/soup/WebKitSoupRequestGeneric.h:

2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Move WebKitSoupRequestGeneric to platform layer
        https://bugs.webkit.org/show_bug.cgi?id=145968

        Reviewed by Sergio Villar Senin.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * platform/network/soup/WebKitSoupRequestGeneric.cpp: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp.
        (webkitSoupRequestGenericFinalize):
        (webkit_soup_request_generic_init):
        (webkitSoupRequestGenericSendAsync):
        (webkitSoupRequestGenericSendFinish):
        (webkitSoupRequestGenericGetContentLength):
        (webkitSoupRequestGenericGetContentType):
        (webkit_soup_request_generic_class_init):
        (webkitSoupRequestGenericSetContentLength):
        (webkitSoupRequestGenericSetContentType):
        * platform/network/soup/WebKitSoupRequestGeneric.h: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h.
        * platform/network/soup/WebKitSoupRequestGenericClient.h: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGenericClient.h.

2015-06-13  Chris Dumez  <cdumez@apple.com>

        [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
        https://bugs.webkit.org/show_bug.cgi?id=145948

        Reviewed by Darin Adler.

        API::Navigation objects were leaked on history navigation to
        HistoryItems in PageCache. In such case, we would create 2 Navigation
        objects instead of 1 and the first one would be leaked. The reason
        we create the second one is because we fail to pass along the
        navigationID from the UIProcess to the WebProcess and then back to the
        UIProcess. On the IPC back to the UIProcess, the navigationID ends up
        being 0 so the UIProcess creates a new Navigation object, thinking that
        the load was triggered by the WebContent process.

        We now pass along the navigationID, even if the HistoryItem is in the
        PageCache and we end up reusing the cached DocumentLoader, instead of
        creating a new one. A new updateCachedDocumentLoader() delegate is
        added to the FrameLoaderClient, similarly to the pre-existing
        createDocumentLoader() but for the case where the DocumentLoader gets
        reused.

        * loader/EmptyClients.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        * loader/FrameLoaderClient.h:

2015-06-13  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableJSStream should handle promises returned by JS source start callback
        https://bugs.webkit.org/show_bug.cgi?id=145792

        Reviewed by Darin Adler.

        Covered by rebased tests.

        When calling start callback, the returned value is checked.
        If it is not a promise, we do as if it is a resolved promise.
        If it is a promise, we call its then() method with two resolve/reject JS functions.

        * Modules/streams/ReadableStream.cpp:
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::invoke): Returns a JSPromise* if any is returned by the JS source callback.
        (WebCore::thenPromise): Utility method to call the promise.
        (WebCore::createStartResultFulfilledFunction): The promise resolve callback.
        (WebCore::ReadableJSStream::doStart): Calls thenPromise if a JSPromise* is returned by invoke.
        (WebCore::ReadableJSStream::ReadableJSStream):
        * bindings/js/ReadableJSStream.h:

2015-06-13  Andres Gonzalez  <agonzalez334@nc.rr.com>

        AX: WebKit exposes all Ruby Text as Unknown (Japanese EPUB accessibility blocker)
        https://bugs.webkit.org/show_bug.cgi?id=141303

        Reviewed by Chris Fleizach.

        Test: accessibility/ruby-hierarchy-roles.html

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (createAccessibilityRoleMap):
        (-[WebAccessibilityObjectWrapper subrole]):

2015-06-12  Chris Fleizach  <cfleizach@apple.com>

        AX: iOS: after updating control, VoiceOver speaks aria-expanded states reversed (says "collapsed" when "expanded")
        https://bugs.webkit.org/show_bug.cgi?id=145943

        Reviewed by Darin Adler.

        iOS Accessibility platform needs to be notified of when aria expanded changes.

        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::postPlatformNotification):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper postValueChangedNotification]):
        (-[WebAccessibilityObjectWrapper postExpandedChangedNotification]):
        (-[WebAccessibilityObjectWrapper postScrollStatusChangeNotification]):

2015-06-12  Chris Fleizach  <cfleizach@apple.com>

        AX:ARIA Toggle buttons aren't properly conveyed on iOS using VoiceOver
        https://bugs.webkit.org/show_bug.cgi?id=145949

        Reviewed by Darin Adler.

        Expose pressed state information to the iOS platform AX API.

        Test: Updated inspector-protocol/dom/getAccessibilityPropertiesForNode.html 
              There was a FIXME for this issue in that test: https://bugs.webkit.org/show_bug.cgi?id=129830

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::isPressed):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::classList):
        (WebCore::AccessibilityObject::supportsARIAPressed):
        (WebCore::AccessibilityObject::supportsARIAExpanded):
        * accessibility/AccessibilityObject.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
        (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
        (-[WebAccessibilityObjectWrapper accessibilityIsPressed]):
        (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):

2015-06-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr in JavaScriptCore - 2
        https://bugs.webkit.org/show_bug.cgi?id=145834

        Reviewed by Darin Adler.

        Fix call sites depends on changing of JSC.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getParameter):
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getParameter):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::getUniform):
        (WebCore::WebGLRenderingContextBase::getVertexAttrib):
        (WebCore::WebGLRenderingContextBase::getWebGLFloatArrayParameter):
        (WebCore::WebGLRenderingContextBase::getWebGLIntArrayParameter):

2015-06-12  Zalan Bujtas  <zalan@apple.com>

        Be more defensive at renderer type checking when initializing flow segments.
        https://bugs.webkit.org/show_bug.cgi?id=145942

        Reviewed by Simon Fraser.

        FlowContents::initializeSegments should ignore unsupported renderers so that when we miss
        a simple line layout path invalidation, we don't downcast the unsupported renderer to RenderText.

        I have not reproduced this issue (but related to rdar://problem/21312452)

        * rendering/SimpleLineLayoutFlowContents.cpp:
        (WebCore::SimpleLineLayout::initializeSegments):

2015-06-12  Anders Carlsson  <andersca@apple.com>

        deleteEmptyDirectory should delete .DS_Store files on OS X
        https://bugs.webkit.org/show_bug.cgi?id=145944

        Reviewed by Dan Bernstein.

        deleteEmptyDirectory is often used when clearing website data, so we should
        take extra care to delete empty directories so the user won't think that clearing
        website data didn't do anything because it would leave directories with .DS_Store 
        files behind.

        * platform/mac/FileSystemMac.mm:
        (WebCore::deleteEmptyDirectory):
        * platform/posix/FileSystemPOSIX.cpp:

2015-06-12  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Fix grid-template-areas parsing to avoid spaces
        https://bugs.webkit.org/show_bug.cgi?id=145860

        Reviewed by Sergio Villar Senin.

        The spec doesn't require to have spaces between unnamed and named areas
        in grid-template-areas syntax. But spaces are currently required in our
        code.

        This was confirmed in the CSS WG mailing list:
        https://lists.w3.org/Archives/Public/www-style/2015May/0239.html

        This patch updates grid-template-areas parsing to allow the possibility
        of removing spaces between unnamed and named areas.

        Added new cases to fast/css-grid-layout/grid-template-areas-get-set.html.

        * css/CSSParser.cpp:
        (WebCore::parseGridTemplateAreasColumnNames): New helper method to
        determine the column names split by white spaces or dots.
        (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
        method to get the column names.
        (WebCore::containsOnlyDots): Deleted. Not needed anymore as
        parseGridTemplateAreasColumnNames() is using a single dot for unnamed
        grid areas (despite of being defined with 1 or more dots).

2015-06-12  Eric Carlson  <eric.carlson@apple.com>

        [Mac] AirPlay menu button doesn't always show on page load
        https://bugs.webkit.org/show_bug.cgi?id=145936

        Reviewed by Brent Fulgham.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::mediaProducerStateString): New, return a string representing MediaStateFlags.
        (WebCore::WebMediaSessionManager::clientStateDidChange): Log the states as strings.
        (WebCore::WebMediaSessionManager::toString): New, return a string representing ConfigurationTasks.
        (WebCore::WebMediaSessionManager::scheduleDelayedTask): Add logging.
        (WebCore::WebMediaSessionManager::taskTimerFired): Add logging.
        * Modules/mediasession/WebMediaSessionManager.h:

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Override wirelessVideoPlaybackDisabled
          so it is possible to activate route monitoring for a movie loaded with this engine.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Ditto.

2015-06-12  Zan Dobersek  <zdobersek@igalia.com>

        Add the remaining missing override specifiers under Source/WebCore/
        https://bugs.webkit.org/show_bug.cgi?id=145907

        Reviewed by Darin Adler.

        Fix the remaining compiler warnings about missing override specifiers
        for overriding method declarations in classes under Source/WebCore/.

        Where the addition had to be performed on all virtual methods of the
        class, the virtual specifier was removed so now only the override
        specifier is in use.

        * Modules/indexeddb/IDBOpenDBRequest.h:
        * Modules/indexeddb/IDBRequest.h:
        * Modules/webdatabase/DatabaseServer.h:
        * bindings/js/ReadableJSStream.h:
        * editing/InsertTextCommand.h:
        * mathml/MathMLInlineContainerElement.h:
        * platform/audio/EqualPowerPanner.h:
        (WebCore::EqualPowerPanner::reset):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::NullMediaPlayerPrivate::load):
        (WebCore::NullMediaPlayerPrivate::cancelLoad):
        (WebCore::NullMediaPlayerPrivate::prepareToPlay):
        (WebCore::NullMediaPlayerPrivate::play):
        (WebCore::NullMediaPlayerPrivate::pause):
        (WebCore::NullMediaPlayerPrivate::platformMedia):
        (WebCore::NullMediaPlayerPrivate::platformLayer):
        (WebCore::NullMediaPlayerPrivate::naturalSize):
        (WebCore::NullMediaPlayerPrivate::hasVideo):
        (WebCore::NullMediaPlayerPrivate::hasAudio):
        (WebCore::NullMediaPlayerPrivate::setVisible):
        (WebCore::NullMediaPlayerPrivate::durationDouble):
        (WebCore::NullMediaPlayerPrivate::currentTimeDouble):
        (WebCore::NullMediaPlayerPrivate::seekDouble):
        (WebCore::NullMediaPlayerPrivate::seeking):
        (WebCore::NullMediaPlayerPrivate::setRateDouble):
        (WebCore::NullMediaPlayerPrivate::setPreservesPitch):
        (WebCore::NullMediaPlayerPrivate::paused):
        (WebCore::NullMediaPlayerPrivate::setVolumeDouble):
        (WebCore::NullMediaPlayerPrivate::supportsMuting):
        (WebCore::NullMediaPlayerPrivate::setMuted):
        (WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
        (WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
        (WebCore::NullMediaPlayerPrivate::networkState):
        (WebCore::NullMediaPlayerPrivate::readyState):
        (WebCore::NullMediaPlayerPrivate::maxTimeSeekableDouble):
        (WebCore::NullMediaPlayerPrivate::minTimeSeekable):
        (WebCore::NullMediaPlayerPrivate::buffered):
        (WebCore::NullMediaPlayerPrivate::totalBytes):
        (WebCore::NullMediaPlayerPrivate::didLoadingProgress):
        (WebCore::NullMediaPlayerPrivate::setSize):
        (WebCore::NullMediaPlayerPrivate::canLoadPoster):
        (WebCore::NullMediaPlayerPrivate::setPoster):
        (WebCore::NullMediaPlayerPrivate::hasSingleSecurityOrigin):
        * platform/graphics/filters/DistantLightSource.h:
        * platform/graphics/filters/FEComposite.h:
        * platform/graphics/filters/FEDisplacementMap.h:
        (WebCore::FEDisplacementMap::determineAbsolutePaintRect):
        * platform/graphics/filters/FEFlood.h:
        (WebCore::FEFlood::determineAbsolutePaintRect):
        * platform/graphics/filters/PointLightSource.h:
        * platform/graphics/filters/SpotLightSource.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
        (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
        (WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider):
        (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
        (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
        (WebCore::MediaPlayerPrivateGStreamer::totalVideoFrames):
        (WebCore::MediaPlayerPrivateGStreamer::droppedVideoFrames):
        (WebCore::MediaPlayerPrivateGStreamer::corruptedVideoFrames):
        (WebCore::MediaPlayerPrivateGStreamer::totalFrameDelay):
        * platform/graphics/texmap/BitmapTextureGL.h:
        (WebCore::BitmapTextureGL::isBackedByOpenGL):
        * platform/graphics/transforms/Matrix3DTransformOperation.h:
        * platform/graphics/transforms/MatrixTransformOperation.h:
        * platform/graphics/transforms/PerspectiveTransformOperation.h:
        * platform/graphics/transforms/RotateTransformOperation.h:
        * platform/graphics/transforms/ScaleTransformOperation.h:
        * platform/graphics/transforms/SkewTransformOperation.h:
        * platform/image-decoders/png/PNGImageDecoder.h:
        (WebCore::PNGImageDecoder::filenameExtension):
        * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
        * platform/mock/MockRealtimeMediaSourceCenter.h:

2015-06-12  Commit Queue  <commit-queue@webkit.org>

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

        Many asserts on layout tests and on API tests (Requested by
        ap_ on #webkit).

        Reverted changeset:

        "Use modern for-loops in WebCore/rendering - 1"
        https://bugs.webkit.org/show_bug.cgi?id=145831
        http://trac.webkit.org/changeset/185512

2015-06-12  Simon Fraser  <simon.fraser@apple.com>

        OpenGLESSPI.h doesn't need to include UIKit.h
        https://bugs.webkit.org/show_bug.cgi?id=145931

        Reviewed by Darin Adler.

        No need to suck in all of UIKit from OpenGLESSPI.h.

        * platform/spi/ios/OpenGLESSPI.h:

2015-06-12  Matt Rajca  <mrajca@apple.com>

        Add barebones implementation of media session invocation algorithm.
        https://bugs.webkit.org/show_bug.cgi?id=145847

        Reviewed by Darin Adler.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::invoke): Move the media session to an active state.
        * Modules/mediasession/MediaSession.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::playInternal): Call the media session invocation algorithm as described in the
          Media Session spec.

2015-06-12  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/rendering - 1
        https://bugs.webkit.org/show_bug.cgi?id=145831

        Reviewed by Darin Adler.

        No new tests because there is no behavior change.

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
        (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
        * rendering/FilterEffectRenderer.cpp:
        (WebCore::FilterEffectRenderer::build):
        (WebCore::FilterEffectRenderer::clearIntermediateResults):
        * rendering/FilterEffectRenderer.h:
        * rendering/FloatingObjects.cpp:
        (WebCore::FloatingObjects::clearLineBoxTreePointers):
        (WebCore::FloatingObjects::moveAllToFloatInfoMap):
        (WebCore::FloatingObjects::computePlacedFloatsTree):
        * rendering/FlowThreadController.cpp:
        (WebCore::FlowThreadController::collectFixedPositionedLayers):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::append):
        * rendering/ImageQualityController.cpp:
        (WebCore::ImageQualityController::highQualityRepaintTimerFired):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):
        * rendering/RenderBlock.cpp:
        (WebCore::removeBlockFromDescendantAndContainerMaps):
        (WebCore::RenderBlock::addOverflowFromPositionedObjects):
        (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
        (WebCore::RenderBlock::simplifiedNormalFlowLayout):
        (WebCore::RenderBlock::layoutPositionedObjects):
        (WebCore::RenderBlock::markPositionedObjectsForLayout):
        (WebCore::RenderBlock::paintContinuationOutlines):
        (WebCore::clipOutPositionedObjects):
        (WebCore::RenderBlock::removeFromTrackedRendererMaps):
        (WebCore::RenderBlock::removePositionedObjects):
        (WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
        (WebCore::RenderBlockFlow::styleDidChange):
        (WebCore::RenderBlockFlow::moveFloatsTo):
        (WebCore::RenderBlockFlow::addOverflowFromFloats):
        (WebCore::RenderBlockFlow::repaintOverhangingFloats):
        (WebCore::RenderBlockFlow::paintFloats):
        (WebCore::RenderBlockFlow::clipOutFloatingObjects):
        (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
        (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
        (WebCore::RenderBlockFlow::addOverhangingFloats):
        (WebCore::RenderBlockFlow::addIntrudingFloats):
        (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
        (WebCore::RenderBlockFlow::adjustForBorderFit):
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::setLogicalWidthForTextRun):
        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
        (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
        (WebCore::RenderBlockFlow::repaintDirtyFloats):
        (WebCore::RenderBlockFlow::layoutLineBoxes):
        (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
        (WebCore::RenderBlockFlow::determineStartPosition):
        (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
        * rendering/RenderCounter.cpp:
        (WebCore::RenderCounter::destroyCounterNodes):
        (WebCore::updateCounters):
        (WebCore::RenderCounter::rendererStyleChanged):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
        (WebCore::RenderFlexibleBox::freezeViolations):
        (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
        (WebCore::RenderFlexibleBox::numberOfInFlowPositionedChildren):
        (WebCore::RenderFlexibleBox::layoutColumnReverse):
        (WebCore::RenderFlexibleBox::alignFlexLines):
        (WebCore::RenderFlexibleBox::alignChildren):
        (WebCore::RenderFlexibleBox::flipForWrapReverse):
        * rendering/RenderFlowThread.cpp:
        (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::addAnnotatedRegions):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
        (WebCore::RenderLayer::updateDescendantDependentFlags):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::descendantLayerPaintsIntoAncestor):
        (WebCore::RenderLayerBacking::startAnimation):
        * rendering/RenderLineBoxList.cpp:
        (WebCore::RenderLineBoxList::paint):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::updateFromElement):
        * rendering/RenderMenuList.cpp:
        (WebCore::selectedOptionCount):
        (RenderMenuList::updateOptionsWidth):
        * rendering/RenderMultiColumnSet.cpp:
        (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):

2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>

        Fix unused private field warning in ResourceHandleSoup.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145910

        Reviewed by Darin Adler.

        * platform/network/soup/ResourceHandleSoup.cpp:

2015-06-12  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: CRASH trying to inspect text that was removed/replaced
        https://bugs.webkit.org/show_bug.cgi?id=145898

        Reviewed by Darin Adler.

        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::inspect):
        (WebCore::InspectorDOMAgent::focusNode):
        Ensure we only cause focusNode with a node to focus. If the original
        node that was provided is no longer in the document, then we won't
        actually find a node to inspect.

2015-06-12  KwangHyuk Kim  <hyuki.kim@samsung.com>

        [EFL] canvas/philip/tests/toDataURL.jpeg.foo tests have been failed since r185417.
        https://bugs.webkit.org/show_bug.cgi?id=145878

        Reviewed by Gyuyoung Kim.

        Fix input buffer alignment issue.

        No new tests, canvas/philip/tests/toDataURL.jpeg.foo can be used.

        * platform/graphics/efl/ImageBufferEfl.cpp:
        (WebCore::encodeImagePNG):
        (WebCore::encodeImageJPEG):
        (WebCore::ImageBuffer::toDataURL):

2015-06-12  Zan Dobersek  <zdobersek@igalia.com>

        Add missing override specifiers under Source/WebCore/svg/
        https://bugs.webkit.org/show_bug.cgi?id=145841

        Reviewed by Darin Adler.

        Add missing override specifiers to virtual method overrides for classes
        under Source/WebCore/svg/, suppressing a bunch of warnings when compiling
        with Clang 3.6.

        Add the BEGIN_DECLARE_ANIMATED_PROPERTIES_BASE() macro that doesn't
        override the localAttributeToPropertyMap() method declaration, and
        have the BEGIN_DECLARE_ANIMATED_PROPERTIES() macro add the override
        specifier. The new macro is used in SVGElement.

        Change the DECLARE_ANIMATED_PROPERTY() to accept the optional override
        specifier as the fifth parameter. Current DECLARE_ANIMATED_*() macros
        are modified to just pass an empty argument, not adding any specifier.
        DECLARE_ANIMATED_BOOLEAN_OVERRIDE() and DECLARE_ANIMATED_STRING_OVERRIDE()
        macros are added to override the methods for the externalResourcesRequired
        and href animated properties, where required.

        * svg/SVGAElement.h:
        * svg/SVGAltGlyphElement.h:
        * svg/SVGAnimatedAngle.h:
        * svg/SVGAnimatedBoolean.h:
        * svg/SVGAnimatedEnumeration.h:
        * svg/SVGAnimatedInteger.h:
        * svg/SVGAnimatedLength.h:
        * svg/SVGAnimatedNumber.h:
        * svg/SVGAnimatedPreserveAspectRatio.h:
        * svg/SVGAnimatedRect.h:
        * svg/SVGAnimatedString.h:
        * svg/SVGAnimationElement.h:
        * svg/SVGCircleElement.h:
        * svg/SVGClipPathElement.h:
        * svg/SVGCursorElement.h:
        * svg/SVGDefsElement.h:
        * svg/SVGElement.h:
        * svg/SVGEllipseElement.h:
        * svg/SVGFEImageElement.h:
        * svg/SVGFilterElement.h:
        * svg/SVGFontElement.h:
        * svg/SVGForeignObjectElement.h:
        * svg/SVGGElement.h:
        * svg/SVGGlyphRefElement.h:
        * svg/SVGGradientElement.h:
        * svg/SVGImageElement.h:
        * svg/SVGLineElement.h:
        * svg/SVGMPathElement.h:
        * svg/SVGMarkerElement.h:
        * svg/SVGMaskElement.h:
        * svg/SVGPathElement.h:
        * svg/SVGPatternElement.h:
        * svg/SVGPolyElement.h:
        * svg/SVGRectElement.h:
        * svg/SVGSVGElement.h:
        * svg/SVGScriptElement.h:
        * svg/SVGSwitchElement.h:
        * svg/SVGSymbolElement.h:
        * svg/SVGTRefElement.h:
        * svg/SVGTextContentElement.h:
        * svg/SVGTextPathElement.h:
        * svg/SVGURIReference.h: Add the hrefBaseValue() pure virtual method
        so it can be overridden by any class that also overrides the
        corresponding setHrefBaseValue() method.
        * svg/SVGUseElement.h:
        * svg/SVGViewElement.h:
        * svg/properties/SVGAnimatedPropertyMacros.h:
        * svg/properties/SVGMatrixTearOff.h:
        (WebCore::SVGMatrixTearOff::commitChange):

2015-06-12  Zan Dobersek  <zdobersek@igalia.com>

        [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
        https://bugs.webkit.org/show_bug.cgi?id=145799

        Reviewed by Carlos Garcia Campos.

        Update header inclusions for headers that have been moved
        to Source/WTF/wtf/glib/.

        * accessibility/atk/AXObjectCacheAtk.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        * bindings/gobject/DOMObjectCache.cpp:
        * bindings/gobject/GObjectEventListener.h:
        * bindings/gobject/GObjectNodeFilterCondition.h:
        * bindings/gobject/GObjectXPathNSResolver.h:
        * bindings/gobject/WebKitDOMEventTarget.cpp:
        * platform/Pasteboard.h:
        * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
        * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
        * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
        * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
        * platform/audio/gtk/AudioBusGtk.cpp:
        * platform/geoclue/GeolocationProviderGeoclue.h:
        * platform/geoclue/GeolocationProviderGeoclue2.cpp:
        * platform/glib/BatteryProviderUPower.cpp:
        * platform/glib/BatteryProviderUPower.h:
        * platform/graphics/gstreamer/GRefPtrGStreamer.h:
        * platform/graphics/gstreamer/GStreamerUtilities.cpp:
        * platform/graphics/gstreamer/GUniquePtrGStreamer.h:
        * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
        * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        * platform/graphics/gtk/ImageBufferGtk.cpp:
        * platform/graphics/gtk/ImageGtk.cpp:
        * platform/gtk/ContextMenuGtk.cpp:
        * platform/gtk/ContextMenuItemGtk.cpp:
        * platform/gtk/DataObjectGtk.cpp:
        * platform/gtk/DataObjectGtk.h:
        * platform/gtk/FileSystemGtk.cpp:
        * platform/gtk/GRefPtrGtk.h:
        * platform/gtk/GUniquePtrGtk.h:
        * platform/gtk/GamepadsGtk.cpp:
        * platform/gtk/GtkUtilities.cpp:
        * platform/gtk/LanguageGtk.cpp:
        * platform/gtk/LocalizedStringsGtk.cpp:
        * platform/gtk/PasteboardHelper.cpp:
        * platform/gtk/ScrollbarThemeGtk.cpp:
        * platform/gtk/SharedBufferGtk.cpp:
        * platform/gtk/SharedTimerGtk.cpp:
        * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
        * platform/network/ResourceHandleInternal.h:
        * platform/network/gtk/CredentialBackingStore.cpp:
        * platform/network/soup/CertificateInfo.h:
        * platform/network/soup/CookieJarSoup.cpp:
        * platform/network/soup/DNSSoup.cpp:
        * platform/network/soup/GRefPtrSoup.h:
        * platform/network/soup/GUniquePtrSoup.h:
        * platform/network/soup/ResourceError.h:
        * platform/network/soup/ResourceErrorSoup.cpp:
        * platform/network/soup/ResourceHandleSoup.cpp:
        * platform/network/soup/ResourceResponse.h:
        * platform/network/soup/SocketStreamHandle.h:
        * platform/network/soup/SocketStreamHandleSoup.cpp:
        * platform/network/soup/SoupNetworkSession.h:
        * platform/text/gtk/HyphenationLibHyphen.cpp:
        * rendering/RenderThemeGtk.cpp:

2015-06-12  Yoav Weiss  <yoav@yoav.ws>

        Fix the build when the PICTURE_SIZES flag is off
        https://bugs.webkit.org/show_bug.cgi?id=145926

        Reviewed by Csaba Osztrogonác.

        No new tests since there's no functionality change.

        * html/parser/HTMLPreloadScanner.cpp: Remove the guard around the definition of m_sizesAttribute.

2015-06-12  Commit Queue  <commit-queue@webkit.org>

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

        Causes crashes on debug (Requested by rego on #webkit).

        Reverted changeset:

        "[CSS Grid Layout] Fix grid-template-areas parsing to avoid
        spaces"
        https://bugs.webkit.org/show_bug.cgi?id=145860
        http://trac.webkit.org/changeset/185492

2015-06-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Bindings generator should generate code for Promise-based APIs
        https://bugs.webkit.org/show_bug.cgi?id=145833

        Reviewed by Darin Adler.

        Covered by existing tests.

        * Modules/webaudio/AudioContext.idl: Removing custom binding for resume, suspend and close.
        * bindings/js/JSAudioContextCustom.cpp: Ditto.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader): Refactoring to use IsReturningPromise.
        (GenerateImplementation): Disabling include for return type if it is a promise.
        (GenerateParametersCheck): Adding DeferredWrapper() as argument to the DOM method if JS method returns a promise.
        (GenerateImplementationFunctionCall): Added support for promise-returning API.
        (IsReturningPromise): Checking whether function is returning a promise.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
        (webkit_dom_test_obj_test_promise_function):
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
        * bindings/scripts/test/ObjC/DOMTestObj.h:
        * bindings/scripts/test/ObjC/DOMTestObj.mm:
        (-[DOMTestObj testPromiseFunction]):
        * bindings/scripts/test/TestObj.idl: Adding promise returning function.


2015-06-12  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Fix grid-template-areas parsing to avoid spaces
        https://bugs.webkit.org/show_bug.cgi?id=145860

        Reviewed by Sergio Villar Senin.

        The spec doesn't require to have spaces between unnamed and named areas
        in grid-template-areas syntax. But spaces are currently required in our
        code.

        This was confirmed in the CSS WG mailing list:
        https://lists.w3.org/Archives/Public/www-style/2015May/0239.html

        This patch updates grid-template-areas parsing to allow the possibility
        of removing spaces between unnamed and named areas.

        Added new cases to fast/css-grid-layout/grid-template-areas-get-set.html.

        * css/CSSParser.cpp:
        (WebCore::parseGridTemplateAreasColumnNames): New helper method to
        determine the column names split by white spaces or dots.
        (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
        method to get the column names.
        (WebCore::containsOnlyDots): Deleted. Not needed anymore as
        parseGridTemplateAreasColumnNames() is using a single dot for unnamed
        grid areas (despite of being defined with 1 or more dots).

2015-06-11  Mark Lam  <mark.lam@apple.com>

        WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects.
        https://bugs.webkit.org/show_bug.cgi?id=145872

        Reviewed by Michael Saboff.

        API test added: WebKit1.ReportExceptionTest.

        * bindings/js/JSDOMBinding.cpp:
        (WebCore::reportException):
        - Added a version of reportException() that takes a JSValue instead of an Exception
          object.  This version will ensure that we have an Exception object before calling
          into the original reportException() as follows:

          1. If the JSValue is already an Exception object, we're good to go.

          2. Else, if VM::lastException() is available, use that as the exception.
             This is how the old code use to behave (in terms of where it gets the exception
             stack trace).  The assumption is that reportException() will be called in
             a timely manner before the exception stack trace has been purged.

          3. Else, create an Exception object with no stack trace.  This is the fall back
             in case the client did not call reportException() in a timely manner.

        - Also clear the last exception after we've reported it.  This is how the old code
          before r185259 behave (in terms of the lifecycle of the last exception stack
          trace).  We're restoring that behavior here.

        * bindings/js/JSDOMBinding.h:

2015-06-11  Zalan Bujtas  <zalan@apple.com>

        Do not crash when the descendant frame tree is destroyed during layout.
        https://bugs.webkit.org/show_bug.cgi?id=144540
        rdar://problem/20793184

        Reviewed by Andreas Kling.

        Widget::setFrameRect(), through WebHTMLView layout, could trigger a style recalc, which in turn
        could initiate an onBeforeLoad callback.
        If javascript happens to destroy the current iframe in the onBeforeLoad callback, we lose the descendant
        render tree, including the child FrameView (the iframe element's view). However the RenderIFrame
        object stays protected until after the layout is done. (see protectRenderWidgetUntilLayoutIsDone())

        Climbing back on the callstack, we need to make sure that
        1. the root widget of the descendant render tree (FrameView) stays valid as long as it is needed.
        2. RenderFrameBase::layoutWithFlattening() can handle the case when the associated widget (child FrameView) is set to nullptr.
        (see RenderWidget::willBeDestroyed() -> setWidget(nullptr))

        (and later, when layout is finished this (RenderIFrame) object gets destroyed too.)

        Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.

        * page/FrameView.cpp:
        (WebCore::FrameView::setFrameRect):
        (WebCore::FrameView::updateEmbeddedObject):
        (WebCore::FrameView::updateWidgetPositions):
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setFrameRect):
        * platform/mac/WidgetMac.mm:
        (WebCore::Widget::setFrameRect):
        * rendering/RenderFrameBase.cpp:
        (WebCore::RenderFrameBase::layoutWithFlattening):
        (WebCore::RenderFrameBase::childRenderView):
        (WebCore::RenderFrameBase::peformLayoutWithFlattening):
        * rendering/RenderFrameBase.h:
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::updateWidgetPosition):
        * rendering/RenderWidget.h:

2015-06-11  Commit Queue  <commit-queue@webkit.org>

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

        Caused ASan violations (Requested by ap on #webkit).

        Reverted changeset:

        "Add an appearance keyword for wireless playback / airplay
        icon"
        https://bugs.webkit.org/show_bug.cgi?id=145892
        http://trac.webkit.org/changeset/185470

2015-06-11  Brady Eidson  <beidson@apple.com>

        IndexedDB onupgradeneeded event has incorrect value for oldVersion.
        <rdar://problem/18309792> and https://bugs.webkit.org/show_bug.cgi?id=136888

        Reviewed by Sam Weinig.

        Test: storage/indexeddb/version-change-event-basic.html

        "NoIntVersion" is an internal bookkeeping concept that we never should've been passing to Javascript.
        
        This cleans up things by:
        - Adjusting an old version of "NoIntVersion" to "0" before making the version change callback.
        - Removing the VersionNullness parameter from almost everywhere.
        - Removing the nullability of the newVersion parameter from the IDL.

        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::onVersionChange):
        * Modules/indexeddb/IDBDatabase.h:
        
        * Modules/indexeddb/IDBDatabaseBackend.cpp:
        (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
        (WebCore::IDBDatabaseBackend::deleteDatabase):
        
        * Modules/indexeddb/IDBDatabaseCallbacks.h:
        * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
        (WebCore::IDBDatabaseCallbacksImpl::onVersionChange):
        * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
        
        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        (WebCore::IDBOpenDBRequest::onBlocked):
        (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
        
        * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
        (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
        
        * Modules/indexeddb/IDBVersionChangeEvent.cpp:
        (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
        * Modules/indexeddb/IDBVersionChangeEvent.h:
        (WebCore::IDBVersionChangeEvent::create):
        (WebCore::IDBVersionChangeEvent::newVersion):
        * Modules/indexeddb/IDBVersionChangeEvent.idl:

2015-06-11  Matt Rajca  <mrajca@apple.com>

        Media Session: Add plumbing for media control event delivery.
        https://bugs.webkit.org/show_bug.cgi?id=145859

        Reviewed by Anders Carlsson.

        * Modules/mediasession/MediaEventTypes.h: Added.
        * WebCore.xcodeproj/project.pbxproj:
        * page/Page.cpp:
        (WebCore::Page::handleMediaEvent): Toggle media playback upon receiving the PlayPause event as described in the spec.
        * page/Page.h:

2015-06-11  Jon Lee  <jonlee@apple.com>

        Update media controls JS and CSS to use picture-in-picture
        https://bugs.webkit.org/show_bug.cgi?id=145827
        <rdar://problem/21311576>

        Reviewed by Dean Jackson.

        * English.lproj/mediaControlsLocalizedStrings.js: Update localized strings.
        Add a string for the placeholder text, and for the aria-label of the
        placard.

        * Modules/mediacontrols/MediaControlsHost.idl: Remove uncalled functions.
        * Modules/mediacontrols/MediaControlsHost.h: Also remove optimizedFullscreenSupported(),
        which was never used.
        * Modules/mediacontrols/MediaControlsHost.cpp: Remove uncalled functions and media part IDs.
        (WebCore::MediaControlsHost::enterFullscreenOptimized): Deleted.
        (WebCore::MediaControlsHost::mediaUIImageData): Deleted.

        * Modules/mediacontrols/mediaControlsApple.css:
        (audio::-webkit-media-controls-picture-in-picture-button): Update pseudo-element name.
        (audio::-webkit-media-controls-optimized-fullscreen-button): Deleted.
        * Modules/mediacontrols/mediaControlsApple.js: Update global variable name, and classes.
        (Controller.prototype.createControls): Update button name. Add aria-label to the placeholder.
        (Controller.prototype.updateFullscreenButtons):
        (Controller.prototype.updateLayoutForDisplayedWidth):
        (Controller.prototype.handlePictureInPictureButtonClicked): Update handler names.
        (Controller.prototype.handleOptimizedFullscreenButtonClicked): Deleted.

        * Modules/mediacontrols/mediaControlsiOS.css: Rename pseudo-element.
        (audio::-webkit-media-controls-picture-in-picture-button): Add mask images.
        (audio::-webkit-media-controls-picture-in-picture-button:active):
        (video::-webkit-media-controls-picture-in-picture-button):
        (video::-webkit-media-controls-picture-in-picture-button.return-from-picture-in-picture):
        (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
        (audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
        (audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
        (audio::-webkit-media-controls-optimized-fullscreen-button): Deleted.
        (audio::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.
        (video::-webkit-media-controls-optimized-fullscreen-button): Deleted.
        (audio::-webkit-media-controls-wireless-playback-status.optimized): Deleted. The placard
        pseudo-element should be updated from wireless-playback-status to just playback-status
        since it serves both for pip and AirPlay.
        (audio::-webkit-media-controls-wireless-playback-text-top.optimized): Deleted.
        (audio::-webkit-media-controls-wireless-playback-text-bottom.optimized): Deleted.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.createControls): Update button names.
        (ControllerIOS.prototype.configureInlineControls):
        (ControllerIOS.prototype.handlePictureInPictureButtonClicked): Update handler name.
        (ControllerIOS.prototype.handlePictureInPictureTouchStart):
        (ControllerIOS.prototype.handlePictureInPictureTouchEnd):
        (ControllerIOS.prototype.handlePictureInPictureTouchCancel):
        (ControllerIOS.prototype.handlePresentationModeChange): Remove changes to the inline bg
        image style, and rely on the CSS to fill those in. Use localized strings for the placard.
        Move the aria-label to createControls().
        (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): Deleted.
        (ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): Deleted.
        (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): Deleted.
        (ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): Deleted.

        * html/HTMLMediaElement.cpp: Remove enterFullscreenOptimized since it is never called.
        (WebCore::HTMLMediaElement::enterFullscreenOptimized): Deleted.
        * html/HTMLMediaElement.h:
        * platform/ios/WebCoreSystemInterfaceIOS.h: Remove wkGetMediaUIImageData.
        * platform/ios/WebCoreSystemInterfaceIOS.mm:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Remove calls to wkGetMediaUIImageData.

2015-06-11  Dean Jackson  <dino@apple.com>

        Add an appearance keyword for wireless playback / airplay icon
        https://bugs.webkit.org/show_bug.cgi?id=145892
        <rdar://problem/21344872>

        Reviewed by Simon Fraser.

        Add a new "-webkit-appearance" value named "-apple-airplay"
        which will be used to render an icon. This change simply
        adds support for the value, and puts in hooks for drawing.

        At the moment this is only going to be used by Airplay, so
        the public-facing name is "-apple-airplay". However, the
        implementation in Theme has a more generic name, in case
        we hook it up for other ports later.

        Test: fast/css/appearance-airplay.html

        * css/CSSParser.cpp:
        (WebCore::cssValueKeywordID): This new keyword should not get
        translated into having a -webkit prefix.
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping from
        the Theme to the CSS value.
        * css/CSSValueKeywords.in: Add "-apple-airplay".
        * platform/ThemeTypes.h: New ControlPart.
        * rendering/RenderTheme.cpp: Stub implementation of the rendering and
        style update for the new appearance.
        (WebCore::RenderTheme::adjustStyle):
        (WebCore::RenderTheme::paint):
        (WebCore::RenderTheme::adjustWirelessPlaybackIconStyle):
        (WebCore::RenderTheme::paintWirelessPlaybackIcon):
        * rendering/RenderTheme.h:
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::adjustWirelessPlaybackIconStyle):
        (WebCore::RenderThemeMac::paintWirelessPlaybackIcon):

2015-06-11  Commit Queue  <commit-queue@webkit.org>

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

        "This patch is breaking binding tests" (Requested by youenn on
        #webkit).

        Reverted changeset:

        "Bindings generator should generate code for Promise-based
        APIs"
        https://bugs.webkit.org/show_bug.cgi?id=145833
        http://trac.webkit.org/changeset/185464

2015-06-11  Commit Queue  <commit-queue@webkit.org>

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

        "This patch is breaking 32bit mac build" (Requested by youenn
        on #webkit).

        Reverted changeset:

        "[Streams API] ReadableJSStream should handle promises
        returned by JS source start callback"
        https://bugs.webkit.org/show_bug.cgi?id=145792
        http://trac.webkit.org/changeset/185465

2015-06-11  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableJSStream should handle promises returned by JS source start callback
        https://bugs.webkit.org/show_bug.cgi?id=145792

        Reviewed by Darin Adler.

        Covered by rebased tests.

        When calling start callback, the returned value is checked.
        If it is not a promise, we do as if it is a resolved promise.
        If it is a promise, we call its then() method with two resolve/reject JS functions.

        * Modules/streams/ReadableStream.cpp:
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::invoke): Returns a JSPromise* if any is returned by the JS source callback.
        (WebCore::thenPromise): Utility method to call the promise.
        (WebCore::createStartResultFulfilledFunction): The promise resolve callback.
        (WebCore::ReadableJSStream::doStart): Calls thenPromise if a JSPromise* is returned by invoke.
        (WebCore::ReadableJSStream::ReadableJSStream):
        * bindings/js/ReadableJSStream.h:

2015-06-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Bindings generator should generate code for Promise-based APIs
        https://bugs.webkit.org/show_bug.cgi?id=145833

        Reviewed by Darin Adler.

        Covered by existing tests.

        * Modules/webaudio/AudioContext.idl: Removing custom binding for resume, suspend and close.
        * bindings/js/JSAudioContextCustom.cpp: Ditto.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader): Refactoring to use IsReturningPromise.
        (GenerateImplementation): Disabling include for return type if it is a promise.
        (GenerateParametersCheck): Adding DeferredWrapper() as argument to the DOM method if JS method returns a promise.
        (GenerateImplementationFunctionCall): Added support for promise-returning API.
        (IsReturningPromise): Checking whether function is returning a promise.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
        (webkit_dom_test_obj_test_promise_function):
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
        * bindings/scripts/test/ObjC/DOMTestObj.h:
        * bindings/scripts/test/ObjC/DOMTestObj.mm:
        (-[DOMTestObj testPromiseFunction]):
        * bindings/scripts/test/TestObj.idl: Adding promise returning function.


2015-06-08  Simon Fraser  <simon.fraser@apple.com>

        Missing content in UIWebView snapshots sometimes
        https://bugs.webkit.org/show_bug.cgi?id=145779
        rdar://problem/20744708

        Reviewed by Darin Adler.
        
        When expanding collapsed parts of quoted text on iOS, sometimes the "concertina"
        images would be blank. This happened because we'd fail to create tiles for regions
        outside the LegacyTileCache's visibleRect.
        
        Fix by giving LegacyTileCache an optional override visibleRect, which is set
        and cleared during -renderInContext: using the context clip rect.

        * platform/ios/LegacyTileCache.h:
        * platform/ios/LegacyTileCache.mm:
        (WebCore::LegacyTileCache::visibleRectInLayer):
        (WebCore::LegacyTileCache::setOverrideVisibleRect):
        * platform/ios/LegacyTileLayer.mm:
        (-[LegacyTileHostLayer renderInContext:]):

2015-06-11  Daniel Bates  <dabates@apple.com>

        Simplify event handling logic for search cancel button
        https://bugs.webkit.org/show_bug.cgi?id=145780

        Reviewed by Darin Adler.

        Following the patch for <https://bugs.webkit.org/show_bug.cgi?id=145774> we can take advantage
        of the DOM click event to simplify the event handling logic for the search cancel button.
        It is sufficient to listen for mousedown and click events instead of listening for mousedown
        and mouseup events, capturing all events during drag, and using the hover state of the button
        on mouse release together with a instance variable set on mouse press to determine whether
        the cancel button was clicked.

        As a side effect of removing the requirement that the search cancel button be hovered (a
        workaround to ensure that the mouse was pressed and released on the button in absence of
        listening for an explicit DOM click event) we can remove the accessibility-specific class,
        AccessibilitySearchFieldCancelButton, that was primarily used to fake the hover state of
        the button so that the accessibility machinery could simulate a click on it. Instead we
        can add use the default accessibility machinery for clicking on an element.

        No new tests since no functionality was changed.

        * CMakeLists.txt: Remove reference to file AccessibilitySearchFieldButtons.cpp.
        * WebCore.vcxproj/WebCore.vcxproj: Remove reference to files AccessibilitySearchFieldButtons.{cpp, h}.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * accessibility/AXObjectCache.cpp:
        (WebCore::createFromRenderer): Remove special-purpose logic that instantiated
        AccessibilitySearchFieldCancelButton for the search cancel button. Instead we can make
        use of the existing accessibility machinery to handle this button.
        * accessibility/AccessibilityAllInOne.cpp: Remove #include of AccessibilitySearchFieldButtons.cpp
        since the file is no longer needed.
        * accessibility/AccessibilitySearchFieldButtons.cpp: Removed.
        * accessibility/AccessibilitySearchFieldButtons.h: Removed.
        * dom/Element.h:
        (WebCore::Element::isSearchFieldCancelButtonElement): Deleted.
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement): Set the ARIA role
        and label attributes so that the accessibility system identifies the search cancel button as
        a button and shows a description for the button, respectively.
        (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Simplify the event handling logic
        such that we clear the field when we receive a DOM click event (i.e. the mouse was pressed
        and released on the button). Remove unused variable, oldValue. Substitute emptyString() for the
        empty string literal in the call to HTMLInputElement::setValueForUser() to avoid an implicit
        conversion to String. Also remove out-of-date comment that repeated what the code does.
        (WebCore::SearchFieldCancelButtonElement::willDetachRenderers): Deleted. We no longer need to use
        custom style resolve callbacks to reset the state of the EventHandler since we no longer need to
        have the EventHandler dispatch all mouse events to us on mouse press.
        * html/shadow/TextControlInnerElements.h:

2015-06-11  Commit Queue  <commit-queue@webkit.org>

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

        it broke the 32-bit build (Requested by clopez on #webkit).

        Reverted changeset:

        "[GTK] [Wayland] Should be possible to build with support for
        both X11 and Wayland."
        https://bugs.webkit.org/show_bug.cgi?id=145701
        http://trac.webkit.org/changeset/185453

2015-06-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
        https://bugs.webkit.org/show_bug.cgi?id=145701

        Reviewed by Žan Doberšek.

        No new tests, no behavior changes.

        When building both targets, we have to include the wayland-egl
        headers in order to build the Wayland target. This causes that
        EGLNativePixmapType and EGLNativeWindowType get defined as
        different types than when building only the X11 target.

        By type casting them to the ones that are expected, we are able
        to build both targets at the same time.

        I have done tests (building each target alone as also both targets
        at the same time), and everything seems to works as expected.

        Once built for both targets, if you try to launch the MiniBrowser
        from inside a Wayland compositor (Weston on top of X for example),
        it will trigger the X11 target if the DISPLAY environment variable
        is set and the environment variable GDK_BACKEND is not set to wayland,
        otherwise it will trigger the Wayland target.

        * platform/graphics/GLContext.cpp:
        (WebCore::GLContext::createContextForWindow): Add type cast.
        * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
        building both targets that is required for defining DefaultRootWindow().
        (WebCore::GLContextEGL::createPixmapContext): Add type cast.

2015-06-11  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] Fix the debug build after r185417.
        https://bugs.webkit.org/show_bug.cgi?id=145876 

        Reviewed by Gyuyoung Kim.

        * platform/graphics/efl/ImageBufferEfl.cpp: added the missing "MIMETypeRegistry.h".

2015-06-11  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Tahoma isn't installed on iOS, so there is no need to blacklist it
        https://bugs.webkit.org/show_bug.cgi?id=145865

        Reviewed by Dan Bernstein.

        No new tests because I can't copy Tahoma into our open source repository.

        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::fontFamilyShouldNotBeUsedForArabic):

2015-06-10  Commit Queue  <commit-queue@webkit.org>

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

        seems to have broken WTF.StringOperators test (Requested by
        alexchristensen on #webkit).

        Reverted changeset:

        "[Content Extensions] Limit number of rules."
        https://bugs.webkit.org/show_bug.cgi?id=145663
        http://trac.webkit.org/changeset/185442

2015-06-10  Jon Lee  <jonlee@apple.com>

        Update presentation mode JS API to using 'picture-in-picture'
        https://bugs.webkit.org/show_bug.cgi?id=145826
        rdar://problem/2131153

        Reviewed by Anders Carlsson.

        Update presentation modes to use 'picture-in-picture' in lieu of 'optimized'.

        * html/HTMLVideoElement.idl: Update to "picture-in-picture".
        * html/HTMLVideoElement.cpp:
        (WebCore::presentationModePictureInPicture): Rename static function returning string.
        (WebCore::presentationModeOptimized): Deleted.
        (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Use the new static function name.
        (WebCore::HTMLVideoElement::webkitSetPresentationMode): Ditto.
        (WebCore::HTMLVideoElement::webkitPresentationMode): Ditto.

        * Modules/mediacontrols/mediaControlsiOS.js: Update to 'picture-in-picture'.
        (ControllerIOS.prototype.configureInlineControls): 
        (ControllerIOS.prototype.isFullScreen):
        (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked):
        (ControllerIOS.prototype.handlePresentationModeChange):
        (ControllerIOS.prototype.controlsAlwaysVisible):

2015-06-10  Boris Smus  <boris@smus.com>

        [Mobile Safari, WKWebView] increase DeviceOrientationEvent events emission frequency
        https://bugs.webkit.org/show_bug.cgi?id=145814

        Reviewed by Benjamin Poulain.

        Increased the sampling rate of DeviceOrientationEvent from 20 Hz to 60
        Hz to make good head tracking possible.

        * platform/ios/WebCoreMotionManager.h:

2015-06-10  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Limit number of rules.
        https://bugs.webkit.org/show_bug.cgi?id=145663
        rdar://problem/21242407

        Reviewed by Benjamin Poulain.

        Added an API test to make sure that parsing fails when there are too many rules.

        * contentextensions/ContentExtensionError.cpp:
        (WebCore::ContentExtensions::contentExtensionErrorCategory):
        * contentextensions/ContentExtensionError.h:
        * contentextensions/ContentExtensionParser.cpp:
        (WebCore::ContentExtensions::loadEncodedRules):
        Fail to parse a content extension with more than 50000 rules.

2015-06-10  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION (r184895): Vertical border elements ([-webkit]-border-image set to 'repeat') that used to render perfectly are now rendering incorrectly.
        https://bugs.webkit.org/show_bug.cgi?id=145801

        Reviewed by Simon Fraser.

        When using the tiling to draw the sides of an image-border, the image slice
        is repeated only in one direction. For top and bottom sides, the slice is
        repeated horizontally and for left and right sides, it's repeated vertically.
        The tile might be scaled in the other direction of the tiling if the border
        extent and the slice extent are different in this direction.
        
        The bug happens because we were scaling the tile in the tiling direction.

        Test: fast/borders/border-image-repeat-stretch.html

        * rendering/style/NinePieceImage.cpp:
        (WebCore::NinePieceImage::scaleSlicesIfNeeded): Fix the type and the name
        of deviceScaleFactor.
        
        (WebCore::NinePieceImage::computeIntrinsicSideTileScale): Fix the scaling
        direction of the border image side tiling.
        
        * rendering/style/NinePieceImage.h:

2015-06-10  Chris Dumez  <cdumez@apple.com>

        ASSERT_WITH_SECURITY_IMPLICATION in WebCore::DocumentOrderedMap::getElementById
        https://bugs.webkit.org/show_bug.cgi?id=145857
        <rdar://problem/16798440>

        Reviewed by Darin Adler.

        Make sure Node::insertedInto() gets called on the inserted node and its
        descendants after its insertion into the tree but *before*
        ContainerNode::childrenChanged() is called on the parent node. This is
        needed so that the descendants know they've been inserted into the tree
        (and their InDocumentFlag flag gets set) before the parent node does
        anything with them in childrenChanged().

        In the case of <rdar://problem/16798440>, executing HTMLScriptElement's
        childrenChanged() after appending a child to a script element was causing
        the script to be executed. The script would call getElementBy() which
        would traverse the DOM tree and find a matching Element in the newly
        inserted subtree. However, the matching Element's InDocumentFlag flag was
        not set yet because the element's insertedInto() method has not been called
        yet at this point. This would cause us to hit an assertion as
        DocumentOrderedMap::getElementById() is only supposed to return elements
        that are in a Document.

        This patch is based on Blink r178976 by <esprehn@chromium.org>:
        https://src.chromium.org/viewvc/blink?view=rev&revision=178976

        Tests: fast/dom/script-getElementById-during-insertion.html
               fast/dom/script-remove-child-id-map.html

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::notifyChildInserted):
        (WebCore::ContainerNode::notifyChildRemoved):
        (WebCore::ContainerNode::removeChildren):
        (WebCore::ContainerNode::parserInsertBefore): Deleted.
        (WebCore::ContainerNode::removeChild): Deleted.
        (WebCore::ContainerNode::parserRemoveChild): Deleted.
        (WebCore::ContainerNode::parserAppendChild): Deleted.
        (WebCore::ContainerNode::childrenChanged): Deleted.
        (WebCore::ContainerNode::setAttributeEventListener): Deleted.
        (WebCore::ContainerNode::querySelector): Deleted.
        * dom/ContainerNodeAlgorithms.cpp:
        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
        * dom/ContainerNodeAlgorithms.h:
        (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
        (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
        (WebCore::ChildNodeInsertionNotifier::notify):
        (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument): Deleted.
        * dom/Element.cpp:
        (WebCore::Element::addShadowRoot):

2015-06-10  Alex Christensen  <achristensen@webkit.org>

        [Web Timing] Fix flaky test.
        https://bugs.webkit.org/show_bug.cgi?id=145846

        Reviewed by Alexey Proskuryakov.

        The timing data is gathered in ResourceHandle::getConnectionTimingData as 
        millisecond deltas from the fetch start time, not the navigation start time.
        The difference between navigation and fetch start time is usually so small that 
        it only caused one flaky test, but this should fix that flakiness. This patch 
        corrects how the millisecond deltas are used.

        * page/PerformanceTiming.cpp:
        (WebCore::PerformanceTiming::domainLookupStart):
        (WebCore::PerformanceTiming::domainLookupEnd):
        (WebCore::PerformanceTiming::connectStart):
        (WebCore::PerformanceTiming::connectEnd):
        (WebCore::PerformanceTiming::secureConnectionStart):
        (WebCore::PerformanceTiming::requestStart):
        (WebCore::PerformanceTiming::responseStart):
        (WebCore::PerformanceTiming::responseEnd):
        (WebCore::PerformanceTiming::documentLoadTiming):
        (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart):
        (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
        (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Deleted.
        * page/PerformanceTiming.h:

2015-06-10  Beth Dakin  <bdakin@apple.com>

        Overriding the overlay scrollbar style on WKView doesn't take effect immediately
        https://bugs.webkit.org/show_bug.cgi?id=145855
        -and corresponding-
        rdar://problem/20948706

        Reviewed by Simon Fraser.

        Since we opt into layer-per-part scrollbars in order to move the knob on the 
        secondary thread, AppKit is creating its own layers for the knob and track. To 
        invalidate them, we need to call into the ScrollbarPainter’s setNeedsDisplay.

        New virtual function on ScrollAnimator to call into ScrollbarPainter’s 
        setNeedsDispay.
        * platform/ScrollAnimator.h:

        Call the new function when setting the overlay style.
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::setScrollbarOverlayStyle):

        Add setNeedsDisplay to the list of ScrollbarPainter methods.
        * platform/mac/NSScrollerImpDetails.h:

        Implement invalidateScrollbarPartLayers.
        * platform/mac/ScrollAnimatorMac.h:
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):

2015-06-10  Matt Rajca  <mrajca@apple.com>

        MediaRemoteControls should be marked JSGenerateToJSObject.
        https://bugs.webkit.org/show_bug.cgi?id=145849

        Reviewed by Eric Carlson.

        Since MediaRemoteControls has a parent interface, we need to add the JSGenerateToJSObject attribute so the
        toJS(...) function gets generated. This is required for event handling to work.

        * Modules/mediasession/MediaRemoteControls.idl:

2015-06-10  Dean Jackson  <dino@apple.com>

        User can not scroll on page when dragging inside video
        https://bugs.webkit.org/show_bug.cgi?id=145848
        <rdar://problem/20997158>

        Reviewed by Brent Fulgham.

        Revert the change made in http://trac.webkit.org/changeset/183797
        which breaks panning on pages if the touch starts inside the video.

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handleWrapperTouchStart): Do not return true, which stops
        the handleEvent call in the superclass from preventing the default action.

2015-06-10  Matt Rajca  <mrajca@apple.com>

        Explicitly keep track of active HTMLMediaElements in MediaSessions.
        https://bugs.webkit.org/show_bug.cgi?id=145829

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp: Add support for keeping track of active media elements.
        (WebCore::MediaSession::addActiveMediaElement):
        * Modules/mediasession/MediaSession.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::playInternal): If the paused attribute is true and the readyState attribute has the
          value HAVE_FUTURE_DATA or HAVE_ENOUGH_DATA, the media element becomes an active participating element of the
          media session.

2015-06-10  Chris Dumez  <cdumez@apple.com>

        Drop unused argument for Node::didNotifySubtreeInsertions()
        https://bugs.webkit.org/show_bug.cgi?id=145845

        Reviewed by Andreas Kling.

        * dom/ContainerNodeAlgorithms.h:
        (WebCore::ChildNodeInsertionNotifier::notify):
        * dom/Node.h:
        (WebCore::Node::didNotifySubtreeInsertions):
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions):
        * html/HTMLFrameElementBase.h:
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::didNotifySubtreeInsertions):
        * svg/SVGFEImageElement.h:
        * svg/SVGMPathElement.cpp:
        (WebCore::SVGMPathElement::didNotifySubtreeInsertions):
        * svg/SVGMPathElement.h:
        * svg/SVGTRefElement.cpp:
        (WebCore::SVGTRefElement::didNotifySubtreeInsertions):
        * svg/SVGTRefElement.h:
        * svg/SVGTextPathElement.cpp:
        (WebCore::SVGTextPathElement::didNotifySubtreeInsertions):
        * svg/SVGTextPathElement.h:
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::didNotifySubtreeInsertions):
        * svg/animation/SVGSMILElement.h:

2015-06-10  KwangHyuk Kim  <hyuki.kim@samsung.com>

        [EFL] Jpeg image export implementation for Canvas.
        https://bugs.webkit.org/show_bug.cgi?id=145457

        Reviewed by Gyuyoung Kim.

        Add implementation of jpeg image export on Webkit EFL by using JPEGImageEncoder.

        No new tests, fast/canvas/toDataURL-supportedTypes.html can be reused.

        * PlatformEfl.cmake:
        * platform/MIMETypeRegistry.cpp:
        (WebCore::initializeSupportedImageMIMETypesForEncoding):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        * platform/graphics/efl/ImageBufferEfl.cpp: Added.
        (WebCore::writeFunction):
        (WebCore::encodeImage):
        (WebCore::ImageBuffer::toDataURL):
        * platform/image-encoders/JPEGImageEncoder.cpp:
        (WebCore::compressRGBABigEndianToJPEG):

2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
        https://bugs.webkit.org/show_bug.cgi?id=145840

        Reviewed by Martin Robinson.

        It's currently used only by WebKit2 in the UI process and it's
        another file built twice because of the GTK2 plugin process.

        * PlatformGTK.cmake:

2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
        https://bugs.webkit.org/show_bug.cgi?id=145598

        Reviewed by Žan Doberšek.

        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        (WebCore::PlatformKeyboardEvent::commands):
        * platform/gtk/KeyBindingTranslator.cpp: Use a single list of
        custom key bindings. We don't need to distinguish between key down and
        key press commands, since the web editor client already does that
        when executing the commands.
        (WebCore::KeyBindingTranslator::commandsForKeyEvent): This is
        getEditorCommandsForKeyEvent() renamed as commandsForKeyEvent(),
        since it now returns the list of commands to simplify the
        code. Also simplify the custom key bindings handling, by using the
        global list instead of moving it to a HashMap.
        (WebCore::KeyBindingTranslator::getEditorCommandsForKeyEvent): Deleted.
        * platform/gtk/KeyBindingTranslator.h:

2015-06-10  Per Arne Vollan  <peavo@outlook.com>

        [WinCairo] Crash on exit when terminating egl
        https://bugs.webkit.org/show_bug.cgi?id=145832

        Reviewed by Carlos Garcia Campos.

        Avoid terminating egl on exit for WinCairo.

        * platform/graphics/PlatformDisplay.cpp:
        (WebCore::PlatformDisplay::~PlatformDisplay):

2015-06-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Refactor AudioContext implementation to enable automatic binding generation of promise-based methods
        https://bugs.webkit.org/show_bug.cgi?id=145223

        Reviewed by Darin Adler.

        Introducing DOMPromise as a typed wrapper above DeferredWrapper.
        This DOMPromise allows constraining Promise resolution/rejection to a single resolution type and rejection type. 
        This might be useful for typed callback usage of promise based APIs, like getUserMedia() or ReadableStreamReader.read().

        Applying DOMPromise to AudioContext close, suspend and resume.
        Changed binding code to represent what could be automatically generated by binding generator.
        Fixing unneeded copies of std::function callbacks.

        Disabling DOMPromise copy constructors to lower chances that resolution/rejection is done twice on the same object.

        Covered by existing tests.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::addReaction):
        (WebCore::AudioContext::setState):
        (WebCore::AudioContext::suspend):
        (WebCore::AudioContext::resume):
        (WebCore::AudioContext::close):
        * Modules/webaudio/AudioContext.h:
        * bindings/js/JSAudioContextCustom.cpp:
        (WebCore::JSAudioContext::suspend):
        (WebCore::JSAudioContext::resume):
        (WebCore::JSAudioContext::close):
        * bindings/js/JSDOMPromise.cpp:
        (WebCore::DeferredWrapper::callFunction):
        * bindings/js/JSDOMPromise.h:
        (WebCore::DeferredWrapper::resolve):
        (WebCore::DeferredWrapper::reject):
        (WebCore::DOMPromise::DOMPromise):
        (WebCore::DOMPromise::resolve):
        (WebCore::DOMPromise::reject):

2015-06-10  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] Implement pulling of a source by a ReadableStream
        https://bugs.webkit.org/show_bug.cgi?id=145262

        Reviewed by Darin Adler

        Introduced abstract ReadableStream::doPull() which is overriden in ReadableJSStream.
        Added support to call the "pull" JS callback in ReadableJSStream::doPull().
        Added calls to pull as requested by the spec (when resolving a read callback, at start time...).

        Fixed issue in ReadableStreamReader::read() (use of successCallback(JSValue()) in lieu of endCallback())

        Covered by rebased tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::start): calling pull() once start.
        (WebCore::ReadableStream::pull): calling doPull() if readableStream states requires to.
        (WebCore::ReadableStream::read): calling pull() after resolving a read callback.
        * Modules/streams/ReadableStream.h:
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::read): fixed JSValue() bug.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::doPull): calling of JS callback.
        (WebCore::ReadableJSStream::storeException): catches exception and store them.
        (WebCore::ReadableJSStream::storeError): refactoring for checkForException.
        (WebCore::ReadableJSStream::enqueue):
        * bindings/js/ReadableJSStream.h:

2015-06-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        DeferredWrapper should clear its JS strong references once its promise is resolved/rejected
        https://bugs.webkit.org/show_bug.cgi?id=145753

        Reviewed by Darin Adler.

        Clear strong references at the end of DeferredWrapper::resolve and DeferredWrapper::reject.
        Added assertions to check that resolve or reject is called only once.

        Removed DeferredWrapper constructor that creates internally its promise.
        Reason is DeferredWrapper can be resolved synchronously and promise
        will be lost when returning it at the end of the binding promise function.
        Updated all custom bindings accordingly.

        Covered by existing tests.

        * bindings/js/JSAudioContextCustom.cpp:
        (WebCore::JSAudioContext::suspend): Updated DeferredWrapper constructor to properly return the promise.
        (WebCore::JSAudioContext::resume): Ditto.
        (WebCore::JSAudioContext::close): Ditto.
        * bindings/js/JSDOMPromise.cpp:
        (WebCore::DeferredWrapper::resolve): Cleared strong references after promise resolution.
        (WebCore::DeferredWrapper::reject): Cleared strong references after promise rejection.
        * bindings/js/JSDOMPromise.h:
        (WebCore::DeferredWrapper::resolve): Added ASSERT to check promise is not yet rejected/resolved.
        (WebCore::DeferredWrapper::reject): Ditto.
        (WebCore::DeferredWrapper::reject<ExceptionCode>): Ditto.
        (WebCore::DeferredWrapper::resolve<String>): Ditto.
        (WebCore::DeferredWrapper::resolve<bool>): Ditto.
        (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Ditto.
        (WebCore::char>>):
        (WebCore::DeferredWrapper::reject<String>): Ditto.
        * bindings/js/JSMediaDevicesCustom.cpp:
        (WebCore::JSMediaDevices::getUserMedia): Updated DeferredWrapper constructor to properly return the promise.
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::read): Ditto.
        (WebCore::JSReadableStreamReader::closed): Ditto.
        * bindings/js/JSSubtleCryptoCustom.cpp:
        (WebCore::JSSubtleCrypto::encrypt): Ditto.
        (WebCore::JSSubtleCrypto::decrypt): Ditto.
        (WebCore::JSSubtleCrypto::sign): Ditto.
        (WebCore::JSSubtleCrypto::verify): Ditto.
        (WebCore::JSSubtleCrypto::digest): Ditto.
        (WebCore::JSSubtleCrypto::generateKey): Ditto.
        (WebCore::JSSubtleCrypto::importKey): Ditto.
        (WebCore::JSSubtleCrypto::exportKey): Ditto.
        (WebCore::JSSubtleCrypto::wrapKey): Ditto.
        (WebCore::JSSubtleCrypto::unwrapKey): Ditto.

2015-06-09  Zalan Bujtas  <zalan@apple.com>

        Protect FrameView from being destroyed in Document::recalcStyle()
        https://bugs.webkit.org/show_bug.cgi?id=143033
        rdar://problem/20326871

        Reviewed by Andreas Kling.

        This patch ensures that FrameView stays valid in Document::recalcStyle().
        It follows the defensive pattern we use to deal with the refcounted FrameView (see EventDispatcher::dispatchEvent)

        When the iframe destroys itself in the onBeforeLoad callback (as the result of
        PostResolutionCallbackDisabler -> HTMLObjectElement::updateWidget -> guardedDispatchBeforeLoadEvent),
        we detach the frame and release the FrameView. However Document::recalcStyle() expects
        the FrameView to stay valid.

        Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.

        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):

2015-06-09  Daegyu Lee  <daegyu.lee@navercorp.com>

        3D-transformed video does not display on platforms without accelerated video rendering
        https://bugs.webkit.org/show_bug.cgi?id=144782

        Reviewed by Simon Fraser.

        Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
        which means not using accelerated video decoding.
        Although the video element gets GraphicsLayer by changing the CSS style of video element by javascript,
        there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
        As a result, after changing the CSS style, the video content does not show.
        To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).

        Test: media/video-transformed-by-javascript.html
              media/video-transformed-by-javascript-expected.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::containsPaintedContent):

2015-06-09  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
        https://bugs.webkit.org/show_bug.cgi?id=145830

        Reviewed by Darin Adler.

        The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
        that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
        Document::recalcStyle in that case.

        Test: editing/selection/update-selection-by-style-change.html

        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
        * editing/FrameSelection.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::performPostLayoutTasks):

2015-06-09  Dean Jackson  <dino@apple.com>

        MediaControls: Reenable resize of controls on pinch zoom
        https://bugs.webkit.org/show_bug.cgi?id=145824
        <rdar://problem/21212778>

        Reviewed by Darin Adler.

        Reinstate the code that updated the scaling of the
        controls in response to changes in page scale.
        This time around we have to change both the controls
        panel, and its blurry background.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.set pageScaleFactor): Deleted a comment.
        * Modules/mediacontrols/mediaControlsiOS.css:
        (video::-webkit-media-controls-panel-background): Set the background to pin
        to the bottom of its view.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.get pageScaleFactor): Basic getter, copied from mediaControlsApple.
        (ControllerIOS.prototype.set pageScaleFactor): The setter that reacts to the page scale
        and applies an inverse scaling on the control panel using a transform, and adjusts the
        height on the background similarly.

2015-06-09  Andreas Kling  <akling@apple.com>

        GraphicsContext state stack wasting lots of memory when empty.
        <https://webkit.org/b/145817>

        Reviewed by Geoffrey Garen.

        Give the GraphicsContextState stack an inline capacity of 1, and make sure
        to free any heap-allocated backing store when the stack goes empty.

        The 1 is because HTMLCanvasElement keeps one "save" on the underlying
        GraphicsContext at all times, and this prevents those canvases from always
        sitting on an empty stack with 16 capacity.

        This saves ~520 kB on cnet.com video pages.

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::restore):
        * platform/graphics/GraphicsContext.h:

2015-06-09  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVG Fragment is not rendered if it is the css background image of an HTML element
        https://bugs.webkit.org/show_bug.cgi?id=91790

        Reviewed by Darin Adler.

        To show an SVG fragment, the SVGImage has to scrollToFragment() using
        the resource url. The changes http://trac.webkit.org/changeset/164804
        and http://trac.webkit.org/changeset/164983 set the url of SVGImage to
        to be used later in SVGImage::draw(). The problem is the SVGImage url
        is only set when it is the src of an <img> tag. We did not do the same
        thing when the SVGImage is the css background image of an HTML element.
        
        The fix is to set the url of the SVGImage always when it's created by 
        the CachedImage. The CachedImage must have a valid url when the SVGImage
        is created.

        Test: svg/css/svg-resource-fragment-identifier-background.html

        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::load):
        (WebCore::CachedImage::checkShouldPaintBrokenImage):
        Replace the calls resourceRequest().url() and m_resourceRequest.url() by
        calling url() since they are all the same.
        
        (WebCore::CachedImage::createImage): Pass the resource url to SVGImage
        and change ImageObserver& by ImageObserver*, since null is not legal.
        
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::SVGImage):
        * svg/graphics/SVGImage.h: Add a url parameter to SVGImage constructor.
        
        * svg/graphics/SVGImageCache.cpp:
        (WebCore::SVGImageCache::findImageForRenderer): Add a new helper function.
        
        (WebCore::SVGImageCache::imageSizeForRenderer):
        (WebCore::SVGImageCache::imageForRenderer): Code clean up.
        
        * svg/graphics/SVGImageCache.h: Make imageForRenderer() const.

        * svg/graphics/SVGImageForContainer.cpp: Remove unneeded header file.

2015-06-09  Matt Rajca  <mrajca@apple.com>

        Add support for toggling playback in MediaSessions and MediaSessionManagers.
        https://bugs.webkit.org/show_bug.cgi?id=145822

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp: Toggle playback of all active media elements.
        (WebCore::MediaSession::togglePlayback):
        * Modules/mediasession/MediaSession.h:
        * Modules/mediasession/MediaSessionManager.cpp: Toggle playback of all media sessions as described in the
          Media Session spec.
        (WebCore::MediaSessionManager::togglePlayback):
        * Modules/mediasession/MediaSessionManager.h:

2015-06-09  Darin Adler  <darin@apple.com>

        Takes two delete key presses to delete pasted emoji up-pointing index finger with skin tone
        https://bugs.webkit.org/show_bug.cgi?id=145823

        Reviewed by Anders Carlsson.

        Tests: editing/deleting/delete-emoji.html

        * rendering/RenderText.cpp:
        (WebCore::isHangulLVT): Use constants instead of macros. Also changed to take a UChar since
        the Hangul processing can work on UTF-16 code unit at a time and doesn't have to handle
        surrogate pairs.
        (WebCore::isMark): Use U_GC_M_MASK instead of writing the algorithm out another way.
        (WebCore::isInArmenianToLimbuRange): Added.
        (WebCore::RenderText::previousOffsetForBackwardDeletion): Refactored for clarity and to use
        the U16_PREV macro instead of doing what it does in a sloppier way. Added code to allow a
        variation selector before an emoji modifier to fix the bug. Changed Hangul logic to work a
        code unit at a time, since it can, to use an enum class, and to use constants rather than
        all capital macros. Also changed the "dumb" case to use a more appropriate ICU macro.

2015-06-09  Said Abou-Hallawa  <sabouhallawa@apple.com>

        feComposite filter does not clip the paint rect to its effect rect when the operator is 'in' or 'atop'
        https://bugs.webkit.org/show_bug.cgi?id=137856

        Reviewed by Darin Adler.

        There was bug in calculating the absolutePaintRect of the feComposite filter
        when the operator is equal to 'in' or 'atop'. The absolutePaintRect was set
        to the absolutePaintRect of the background FilterEffect which is correct.
        What was missing is clipping this rectangle to the maxEffectRect of the
        filter which we do for other operators.

        Tests: svg/filters/feComposite-background-rect-control-operators.svg

        * platform/graphics/IntRect.h:
        (WebCore::operator-=):
        (WebCore::operator-): Add new operators to IntRect.

        * platform/graphics/filters/FEComposite.cpp:
        (WebCore::FEComposite::determineAbsolutePaintRect): Make sure the filter
        absolutePaintRect is clipped to maxEffectRect for all operators.
        
        (WebCore::FEComposite::platformApplySoftware): Code clean-up.
        
        * platform/graphics/filters/FilterEffect.cpp:
        (WebCore::FilterEffect::determineAbsolutePaintRect): Move the clipping
        part to a separate function.
        
        (WebCore::FilterEffect::clipAbsolutePaintRect): Clip the absolutePaintRect
        to the maxEffectRect of the filter.
        
        * platform/graphics/filters/FilterEffect.h:

2015-06-09  Matt Rajca  <mrajca@apple.com>

        Implement MediaSessionManager to keep track of all MediaSessions.
        https://bugs.webkit.org/show_bug.cgi?id=145806

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::MediaSession): Add ourselves to the MediaSessionManager upon construction.
        (WebCore::MediaSession::~MediaSession): Remove ourselves from the MediaSessionManager before destruction.
        * Modules/mediasession/MediaSessionManager.cpp: Added to keep track of all living MediaSessions.
        (WebCore::MediaSessionManager::singleton):
        (WebCore::MediaSessionManager::addMediaSession):
        (WebCore::MediaSessionManager::removeMediaSession):
        * Modules/mediasession/MediaSessionManager.h: Added.
        * WebCore.xcodeproj/project.pbxproj: Added new MediaSessionManager sources.

2015-06-09  Ryuan Choi  <ryuan.choi@navercorp.com>

        [CoordinatedGraphics] Remove RefCounted from Tile
        https://bugs.webkit.org/show_bug.cgi?id=145788

        Reviewed by Darin Adler.

        Since r185140, Tile does not need to be RefCounted.

        No new tests, no behavior changes.

        * platform/graphics/texmap/coordinated/Tile.cpp:
        (WebCore::Tile::create): Deleted.
        * platform/graphics/texmap/coordinated/Tile.h:
        * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
        (WebCore::TiledBackingStore::invalidate):
        (WebCore::TiledBackingStore::updateTileBuffers): Simplifies not to use unnecessary Vector.
        (WebCore::TiledBackingStore::coverageRatio):
        (WebCore::TiledBackingStore::createTiles):
        (WebCore::TiledBackingStore::resizeEdgeTiles):
        (WebCore::TiledBackingStore::setKeepRect):
        (WebCore::TiledBackingStore::tileAt): Deleted one line wrapper.
        (WebCore::TiledBackingStore::setTile): Ditto.
        (WebCore::TiledBackingStore::removeTile): Ditto.
        * platform/graphics/texmap/coordinated/TiledBackingStore.h:

2015-06-09  Chris Dumez  <cdumez@apple.com>

        Allow one sync GC per gcTimer interval on critical memory pressure warning
        https://bugs.webkit.org/show_bug.cgi?id=145773

        Reviewed by Geoffrey Garen.

        * bindings/js/GCController.cpp:
        (WebCore::GCController::garbageCollectNowIfNotDoneRecently):

        Add new GCController::garbageCollectNowIfNotDoneRecently() API that
        allows one synchronous GC per full GC timer interval. If called more
        than once per interval, it becomes equivalent to garbageCollectSoon()
        and merely accelerates the next collection.

        * bindings/js/GCController.h:
        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseCriticalMemory):

        Call the new GCController::garbageCollectNowIfNotDoneRecently() on
        critical memory pressure instead of garbageCollectionSoon() to try
        as do a synchronous GC if one wasn't already done recently.
        Also drop call to fullSweep() as GCController::garbageCollectNow*()
        already do a sweep after the collection.

2015-06-09  Darin Adler  <darin@apple.com>

        Follow-up fix for:
        JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
        https://bugs.webkit.org/show_bug.cgi?id=145811

        There was one unusual case in the bindings generator that was depending on this.

        * bindings/js/JSDOMBinding.h:
        (WebCore::argumentOrNull): Deleted.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateParametersCheck): Stop using argumentOrNull.
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated.
        * bindings/scripts/test/JS/JSTestObj.cpp: Updated.

2015-06-09  Darin Adler  <darin@apple.com>

        JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
        https://bugs.webkit.org/show_bug.cgi?id=145811

        Reviewed by Antti Koivisto.

        At some point, someone who didn't understand JSValue very well added checks for
        isEmpty (and the function isEmpty itself) in JavaScript bindings. But the engine
        never would pass an empty JSValue to a binding; that's used only inside the
        engine itself. I think this was done by some Google V8 experts a while back, so
        it's not entirely surprising they didn't understand this. But we don't want to
        keep all that unneeded code.

        * bindings/js/JSAudioTrackCustom.cpp:
        (WebCore::JSAudioTrack::setKind): Removed the isEmpty clause here. I presume this
        was copied and pasted from script-generated bindings. While I was at it, I used a
        slightly more efficient code path that avoids doing a ref/deref on the string by
        using auto&. That's trickier to do correctly for functions with more than one
        argument, so I didn't do it in the bindings generator yet.
        (WebCore::JSAudioTrack::setLanguage): Ditto.
        * bindings/js/JSTextTrackCustom.cpp:
        (WebCore::JSTextTrack::setKind): Ditto.
        (WebCore::JSTextTrack::setLanguage): Ditto.
        * bindings/js/JSVideoTrackCustom.cpp:
        (WebCore::JSVideoTrack::setKind): Ditto.
        (WebCore::JSVideoTrack::setLanguage): Ditto.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation): Use "=" syntax instead of constructor style syntax for
        the argument processing. I think this is more readable.
        (GenerateParametersCheck): For the enum code path, did the more efficient auto&
        idiom to avoid ref/deref on a string. For the toExistingAtomicString path,
        restructured so we don't have to check the flag indicating that something is atomic.
        Later we could also avoid the ref/deref; added a FIXME about that.
        (GetNativeType): Use String, not const String, for local variables. Sure, the
        string is const, but so is every other local variable type we use! No need to be
        wordy about it.
        (JSValueToNative): Removed the uneeded calls to isEmpty. Since the call sites no
        longer use construction syntax, used initializer syntax style for a couple classes
        that are constructed with multiple arguments.

        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated.
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
        * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.

2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>

        Fix unused private field warning in GraphicsLayerUpdater.h
        https://bugs.webkit.org/show_bug.cgi?id=145757

        Reviewed by Darin Adler.

        * platform/graphics/GraphicsLayerUpdater.cpp:
        (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
        * platform/graphics/GraphicsLayerUpdater.h:

2015-06-09  Yusuke Suzuki  <utatane.tea@gmail.com>

        Crash when passing Symbol to NPAPI plugin objects
        https://bugs.webkit.org/show_bug.cgi?id=145798

        Reviewed by Darin Adler.

        Test: plugins/npruntime/script-object-with-symbols.html

        For C bridge APIs, we add guards for symbols.
        This is the same to the existing guards in Objective-C APIs.

        * bridge/c/c_class.cpp:
        (JSC::Bindings::CClass::methodNamed):
        (JSC::Bindings::CClass::fieldNamed):
        * bridge/objc/objc_class.mm:
        (JSC::Bindings::ObjcClass::methodNamed):
        (JSC::Bindings::ObjcClass::fieldNamed):
        (JSC::Bindings::ObjcClass::fallbackObject):

2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>

        [cmake] Fix the style issues in cmake project files
        https://bugs.webkit.org/show_bug.cgi?id=145755

        Reviewed by Darin Adler.

        * CMakeLists.txt:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * PlatformWin.cmake:
        * PlatformWinCairo.cmake:

2015-06-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableJSStream should handle JS source getters that throw
        https://bugs.webkit.org/show_bug.cgi?id=145600

        Reviewed by Darin Adler.

        Checking whether there is an exception when trying to access to a source method.
        If so, rethrowing it in case of "start".

        Refactoring of code to prepare pulling, cancelling and additional parameter handling in ReadableStream construtor.

        Fixed the case of ReadableStream constructor called with an undefined parameter.

        Covered by rebased test expectation.

        * bindings/js/JSReadableStreamCustom.cpp:
        (WebCore::constructJSReadableStream): Refactoring to group all parameter check and exception handling in ReadableJSStream::create.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::getPropertyFromObject):
        (WebCore::callFunction):
        (WebCore::ReadableJSStream::invoke): Added method to be used also for pulling and cancelling.
        (WebCore::ReadableJSStream::doStart):
        (WebCore::ReadableJSStream::create):
        * bindings/js/ReadableJSStream.h:

2015-06-08  Dan Bernstein  <mitz@apple.com>

        Made MicroTask.h a project header.

        Rubber-stamped by Anders Carlsson.

        * WebCore.xcodeproj/project.pbxproj: Demoted MicroTask.h from Public to Project. WebCore
        doesn’t have public headers, and this header isn’t used by WebKit.

2015-06-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr in JavaScriptCore
        https://bugs.webkit.org/show_bug.cgi?id=145750

        Reviewed by Darin Adler.

        As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.

        No new tests, no behavior changes.

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::commonVM):

2015-06-08  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: Clip-path does not work properly on subpixel positions.
        https://bugs.webkit.org/show_bug.cgi?id=145749
        rdar://problem/20824305

        Reviewed by Simon Fraser.

        This patch ensures that clip-path is device pixel snapped both for composited and
        non-composited content.

        Tests: compositing/masks/compositing-clip-path-on-subpixel-position.html
               fast/masking/clip-path-on-subpixel-position.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setupClipPath):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

2015-06-08  Chris Dumez  <cdumez@apple.com>

        Access GCController instance via GCController::singleton() instead of a free function
        https://bugs.webkit.org/show_bug.cgi?id=145776

        Reviewed by Darin Adler.

        Access GCController instance via GCController::singleton() instead of a
        free function as per coding style and for consistency with other
        singleton classes in the codebase.

        * bindings/js/GCController.cpp:
        (WebCore::GCController::singleton):
        (WebCore::gcController): Deleted.
        * bindings/js/GCController.h:
        * bindings/js/JSDOMWindowShell.cpp:
        (WebCore::JSDOMWindowShell::setWindow):
        * bindings/js/ScriptCachedFrameData.cpp:
        (WebCore::ScriptCachedFrameData::clear):
        * bindings/js/ScriptController.cpp:
        (WebCore::collectGarbageAfterWindowShellDestruction):
        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseCriticalMemory):

2015-06-08  Daniel Bates  <dabates@apple.com>

        Mouse release on AutoFill button activates it; should only activate on click
        https://bugs.webkit.org/show_bug.cgi?id=145774
        <rdar://problem/21069245>

        Reviewed by Ryosuke Niwa.

        Fixes an issue where a click event was dispatched to a shadow tree node regardless of whether
        both the mouse press and mouse release were targeted at it. In particular, releasing the mouse
        on the AutoFill button activates it regardless of whether the mouse was pressed on it.

        Currently we always dispatch a click event to a node n where the mouse was released when n is
        in a shadow tree regardless of whether the mouse was pressed on n. Instead we should only
        dispatch a click event to n if the mouse was pressed and released on n. If n is a shadow tree
        descendant, the mouse was released on n, and n never received a mouse press then we should
        dispatch the click event at the shadow host element of n to preserve the illusion to web
        developers that the shadow host element is a single element.

        Test: fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html

        * page/EventHandler.cpp:
        (WebCore::targetNodeForClickEvent): Added; returns the target node for the DOM click event.
        (WebCore::EventHandler::handleMouseReleaseEvent): Modified to use dispatch the DOM click event
        at the node returned by targetNodeForClickEvent().
        (WebCore::mouseIsReleasedOnPressedElement): Deleted.

2015-06-08  Chris Dumez  <cdumez@apple.com>

        WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
        https://bugs.webkit.org/show_bug.cgi?id=145748
        <rdar://problem/21226577>

        Reviewed by Brady Eidson.

        We would sometimes crash when pruning the PageCache because it was
        possible for frames to still be loading while in the PageCache and
        we would try to stop the load when the CachedFrame is destroyed. This
        code path was not supposed to be exercised as we were not supposed to
        have pages still loading inside the PageCache.

        r185017 made sure we don't insert into the PageCache pages that are
        still loading. However, nothing was preventing content from starting
        new loads in their 'pagehide' event handlers, *after* the decision
        to put the page in the PageCache was made.

        This patch prevents content from starting loads from a 'pagehide'
        event handler so that we can no longer have content that is loading
        inside the PageCache. 'ping' image loads still go through though as
        these are specially handled and use PingLoaders.

        Tests: http/tests/navigation/image-load-in-pagehide-handler.html
               http/tests/navigation/subframe-pagehide-handler-starts-load.html
               http/tests/navigation/subframe-pagehide-handler-starts-load2.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::stopLoading):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::stopAllLoaders):
        (WebCore::FrameLoader::handleBeforeUnloadEvent):
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
        (WebCore::FrameLoader::PageDismissalEventType::PageDismissalEventType):
        (WebCore::FrameLoader::PageDismissalEventType::operator Page::DismissalType):

        Add wrapper class for m_pageDismissalEventBeingDispatched member type.
        The wrapper takes care of updating the m_dismissalEventBeingDispatched
        member on the Page every time the member on FrameLoader is updated. We
        now cache this information on the Page so that clients can cheaply
        query if a dismissal event is being dispatched in any of the Page's
        frame, without having to traverse the frame tree.

        * loader/ImageLoader.cpp:
        (WebCore::pageIsBeingDismissed):

        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):

        Abort the load early if we are currently dispatching a 'pagehide'
        event. We don't allow new loads at such point because we've already
        made the decision to add the Page to the PageCache.

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestImage):

        * page/Chrome.cpp:
        (WebCore::Chrome::runModal): Deleted.
        (WebCore::Chrome::setToolbarsVisible): Deleted.
        (WebCore::Chrome::toolbarsVisible): Deleted.
        (WebCore::Chrome::runJavaScriptConfirm): Deleted.
        (WebCore::Chrome::runJavaScriptPrompt): Deleted.
        (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::canShowModalDialogNow):

        Drop ChromeClient::shouldRunModalDialogDuringPageDismissal() and code
        using it as it is unused and I did not think it was worth updating
        this code.

        * page/Page.h:
        (WebCore::Page::dismissalEventBeingDispatched):
        (WebCore::Page::setDismissalEventBeingDispatched):

        Add a m_dismissalEventBeingDispatched member to the Page so that we can
        easily query if a dismissal event is being dispatched in any of the
        frames, without having to traverse the frame tree. I suspect more call
        sites of FrameLoader::pageDismissalEventBeingDispatched() may actually
        want this but I did not make such change in this patch. It is important
        to check all the frames and not simply the current one because a frame's
        pagehide event handler may trigger a load in another frame.

2015-06-08  Hunseop Jeong  <hs85.jeong@samsung.com>

        Replaced 0 with nullptr in WebCore/Modules.
        https://bugs.webkit.org/show_bug.cgi?id=145758

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * Modules/battery/BatteryManager.cpp:
        (WebCore::BatteryManager::BatteryManager):
        * Modules/encryptedmedia/CDM.cpp:
        (WebCore::CDM::CDM):
        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::MediaKeys):
        (WebCore::MediaKeys::~MediaKeys):
        * Modules/indexeddb/IDBCursor.h:
        (WebCore::IDBCursor::continueFunction):
        * Modules/indexeddb/IDBCursorBackendOperations.cpp:
        (WebCore::CursorAdvanceOperation::perform):
        (WebCore::CursorIterationOperation::perform):
        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::transactionFinished):
        * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
        (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
        * Modules/indexeddb/IDBEventDispatcher.cpp:
        (WebCore::IDBEventDispatcher::dispatch):
        * Modules/indexeddb/IDBIndex.h:
        (WebCore::IDBIndex::openCursor):
        (WebCore::IDBIndex::count):
        (WebCore::IDBIndex::openKeyCursor):
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::add):
        (WebCore::IDBObjectStore::put):
        (WebCore::IDBObjectStore::index):
        (WebCore::IDBObjectStore::openCursor):
        * Modules/indexeddb/IDBObjectStore.h:
        (WebCore::IDBObjectStore::count):
        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
        (WebCore::IDBOpenDBRequest::onSuccess):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::IDBRequest):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
        * Modules/indexeddb/IDBTransactionBackend.cpp:
        (WebCore::IDBTransactionBackend::commit):
        * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
        (WebCore::OpenCursorOperation::perform):
        * Modules/indieui/UIRequestEvent.cpp:
        (WebCore::UIRequestEventInit::UIRequestEventInit):
        (WebCore::UIRequestEvent::UIRequestEvent):
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::MediaSource):
        (WebCore::MediaSource::setReadyState):
        (WebCore::MediaSource::removeSourceBuffer):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::~SourceBuffer):
        (WebCore::SourceBuffer::removedFromMediaSource):
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::~MediaStream):
        * Modules/mediastream/MediaStreamEvent.cpp:
        (WebCore::MediaStreamEventInit::MediaStreamEventInit):
        * Modules/mediastream/MediaStreamTrackEvent.cpp:
        (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::stop):
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::contextDestroyed):
        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::Notification):
        * Modules/notifications/Notification.h:
        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::SpeechSynthesis):
        (WebCore::SpeechSynthesis::setPlatformSynthesizer):
        (WebCore::SpeechSynthesis::cancel):
        (WebCore::SpeechSynthesis::handleSpeakingCompleted):
        * Modules/speech/SpeechSynthesisUtterance.cpp:
        (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
        * Modules/webaudio/AudioBufferSourceNode.cpp:
        (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
        (WebCore::AudioBufferSourceNode::clearPannerNode):
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::createMediaStreamSource):
        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
        (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
        * Modules/webaudio/OscillatorNode.cpp:
        (WebCore::OscillatorNode::setType):
        (WebCore::OscillatorNode::process):
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::DatabaseManager):
        * Modules/webdatabase/DatabaseThread.cpp:
        (WebCore::DatabaseThread::DatabaseThread):
        (WebCore::DatabaseThread::databaseThread):
        * Modules/webdatabase/DatabaseThread.h:
        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::DatabaseTracker):
        * Modules/webdatabase/SQLCallbackWrapper.h:
        (WebCore::SQLCallbackWrapper::clear):
        (WebCore::SQLCallbackWrapper::unwrap):
        * Modules/webdatabase/SQLStatementBackend.cpp:
        (WebCore::SQLStatementBackend::clearFailureDueToQuota):
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::deliverTransactionErrorCallback):
        * Modules/webdatabase/SQLTransactionBackend.cpp:
        (WebCore::SQLTransactionBackend::doCleanup):
        (WebCore::SQLTransactionBackend::getNextStatement):
        * Modules/webdatabase/SQLTransactionCoordinator.cpp:
        (WebCore::SQLTransactionCoordinator::releaseLock):
        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
        (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
        (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
        (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::stop):
        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::disconnect):
        (WebCore::WebSocketChannel::didCloseSocketStream):
        * Modules/websockets/WebSocketFrame.h:
        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::clearScriptExecutionContext):
        (WebCore::WebSocketHandshake::readStatusLine):
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
        (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):

2015-06-08  Chris Fleizach  <cfleizach@apple.com>

        AX: improve list heuristics (presentational use versus actual lists)
       ​https://bugs.webkit.org/show_bug.cgi?id=134187

        Unreviewed. Rolling this change out temporarily.

        * accessibility/AccessibilityList.cpp:
        (WebCore::AccessibilityList::isDescriptionList):
        (WebCore::AccessibilityList::determineAccessibilityRole):
        (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Deleted.
        * accessibility/AccessibilityList.h:

2015-06-08  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Enable AVFoundation by default when QTKit is disabled by default
        https://bugs.webkit.org/show_bug.cgi?id=145760

        Reviewed by Alexey Proskuryakov.

        No new tests, this change makes existing tests pass.

        Settings::gAVFoundationEnabled defaults to true.

        * page/Settings.cpp:
        (WebCore::invalidateAfterGenericFamilyChange):

2015-06-08  Ryosuke Niwa  <rniwa@webkit.org>

        Explicitly dismiss correction panel when user types a new character
        https://bugs.webkit.org/show_bug.cgi?id=145732
        <rdar://problem/19596892>

        Reviewed by Darin Adler.

        Explicitly dismiss the correction panel when the user types a new character.
        This patch shouldn't change any behavior we're currently relying on AppKit to do the same.

        Manually ran tests in ManualTests/autocorrection.

        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::respondToAppliedEditing):

2015-06-08  Javier Fernandez  <jfernandez@igalia.com>

        [CSS Grid Layout] Setting height on a grid item doesn't have any effect
        https://bugs.webkit.org/show_bug.cgi?id=145604

        Reviewed by Sergio Villar Senin.

        Box Alignment spec states that stretch is only possible when height is
        'auto' and no 'auto' margins are used.

        It might be the case that style changes so that stretching is not allowed,
        hence we need to detect it and clear the override height the stretching
        algorithm previously set. The new layout triggered by the style change
        will then set grid item's height according to the new style rules.

        Test: fast/css-grid-layout/grid-item-should-not-be-stretched-when-height-or-margin-change.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):

2015-06-08  Brady Eidson  <beidson@apple.com>

        Completely remove all IDB properties/constructors when it is disabled at runtime.
        rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034

        Reviewed by Geoffrey Garen.

        Test: storage/indexeddb/properties-disabled-at-runtime.html

        - Make constructors all runtime enabled.
        - Remove autogeneration of the window.(webkit)indexedDB accessors.
        - Add manual overrides for the (webkit)indexedDB accessors at runtime.
        
        * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
        * Modules/indexeddb/IDBAny.idl:
        * Modules/indexeddb/IDBCursor.idl:
        * Modules/indexeddb/IDBCursorWithValue.idl:
        * Modules/indexeddb/IDBDatabase.idl:
        * Modules/indexeddb/IDBFactory.idl:
        * Modules/indexeddb/IDBIndex.idl:
        * Modules/indexeddb/IDBKeyRange.idl:
        * Modules/indexeddb/IDBObjectStore.idl:
        * Modules/indexeddb/IDBOpenDBRequest.idl:
        * Modules/indexeddb/IDBRequest.idl:
        * Modules/indexeddb/IDBTransaction.idl:
        * Modules/indexeddb/IDBVersionChangeEvent.idl:
        * page/DOMWindow.idl:

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::jsDOMWindowIndexedDB):
        (WebCore::JSDOMWindow::getOwnPropertySlot):

2015-06-08  Michael Catanzaro  <mcatanzaro@igalia.com>

        [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
        https://bugs.webkit.org/show_bug.cgi?id=145542

        Reviewed by Alexey Proskuryakov.

        No new tests, because it's hard to test whether a DNS request has been sent. We could do
        this by adding new API to modify the GProxyResolver and GResolver used by the SoupSession in
        the network process, but even if such API were desirable, it would be a big job. Tests
        should not be allowed to dictate our public API.

        * platform/network/DNSResolveQueue.cpp:
        (WebCore::DNSResolveQueue::add): Do not check whether the system is using a proxy, since
        this can't be determined for all ports here.
        (WebCore::DNSResolveQueue::timerFired): Do not check whether the system is using a proxy,
        since this can't be determined for all ports here.
        (WebCore::DNSResolveQueue::DNSResolveQueue): Remove member variables and member functions
        that are only needed by the CF backend. Rename platformResolve to
        platformMaybeResolveHost.
        (WebCore::DNSResolveQueue::isUsingProxy): Moved to DNSCFNet.cpp.
        * platform/network/DNSResolveQueue.h: Remove member variables that are only needed by the
        CF backend.
        * platform/network/cf/DNSCFNet.cpp:
        (WebCore::proxyIsEnabledInSystemPreferences): Renamed from
        platformProxyIsEnabledInSystemPreferences.
        (WebCore::isUsingProxy): Moved from DNSResolveQueue.cpp. The member variables removed from
        DNSResolveQueue are not static here. This is safe since it's a singleton.
        (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
        Bail early from here if a proxy is configured.
        (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Renamed to
        proxyIsEnabledInSystemPreferences.
        (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
        * platform/network/soup/DNSSoup.cpp:
        (WebCore::gotProxySettingsCallback): Added. Call soup_session_prefetch_dns from here only
        if a proxy would not be used to resolve the host.
        (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
        Look up proxy settings using g_proxy_resolver_lookup_async rather than calling
        soup_session_prefetch_dns directly.
        (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
        (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.

2015-06-08  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/Modules - 2
        https://bugs.webkit.org/show_bug.cgi?id=145541

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * Modules/mediastream/RTCConfiguration.h:
        (WebCore::RTCConfiguration::iceServers):
        * Modules/mediastream/RTCDTMFSender.cpp:
        (WebCore::RTCDTMFSender::scheduledEventTimerFired):
        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::scheduledEventTimerFired):
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::processIceServer):
        (WebCore::RTCPeerConnection::~RTCPeerConnection):
        (WebCore::RTCPeerConnection::getStreamById):
        (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
        (WebCore::RTCPeerConnection::stop):
        (WebCore::RTCPeerConnection::scheduledEventTimerFired):
        * Modules/mediastream/RTCStatsReport.cpp:
        (WebCore::RTCStatsReport::names):
        * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
        (WebCore::initProtocolHandlerWhitelist):
        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::getVoices):
        * Modules/webaudio/AudioBuffer.cpp:
        (WebCore::AudioBuffer::memoryCost):
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::createMediaStreamSource):
        (WebCore::AudioContext::derefFinishedSourceNodes):
        (WebCore::AudioContext::derefUnfinishedSourceNodes):
        (WebCore::AudioContext::handleDeferredFinishDerefs):
        (WebCore::AudioContext::handleDirtyAudioSummingJunctions):
        (WebCore::AudioContext::handleDirtyAudioNodeOutputs):
        (WebCore::AudioContext::updateAutomaticPullNodes):
        (WebCore::AudioContext::processAutomaticPullNodes):
        * Modules/webaudio/AudioNode.cpp:
        (WebCore::AudioNode::updateChannelsForInputs):
        (WebCore::AudioNode::checkNumberOfChannelsForInput):
        (WebCore::AudioNode::pullInputs):
        (WebCore::AudioNode::inputsAreSilent):
        (WebCore::AudioNode::silenceOutputs):
        (WebCore::AudioNode::unsilenceOutputs):
        (WebCore::AudioNode::enableOutputsIfNecessary):
        (WebCore::AudioNode::disableOutputsIfNecessary):
        (WebCore::AudioNode::finishDeref):
        * Modules/webaudio/AudioNodeInput.cpp:
        (WebCore::AudioNodeInput::numberOfChannels):
        (WebCore::AudioNodeInput::sumAllConnections):
        * Modules/webaudio/AudioNodeOutput.cpp:
        (WebCore::AudioNodeOutput::propagateChannelCount):
        (WebCore::AudioNodeOutput::disable):
        (WebCore::AudioNodeOutput::enable):
        * Modules/webaudio/AudioParam.cpp:
        (WebCore::AudioParam::calculateFinalValues):
        * Modules/webaudio/AudioParamTimeline.cpp:
        (WebCore::AudioParamTimeline::insertEvent):
        * Modules/webaudio/AudioSummingJunction.cpp:
        (WebCore::AudioSummingJunction::updateRenderingState):
        * Modules/webaudio/MediaStreamAudioSource.cpp:
        (WebCore::MediaStreamAudioSource::setAudioFormat):
        (WebCore::MediaStreamAudioSource::consumeAudio):
        * Modules/webaudio/WaveShaperProcessor.cpp:
        (WebCore::WaveShaperProcessor::setOversample):
        * Modules/webdatabase/DatabaseThread.cpp:
        (WebCore::DatabaseThread::handlePausedQueue):
        (WebCore::DatabaseThread::databaseThread):
        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
        (WebCore::DatabaseTracker::databaseNamesForOrigin):
        (WebCore::DatabaseTracker::getOpenDatabases):
        (WebCore::DatabaseTracker::usageForOrigin):
        (WebCore::DatabaseTracker::deleteAllDatabases):
        (WebCore::DatabaseTracker::deleteOrigin):
        (WebCore::DatabaseTracker::deleteDatabaseFile):
        (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
        (WebCore::DatabaseTracker::setDatabasesPaused):
        * Modules/webdatabase/SQLTransactionCoordinator.cpp:
        (WebCore::SQLTransactionCoordinator::shutdown):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        * Modules/websockets/WebSocketExtensionDispatcher.cpp:
        (WebCore::WebSocketExtensionDispatcher::addProcessor):
        (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
        (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::clientHandshakeMessage):

2015-06-07  Darin Adler  <darin@apple.com>

        REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
        https://bugs.webkit.org/show_bug.cgi?id=145733

        Reviewed by Andreas Kling.

        Test: fast/images/animated-gif-no-layout.html

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::styleDidChange): Correctly pass ImageSizeChangeNone in cases
        where we don't need to report a change in intrinsic size that happened outside the
        repaintOrMarkForLayout function.
        (WebCore::RenderImage::repaintOrMarkForLayout): Move work that should only be done
        when size changed inside the if statement.

        * testing/Internals.cpp:
        (WebCore::Internals::layoutCount): Added.
        * testing/Internals.h: Added layoutCount.
        * testing/Internals.idl: Ditto.

2015-06-07  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix strncpy use in WebCore::Text::formatForDebugger
        https://bugs.webkit.org/show_bug.cgi?id=145608

        Reviewed by Darin Adler.

        r185137 replaced a call to strncpy with a call to strlcpy, which broke the build on Linux
        since strlcpy does not exist there. r185148 reverted this to use strncpy again, but got the
        size argument off by one, "introducing" a buffer overrun. But this code has always been
        wrong, since it used strncpy without ensuring that the buffer is null-terminated after the
        call to strncpy. Fix this as well.

        * dom/Text.cpp:
        (WebCore::Text::formatForDebugger):

2015-06-07  Antti Koivisto  <antti@apple.com>

        CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
        https://bugs.webkit.org/show_bug.cgi?id=145736
        rdar://problem/21246971

        Reviewed by David Kilzer.

        No repro, no test.

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::setCSSStyleSheet):

            Null check frame. It may be null during frame teardown.

2015-06-06  Anders Carlsson  <andersca@apple.com>

        Remove support from getting plug-in information from Carbon resources
        https://bugs.webkit.org/show_bug.cgi?id=145730

        Reviewed by Dan Bernstein.

        Remove a now unused function.

        * platform/mac/WebCoreNSStringExtras.h:
        * platform/mac/WebCoreNSStringExtras.mm:
        (stringEncodingForResource): Deleted.

2015-06-06  Commit Queue  <commit-queue@webkit.org>

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

        it needs some discussion before landing (Requested by dino on
        #webkit).

        Reverted changeset:

        "[iOS] Don't force compositing layers for no-op 3D transforms
        on low-memory devices."
        https://bugs.webkit.org/show_bug.cgi?id=145719
        http://trac.webkit.org/changeset/185284

2015-06-06  Ryosuke Niwa  <rniwa@webkit.org>

        Typing is slow in Gmail on iPads
        https://bugs.webkit.org/show_bug.cgi?id=145686

        Reviewed by Enrica Casucci.

        The bug was caused by nextCandidate and nextVisuallyDistinctCandidate traversing through each character
        in a text node without a renderer. Skip any node that doesn't have a renderer in both of those functions
        and corresponding previous* functions.

        It's fine to skip unrendered nodes in PositionIterator because only other clients of PositionIterator
        are Position::upstream and Position::downstream and they don't care about un-rendered nodes either.

        * dom/PositionIterator.cpp:
        (WebCore::PositionIterator::increment):
        (WebCore::PositionIterator::decrement):
        * editing/htmlediting.cpp:
        (WebCore::nextVisuallyDistinctCandidate):
        (WebCore::previousVisuallyDistinctCandidate):

2015-06-06  Mark Lam  <mark.lam@apple.com>

        Returned Exception* values need to be initialized to nullptr when no exceptions are thrown.
        https://bugs.webkit.org/show_bug.cgi?id=145720

        Reviewed by Dan Bernstein.

        No new tests because this issue is already covered by the existing inspector-protocol tests.

        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):

2015-06-05  Andreas Kling  <akling@apple.com>

        [iOS] Don't force compositing layers for no-op 3D transforms on low-memory devices.
        <https://webkit.org/b/145719>
        <rdar://problem/19973042>

        Reviewed by Geoffrey Garen.

        We put elements with 3D identity transforms onto compositing layers because
        we anticipate that they will somehow animate in the future.

        This can get extremely expensive, especially on low-memory devices.
        This patch makes WebKit stop handing out compositing layers for this kinda thing:

            -webkit-transform: translate3d(0,0,0)

        ..on devices with 512MB or less. This dramatically improves stability on some
        web pages.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForTransform):

2015-06-05  Matt Baker  <mattbaker@apple.com>

        Web Inspector: "Other" time in the framerate table is often negative
        https://bugs.webkit.org/show_bug.cgi?id=145712

        Reviewed by Timothy Hatcher.

        The Inspector frontend flattens the timeline event tree it receives from the backend, which can contain nested
        paint records. The nested records represent a single paint event, but were being interpreted as two separate
        events for purposes of calculating total layout time. This caused the calculated "other" time to be less than
        it should be (and in some cases negative).

        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::addRecordToTimeline):
        Paint records are no longer nested, we simply drop the child paint event.

2015-06-05  Chris Dumez  <cdumez@apple.com>

        Unreviewed, speculative Windows build fix after r185273.

        * platform/VNodeTracker.h:

2015-06-05  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Limit the number of vnodes used by the WebContent processes
        https://bugs.webkit.org/show_bug.cgi?id=145672
        <rdar://problem/21126637>

        Reviewed by Antti Koivisto.

        Limit the number of vnodes used by the WebContent processes to reduce
        the chance of getting killed due to the system running out of vnodes.
        We sometimes see the WebContent process use up to 50% of the system's
        vnode limit on some tests on iOS, which seems excessive. Most vnodes
        are due to CachedResources which are mmap'd from the WebKit disk cache
        and kept alive due to caches such as the Memory Cache / PageCache.

        This patch adds tracking for the number of SharedBuffer objects that are
        backed by a CFDataRef as this should track most of the vnodes used by
        the process. The WebContent process registers a vnode pressure handler
        upon initialization (likely it already does for memory pressure
        handling). This handler gets called when the process uses over 15% of
        of system's vnode limit and the "critical" flag is set if it uses over
        20% of the system limit. The vnode pressure handler currently calls the
        memory pressure handler as freeing our caches (especially PageCache,
        MemoryCache) and doing a JS GC frees up vnodes.

        On iPhone 6 Plus, the system limit is at 3000, which would lead to the
        following limits being used:
        soft: 450 / hard: 600

        However, on older hardware, the system limit can be as low as 2000,
        which would lead to the following limits being used:
        soft: 300 / hard: 400

        vnode tracking is currently only enabled on iOS because system vnode
        limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
        on a 2011 MacBook Air) and we normally don't get killed.

        * WebCore.xcodeproj/project.pbxproj:

        Add new files to the XCode project.

        * platform/SharedBuffer.h:

        Add a VNodeTracker::Token member next to the CFDataRef member that we
        initialize if the SharedBuffer is constructed from a CFDataRef.

        * platform/VNodeTracker.cpp: Added.
        (WebCore::VNodeTracker::singleton):
        (WebCore::VNodeTracker::VNodeTracker):
        (WebCore::VNodeTracker::checkPressureState):
        (WebCore::VNodeTracker::pressureWarningTimerFired):
        (WebCore::VNodeTracker::nextPressureWarningInterval):
        (WebCore::VNodeTracker::platformInitialize):
        * platform/VNodeTracker.h: Added.
        (WebCore::VNodeTracker::setPressureHandler):

        Add a new VNodeTracker singleton to keep track the number of vnodes
        used by the process since the system does not issue warnings before
        reaching its vnode limit. Call sites should request Tokens for
        every vnode they use for tracking purposes. Each process can then
        set a vnode pressure handler function that will be called when the
        process is over the designated limits.

        * platform/cf/SharedBufferCF.cpp:
        (WebCore::SharedBuffer::SharedBuffer):

        Take a VNodeToken from the VNodeTracker when constructing the
        SharedBuffer from a CFDataRef as these usually use mmap.

        * platform/cocoa/VNodeTrackerCocoa.cpp: Added.
        (WebCore::VNodeTracker::platformInitialize):

        Get the system's vnode limit and uses 15% of that value as soft
        limit for the process and 20% of that value as hard limit.

2015-06-05  Dean Jackson  <dino@apple.com>

        Lingering checkbox animations when rapidly switching between views on WK1
        https://bugs.webkit.org/show_bug.cgi?id=145715
        <rdar://problem/17381121>

        Reviewed by Simon Fraser.

        On WK1, the NSView we use for NSButtonCells is parented in the ScrollView.
        Our checkbox and radiobutton animations cause AppKit to create a CALayer which
        is parented into that view. As we render the animations, we see the CALayer getting
        drawn also.

        The fix was to use an unparented layer on WK1 when drawing these controls, the same
        way WK2 does. This technique may apply to all controls, but restricting it
        to just the buttons at the moment is less risky.

        This only happens during the swap between a checked and non-checked state,
        and we have no way to test it :(

        * platform/mac/ThemeMac.h: New optional parameter to ensuredView.
        * platform/mac/ThemeMac.mm:
        (WebCore::paintToggleButton): If we're on Yosemite or highter, use an unparented view.
        (WebCore::ThemeMac::ensuredView): Return either a parented or unparented view.

2015-06-05  Matt Rajca  <mrajca@apple.com>

        MediaSessions should keep track of their participating media elements.
        https://bugs.webkit.org/show_bug.cgi?id=145703

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaSession.cpp:
        (WebCore::MediaSession::addMediaElement): Add the given media element to the media session.
        (WebCore::MediaSession::removeMediaElement): Remove the given media element from the media session.
        (WebCore::MediaSession::activeParticipatingElements): Dynamically build a vector of actively-playing media
          elements.
        * Modules/mediasession/MediaSession.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::~HTMLMediaElement): Ensure the element is removed from its media session.
        (WebCore::HTMLMediaElement::setSession): Update sessions' references to their media elements.

2015-06-05  Chris Dumez  <cdumez@apple.com>

        Regression(r176212): Broke app switching on iCloud.com
        https://bugs.webkit.org/show_bug.cgi?id=145708
        <rdar://problem/21235277>

        Reviewed by Simon Fraser.

        Roll out r176212 and follow-up fixes for now, to fix iCloud.com.
        We can reconsider later how to do this in a safer way.

        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
        (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
        (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Deleted.
        * dom/Element.cpp:
        * dom/Element.h:
        * dom/ElementRareData.cpp:
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::ElementRareData):
        (WebCore::ElementRareData::~ElementRareData): Deleted.
        * dom/Node.cpp:
        (WebCore::Node::materializeRareData):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
        * page/DOMTimer.cpp:
        (WebCore::DOMTimerFireState::scriptMadeNonUserObservableChanges): Deleted.
        (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges): Deleted.
        (WebCore::NestedTimersMap::instanceForContext): Deleted.
        (WebCore::DOMTimer::install): Deleted.
        (WebCore::DOMTimer::fired): Deleted.
        (WebCore::DOMTimer::alignedFireTime): Deleted.
        (WebCore::DOMTimer::activeDOMObjectName): Deleted.
        * page/DOMTimer.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::reset): Deleted.
        (WebCore::FrameView::viewportContentsChanged): Deleted.
        (WebCore::FrameView::autoSizeIfEnabled): Deleted.
        * page/FrameView.h:

2015-06-05  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Emoji overlap preceeding lines
        https://bugs.webkit.org/show_bug.cgi?id=145678
        <rdar://problem/10684914>

        Reviewed by Enrica Casucci.

        In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
        its containing line. If the author has not specified a particular line-height, the height of a line comes from
        the font metrics for the primary font of the line.

        In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
        if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
        are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
        overlaps the preceeding line.

        I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
        to review this patch; hopefully she knows the answer.

        Test: fast/text/emoji.html

        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::platformInit):

2015-06-05  Alex Christensen  <achristensen@webkit.org>

        [Web Timing] Use new SPI to enable data collection.
        https://bugs.webkit.org/show_bug.cgi?id=145650
        rdar://problem/21203358

        Reviewed by Chris Dumez.

        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::createCFURLConnection):
        Gather web timing data on iOS.
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::createNSURLConnection):
        (WebCore::ResourceHandle::setCollectsTimingData):
        Gather web timing data on Mac.

2015-06-05  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableStream should store callbacks as a Deque
        https://bugs.webkit.org/show_bug.cgi?id=145641

        Reviewed by Darin Adler.

        Covered by existing tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::resolveReadCallback): Use of Deque.takeFirst
        * Modules/streams/ReadableStream.h: Using Deque in lieu of Vector for storing callbacks.

2015-06-05  Mark Lam  <mark.lam@apple.com>

        finally blocks should not set the exception stack trace when re-throwing the exception.
        https://bugs.webkit.org/show_bug.cgi?id=145525

        Reviewed by Geoffrey Garen.

        Update to use the new JSC::Exception object.

        Test: inspector/debugger/break-on-exceptions.html

        * ForwardingHeaders/runtime/Exception.h: Added.
        * bindings/js/JSCallbackData.cpp:
        (WebCore::JSCallbackData::invokeCallback):
        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::jsArray):
        (WebCore::reportException):
        (WebCore::reportCurrentException):
        * bindings/js/JSDOMBinding.h:
        * bindings/js/JSErrorHandler.cpp:
        (WebCore::JSErrorHandler::handleEvent):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * bindings/js/JSMainThreadExecState.cpp:
        (WebCore::JSMainThreadExecState::didLeaveScriptContext):
        (WebCore::functionCallHandlerFromAnyThread):
        (WebCore::evaluateHandlerFromAnyThread):
        * bindings/js/JSMainThreadExecState.h:
        (WebCore::JSMainThreadExecState::currentState):
        (WebCore::JSMainThreadExecState::call):
        (WebCore::JSMainThreadExecState::evaluate):
        (WebCore::JSMainThreadExecState::runTask):

        * bindings/js/JSMediaDevicesCustom.cpp:
        (WebCore::JSMediaDevices::getUserMedia):
        - Fixed a bug where the exception was not cleared before entering the VM to
          call JS code.

        * bindings/js/JSMutationCallback.cpp:
        (WebCore::JSMutationCallback::call):
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::getPropertyFromObject):
        (WebCore::callFunction):
        (WebCore::ReadableJSStream::Source::start):
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::executeFunctionInContext):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluateInWorld):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::SerializedScriptValue::create):
        (WebCore::SerializedScriptValue::deserialize):
        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):
        (WebCore::WorkerScriptController::setException):
        (WebCore::WorkerScriptController::scheduleExecutionTermination):
        * bindings/js/WorkerScriptController.h:
        (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
        * bindings/js/WorkerScriptDebugServer.cpp:
        (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
        (WebCore::WorkerScriptDebugServer::reportException):
        * bindings/js/WorkerScriptDebugServer.h:
        * bindings/objc/WebScriptObject.mm:
        (WebCore::createJSWrapper):
        (WebCore::addExceptionToConsole):
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (-[WebScriptObject evaluateWebScript:]):
        - Changed to call a version of JSMainThreadExecState::evaluate() that provides
          a stub returnedException because evaluateWebScript: doesn't need the exception.

        * inspector/PageScriptDebugServer.cpp:
        (WebCore::PageScriptDebugServer::isContentScript):
        (WebCore::PageScriptDebugServer::reportException):
        * inspector/PageScriptDebugServer.h:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::importScripts):

2015-06-05  Eric Carlson  <eric.carlson@apple.com>

        Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only-controls.html
        fail on WK1 and WK2
        https://bugs.webkit.org/show_bug.cgi?id=145675

        Reviewed by Dean Jackson.

        No new tests, changes covered by existing tests.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.updateControls): Use shouldHaveControls() to test if controls should
          be visible.
        (Controller.prototype.handleWrapperMouseMove): Don't return early when in fullscreen.
        (Controller.prototype.updateFullscreenButtons): Drive-by fix: always show the (exit) fullscreen
          button when in fullscreen.
          

2015-06-04  David Hyatt  <hyatt@apple.com>

        Underlines too close in vertical Chinese text.
        https://bugs.webkit.org/show_bug.cgi?id=145651
        <rdar://problem/11105920>

        Reviewed by Simon Fraser.

        Added fast/text/decorations-vertical-underline.html

        * style/InlineTextBoxStyle.cpp:
        (WebCore::computeUnderlineOffset):
        Make sure the to map text-underline-position: auto to under when a line has an ideographic baseline.

2015-06-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] [Wayland] The MiniBrowser crashes inside Weston.
        https://bugs.webkit.org/show_bug.cgi?id=145645

        Reviewed by Žan Doberšek.

        No new tests, no behavior changes.

        The issue was caused because we were not properly initializing the
        Wayland display, and we were returning a nullptr in PlatformDisplayWayland::create(),
        therefore a crash was happening on WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
        <http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=185245#L1136>

        * platform/graphics/wayland/PlatformDisplayWayland.cpp:
        (WebCore::PlatformDisplayWayland::create): When connecting to the Wayland
        server socket we should use the default value (NULL). This allows the value
        to be overwritten at run-time by the environment variables WAYLAND_DISPLAY or
        WAYLAND_SOCKET that the Wayland compositor should define. Also add a couple
        of warnings to get information about what is going wrong when we fail to
        initialize the display instead of just crashing without giving more information.
        * platform/graphics/wayland/PlatformDisplayWayland.h:
        (WebCore::PlatformDisplayWayland::isInitialized): Not longer check for m_webkitgtk
        to signal that the display is ready because the UIProcess embedded Wayland
        subcompositer is still not implemented. Added a FIXME note about it.

2015-06-05  Dean Jackson  <dino@apple.com>

        [Mac] Popup focus is cut off
        https://bugs.webkit.org/show_bug.cgi?id=145688
        <rdar://problem/18313375>

        Reviewed by Brent Fulgham.

        Yosemite increased the width of focus rings, causing
        some ugly clipping on Yosemite. The solution was to
        not set a clip (which was code introduced for Leopard).

        Test: fast/forms/select-element-focus-ring.html

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintMenuList): Don't clip on Yosemite.

2015-06-05  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Support dots sequences in grid-template-areas
        https://bugs.webkit.org/show_bug.cgi?id=145693

        Reviewed by Sergio Villar Senin.

        The CSS WG agreed to consider a sequence of "." characters a single null
        cell token for grid-template-areas. That way authors can match the
        number of dots to the width of the column.

        For more information see:
        https://lists.w3.org/Archives/Public/www-style/2015May/0175.html

        Added new test cases to check the new behavior.

        * css/CSSParser.cpp:
        (WebCore::containsOnlyDots): New helper function to check that the grid
        area name is composed by only dots.
        (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
        function to look for unnamed areas.

2015-06-04  Joonghun Park  <jh718.park@samsung.com>

        Purge PassRefPtr create() factory functions in WebCore/css
        https://bugs.webkit.org/show_bug.cgi?id=144905

        Reviewed by Darin Adler.

        Return Ref instead of PassRefPtr in create() factory functions in css,
        because the factory can't return null.

        No new tests, no new behaviours.

        * css/BasicShapeFunctions.cpp:
        (WebCore::valueForCenterCoordinate):
        (WebCore::basicShapeRadiusToCSSValue):
        (WebCore::valueForBasicShape):
        * css/BasicShapeFunctions.h:
        * css/CSSBasicShapes.h:
        * css/CSSCalculationValue.cpp:
        (WebCore::createCSS):
        (WebCore::CSSCalcValue::create):
        * css/CSSCalculationValue.h:
        * css/CSSCharsetRule.h:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForNinePieceImageSlice):
        (WebCore::valueForNinePieceImageQuad):
        (WebCore::zoomAdjustedPixelValue):
        (WebCore::zoomAdjustedNumberValue):
        (WebCore::zoomAdjustedPixelValueForLength):
        (WebCore::valueForReflection):
        (WebCore::createPositionListForLayer):
        (WebCore::positionOffsetValue):
        (WebCore::percentageOrZoomAdjustedValue):
        (WebCore::autoOrZoomAdjustedValue):
        (WebCore::getBorderRadiusCornerValues):
        (WebCore::getBorderRadiusCornerValue):
        (WebCore::getBorderRadiusShorthandValue):
        (WebCore::matrixTransformValue):
        (WebCore::computedTransform):
        (WebCore::adjustLengthForZoom):
        (WebCore::ComputedStyleExtractor::valueForShadow):
        (WebCore::ComputedStyleExtractor::valueForFilter):
        (WebCore::specifiedValueForGridTrackBreadth):
        (WebCore::specifiedValueForGridTrackSize):
        (WebCore::valueForGridTrackList):
        (WebCore::scrollSnapDestination):
        (WebCore::scrollSnapPoints):
        (WebCore::scrollSnapCoordinates):
        (WebCore::createAnimationTriggerValue):
        (WebCore::getAnimationTriggerValue):
        (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
        (WebCore::fillSizeToCSSValue):
        (WebCore::lineHeightFromStyle):
        (WebCore::fontSizeFromStyle):
        (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
        (WebCore::shapePropertyValue):
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSComputedStyleDeclaration.h:
        * css/CSSFontFace.h:
        (WebCore::CSSFontFace::create):
        * css/CSSFontFaceLoadEvent.h:
        * css/CSSFontFaceRule.h:
        * css/CSSGrammar.y.in:
        * css/CSSGridLineNamesValue.cpp:
        (WebCore::CSSGridLineNamesValue::cloneForCSSOM):
        * css/CSSGridLineNamesValue.h:
        (WebCore::CSSGridLineNamesValue::create):
        * css/CSSImportRule.h:
        * css/CSSKeyframeRule.h:
        (WebCore::StyleKeyframe::create):
        * css/CSSKeyframesRule.h:
        * css/CSSMediaRule.h:
        * css/CSSPageRule.h:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseGridLineNames):
        (WebCore::CSSParser::parseDashboardRegions):
        (WebCore::CSSParser::parseClipShape):
        (WebCore::CSSParser::parseBasicShape):
        (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
        (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
        * css/CSSParser.h:
        (WebCore::CSSParser::ValueWithCalculation::calculation):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::init):
        (WebCore::CSSPrimitiveValue::cloneForCSSOM):
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::create):
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/CSSPropertySourceData.h:
        (WebCore::CSSStyleSourceData::create):
        (WebCore::CSSRuleSourceData::create):
        (WebCore::CSSRuleSourceData::createUnknown):
        * css/CSSRuleList.h:
        * css/CSSSegmentedFontFace.h:
        (WebCore::CSSSegmentedFontFace::create):
        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::createRareData):
        * css/CSSSelector.h:
        (WebCore::CSSSelector::RareData::create):
        * css/CSSStyleRule.h:
        * css/CSSSupportsRule.h:
        * css/CSSValuePool.h:
        (WebCore::CSSValuePool::createValue):
        * css/FontLoader.cpp:
        (WebCore::LoadFontCallback::create):
        * css/LengthRepeat.h:
        (WebCore::LengthRepeat::create):
        (WebCore::LengthRepeat::cloneForCSSOM):
        * css/MediaList.h:
        (WebCore::MediaQuerySet::create):
        (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
        (WebCore::MediaList::create):
        * css/MediaQueryList.cpp:
        (WebCore::MediaQueryList::create):
        * css/MediaQueryList.h:
        * css/MediaQueryMatcher.h:
        (WebCore::MediaQueryMatcher::create):
        * css/Pair.h:
        (WebCore::Pair::create):
        * css/Rect.h:
        (WebCore::Rect::create):
        (WebCore::Rect::cloneForCSSOM):
        (WebCore::Quad::create):
        (WebCore::Quad::cloneForCSSOM):
        * css/SVGCSSComputedStyleDeclaration.cpp:
        (WebCore::paintOrder):
        (WebCore::ComputedStyleExtractor::svgPropertyValue):
        * css/StyleMedia.h:
        (WebCore::StyleMedia::create):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::keyframeStylesForAnimation):
        * css/StyleSheetList.h:
        (WebCore::StyleSheetList::create):
        * css/ViewportStyleResolver.h:
        (WebCore::ViewportStyleResolver::create):
        * css/WebKitCSSMatrix.h:
        * css/WebKitCSSRegionRule.h:
        * css/WebKitCSSViewportRule.h:
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFilter):
        * rendering/style/RenderStyle.h:
        (WebCore::adjustFloatForAbsoluteZoom):
        * rendering/style/StyleInheritedData.h:

2015-06-04  Benjamin Poulain  <bpoulain@apple.com>

        The last 2 merged DFAs are not minimized by DFACombiner

        * contentextensions/DFACombiner.cpp:
        (WebCore::ContentExtensions::DFACombiner::combineDFAs):
        I introduced a bug when I made minimization conditional: the last merge
        does not minimize if we do not reach the minimum size.

2015-06-04  Brent Fulgham  <bfulgham@apple.com>

        Latching algorithm in findEnclosingOverflowScroll is broken
        https://bugs.webkit.org/show_bug.cgi?id=145642
        <rdar://problem/21242308>

        Reviewed by Simon Fraser.

        Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html

        * page/mac/EventHandlerMac.mm:
        (WebCore::scrollableAreaForBox): Added helper function.
        (WebCore::findEnclosingScrollableContainer): Renamed from findEnclosingOverflowScroll.
        Only identify something as our scroll element if it can be scrolled in either
        axis of the gesture's motion.
        (WebCore::scrollableAreaForContainerNode): Use new helper function.
        (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
        name, and pass horizontal and vertical deltas.
        (WebCore::findEnclosingOverflowScroll): Deleted.

2015-06-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        REGRESSION(r185091): Crash happens on indexdb tests
        https://bugs.webkit.org/show_bug.cgi?id=145549

        Reviewed by Darin Adler.

        * Modules/indexeddb/IDBDatabaseError.h:
        (WebCore::IDBDatabaseError::create): Revert Ref usage of IDBDatabaseError::create().

2015-06-04  Simon Fraser  <simon.fraser@apple.com>

        Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
        https://bugs.webkit.org/show_bug.cgi?id=145677
        rdar://problem/20698280

        Reviewed by Dean Jackson.

        If a transition is running on a pseudo-element, and the host element is removed
        from the DOM just as the transition ends, and there is a transition event listener,
        then we'd crash with a null dereference in event dispatch code.
        
        AnimationController tries to clean up running animations when renderers are destroyed,
        but omitted to remove the element from two vectors that store element references.
        Elements are only added to these vectors briefly on animation end, before firing
        events, but failure to remove the vector entries could result in attempting
        to fire an event on a pseudo-element with no host element.
        
        Also convert EventDispatcher code to be more robust to potentially null event
        targets, since it's not clear that eventTargetRespectingTargetRules() can always
        manage to return a non-null node.
        
        Hard to make a test because this is timing sensitive.

        * dom/EventDispatcher.cpp:
        (WebCore::eventTargetRespectingTargetRules):
        (WebCore::EventDispatcher::dispatchScopedEvent):
        (WebCore::EventDispatcher::dispatchEvent):
        (WebCore::EventPath::EventPath):
        * page/animation/AnimationController.cpp:
        (WebCore::AnimationControllerPrivate::clear):

2015-06-04  Hunseop Jeong  <hs85.jeong@samsung.com>

        Replace 0 with nullptr in WebCore/Page.
        https://bugs.webkit.org/show_bug.cgi?id=145631

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * page/AutoscrollController.cpp:
        (WebCore::AutoscrollController::AutoscrollController):
        (WebCore::AutoscrollController::stopAutoscrollTimer):
        * page/ContentSecurityPolicy.cpp:
        (WebCore::CSPSourceList::parseSource):
        * page/ContentSecurityPolicy.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::clearContextMenu):
        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::clearTreeScope):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::resetDOMWindowProperties):
        (WebCore::DOMWindow::localStorage):
        (WebCore::DOMWindow::focus):
        * page/DOMWindow.h:
        * page/DOMWindowExtension.cpp:
        (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
        (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
        * page/DOMWindowProperty.cpp:
        (WebCore::DOMWindowProperty::DOMWindowProperty):
        (WebCore::DOMWindowProperty::~DOMWindowProperty):
        (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
        (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
        (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
        * page/DragController.cpp:
        (WebCore::DragController::dragEnded):
        (WebCore::DragController::performDragOperation):
        (WebCore::DragController::tryDocumentDrag):
        (WebCore::DragController::concludeEditDrag):
        (WebCore::DragController::startDrag):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::EventHandler):
        (WebCore::EventHandler::resizeLayerDestroyed):
        (WebCore::EventHandler::freeDataTransfer):
        (WebCore::EventHandler::dragSourceEndedAt):
        (WebCore::EventHandler::handleDrag):
        * page/EventHandler.h:
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocusInDocumentOrder):
        * page/Frame.cpp:
        (WebCore::Frame::~Frame):
        (WebCore::Frame::searchForLabelsBeforeElement):
        (WebCore::Frame::willDetachPage):
        (WebCore::Frame::createView):
        * page/Frame.h:
        (WebCore::Frame::detachFromPage):
        * page/FrameDestructionObserver.cpp:
        (WebCore::FrameDestructionObserver::FrameDestructionObserver):
        (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
        (WebCore::FrameDestructionObserver::frameDestroyed):
        * page/FrameTree.cpp:
        (WebCore::FrameTree::~FrameTree):
        (WebCore::FrameTree::removeChild):
        * page/FrameTree.h:
        (WebCore::FrameTree::FrameTree):
        (WebCore::FrameTree::detachFromParent):
        * page/History.cpp:
        (WebCore::History::History):
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::~Page):
        (WebCore::Page::findStringMatchingRanges):
        * page/PageGroup.cpp:
        * page/Performance.cpp:
        (WebCore::Performance::Performance):
        * page/PointerLockController.cpp:
        (WebCore::PointerLockController::didLosePointerLock):
        (WebCore::PointerLockController::clearElement):
        * page/SecurityOrigin.h:
        (WebCore::SecurityOrigin::canAccessDatabase):
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        * page/SpatialNavigation.cpp:
        (WebCore::FocusCandidate::FocusCandidate):
        * page/SpatialNavigation.h:
        (WebCore::FocusCandidate::FocusCandidate):
        * page/scrolling/ScrollingTreeNode.cpp:
        (WebCore::ScrollingTreeNode::ScrollingTreeNode):
        * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
        (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):

2015-06-04  Benjamin Poulain  <bpoulain@apple.com>

        Combine tiny DFAs into slightly larger ones
        https://bugs.webkit.org/show_bug.cgi?id=145572

        Reviewed by Alex Christensen.

        This patch changes the ContentExtensions compiler to combine tiny DFA
        until they reach a minimum size.

        The main tool introduced here is DFAMerger. It combines 2 DFAs into
        a single DFA that represent the union of the two machines.
        That is done by a simple subset construction on the "name" of the nodes
        in each DFAs.

        Since we only merge 2 machines, and they are both deterministic, we know that
        we can only be in one state of each machine, or a state in one machine without
        equivalent in the other machine.
        We exploit that to identify the mapping between nodes. To identify a node in
        the new machine from nodes in the original machines, we just concatenate the node
        IDs into a single 64 bits number. If there is no node in one of the machine, we
        use a special tag.

        The current algorithm does not have any subgraph pruning, machines grow very very
        quickly. Because of that, we only merge very small DFAs at the moment.

        Test: http/tests/contentextensions/filters-with-quantifiers-combined.html

        * WebCore.xcodeproj/project.pbxproj:
        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::compileRuleList):
        * contentextensions/ContentExtensionsDebugging.h:
        * contentextensions/DFA.cpp:
        (WebCore::ContentExtensions::DFA::graphSize):
        (WebCore::ContentExtensions::DFA::debugPrintDot):
        * contentextensions/DFA.h:
        * contentextensions/DFACombiner.cpp: Added.
        (WebCore::ContentExtensions::DFAMerger::DFAMerger):
        (WebCore::ContentExtensions::DFAMerger::merge):
        (WebCore::ContentExtensions::DFAMerger::signatureForIndices):
        (WebCore::ContentExtensions::DFAMerger::extractIndexA):
        (WebCore::ContentExtensions::DFAMerger::extractIndexB):
        (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
        (WebCore::ContentExtensions::DFAMerger::setHalfSignature):
        (WebCore::ContentExtensions::DFAMerger::populateTransitions):
        (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions):
        (WebCore::ContentExtensions::DFAMerger::createTransitions):
        (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded):
        (WebCore::ContentExtensions::DFACombiner::combineDFAs):
        * contentextensions/DFACombiner.h: Copied from Source/WebCore/contentextensions/DFA.h.
        (WebCore::ContentExtensions::DFACombiner::addDFA):

2015-06-04  Matt Rajca  <mrajca@apple.com>

        Rename MediaSessionManager to PlatformMediaSessionManager for consistency with PlatformMediaSession.
        https://bugs.webkit.org/show_bug.cgi?id=145648

        Reviewed by Eric Carlson.

        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::effectivePreloadForElement):
        (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::PlatformMediaSession):
        (WebCore::PlatformMediaSession::~PlatformMediaSession):
        (WebCore::PlatformMediaSession::clientWillBeginPlayback):
        (WebCore::PlatformMediaSession::clientWillPausePlayback):
        (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
        (WebCore::PlatformMediaSession::updateClientDataBuffering):
        * platform/audio/PlatformMediaSessionManager.cpp: Renamed from Source/WebCore/platform/audio/MediaSessionManager.cpp.
        (WebCore::PlatformMediaSessionManager::sharedManager):
        (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
        (WebCore::PlatformMediaSessionManager::resetRestrictions):
        (WebCore::PlatformMediaSessionManager::has):
        (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
        (WebCore::PlatformMediaSessionManager::count):
        (WebCore::PlatformMediaSessionManager::beginInterruption):
        (WebCore::PlatformMediaSessionManager::endInterruption):
        (WebCore::PlatformMediaSessionManager::addSession):
        (WebCore::PlatformMediaSessionManager::removeSession):
        (WebCore::PlatformMediaSessionManager::addRestriction):
        (WebCore::PlatformMediaSessionManager::removeRestriction):
        (WebCore::PlatformMediaSessionManager::restrictions):
        (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
        (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
        (WebCore::PlatformMediaSessionManager::setCurrentSession):
        (WebCore::PlatformMediaSessionManager::currentSession):
        (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback):
        (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
        (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
        (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
        (WebCore::PlatformMediaSessionManager::updateSessionState):
        (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand):
        (WebCore::PlatformMediaSessionManager::systemWillSleep):
        (WebCore::PlatformMediaSessionManager::systemDidWake):
        (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged):
        * platform/audio/PlatformMediaSessionManager.h: Renamed from Source/WebCore/platform/audio/MediaSessionManager.h.
        (WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager):
        (WebCore::PlatformMediaSessionManager::configureWireLessTargetMonitoring):
        (WebCore::PlatformMediaSessionManager::hasWirelessTargetsAvailable):
        (WebCore::PlatformMediaSessionManager::sessions):
        * platform/audio/mac/AudioDestinationMac.cpp:
        * platform/audio/mac/MediaSessionManagerMac.cpp:
        (PlatformMediaSessionManager::updateSessionState):
        (MediaSessionManager::updateSessionState): Deleted.
        * testing/Internals.cpp:

2015-06-04  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Don't show default controls after playing to wireless target, again
        https://bugs.webkit.org/show_bug.cgi?id=145620
        <rdar://problem/21145806>

        Reviewed by Dean Jackson.

        Follow up to fix two tests broken by r185207.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.updateControls): Always show controls when the video element
          is the fullscreen element because custom controls aren't possible.

2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Add ASSERT to FontPlatformData::ctFont()
        https://bugs.webkit.org/show_bug.cgi?id=145659

        Reviewed by Dean Jackson.

        The new ASSERT needs to be guarded with CORETEXT_WEB_FONTS, which is defined in FontCustomPlatformData.h,
        and is not accessible to FontPlatformData. Therefore, I've moved the definition into TextFlags.h, which
        both files include.

        No new tests because there is no behavior change.

        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::ctFont): Add the ASSERT.
        * platform/graphics/mac/FontCustomPlatformData.h: Move the CORETEXT_WEB_FONTS preprocessor
        macro from here ...
        * platform/text/TextFlags.h: ... to here.

2015-06-04  Commit Queue  <commit-queue@webkit.org>

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

        platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-
        latched-select.html (Requested by shallawa on #webkit).

        Reverted changeset:

        "Latching algorithm in findEnclosingOverflowScroll is broken"
        https://bugs.webkit.org/show_bug.cgi?id=145642
        http://trac.webkit.org/changeset/185208

2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Remove unnecessary code from FontPlatformData::ctFont()
        https://bugs.webkit.org/show_bug.cgi?id=145652

        Hoefler Text Italic no longer has initial and final swashes by default, so there
        is no reason to explicitly disable them.

        Reviewed by Andreas Kling.

        No new tests because there is no behavior change.

        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::ctFont):
        (WebCore::createFeatureSettingDictionary): Deleted.
        (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Deleted.

2015-06-04  Brent Fulgham  <bfulgham@apple.com>

        Latching algorithm in findEnclosingOverflowScroll is broken
        https://bugs.webkit.org/show_bug.cgi?id=145642
        <rdar://problem/21242308>

        Reviewed by Simon Fraser.

        Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html

        * page/mac/EventHandlerMac.mm:
        (WebCore::findEnclosingOverflowScrollForDominantDirection): Renamed from
        'findEnclosingOverflowScroll'. Only identify element as our overflow
        scroll element if it can be scrolled in either axis of the gesture's
        motion.
        (WebCore::scrolledToEdgeInDominantDirection): Renamed.
        (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
        name, and pass horizontal and vertical deltas.
        (WebCore::findEnclosingOverflowScroll): Deleted.

2015-06-04  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Don't show default controls after playing to wireless target, again
        https://bugs.webkit.org/show_bug.cgi?id=145620
        <rdar://problem/21145806>

        Reviewed by Dean Jackson.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.updateControls): Show or hide the panel as appropriate.
        (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
        (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
          so all needed setup is done.
        (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.

2015-06-04  Chris Dumez  <cdumez@apple.com>

        [WK2] Prune more resources from the MemoryCache before process suspension
        https://bugs.webkit.org/show_bug.cgi?id=145633

        Reviewed by Andreas Kling.

        Prune more resources from the MemoryCache before process suspension or
        on simulated memory warning by doing a synchronous JS garbage collection
        and sweep *before* pruning dead resources from the memory cache.
        Previously, we would do the garbage collection after pruning the
        MemoryCache which meant that a lot of resources became dead after we
        tried to prune them.

        At the end a basic browsing on apple.com, we are able to remove ~17%
        more resources from the MemoryCache on simulated memory warning with this
        change.

        Pruning as much as we can from the memory cache on critical memory
        pressure or before process suspension is not only useful to free up
        memory but also to make room in the vnode table as a lot of
        CachedResources are mmmap'd from the network disk cache.

        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::MemoryPressureHandler):
        (WebCore::MemoryPressureHandler::releaseCriticalMemory):

        - Pass 'synchronous' argument so that we know if we need to do a
          synchronous JS garbage collection.
        - Move here code from in the Cocoa handler that is doing a JS garbage
          collection as well as a sweep, and make this code cross-platform.
          This code used to be iOS specific but I see no reason we shouldn't
          do this on Mac.

        (WebCore::MemoryPressureHandler::releaseMemory):
        * platform/MemoryPressureHandler.h:

        Use enum class arguments for critical / synchronous. The 'synchronous'
        argument is new so that the call site can let us know if memory needs
        to be freed synchronously (e.g. in case of imminent process suspension).

        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        (WebCore::MemoryPressureHandler::platformReleaseMemory):

        Remove iOS-specific code that was doing a JS garbage collection and
        sweep as this code is now in the generic memory pressure handler.

        (WebCore::MemoryPressureHandler::install):

        On simulated memory pressure, set 'synchronous' argument to Yes so that
        a synchronous GC is done by the generic memory pressure handler. This
        way, we no longer need to do a sync GC after calling the memory pressure
        handler. This avoids code duplication and makes sure the GC is done
        before pruning the memory cache.


2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Clean up m_isEmoji in FontPlatformData
        https://bugs.webkit.org/show_bug.cgi?id=145644

        Reviewed by Andreas Kling.

        m_isEmoji used to be a public member variable only defined on iOS. This
        means that, whenever it was consulted, the sites were surrounded by
        PLATFORM(IOS) guards. A cleaner design is to use a getter and setter,
        which on non-iOS platforms, always return false / do nothing. Then, the
        use sites can just use these functions without having ugly guards.

        No new tests because there is no behavior change.

        * platform/graphics/FontPlatformData.h:
        (WebCore::FontPlatformData::hash): Simplify isEmoji use site.
        (WebCore::FontPlatformData::isEmoji): Getter. Returns false on Mac.
        (WebCore::FontPlatformData::setIsEmoji): Setter. Does nothing on Mac.
        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::pointAdjustedForEmoji): Simplify isEmoji use site.
        (WebCore::FontCascade::drawGlyphs): Ditto.
        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::platformInit): Ditto.
        (WebCore::canUseFastGlyphAdvanceGetter): Ditto.
        (WebCore::isEmoji): Deleted.
        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::platformDataInit): Simplify isEmoji use
        site.
        (WebCore::FontPlatformData::platformDataAssign): Ditto.
        (WebCore::FontPlatformData::platformIsEqual): Ditto.
        (WebCore::FontPlatformData::ctFontSize): Ditto.
        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::FontCache::getSystemFontFallbackForCharacters): Ditto.
        (WebCore::FontCache::createFontPlatformData): Ditto.
        * platform/graphics/mac/ComplexTextController.cpp:
        (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.

2015-06-03  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION (r181879): Scrolling order on pages with focused iframe is broken.
        https://bugs.webkit.org/show_bug.cgi?id=145637
        <rdar://problem/20635581>

        Reviewed by Zalan Bujtas.

        Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html

        This page revealed a bug in our RenderBox code caused by the mismatch between
        our scrolling units, which are all integrally snapped, with our client height
        and widths, which are not snapped at all. 
        
        In certain cases, the client height would have a small subpixel difference compared
        to the scroll height, which would cause WebKit to believe it was scrollable. When
        this happened, it would get stuck latched to this element and block scrolling events. 

        * page/Frame.cpp:
        (WebCore::Frame::scrollOverflowLayer): Use roundToInt for clientWidth and clientHeight,
        rather than integer truncation.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): Need to round clientWidth
        and clientHeight to compare with scrollWidth/scrollHeight.
        * rendering/RenderBox.h:
        (WebCore::RenderBox::hasScrollableOverflowX): Ditto.
        (WebCore::RenderBox::hasScrollableOverflowY): Ditto.
        * rendering/RenderMarquee.cpp:
        (WebCore::RenderMarquee::computePosition): Use roundToInt for clientWidth and
        clientHeight, rather than integer truncation.

2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Clean up m_font inside FontPlatformData
        https://bugs.webkit.org/show_bug.cgi?id=145634

        Reviewed by Andreas Kling.

        FontPlatformDatas are used as keys in a HashMap. This means that they need
        to be able to represent a "deleted" value. Previously, this "deleted" value
        was represented as setting the pointer value of m_font to -1, and guarding
        all uses of m_font to make sure it wasn't -1 before dereferencing it.

        This patch simplifies FontPlatformData to represent a "deleted" value using
        a separate boolean member variable. This class is already big enough that
        the increased space is negligable (the class already contains two CoreText
        fonts in addition to a CoreGraphics font). Because of this simplification,
        m_font can now be a RetainPtr, instead of being manually retained and
        released.

        There is still a long way to go before FontPlatformData is acceptably
        clean and understandable. This patch improves one aspect of it, and more
        improvements will eventually follow.

        No new tests because there is no behavior change.

        * platform/graphics/FontCache.cpp: Remove unused variable.
        * platform/graphics/FontPlatformData.cpp:
        (WebCore::FontPlatformData::FontPlatformData): Clean up all the PLATFORM
        macros in favor of a single bool. Also, update to include new state.
        (WebCore::FontPlatformData::operator=): Update to include new state.
        * platform/graphics/FontPlatformData.h:
        (WebCore::FontPlatformData::font): Update to account for RetainPtr.
        (WebCore::FontPlatformData::nsFont): Ditto.
        (WebCore::FontPlatformData::setNSFont): Ditto.
        (WebCore::FontPlatformData::hash): Update to include new state.
        (WebCore::FontPlatformData::operator==): Ditto.
        (WebCore::FontPlatformData::isHashTableDeletedValue): Use new state.
        (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
        (WebCore::FontPlatformData::isValidCTFontRef): Deleted.
        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::platformDataInit): No need for manual retain
        and release.
        (WebCore::FontPlatformData::platformDataAssign): Ditto.
        (WebCore::FontPlatformData::platformIsEqual): Update to account for
        RetanPtr.
        (WebCore::FontPlatformData::setFont): No need for manual retain and
        release.
        (WebCore::FontPlatformData::FontPlatformData): Deleted.
        (WebCore::FontPlatformData::~FontPlatformData): Deleted.
        * platform/graphics/win/FontPlatformDataCairoWin.cpp:
        (WebCore::FontPlatformData::~FontPlatformData): m_scaledFont is always
        valid.
        (WebCore::FontPlatformData::platformDataAssign): Ditto.

2015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] [Wayland] Build is broken on trunk
        https://bugs.webkit.org/show_bug.cgi?id=142879

        Reviewed by Carlos Garcia Campos.

        No new tests, no behavior changes.

        Patch on GLContext.h picked from bug 136831 by
        Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>

        * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
        to use the Wayland platform when building for Wayland.
        * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
        headers for the different targets.
        * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
        (WebCore::WaylandSurface::~WaylandSurface):

2015-06-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] Implement ReadableStreamController enqueue
        https://bugs.webkit.org/show_bug.cgi?id=145210

        Reviewed by Darin Adler.

        Added possibility to enqueue any JSValue within ReadableJSStream.
        They are stored in a Vector of strongified JSValue.

        Added support for streams that contain data but are asked to close.
        This is done through m_closeRequested boolean and splitting actual closing of the stream from changeStateToClosed().

        Chunk size and backpressure mechanism is not yet implemented.
        Neither is pulling once enqueued data is processed.

        Covered by rebased tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::changeStateToClosed): Split method with newly added close().
        (WebCore::ReadableStream::close): Does the actual closing of stream once stream has no more values.
        (WebCore::ReadableStream::read): Close the stream when stream is emptied and close is requested.
        (WebCore::ReadableStream::resolveReadCallback): Added to enable ReadableJSStream to resolve read callbacks immediatly at enqueue time.
        * Modules/streams/ReadableStream.h:
        (WebCore::ReadableStream::isErrored): Getter added for the custom binding code.
        (WebCore::ReadableStream::isCloseRequested): Ditto.
        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::JSReadableStreamController::enqueue): binding code for enqueue, taking care of raising exception if readable stream cannot enqueue.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::hasValue):
        (WebCore::ReadableJSStream::read):
        (WebCore::ReadableJSStream::enqueue):
        * bindings/js/ReadableJSStream.h:

2015-06-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableJSStream does not need a ReadableStreamSource
        https://bugs.webkit.org/show_bug.cgi?id=145601

        Reviewed by Darin Adler.

        Covered by existing tests.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::ReadableStream): Remoed m_source.
        * Modules/streams/ReadableStream.h: Ditto
        * Modules/streams/ReadableStreamSource.h: Deleted.
        * WebCore.vcxproj/WebCore.vcxproj: Removing Modules/streams/ReadableStreamSource.h.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::globalObject):
        (WebCore::ReadableJSStream::doStart): Equivalent of ReadableJSStream::Source::start().
        (WebCore::ReadableJSStream::create): Updated according new constructor.
        (WebCore::ReadableJSStream::ReadableJSStream):
        (WebCore::startReadableStreamAsync): Deleted.
        (WebCore::ReadableJSStream::jsController): Deleted.
        (WebCore::ReadableJSStream::storeError): Deleted.
        * bindings/js/ReadableJSStream.h: Added m_source member to store the JS source as a JS object.

2015-06-04  Zan Dobersek  <zdobersek@igalia.com>

        Shrink the ArabicCharShapingMode enum in SVGGlyph.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145564

        Reviewed by Darin Adler.

        Shrink the ArabicCharShapingMode enum to just one byte.
        This drops the size of the static s_arabicCharShapingMode
        array of  ArabicCharShapingMode values from 888 bytes to 222.

        * platform/graphics/SVGGlyph.cpp:
        (WebCore::processArabicFormDetection):

2015-06-03  Zalan Bujtas  <zalan@apple.com>

        Use borderBoxRect instead of contentBoxRect for backdrop filter.
        https://bugs.webkit.org/show_bug.cgi?id=145606

        Reviewed by Simon Fraser.

        Backdrop filter should use border box rect. It also needs to take css clip into account.

        Tests: css3/filters/backdrop/backdrop-filter-with-cliprect.html
               css3/filters/backdrop/backdrop-filter-with-mask.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):

2015-06-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        MediaDevices.getUserMedia should put promises in resolve/reject state synchronously
        https://bugs.webkit.org/show_bug.cgi?id=145308

        Reviewed by Darin Adler.

        Removed the calls to callToMainThread in which were resolved and rejected promises.
        Cleaned up the code to remove unneeded callback copies.

        Covered by existing tests.

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::create):
        (WebCore::UserMediaRequest::UserMediaRequest):
        (WebCore::UserMediaRequest::didCreateStream):
        (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
        (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
        * Modules/mediastream/UserMediaRequest.h:

2015-06-03  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
        https://bugs.webkit.org/show_bug.cgi?id=145630

        Reviewed by Zalan Bujtas.

        r184968 changed the initial value of m_intersectsCoverageRect to false. However,
        this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
        updated.

        Fix by copying the value of m_intersectsCoverageRect from the main layer to its
        mask layer, just as we do for m_visibleRect and m_coverageRect.

        Test: compositing/visible-rect/mask-layer-coverage.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):

2015-06-03  Simon Fraser  <simon.fraser@apple.com>

        Layer tree dumps should include mask layers
        https://bugs.webkit.org/show_bug.cgi?id=145629

        Reviewed by Zalan Bujtas.

        Dumping the layer tree omitted to dump the mask layer, so fix 
        GraphicsLayer::dumpProperties() to dump this layer.

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::dumpProperties):

2015-06-03  Greg Hughes  <ghughes@apple.com>

        AX: Expose field sets to accessibility clients
        https://bugs.webkit.org/show_bug.cgi?id=145585
   
        Expose fieldsets to the accessibility API via a subrole of AXFieldset.

        Reviewed by Chris Fleizach.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper subrole]):

2015-06-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Remove dead code FontPlatformData::roundsGlyphAdvances()
        https://bugs.webkit.org/show_bug.cgi?id=145628

        Reviewed by Simon Fraser.

        No new tests because there is no behavior change.

        * WebCore.order:
        * platform/graphics/FontPlatformData.h:
        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.

2015-06-03  Ryuan Choi  <ryuan.choi@navercorp.com>

        [CoordinatedGraphics] Merge CoordinatedTile into Tile
        https://bugs.webkit.org/show_bug.cgi?id=145602

        Reviewed by Darin Adler.

        CoordinatedTile only implements Tile since Qt and WebKit1/Efl were dropped.
        So, there is no reason that CoordinatedTile inherits Tile interface.

        No new tests, no behavior changes.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
        * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: Renamed to Tile.cpp
        * platform/graphics/texmap/coordinated/CoordinatedTile.h: Merged into Tile.h
        (WebCore::CoordinatedTile::coordinate): Deleted.
        (WebCore::CoordinatedTile::rect): Deleted.
        * platform/graphics/texmap/coordinated/Tile.cpp: Renamed from CoordinatedTile.cpp.
        * platform/graphics/texmap/coordinated/Tile.h:
        * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
        (WebCore::TiledBackingStore::createTiles):

2015-06-03  Matt Rajca  <mrajca@apple.com>

        Add basic Media Session support to HTMLMediaElement.
        https://bugs.webkit.org/show_bug.cgi?id=145581

        Reviewed by Eric Carlson.

        HTMLMediaElements now have:

        - a 'kind' attribute representing the intrinsic media category
        - a 'session' attribute representing the current media session, if any

        * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
        * DerivedSources.make: Include the new IDL file.
        * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
        (WebCore::HTMLMediaElementMediaSession::session):
        * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
        (WebCore::HTMLMediaElementMediaSession::kind):
        (WebCore::HTMLMediaElementMediaSession::setKind):
        (WebCore::HTMLMediaElementMediaSession::setSession):
        * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
        * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
        * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
        * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
        (WebCore::HTMLMediaElement::kind):
        (WebCore::HTMLMediaElement::setKind):
        (WebCore::HTMLMediaElement::session):
        (WebCore::HTMLMediaElement::setSession):

2015-06-03  Myles C. Maxfield  <mmaxfield@apple.com>

        Cleanup after r185175.
        https://bugs.webkit.org/show_bug.cgi?id=145569
        <rdar://problem/20671711>

        Unreviewed.

        No new tests because there is no behavior change.

        * platform/graphics/WidthIterator.h:

2015-06-02  Myles C. Maxfield  <mmaxfield@apple.com>

        SoftBank Emoji are not transformed by shaping when in a run of their own
        https://bugs.webkit.org/show_bug.cgi?id=145569
        <rdar://problem/20671711>

        Reviewed by Dean Jackson.

        Normally, we don't perform shaping on single glyphs. However, these particular codepoints
        need to have shaping run on them, even if they are alone.

        Test: fast/text/softbank-emoji.html Note that this test may fail in different locales on
        different platforms. This patch disables the test on iOS.

        * Source/WebCore/platform/graphics/WidthIterator.cpp:
        (WebCore::applyFontTransforms): Move the length-of-1 check into shouldApplyFontTransforms()
        (WebCore::shouldApplyFontTransforms): Return true if we have one of these emoji characters in
        a run of its own
        (WebCore::advanceInternal): Keep track of the previous character, and use it to call
        shouldApplyFontTransforms. 
        * Source/WebCore/platform/graphics/WidthIterator.h: shouldApplyFontTransforms() needs
        some more information to perform its duties.

2015-06-03  Daniel Bates  <dabates@apple.com>

        Caps lock indicator should not be shown in read-only or disabled field
        https://bugs.webkit.org/show_bug.cgi?id=145612
        <rdar://problem/21227454>

        Reviewed by Darin Adler.

        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::disabledAttributeChanged): Update caps lock indicator state.
        (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
        (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator): Do not draw the caps lock indicator
        when the field is read-only or disabled.

2015-06-03  Dean Jackson  <dino@apple.com>

        Crash in GraphicsContext3D::getInternalFramebufferSize
        https://bugs.webkit.org/show_bug.cgi?id=145479
        <rdar://problem/16461048>

        Reviewed by Eric Carlson.

        If we are in an unitialized or lost state, don't try to access the context.

        In order to test this, I added an Internal setting that always
        forces WebGL into a pending state.

        Test: fast/canvas/webgl/useWhilePending.html

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::create): Check internal settings for
        a forced pending state.
        (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
        (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
        * page/Settings.cpp: New Internal setting for forcing a pending policy.
        (WebCore::Settings::Settings):
        (WebCore::Settings::setForcePendingWebGLPolicy):
        * page/Settings.h:
        (WebCore::Settings::isForcePendingWebGLPolicy):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setForcePendingWebGLPolicy):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2015-06-03  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/page.
        https://bugs.webkit.org/show_bug.cgi?id=145455

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * page/Chrome.cpp:
        (WebCore::Chrome::notifyPopupOpeningObservers):
        * page/ContentSecurityPolicy.cpp:
        (WebCore::CSPSourceList::matches):
        (WebCore::CSPDirectiveList::gatherReportURIs):
        (WebCore::ContentSecurityPolicy::copyStateFrom):
        (WebCore::isAllowedByAll):
        (WebCore::isAllowedByAllWithState):
        (WebCore::isAllowedByAllWithContext):
        (WebCore::isAllowedByAllWithURL):
        (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
        (WebCore::ContentSecurityPolicy::allowPluginType):
        (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
        (WebCore::ContentSecurityPolicy::gatherReportURIs):
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::populate):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
        (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
        (WebCore::DOMWindow::willDestroyCachedFrame):
        (WebCore::DOMWindow::willDestroyDocumentInFrame):
        (WebCore::DOMWindow::willDetachDocumentFromFrame):
        (WebCore::DOMWindow::disconnectDOMWindowProperties):
        (WebCore::DOMWindow::reconnectDOMWindowProperties):
        (WebCore::DOMWindow::getMatchedCSSRules):
        * page/DeviceController.cpp:
        (WebCore::DeviceController::dispatchDeviceEvent):
        (WebCore::DeviceController::fireDeviceEvent):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::updateMouseEventTargetNode):
        (WebCore::EventHandler::handleTouchEvent):
        * page/FocusController.cpp:
        (WebCore::FocusController::setIsVisibleAndActiveInternal):
        * page/Frame.cpp:
        (WebCore::Frame::orientationChanged):
        (WebCore::Frame::injectUserScriptsForWorld):
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollContentsFastPath):
        (WebCore::FrameView::serviceScriptedAnimations):
        (WebCore::FrameView::trackedRepaintRectsAsText):
        (WebCore::FrameView::updateWidgetPositions):
        (WebCore::FrameView::notifyWidgets):
        * page/Page.cpp:
        (WebCore::networkStateChanged):
        (WebCore::Page::stringToViewMode):
        (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
        (WebCore::Page::refreshPlugins):
        (WebCore::Page::lockAllOverlayScrollbarsToHidden):
        (WebCore::Page::pluginViews):
        (WebCore::Page::storageBlockingStateChanged):
        (WebCore::Page::setIsVisibleInternal):
        * page/PageGroup.cpp:
        (WebCore::PageGroup::captionPreferencesChanged):
        * page/PageGroupLoadDeferrer.cpp:
        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
        (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
        * page/PageSerializer.cpp:
        (WebCore::PageSerializer::serializeFrame):
        * page/Performance.cpp:
        (WebCore::Performance::webkitGetEntriesByType):
        (WebCore::Performance::webkitGetEntriesByName):
        * page/PerformanceResourceTiming.cpp:
        (WebCore::passesTimingAllowCheck):
        * page/PerformanceUserTiming.cpp:
        (WebCore::convertToEntrySequence):
        * page/SecurityPolicy.cpp:
        (WebCore::SecurityPolicy::isAccessWhiteListed):
        * page/UserContentURLPattern.cpp:
        (WebCore::UserContentURLPattern::matchesPatterns):
        * page/WindowFeatures.cpp:
        (WebCore::WindowFeatures::parseDialogFeatures):
        * page/animation/AnimationController.cpp:
        (WebCore::AnimationControllerPrivate::updateAnimations):
        (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
        (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
        (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
        (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::ShorthandPropertyWrapper::equals):
        (WebCore::ShorthandPropertyWrapper::blend):
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
        (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):

2015-06-03  Daniel Bates  <dabates@apple.com>

        AutoFill button should not be shown in read-only or disabled field
        https://bugs.webkit.org/show_bug.cgi?id=145579
        <rdar://problem/21212494>

        Reviewed by Darin Adler.

        Fixes an issue where the AutoFill button is shown in a read-only or disabled
        field. We should not show the AutoFill button in such cases.

        Tests: fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html
               fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html
               fast/forms/auto-fill-button/input-auto-fill-button.html
               fast/forms/auto-fill-button/input-disabled-auto-fill-button.html
               fast/forms/auto-fill-button/input-readonly-auto-fill-button.html
               fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html

        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
        (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
        (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
        when the field is disabled or read-only.

2015-06-03  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
        https://bugs.webkit.org/show_bug.cgi?id=145574
        <rdar://problem/20966828>

        Reviewed by Simon Fraser.

        Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html

        When the scroll gesture is started when the latched scrollable container is not at the limit of its
        scroll region, we are NOT supposed to propagate the scroll event to the enclosing region. However,
        we were doing two things wrong:
        (1) When we recognized we were latching, we were using the right wheel event target, but not using
            the latched scrollable container.
        (2) Likewise, we were not using latched ScrollableArea when handling wheel events.

        Instead, we were using the current scrollable container and ScrollableArea under the mouse pointer,
        which could be different from the point we started latching as the content scrolled.
        
        The fix was to properly track the scrollable container and scrollable area during latching.

        I attempted to store the latched ScrollableArea in the latchingState object, like we already do for the
        scrollable container, but found that this did not work properly. I think the life cycle of the
        ScrollableArea may not match the scrollable container, and since they are not reference counted I
        simply retrieve the ScrollableArea when needed.

        * page/mac/EventHandlerMac.mm:
        (WebCore::scrollableAreaForContainerNode): Helper function to return the correct ScrollableArea
        for the two types of RenderBox elements.
        (WebCore::latchedToFrameOrBody): Helper predicate to identify Frame and Body elements.
        (WebCore::EventHandler::platformPrepareForWheelEvents): Use the correct ScrollableArea for the given
        ContainerNode. When latching, make sure to use the ScrollableArea that is related to the latched scrollable
        container, not the area currently underneath the mouse pointer.

2015-06-03  Brady Eidson  <beidson@apple.com>

        REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs
        https://bugs.webkit.org/show_bug.cgi?id=145580

        Reviewed by Mark Lam.

        Tests: fast/loader/fragment-navigation-base-blank.html
               fast/loader/iframe-meta-refresh-base-blank.html
               fast/loader/iframe-set-location-base-blank.html
               fast/loader/refresh-iframe-base-blank.html

        Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self".
        After 183498, many remained without a frame name.
        
        Later on, FrameLoader applies the <base> target as their frame name if they don't already have one. 
        
        When the <base> target is "_blank", that causes a new window/tab.
        
        Restoring "_self" to these call sites fixes this.

        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::openInNewTab):
        
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::navigate):
        
        * loader/FrameLoadRequest.h:
        (WebCore::FrameLoadRequest::FrameLoadRequest):
        
        * loader/NavigationScheduler.cpp:
        (WebCore::NavigationScheduler::scheduleLocationChange):
        
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::createWindow):

2015-06-03  Alexey Proskuryakov  <ap@apple.com>

        More iOS build fixing.

        * platform/spi/mac/AVFoundationSPI.h:

2015-06-03  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: Composited layer with subpixel gap does not get painted properly when its position changes.
        https://bugs.webkit.org/show_bug.cgi?id=145587

        Reviewed by Simon Fraser.

        The composited layer always snaps to an enclosing device pixel (floors) while the renderer rounds.
        At certain positions (for example 0.5px on a 1x display), a gap is formed between the layer(0px) and its renderer(1px).
        In such cases, when the the renderer moves to a position (1.1px) where the gap is closed, we need to issue repaint on the layer
        in order to get the renderering right.

        Test: compositing/child-layer-with-subpixel-gap-needs-repaint-when-parent-moves.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateAfterLayout):
        (WebCore::devicePixelFractionGapFromRendererChanged):
        (WebCore::RenderLayerBacking::updateGeometry):
        * rendering/RenderLayerBacking.h:

2015-06-03  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableStreamReader::closed() should be called once by binding code
        https://bugs.webkit.org/show_bug.cgi?id=145551

        Reviewed by Darin Adler.

        Covered by existing tests.

        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::closed): Calling ReadableStreamReader::closed only at creation of the promise.

2015-06-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL][GTK] Fix build error since r185137
        https://bugs.webkit.org/show_bug.cgi?id=145596

        Unreviewed, fix build break on EFL and GTK port.

        * dom/Text.cpp:
        (WebCore::Text::formatForDebugger): Use strncpy() instead of strlcpy().

2015-06-02  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Switch from parenthesis to brackets for grid line names
        https://bugs.webkit.org/show_bug.cgi?id=144996

        Reviewed by Darin Adler.

        Grid line names are now enclosed by brackets instead of parentheses
        as mentioned in the latest version of the spec. Appartently the CSS
        code is now more readable and avoids issues with tools like SASS.

        * css/CSSGrammar.y.in:
        * css/CSSGridLineNamesValue.cpp:
        (WebCore::CSSGridLineNamesValue::customCSSText):

2015-06-02  Alexey Proskuryakov  <ap@apple.com>

        iOS build fix

        * platform/spi/mac/AVFoundationSPI.h:

2015-06-02  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r185128 and r185132.
        https://bugs.webkit.org/show_bug.cgi?id=145597

        The new test hits a bad assertion (Requested by ap on
        #webkit).

        Reverted changesets:

        "Crash in GraphicsContext3D::getInternalFramebufferSize"
        https://bugs.webkit.org/show_bug.cgi?id=145479
        http://trac.webkit.org/changeset/185128

        "Skip webgl/useWhilePending.html on WebKit 1."
        http://trac.webkit.org/changeset/185132

2015-06-02  Ryuan Choi  <ryuan.choi@navercorp.com>

        [CoordinatedGraphics] Refactor TiledBackingStoreClient
        https://bugs.webkit.org/show_bug.cgi?id=145577

        Reviewed by Gyuyoung Kim.

        This patch removes and simplifies unnecessary virtual methods of TiledBackingStoreClient.

        No new tests, no behavior changes.

        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers): Renamed from tiledBackingStorePaintEnd.
        (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintBegin): Deleted.
        (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): Deleted.
        (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreBackgroundColor):
        Deleted because tiledBackingStoreBackgroundColor() is not used anywhere.
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
        * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
        (WebCore::CoordinatedTile::updateBackBuffer):
        Simplified not to call unnecessary methods. In addition, used modern for loop.
        (WebCore::CoordinatedTile::swapBackBufferToFront): Deleted.
        * platform/graphics/texmap/coordinated/CoordinatedTile.h:
        * platform/graphics/texmap/coordinated/Tile.h:
        * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
        (WebCore::TiledBackingStore::updateTileBuffers):
        * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:

2015-06-02  Doug Russell  <d_russell@apple.com>

        AX: debugging attributes for text markers
        https://bugs.webkit.org/show_bug.cgi?id=145283

        Reviewed by Chris Fleizach.

        AXTextMarkerDebugDescription: returns the result of
        VisiblePosition::formatForDebugger() for the visible position that a text marker
        represents.
        AXTextMarkerNodeDebugDescription: calls Node::showNode() and
        Node::showNodePathForThis() for the visible position that a text marker
        represents.
        AXTextMarkerNodeTreeDebugDescription: calls Node::showTreeForThis() for the
        visible position that a text marker represents.
        AXTextMarkerRangeDebugDescription: returns the result of
        formatForDebugger(VisiblePositionRange) for the visible position range that a text
        marker range represents.

        This is debug only tooling. Tests would be flakey and not very helpful.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
        (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
        (-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
        (-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
        (formatForDebugger):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        * dom/Text.cpp:
        (WebCore::Text::formatForDebugger):

2015-06-02  Matt Rajca  <mrajca@apple.com>

        MediaSessions should keep track of their current state.
        https://bugs.webkit.org/show_bug.cgi?id=145575

        Reviewed by Alex Christensen.

        * Modules/mediasession/MediaSession.h: Per the Media Session spec, the state can be 'Idle', 'Active', or
          'Interrupted'. Sessions are created in an 'Idle' state.

2015-06-02  Jon Lee  <jonlee@apple.com>

        Build fix when building with internal SDKs
        https://bugs.webkit.org/show_bug.cgi?id=145576
        rdar://problem/21089476

        Reviewed by Alexey Proskuryakov.

        * platform/spi/mac/AVFoundationSPI.h: Include the right header.

2015-06-02  Dean Jackson  <dino@apple.com>

        No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
        https://bugs.webkit.org/show_bug.cgi?id=145573
        <rdar://problem/21210038>

        Reviewed by Myles Maxfield.

        The PICTURE_SIZES feature flag doesn't need to be used to
        guard preloading of the sizes attribute.

        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.

2015-06-02  Anders Carlsson  <andersca@apple.com>

        Use UUIDs for WebSQL database filenames instead of a sequential number
        https://bugs.webkit.org/show_bug.cgi?id=145571

        Reviewed by Dan Bernstein.

        This is a first step towards getting rid of the iOS specific code path where we truncate
        database files instead of deleting them (in order to avoid file corruption).

        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::generateDatabaseFileName):
        (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
        * platform/sql/SQLiteFileSystem.cpp:
        (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
        * platform/sql/SQLiteFileSystem.h:

2015-06-02  Dean Jackson  <dino@apple.com>

        Crash in GraphicsContext3D::getInternalFramebufferSize
        https://bugs.webkit.org/show_bug.cgi?id=145479
        <rdar://problem/16461048>

        Reviewed by Eric Carlson.

        If we are in an unitialized or lost state, don't try to access the context.

        In order to test this, I added an Internal setting that always
        forces WebGL into a pending state.

        Test: fast/canvas/webgl/useWhilePending.html

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::create): Check internal settings for
        a forced pending state.
        (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
        (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
        * page/Settings.cpp: New Internal setting for forcing a pending policy.
        (WebCore::Settings::Settings):
        (WebCore::Settings::setForcePendingWebGLPolicy):
        * page/Settings.h:
        (WebCore::Settings::isForcePendingWebGLPolicy):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setForcePendingWebGLPolicy):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2015-06-02  Matt Rajca  <mrajca@apple.com>

        Added a stub implementation of MediaSession, part of the Media Session spec.
        https://bugs.webkit.org/show_bug.cgi?id=145530

        Reviewed by Eric Carlson.

        * CMakeLists.txt: Added new MediaSession sources.
        * DerivedSources.make:
        * Modules/mediasession/MediaSession.cpp: Added stub implementation.
        (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
          set for 'content' sessions; it is null otherwise.
        (WebCore::MediaSession::~MediaSession):
        (WebCore::MediaSession::controls):
        (WebCore::MediaSession::releaseSession):
        * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
        * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
        * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.

2015-06-02  Zalan Bujtas  <zalan@apple.com>

        Backdrop filter is pulling in content from behind the window.
        https://bugs.webkit.org/show_bug.cgi?id=145561
        rdar://problem/20909309

        Reviewed by Simon Fraser.

        This patch ensures that the backdrop filter layer is positioned and sized properly.

        The backdrop filter layer should take its size and position from its renderer and not
        directly from the composited layer.
        In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
        In such cases, we ended up applying the backdrop filter to those areas as well.

        Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
               css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html

        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::setBackdropFiltersRect):
        (WebCore::GraphicsLayer::backdropFiltersRect):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
        (WebCore::GraphicsLayerCA::updateBackdropFilters):
        (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
        (WebCore::GraphicsLayerCA::updateContentsRects):
        (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
        * platform/graphics/ca/GraphicsLayerCA.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
        (WebCore::RenderLayerBacking::updateGeometry):
        * rendering/RenderLayerBacking.h:

2015-06-02  Eric Carlson  <eric.carlson@apple.com>

        [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
        https://bugs.webkit.org/show_bug.cgi?id=145559

        Reviewed by Darin Adler.

        No new tests, covered by existing tests.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
        (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
        (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
        (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.

        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::registerWithDocument): Take a document.
        (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
        * html/MediaElementSession.h:

2015-06-02  Chris Dumez  <cdumez@apple.com>

        Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
        https://bugs.webkit.org/show_bug.cgi?id=145554
        <rdar://problem/21189478>

        Reviewed by Darin Adler and Simon Fraser.

        Only call FrameView::viewportContentsChanged() after a style recalc if
        composited layers have been updated (and there is no pending layout).

        We already viewportContentsChanged() after layout so we only need to
        call viewportContentsChanged() after a style recalc if it did not cause
        a layout but may have caused an element to become visible. In
        particular, this can happen in the case of composited animations (e.g.
        using -webkit-transform to move an element inside the viewport).
        Therefore, we now only call viewportContentsChanged() after a style
        recalc if it caused composited layers to be updated. This avoids a lot
        of unnecessary calls to viewportContentsChanged(), which is expensive.

        No new tests, already covered by:
        fast/images/animated-gif-webkit-transform.html

        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):
        * page/FrameView.cpp:
        (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
        * page/FrameView.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        * rendering/RenderLayerCompositor.h:

2015-06-02  Myles C. Maxfield  <mmaxfield@apple.com>

        Remove use of CTFontSetRenderingParameters()
        https://bugs.webkit.org/show_bug.cgi?id=145560

        Reviewed by Simon Fraser.

        Instead, always use CTFontSetRenderingStyle().

        No new tests because there is no behavior change.

        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
        (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.

2015-06-02  Anders Carlsson  <andersca@apple.com>

        Move WKFontAntialiasingStateSaver to its own file
        https://bugs.webkit.org/show_bug.cgi?id=145557
        rdar://problem/21134776

        Reviewed by Dan Bernstein.

        Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
        CGFontAntialiasingStyle definition instead of using an explicit typedef.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        (PlatformCALayer::drawLayerContents):
        * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
        (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
        (WebCore::FontAntialiasingStateSaver::setup):
        (WebCore::FontAntialiasingStateSaver::restore):
        * platform/ios/LegacyTileCache.mm:
        (WebCore::LegacyTileCache::drawWindowContent):
        * platform/ios/wak/WKGraphics.h:
        (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
        * platform/ios/wak/WKGraphics.mm:
        (WKFontAntialiasingStateSaver::setup): Deleted.
        (WKFontAntialiasingStateSaver::restore): Deleted.

2015-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] Implement ReadableStreamReader read method in closed and errored state
        https://bugs.webkit.org/show_bug.cgi?id=144790

        Reviewed by Darin Adler.

        Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
        Storing of reader read() promise callbacks as a Vector in ReadableStream.
        Added resolution/rejection of read() promises in case of errored/closed streams.

        Test: streams/readable-stream-reader-read.html

        * ForwardingHeaders/runtime/IteratorOperations.h: Added.
        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
        (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
        (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
        (WebCore::ReadableStream::closed): Parameter name changed.
        (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
        value if there is one and pushes the callbacks to the queue otherwise.
        * Modules/streams/ReadableStream.h:
        (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::closed): Parameter name changed.
        (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
        and call the stream otherwise to read.
        * Modules/streams/ReadableStreamReader.h:
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
        promise and success creates the result from the read value.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::hasValue):
        (WebCore::ReadableJSStream::read): Not implemented yet.
        * bindings/js/ReadableJSStream.h:

2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] FontPlatformData's equality check should always use reference URLs
        https://bugs.webkit.org/show_bug.cgi?id=144168

        Reviewed by Tim Horton.

        <rdar://problem/18985642> is not fixed, so we need to continue using the older
        objectForEqualityCheck().

        No new tests because there is no behavior change.

        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::objectForEqualityCheck):

2015-06-02  Andy Estes  <aestes@apple.com>

        [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
        https://bugs.webkit.org/show_bug.cgi?id=145555

        Reviewed by Darin Adler.

        Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.

        * Resources/copyCursor.png: Added.
        * Resources/moveCursor.png: Added.
        * Resources/northEastSouthWestResizeCursor.png: Added.
        * Resources/northSouthResizeCursor.png: Added.
        * Resources/northWestSouthEastResizeCursor.png: Added.
        * WebCore.xcodeproj/project.pbxproj:

2015-06-02  Brady Eidson  <beidson@apple.com>

        WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
        rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280

        Reviewed by Alex Christensen.

        Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
               loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
               loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
               loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
               loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
               loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
               loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
               loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
               loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
               loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
               loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
               loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
               loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
               loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
               loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
               loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
               loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
               loader/navigation-policy/should-open-external-urls/window-open-without-flag.html

        The "should open external URLs" flag is only for main frames.
        It doesn't enforce any sort of policy internal to WebKit, but rather is for notifications to the policy delegate.
        
        It is set from one of two places:
        1 - A main frame is navigated by any frame as the result of a user gesture.
        2 - WebKit2 API explicitly states the flag is true.
        
        The flag value propagates when:
        1 - When a main frame document is navigated to a new main frame document.
        2 - When a new window is opened from a page whose main frame had the flag set.
        3 - When a new window is opened as the result of a user gesture.
        
        The flag resets to false when:
        1 - A subframe navigates a main frame without a user gesture.
        
        This patch is large, but does little more than the following:
        1 - Adds a ShouldOpenExternalURLs flag to both FrameLoadRequest and NavigationAction.
        2 - Makes sure anybody who creates either of those objects sets a sensible for that flag.
        3 - When FrameLoader creates a new DocumentLoader, it sets its flag based on whether or not the load is in a main frame,
            whether or not the load is from a user gesture, and based on the initiator's value of the flag. 
            
        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        (WebCore::Document::shouldOpenExternalURLsPolicyToPropagate):
        * dom/Document.h:
        
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::handleClick):
        
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::handleClick):
        
        * html/parser/XSSAuditorDelegate.cpp:
        (WebCore::XSSAuditorDelegate::didBlockScript):
        
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::openInNewTab):
        
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::navigate):
        
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setTriggeringAction):
        (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate):
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy): Deleted.
        
        * loader/FrameLoadRequest.cpp:
        (WebCore::FrameLoadRequest::FrameLoadRequest):
        * loader/FrameLoadRequest.h:
        (WebCore::FrameLoadRequest::FrameLoadRequest):
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected):
        (WebCore::FrameLoader::receivedFirstData):
        (WebCore::FrameLoader::loadURLIntoChildFrame):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::loadWithNavigationAction):
        (WebCore::FrameLoader::reloadWithOverrideEncoding):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameLoader::loadPostRequest):
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
        (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
        * loader/FrameLoader.h:
        
        * loader/NavigationAction.cpp:
        (WebCore::NavigationAction::NavigationAction):
        (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
        * loader/NavigationAction.h:
        (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy): Deleted.
        
        * loader/NavigationScheduler.cpp:
        (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
        (WebCore::ScheduledRedirect::ScheduledRedirect):
        (WebCore::ScheduledLocationChange::ScheduledLocationChange):
        (WebCore::ScheduledRefresh::ScheduledRefresh):
        (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
        (WebCore::NavigationScheduler::scheduleRedirect):
        (WebCore::NavigationScheduler::scheduleLocationChange):
        (WebCore::NavigationScheduler::scheduleRefresh):
        * loader/NavigationScheduler.h:
        
        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::checkNavigationPolicy):
        
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::loadOrRedirectSubframe):
        
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::selectCache):
        
        * page/ContextMenuController.cpp:
        (WebCore::openNewWindow):
        (WebCore::ContextMenuController::contextMenuItemSelected):
        
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::setLocation):
        (WebCore::DOMWindow::createWindow):
        (WebCore::DOMWindow::open):
        
        * page/DragController.cpp:
        (WebCore::DragController::performDragOperation):
        
        * page/Location.cpp:
        (WebCore::Location::reload):
        
        * replay/ReplayInputDispatchMethods.cpp:
        (WebCore::InitialNavigation::dispatch):
        
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):

2015-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>

        Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
        https://bugs.webkit.org/show_bug.cgi?id=145532

        Reviewed by Geoffrey Garen.

        Hold the ownership of AtomicStringImpl*.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateParametersCheck):
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::getElementById):

2015-06-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        SharedBuffer::copy should return a Ref<SharedBuffer>
        https://bugs.webkit.org/show_bug.cgi?id=145499

        Reviewed by Andreas Kling.

        Changing SharedBuffer::copy to return a Ref<> and adapting some code accordingly.

        Covered by existing tests.

        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse):
        * loader/appcache/ApplicationCacheResource.cpp:
        (WebCore::ApplicationCacheResource::deliver):
        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::copy):
        * platform/SharedBuffer.h:

2015-06-01  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/Modules - 1
        https://bugs.webkit.org/show_bug.cgi?id=145507

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * Modules/battery/BatteryController.cpp:
        (WebCore::BatteryController::~BatteryController):
        (WebCore::BatteryController::updateBatteryStatus):
        (WebCore::BatteryController::didChangeBatteryStatus):
        * Modules/encryptedmedia/CDM.cpp:
        (WebCore::CDMFactoryForKeySystem):
        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::~MediaKeys):
        * Modules/geolocation/Geolocation.cpp:
        (WebCore::Geolocation::resumeTimerFired):
        (WebCore::Geolocation::resetAllGeolocationPermission):
        (WebCore::Geolocation::makeCachedPositionCallbacks):
        (WebCore::Geolocation::sendError):
        (WebCore::Geolocation::sendPosition):
        (WebCore::Geolocation::stopTimer):
        (WebCore::Geolocation::cancelRequests):
        (WebCore::Geolocation::extractNotifiersWithCachedPosition):
        (WebCore::Geolocation::copyToSet):
        (WebCore::Geolocation::handlePendingPermissionNotifiers):
        * Modules/geolocation/GeolocationController.cpp:
        (WebCore::GeolocationController::positionChanged):
        (WebCore::GeolocationController::errorOccurred):
        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::objectStoreNames):
        (WebCore::IDBDatabase::transaction):
        (WebCore::IDBDatabase::forceClose):
        (WebCore::IDBDatabase::closeConnection):
        (WebCore::IDBDatabase::findObjectStoreId):
        * Modules/indexeddb/IDBDatabaseBackend.cpp:
        (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
        (WebCore::IDBDatabaseBackend::deleteDatabase):
        (WebCore::IDBDatabaseBackend::close):
        * Modules/indexeddb/IDBDatabaseMetadata.cpp:
        (WebCore::IDBDatabaseMetadata::isolatedCopy):
        (WebCore::IDBObjectStoreMetadata::isolatedCopy):
        * Modules/indexeddb/IDBKey.cpp:
        (WebCore::IDBKey::isValid):
        * Modules/indexeddb/IDBKey.h:
        (WebCore::IDBKey::createMultiEntryArray):
        (WebCore::IDBKey::createArray):
        * Modules/indexeddb/IDBKeyPath.cpp:
        (WebCore::IDBKeyPath::IDBKeyPath):
        (WebCore::IDBKeyPath::isValid):
        (WebCore::IDBKeyPath::isolatedCopy):
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::indexNames):
        (WebCore::IDBObjectStore::put):
        Rename the two 'i's to 'keyData' and 'indexKeyData'.
        (WebCore::IDBObjectStore::index):
        (WebCore::IDBObjectStore::findIndexId):
        * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
        (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::abort):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::closeOpenCursors):
        (WebCore::IDBTransaction::onAbort):
        (WebCore::IDBTransaction::dispatchEvent):
        * Modules/indexeddb/IDBTransactionBackend.cpp:
        (WebCore::IDBTransactionBackend::create):
        (WebCore::IDBTransactionBackend::closeOpenCursors):
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::onReadyStateChange):
        * Modules/mediastream/MediaConstraintsImpl.cpp:
        (WebCore::MediaConstraintsImpl::initialize):
        (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
        (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::create):
        (WebCore::MediaStream::cloneMediaStreamTrackVector):
        (WebCore::MediaStream::addTrack):
        (WebCore::MediaStream::removeTrack):
        (WebCore::MediaStream::haveTrackWithSource):
        (WebCore::MediaStream::getTrackById):
        (WebCore::MediaStream::getTracks):
        (WebCore::MediaStream::trackDidEnd):
        (WebCore::MediaStream::scheduledEventTimerFired):
        * Modules/mediastream/MediaStreamCapabilities.cpp:
        (WebCore::MediaStreamCapabilities::sourceType):
        (WebCore::MediaStreamCapabilities::sourceId):
        (WebCore::MediaStreamCapabilities::facingMode):
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::trackDidEnd):
        * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
        (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):

2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>

        [SVG -> OTF Converter] Remove unnecessary hacks
        https://bugs.webkit.org/show_bug.cgi?id=145088

        Reviewed by Simon Fraser.

        Not needed anymore.

        Test: svg/text/offset-square-svg-font.html

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

2015-06-01  Andreas Kling  <akling@apple.com>

        CSS animations in filling-forwards state shouldn't force compositing.
        <https://webkit.org/b/145389>
        <rdar://problem/17923642>

        Reviewed by Simon Fraser.

        Stop checking if a CSS animation is filling forwards when computing
        compositing requirements.

        This prevents finished animations from pinning elements in composited
        state, and frees up a bunch of IOSurface memory on some content.

        * page/animation/AnimationBase.h:
        (WebCore::AnimationBase::isAnimatingProperty): Deleted.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGeometry):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):

2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>

        Out of bounds read in WebCore::ComplexTextController::adjustGlyphsAndAdvances
        https://bugs.webkit.org/show_bug.cgi?id=145537
        <rdar://problem/20959267>

        Reviewed by Darin Adler.

        U16_IS_SURROGATE_LEAD(ch) assumes U16_IS_SURROGATE(ch). In this case, that isn't true.

        Test: fast/text/crash-complex-text-surrogate.html

        * platform/graphics/mac/ComplexTextController.cpp:
        (WebCore::ComplexTextController::adjustGlyphsAndAdvances):

2015-05-30  Zalan Bujtas  <zalan@apple.com>

        REGRESSION (179771): zooming on facebook images covers image
        https://bugs.webkit.org/show_bug.cgi?id=145485

        Reviewed by Simon Fraser.

        Scaling an infinite rect should always produce an infinite rect.
        (Based on Simon Fraser's patch)

        Test: compositing/layer-creation/zoomed-clip-intersection.html

        * platform/graphics/LayoutRect.cpp:
        (WebCore::LayoutRect::scale):

2015-06-01  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr in WebCore/Modules - 3
        https://bugs.webkit.org/show_bug.cgi?id=145508

        Reviewed by Darin Adler.

        As a step to purge PassRefPtr, this patch removes PassRefPtr, then use Ref or RefPtr.

        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::create):
        * Modules/indexeddb/IDBCursor.h:
        * Modules/indexeddb/IDBCursorBackend.h:
        (WebCore::IDBCursorBackend::create):
        * Modules/indexeddb/IDBCursorBackendOperations.h:
        (WebCore::CursorIterationOperation::create):
        (WebCore::CursorAdvanceOperation::create):
        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::create):
        * Modules/indexeddb/IDBDatabase.h:
        * Modules/indexeddb/IDBDatabaseBackend.cpp:
        (WebCore::IDBDatabaseBackend::create):
        * Modules/indexeddb/IDBDatabaseBackend.h:
        * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
        (WebCore::IDBDatabaseCallbacksImpl::create):
        * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
        * Modules/indexeddb/IDBDatabaseError.h:
        (WebCore::IDBDatabaseError::create):
        * Modules/indexeddb/IDBIndex.h:
        (WebCore::IDBIndex::create):
        * Modules/indexeddb/IDBKey.h:
        (WebCore::IDBKey::createInvalid):
        (WebCore::IDBKey::createNumber):
        (WebCore::IDBKey::createString):
        (WebCore::IDBKey::createDate):
        (WebCore::IDBKey::createArray):
        * Modules/indexeddb/IDBKeyRange.cpp:
        (WebCore::IDBKeyRange::create):
        * Modules/indexeddb/IDBKeyRange.h:
        (WebCore::IDBKeyRange::create):
        * Modules/indexeddb/IDBObjectStore.cpp:
        * Modules/indexeddb/IDBObjectStore.h:
        (WebCore::IDBObjectStore::create):
        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        (WebCore::IDBOpenDBRequest::create):
        * Modules/indexeddb/IDBOpenDBRequest.h:
        * Modules/indexeddb/IDBRecordIdentifier.h:
        (WebCore::IDBRecordIdentifier::create):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::create):
        (WebCore::IDBRequest::getResultCursor):
        * Modules/indexeddb/IDBRequest.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::create):
        * Modules/indexeddb/IDBTransaction.h:
        * Modules/indexeddb/IDBTransactionBackend.cpp:
        (WebCore::IDBTransactionBackend::create):
        * Modules/indexeddb/IDBTransactionBackend.h:
        * Modules/indexeddb/IDBTransactionBackendOperations.h:
        (WebCore::CreateObjectStoreOperation::create):
        (WebCore::DeleteObjectStoreOperation::create):
        (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
        (WebCore::CreateObjectStoreAbortOperation::create):
        (WebCore::DeleteObjectStoreAbortOperation::create):
        (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
        (WebCore::CreateIndexOperation::create):
        (WebCore::CreateIndexAbortOperation::create):
        (WebCore::DeleteIndexOperation::create):
        (WebCore::DeleteIndexAbortOperation::create):
        (WebCore::GetOperation::create):
        (WebCore::PutOperation::create):
        (WebCore::SetIndexesReadyOperation::create):
        (WebCore::OpenCursorOperation::create):
        (WebCore::CountOperation::create):
        (WebCore::DeleteRangeOperation::create):
        (WebCore::ClearObjectStoreOperation::create):
        * Modules/mediasource/VideoPlaybackQuality.cpp:
        (WebCore::VideoPlaybackQuality::create):
        * Modules/mediasource/VideoPlaybackQuality.h:
        * Modules/mediastream/MediaConstraintsImpl.cpp:
        (WebCore::MediaConstraintsImpl::create):
        * Modules/mediastream/MediaConstraintsImpl.h:
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::create):
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/RTCDTMFSender.cpp:
        (WebCore::RTCDTMFSender::create):
        * Modules/mediastream/RTCDTMFSender.h:
        * Modules/mediastream/RTCOfferAnswerOptions.cpp:
        (WebCore::RTCOfferAnswerOptions::create):
        (WebCore::RTCOfferOptions::create):
        * Modules/mediastream/RTCOfferAnswerOptions.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::parseConfiguration):
        (WebCore::RTCPeerConnection::create):
        * Modules/mediastream/RTCPeerConnection.h:
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::create):
        * Modules/webdatabase/AbstractDatabaseServer.h:
        * Modules/webdatabase/DOMWindowWebDatabase.cpp:
        (WebCore::DOMWindowWebDatabase::openDatabase):
        * Modules/webdatabase/DOMWindowWebDatabase.h:
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::existingDatabaseContextFor):
        (WebCore::DatabaseManager::databaseContextFor):
        (WebCore::DatabaseManager::openDatabase):
        * Modules/webdatabase/DatabaseManager.h:
        * Modules/webdatabase/DatabaseServer.cpp:
        (WebCore::DatabaseServer::openDatabase):
        (WebCore::DatabaseServer::createDatabase):
        * Modules/webdatabase/DatabaseServer.h:

2015-06-01  Daniel Bates  <dabates@apple.com>

        Notify client that we began editing when text field is focused
        https://bugs.webkit.org/show_bug.cgi?id=145439
        <rdar://problem/21142108>

        Reviewed by Anders Carlsson.

        Inform the editor client that we began editing when a text field is focused either
        by being explicitly focused (programmatically or by user interaction) or implicitly
        focused when the window became active.

        Currently we only notify the editor client that we began editing a text field when
        when a person actually changes the value of the field. And we always notify the
        client that we ended editing when a text field is defocused regardless of whether
        we executed a began editing callback. Moreover we notify a client that we
        ended editing when the field is defocused (either explicitly or implicitly when the
        window becomes inactive). Instead we should always notify the client that we began
        editing when the field is focused so that this callback is symmetric with the end
        editing callback.

        * html/SearchInputType.cpp:
        (WebCore::SearchInputType::didSetValueByUserEdit): Remove parameter for ValueChangeState,
        which was used to determine whether we should notify the client that we began editing, because
        we we will notify the client that editing began when the text field is focused as opposed to
        when the value of text field first changes.
        * html/SearchInputType.h: Ditto.
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::forwardEvent): Notify the client that we began editing when
        the text field is focused.
        (WebCore::TextFieldInputType::subtreeHasChanged): Update call site of didSetValueByUserEdit()
        following the removal of its parameter.
        (WebCore::TextFieldInputType::didSetValueByUserEdit): Ditto.
        * html/TextFieldInputType.h:

2015-06-01  Anders Carlsson  <andersca@apple.com>

        WAKScrollView.h cannot be imported standalone
        https://bugs.webkit.org/show_bug.cgi?id=145529

        Reviewed by Dan Bernstein.

        * page/mac/WebCoreFrameView.h:
        Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
        (The different non-C++ method declarations were wrong anyway!)

        * platform/ScrollTypes.h:
        Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
        and reformat the enum definitions.

2015-06-01  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] resource-type and load-type should be independent.
        https://bugs.webkit.org/show_bug.cgi?id=145528
        rdar://problem/21190765

        Reviewed by Benjamin Poulain.

        Covered by existing tests and a new API test.
        
        Right now we use the same uint16_t to store all the load-type and resource-type flags,
        then we just do a bitwise and to check both at the same time. This results in a trigger
        with load-type and resource-type firing if either condition is met, not both conditions.
        A trigger with both resource-type and load-type conditions should only fire if both conditions are met.

        * contentextensions/DFABytecodeInterpreter.cpp:
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
        Check and correctly handle rules with both resource-type and load-type flags.
        * loader/ResourceLoadInfo.h:
        Add masks to separate flags from resource-type and load-type.

2015-06-01  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Reduce DFA memory usage.
        https://bugs.webkit.org/show_bug.cgi?id=145526

        Reviewed by Benjamin Poulain.

        * contentextensions/DFA.cpp:
        (WebCore::ContentExtensions::DFA::memoryUsed):
        (WebCore::ContentExtensions::DFANode::transitions):
        (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
        (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
        (WebCore::ContentExtensions::DFANode::addFallbackTransition):
        (WebCore::ContentExtensions::DFANode::containsTransition):
        (WebCore::ContentExtensions::DFANode::kill):
        * contentextensions/DFA.h:
        * contentextensions/DFAMinimizer.cpp:
        (WebCore::ContentExtensions::DFAMinimizer::minimize):
        * contentextensions/NFAToDFA.cpp:
        (WebCore::ContentExtensions::NFAToDFA::convert):
        Use separate Vectors for the transition characters and destinations to avoid wasting memory to padding a std::pair.

2015-06-01  Matt Rajca  <mrajca@apple.com>

        Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
        some required infrastructure.
        https://bugs.webkit.org/show_bug.cgi?id=145523

        Reviewed by Eric Carlson.

        * Modules/mediasession/MediaRemoteControls.cpp:
        (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
        * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
          context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
        (WebCore::MediaRemoteControls::create):
        * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
          passed in a script execution context. To prevent build errors, event handlers have been removed until they are
          implemented.
        * WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
        * dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.

2015-06-01  Benjamin Poulain  <bpoulain@apple.com>

        [CSS JIT] Fail to compile when we are out of executable memory
        https://bugs.webkit.org/show_bug.cgi?id=145483
        rdar://problem/21166612

        Reviewed by Andreas Kling.

        We should use a soft failure when the Linker fails to allocate
        executable memory for the CSS JIT. We will just fallback to slow
        code when that happen, better slow CSS than crashing.

        Credit to Chris for finding this problem.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):

2015-06-01  Chris Dumez  <cdumez@apple.com>

        ASSERT(revalidatingResource.inCache()) in MemoryCache when reloading tumblr.com
        https://bugs.webkit.org/show_bug.cgi?id=145518
        <rdar://problem/21168573>

        Reviewed by Darin Adler.

        There was an assertion in MemoryCache::revalidationSucceeded() making
        sure that the resource that was revalidated is still in the memory
        cache. However, nothing prevents this resource from being pruned while
        it is being revalidated. We do make sure that the resource in question
        cannot be destroyed though (see CachedResource::canDelete()).

        This patch gets rid of this assertion as it is incorrect. Also, the
        fact that the resource is no longer in the memory cache is not an
        issue. We are merely going to call MemoryCache::remove() to remove
        it from the memory cache before re-adding it and updating its
        HTTP response. The call to MemoryCache::remove() will simply be a
        no-op in this case and we will not have any problem adding the
        resource back to the memory cache because the resource is kept alive.

        Test: http/tests/cache/memory-cache-pruning-during-revalidation.html

        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::revalidationSucceeded): Deleted.

2015-06-01  Matt Rajca  <mrajca@apple.com>

        Add stub implementation of MediaRemoteControls, part of the Media Session spec.
        https://bugs.webkit.org/show_bug.cgi?id=145462

        Reviewed by Eric Carlson.

        * CMakeLists.txt: Added IDL file as well as the corresponding implementation file.
        * DerivedSources.make: Included the new IDL file.
        * Modules/mediasession/MediaRemoteControls.cpp: Added an empty implementation file.
        (MediaRemoteControls::~MediaRemoteControls):
        * Modules/mediasession/MediaRemoteControls.h: Added a stubbed header file with accessors for the four attributes declared in the IDL file.
        (WebCore::MediaRemoteControls::previousTrackEnabled):
        (WebCore::MediaRemoteControls::setPreviousTrackEnabled):
        (WebCore::MediaRemoteControls::nextTrackEnabled):
        (WebCore::MediaRemoteControls::setNextTrackEnabled):
        (WebCore::MediaRemoteControls::seekForwardEnabled):
        (WebCore::MediaRemoteControls::setSeekForwardEnabled):
        (WebCore::MediaRemoteControls::seekBackwardEnabled):
        (WebCore::MediaRemoteControls::setSeekBackwardEnabled):
        * Modules/mediasession/MediaRemoteControls.idl: Added from the Media Session spec.
        * WebCore.xcodeproj/project.pbxproj: Included the new IDL file and MediaRemoteControls.cpp/.h sources.

2015-06-01  Sergio Villar Senin  <svillar@igalia.com>

        [CSS Grid Layout] Simplify the interface of GridResolvedPosition
        https://bugs.webkit.org/show_bug.cgi?id=139077

        Reviewed by Darin Adler.

        The interface of GridResolvedPosition is full of static methods
        that are used only internally, we should not expose them.

        Apart from that resolveGridPositionsFromStyle() do always return
        a valid GridSpan from now on meaning that the caller has to ensure
        that the resolution does not require running the auto-placement
        algorithm. A new class called GridUnresolvedSpan was added for
        that purpose.

        No new tests as this is a refactoring.

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::placeItemsOnGrid):
        (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
        (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
        (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
        * rendering/style/GridPosition.h:
        * rendering/style/GridResolvedPosition.cpp:
        (WebCore::gridLinesForSide):
        (WebCore::implicitNamedGridLineForSide):
        (WebCore::isNonExistentNamedLineOrArea):
        (WebCore::GridUnresolvedSpan::requiresAutoPlacement):
        (WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle):
        (WebCore::adjustGridPositionForRowEndColumnEndSide):
        (WebCore::adjustGridPositionForSide):
        (WebCore::resolveNamedGridLinePositionFromStyle):
        (WebCore::firstNamedGridLineBeforePosition):
        (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
        (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
        (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
        (WebCore::resolveGridPositionAgainstOppositePosition):
        (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
        (WebCore::resolveGridPositionFromStyle):
        (WebCore::GridResolvedPosition::GridResolvedPosition):
        (WebCore::GridResolvedPosition::unresolvedSpanFromStyle):
        (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
        (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Deleted.
        (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle): Deleted.
        (WebCore::GridResolvedPosition::resolveGridPositionFromStyle): Deleted.
        (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition): Deleted.
        (WebCore::GridResolvedPosition::resolveNamedGridLinePositionAgainstOppositePosition): Deleted.
        (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Deleted.
        (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Deleted.
        * rendering/style/GridResolvedPosition.h:
        (WebCore::GridUnresolvedSpan::GridUnresolvedSpan): New class.
        (WebCore::GridUnresolvedSpan::initialPosition):
        (WebCore::GridUnresolvedSpan::finalPosition):
        (WebCore::GridUnresolvedSpan::initialPositionSide):
        (WebCore::GridUnresolvedSpan::finalPositionSide):
        (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide): Deleted.
        (WebCore::GridResolvedPosition::adjustGridPositionForSide): Deleted.
        (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.

2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the !ENABLE(VIDEO_TRACK) build after r184799
        https://bugs.webkit.org/show_bug.cgi?id=145510

        Reviewed by Eric Carlson.

        * testing/Internals.cpp:
        (WebCore::Internals::userPreferredAudioCharacteristics):
        (WebCore::Internals::setUserPreferredAudioCharacteristic):

2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>

        Fix logical-not-parentheses warning in CachedScript.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145254

        Reviewed by Sam Weinig.

        * loader/cache/CachedScript.cpp:
        (WebCore::CachedScript::mimeTypeAllowedByNosniff): "!X==Y" should be "X!=Y" here.

2015-05-31  Dan Bernstein  <mitz@apple.com>

        Remove Panther support
        https://bugs.webkit.org/show_bug.cgi?id=145506

        Reviewed by Sam Weinig.

        * platform/ios/wak/WAKAppKitStubs.h: Don't check for pre-Tiger SDKs.

2015-05-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        Remove unused variable kZoomTicks.
        https://bugs.webkit.org/show_bug.cgi?id=145504

        Reviewed by Sam Weinig.

        No new tests, no behavior changes.

        * platform/ScrollAnimatorNone.cpp:

2015-05-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Async XMLHttpRequest should get access to AppCache resources stored as flat files
        https://bugs.webkit.org/show_bug.cgi?id=138506

        Reviewed by Darin Adler.

        This patch reads flat file data when DocumentLoader substituteResource delivery timer is fired.
        Refactoring to remove ApplicationCacheHost/DocumentLoader friend link.
        Added ResourceLoader::deliverResponseAndData helper function, taking a SharedBuffer as input to remove an unneeded copy for flat files (no change for other files). 

        Test: http/tests/appcache/simple-video-async.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
        (WebCore::DocumentLoader::scheduleArchiveLoad):
        (WebCore::DocumentLoader::scheduleSubstituteResourceLoad): Helper function to remove ApplicationCacheHost friend link.
        * loader/DocumentLoader.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::deliverResponseAndData): Helper function, code mostly moved from DocumentLoader::substituteResourceDeliveryTimerFired.
        * loader/ResourceLoader.h:
        * loader/SubstituteResource.h:
        (WebCore::SubstituteResource::deliver): Introduced to be overriden by ApplicationCacheResource to take care of flat file case.
        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::maybeLoadResource):
        (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
        * loader/appcache/ApplicationCacheResource.cpp:
        (WebCore::ApplicationCacheResource::deliver): Use SharedBuffer::createWithContentsOfFile to load data stored in flat file.
        * loader/appcache/ApplicationCacheResource.h:

2015-05-31  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] Implement ReadableStreamController constructor
        https://bugs.webkit.org/show_bug.cgi?id=143752

        Reviewed by Darin Adler.

        Covered by rebased test and expectation.

        * Modules/streams/ReadableStreamController.idl: Adding CustomConstructor.
        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::constructJSReadableStreamController): Throws an exception whenever called.

2015-05-30  Brady Eidson  <beidson@apple.com>

        Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
        https://bugs.webkit.org/show_bug.cgi?id=145495

        Reviewed by Alexey Proskuryakov.

        No new tests (No change in behavior).

        In most cases ownership of the Event is not actually being transferred, and these functions are all rarely called anyways.
        
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::handleClick):
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected):
        (WebCore::FrameLoader::loadFrameRequest):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::loadPostRequest):
        * loader/FrameLoader.h:

2015-05-30  Andreas Kling  <akling@apple.com>

        [iOS] Tiling coverage sometimes inflated by outdated scale factor.
        <https://webkit.org/b/145494>
        <rdar://problem/20989389>

        Reviewed by Benjamin Poulain.

        Have GraphicsLayerCA plumb the current contents scale through to TileController::adjustCoverageRect()
        instead of TileController getting it from TileGrid.

        This avoids a situation where adjustCoverageRect() could cause temporarily oversized tiling coverage
        if called while TileGrid's content scale is outdated, and we're neither zooming or pinching, following
        a pinch zoom that increased the scale factor.

        Specifically, if all the velocity data is zero, we pad the coverage rect by a horizontal and vertical
        margin computed like so:

            margin = defaultTileSize / tileGrid.scale

        If the actual scale is 5, but the TileGrid's outdated scale is e.g 0.8, you'll get a much larger
        margin than you really wanted. Then the whole thing gets scaled up by 5x later on, and we explode
        in a fiery feast of IOSurface allocations.

        * platform/graphics/TiledBacking.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::adjustCoverageRect):
        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::computeTileCoverageRect):
        * platform/graphics/ca/TileController.h:

2015-05-30  Brady Eidson  <beidson@apple.com>

        Fix Windows tests broken by r185007.
        https://bugs.webkit.org/show_bug.cgi?id=145472

        Unreviewed. Discussed with Alexey Proskuryakov.

        No new tests (Fixing the four broken ones should suffice).

        The bug was that evaluating arguments in a method/constructor call has no guaranteed sequencing.
        
        Clang seems to always do LTR, allowing the PassRefPtr to be evaluated as a bool in the call to
        navigationType() before it is "consumed" by the PassRefPtr argument.
        
        In Visual Studio the PassRefPtr consumption happened before the bool evaluation, meaning `false`
        was always passed in to navigationType(), breaking the four tests.
        
        The fix? Using PassRefPtr here was silly in the first place.
        No ownership is being transferred.
        Raw pointers it is.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::loadPostRequest):
        * loader/NavigationAction.cpp:

        (WebCore::NavigationAction::NavigationAction):
        * loader/NavigationAction.h: Nobody is actually transferring ownership of these Events.
          Raw pointers will work just fine, thanks.

2015-05-29  Joseph Pecoraro  <pecoraro@apple.com>

        Unreviewed bindings test rebaseline after r185023.

        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::isObservable): Deleted.
        (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots): Deleted.

2015-05-29  Andreas Kling  <akling@apple.com>

        [iOS] Reduce tiling coverage when doing a pure pinch zoom with no panning.
        <https://webkit.org/b/145481>
        <rdar://problem/20989389>

        Reviewed by Benjamin Poulain.

        When we're zooming in with a pinch gesture but not panning the page
        at the same time, make the coverage rect be the visible rect.

        This reduces memory pressure during zooming, especially on slower
        devices that struggle to keep up with the current viewport.

        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::computeTileCoverageRect):

2015-05-29  Keith Miller  <keith_miller@apple.com>

        WeakMap reference w/ DOM element as key does not survive long enough.
        https://bugs.webkit.org/show_bug.cgi?id=137651

        Reviewed by Geoffrey Garen.

        Remove isObservable functions as an "unobservable wrappers"
        optimization is invalid with WeakMaps. Performance testing
        will be done after the code is commited. If major
        performance issues occur the patch will be rolled out.

        Test: js/dom/weakmap-gc-unobservable-dom-nodes.html

        * bindings/js/JSNodeCustom.cpp:
        (WebCore::isReachableFromDOM):
        (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
        (WebCore::JSNode::insertBefore):
        (WebCore::isObservable): Deleted.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):

2015-05-29  Anders Carlsson  <andersca@apple.com>

        Get rid of WAKViewPrivate.h
        https://bugs.webkit.org/show_bug.cgi?id=145482
        rdar://problem/21162149

        Reviewed by Dan Bernstein.

        Merge WAKViewPrivate.h into WAKViewInternal.h and move the NSView sizing enum
        to WAKView.h since that was the only thing WebKit used (indirectly) from WAKViewPrivate.h.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/WAKViewInternal.h:
        (WAKViewForWKViewRef):
        * platform/ios/ScrollViewIOS.mm:
        * platform/ios/wak/WAKResponder.m:
        * platform/ios/wak/WAKView.h:
        * platform/ios/wak/WAKView.mm:
        * platform/ios/wak/WAKViewPrivate.h: Removed.
        (WAKViewForWKViewRef): Deleted.
        * platform/ios/wak/WAKWindow.mm:
        * platform/ios/wak/WKView.h:
        * platform/ios/wak/WKView.mm:

2015-05-29  Daniel Bates  <dabates@apple.com>

        Clean up logic for updating caps lock indicator state
        https://bugs.webkit.org/show_bug.cgi?id=145329

        Reviewed by Sam Weinig.

        Remove logic to explicitly update the state of the caps lock indicator, which was used
        when the caps logic indicator was implemented as part of RenderTextControl. Currently,
        the caps logic indicator is implemented as part of a shadow DOM and we have existing
        logic to forward DOM focus and blur events to it so that it may update its state.

        No change in behavior.

        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::focusedOrActiveStateChanged): Deleted.
        * editing/FrameSelection.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent): Inline the code from EventHandler::capsLockStateMayHaveChanged()
        into this function because it is the only caller of EventHandler::capsLockStateMayHaveChanged() after
        we removed the call site in FrameSelection::focusedOrActiveStateChanged().
        (WebCore::EventHandler::capsLockStateMayHaveChanged): Deleted.
        * page/EventHandler.h:

2015-05-29  Zalan Bujtas  <zalan@apple.com>

        Text disappears shortly after page load on Nexus 7 site.
        https://bugs.webkit.org/show_bug.cgi?id=145467
        rdar://problem/18327239

        Reviewed by Simon Fraser.

        This patch ensures that overlap testing for composited layers works properly when the sibling
        layer gets composited through its child.

        When a layer gets composited through its child content, the recursive overlap testing should build up the
        overlapmap stack so that sibling content is intersected both against the child and its parent bounds.

        Tests: compositing/sibling-layer-does-not-get-composited-overflow-hidden-case.html
               compositing/sibling-layer-does-not-get-composited-transform-case.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
        (WebCore::RenderLayerCompositor::OverlapMap::contains): Deleted.

2015-05-29  Brady Eidson  <beidson@apple.com>

        Review feedback followup for r185003.
        https://bugs.webkit.org/show_bug.cgi?id=145463

        Reviewed by Darin Adler.

        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): `static const` one thing, c++-style cast another.

2015-05-29  Chris Dumez  <cdumez@apple.com>

        WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
        https://bugs.webkit.org/show_bug.cgi?id=145422
        <rdar://problem/20613631>

        Reviewed by Brady Eidson.

        We sometimes crash when destroying a PageCache CachedFrame because its
        DocumentLoader is still loading. This should never happen as we are not
        supposed to let pages are still have pending loads into the PageCache.

        However, we were using DocumentLoader::isLoadingInAPISense() as check
        in PageCache::canCachePageContainingThisFrame() which is not exactly
        what we want. isLoadingInAPISense() no longer considers subresource
        loads once the frame as loaded. This means if the JS triggers a new
        load in a subframe after it has been loaded, then isLoadingInAPISense()
        will return false, despite the pending load.

        This patch replaces the isLoadingInAPISense() check with isLoading()
        as this will consider all pending loads, even after the frame is
        loaded.

        In most cases, using isLoadingInAPISense() was not an issue because
        we call DocumentLoader::stopLoading() in all subframes before starting
        a provisional load. However, nothing seems to prevent JS from
        triggering a new load after that and before the new load gets committed
        (which is when we save the page into PageCache).

        No new test as we don't have a reliable reproduction case and the
        issue is timing related.

        * history/PageCache.cpp:
        (WebCore::logCanCacheFrameDecision):
        (WebCore::PageCache::canCachePageContainingThisFrame):
        * page/DiagnosticLoggingKeys.cpp:
        (WebCore::DiagnosticLoggingKeys::isLoading):
        (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey): Deleted.
        * page/DiagnosticLoggingKeys.h:

2015-05-29  Chris Dumez  <cdumez@apple.com>

        Consider throttling DOM timers in iframes outside the viewport
        https://bugs.webkit.org/show_bug.cgi?id=145465
        <rdar://problem/20768957>

        Reviewed by Darin Adler.

        Throttle DOM timers in iframes that are outside the viewport to decrease
        CPU usage, improve performance and reduce power use.

        The approach is similar to what we already did for requestAnimationFrame
        in r183998.

        We already has support for throttling DOM timers at:
        - Page level: for backgound pages
        - DOM timer level: for timers changing the style of an element outside
          the viewport or drawing on a canvas outside the viewport.

        This patch adds support for throttling DOM timers at Document level so
        we can throttle all timers inside a specific iframe / Document. It relies
        on the same timerAlignmentInterval that is used for throttling at Page
        level with tweaks so that different Documents inside the same Page can
        have a different timerAlignmentInterval.

        Test: fast/dom/timer-throttling-subframe.html

        * dom/Document.cpp:
        (WebCore::Document::setTimerThrottlingEnabled):
        (WebCore::Document::timerAlignmentInterval):
        * dom/Document.h:
        (WebCore::Document::isTimerThrottlingEnabled):
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::alignedFireTime):
        The previous code was not throttling the timer if its fireTime was in
        the past. This was causing some aggressive timers on mashable.com to
        not be throttled so I got rid of this behavior. I don't see any reason
        why we would not throttle a timer simply because it is supposed to have
        fired already.

        * page/FrameView.cpp:
        (WebCore::FrameView::viewportContentsChanged):
        (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
        * page/FrameView.h:

        * testing/Internals.cpp:
        (WebCore::Internals::areTimersThrottled):
        * testing/Internals.h:
        * testing/Internals.idl:
        Add API to facilitate layout testing of this functionality.

2015-05-29  Brady Eidson  <beidson@apple.com>

        NavigationAction constructor cleanup.
        https://bugs.webkit.org/show_bug.cgi?id=145472

        Reviewed by Alex Christensen.

        No new tests (Refactor, no change in behavior).

        * loader/NavigationAction.cpp:
        (WebCore::NavigationAction::NavigationAction): Delegate many of the various constructors
          to a single full-featured constructor.
        * loader/NavigationAction.h:

2015-05-29  Matt Rajca  <mrajca@apple.com>

        Rename MediaSession and MediaSessionClient to PlatformMediaSession and PlatformMediaSessionClient so we can use MediaSession for the formal implementation of the Media Session spec.
        https://bugs.webkit.org/show_bug.cgi?id=145447

        Reviewed by Eric Carlson.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        (WebCore::AudioContext::suspendPlayback):
        * Modules/webaudio/AudioContext.h:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLAudioElement.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::pausedForUserInteraction):
        (WebCore::HTMLMediaElement::mediaType):
        (WebCore::HTMLMediaElement::presentationType):
        (WebCore::HTMLMediaElement::displayType):
        (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):
        * html/HTMLMediaElement.h:
        * html/HTMLMediaSession.cpp:
        (WebCore::HTMLMediaSession::HTMLMediaSession):
        (WebCore::HTMLMediaSession::requiresFullscreenForVideoPlayback):
        * html/HTMLMediaSession.h:
        * html/HTMLVideoElement.h:
        * platform/RemoteCommandListener.h:
        * platform/audio/MediaSessionManager.cpp:
        (WebCore::MediaSessionManager::resetRestrictions):
        (WebCore::MediaSessionManager::has):
        (WebCore::MediaSessionManager::activeAudioSessionRequired):
        (WebCore::MediaSessionManager::count):
        (WebCore::MediaSessionManager::beginInterruption):
        (WebCore::MediaSessionManager::endInterruption):
        (WebCore::MediaSessionManager::addSession):
        (WebCore::MediaSessionManager::removeSession):
        (WebCore::MediaSessionManager::addRestriction):
        (WebCore::MediaSessionManager::removeRestriction):
        (WebCore::MediaSessionManager::restrictions):
        (WebCore::MediaSessionManager::sessionWillBeginPlayback):
        (WebCore::MediaSessionManager::sessionWillEndPlayback):
        (WebCore::MediaSessionManager::setCurrentSession):
        (WebCore::MediaSessionManager::currentSession):
        (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
        (WebCore::MediaSessionManager::sessionCanLoadMedia):
        (WebCore::MediaSessionManager::applicationWillEnterBackground):
        (WebCore::MediaSessionManager::applicationWillEnterForeground):
        (WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
        (WebCore::MediaSessionManager::systemWillSleep):
        (WebCore::MediaSessionManager::systemDidWake):
        * platform/audio/MediaSessionManager.h:
        (WebCore::MediaSessionManager::sessions):
        * platform/audio/PlatformMediaSession.cpp: Renamed from Source/WebCore/platform/audio/MediaSession.cpp.
        (WebCore::stateName):
        (WebCore::PlatformMediaSession::create):
        (WebCore::PlatformMediaSession::PlatformMediaSession):
        (WebCore::PlatformMediaSession::~PlatformMediaSession):
        (WebCore::PlatformMediaSession::setState):
        (WebCore::PlatformMediaSession::beginInterruption):
        (WebCore::PlatformMediaSession::endInterruption):
        (WebCore::PlatformMediaSession::clientWillBeginPlayback):
        (WebCore::PlatformMediaSession::clientWillPausePlayback):
        (WebCore::PlatformMediaSession::pauseSession):
        (WebCore::PlatformMediaSession::mediaType):
        (WebCore::PlatformMediaSession::presentationType):
        (WebCore::PlatformMediaSession::title):
        (WebCore::PlatformMediaSession::duration):
        (WebCore::PlatformMediaSession::currentTime):
        (WebCore::PlatformMediaSession::canReceiveRemoteControlCommands):
        (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand):
        (WebCore::PlatformMediaSession::visibilityChanged):
        (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
        (WebCore::PlatformMediaSession::updateClientDataBuffering):
        (WebCore::PlatformMediaSession::isHidden):
        (WebCore::PlatformMediaSession::displayType):
        (WebCore::PlatformMediaSessionClient::mediaSessionTitle):
        (WebCore::PlatformMediaSessionClient::mediaSessionDuration):
        (WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime):
        * platform/audio/PlatformMediaSession.h: Renamed from Source/WebCore/platform/audio/MediaSession.h.
        (WebCore::PlatformMediaSession::state):
        (WebCore::PlatformMediaSession::canPlayToWirelessPlaybackTarget):
        (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget):
        (WebCore::PlatformMediaSession::requiresPlaybackTargetRouteMonitoring):
        (WebCore::PlatformMediaSession::client):
        (WebCore::PlatformMediaSessionClient::PlatformMediaSessionClient):
        (WebCore::PlatformMediaSessionClient::displayType):
        (WebCore::PlatformMediaSessionClient::setShouldBufferData):
        (WebCore::PlatformMediaSessionClient::elementIsHidden):
        (WebCore::PlatformMediaSessionClient::wirelessRoutesAvailableDidChange):
        (WebCore::PlatformMediaSessionClient::setWirelessPlaybackTarget):
        (WebCore::PlatformMediaSessionClient::canPlayToWirelessPlaybackTarget):
        (WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget):
        (WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget):
        (WebCore::PlatformMediaSessionClient::~PlatformMediaSessionClient):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::resetRestrictions):
        (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback):
        (WebCore::MediaSessionManageriOS::sessionWillEndPlayback):
        (WebCore::MediaSessionManageriOS::updateNowPlayingInfo):
        (WebCore::MediaSessionManageriOS::sessionCanLoadMedia):
        (-[WebMediaSessionHelper interruption:]):
        * platform/audio/mac/MediaSessionManagerMac.cpp:
        (MediaSessionManager::updateSessionState):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::handlePlaybackCommand):
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
        * platform/ios/RemoteCommandListenerIOS.mm:
        (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
        * testing/Internals.cpp:
        (WebCore::Internals::beginMediaSessionInterruption):
        (WebCore::Internals::endMediaSessionInterruption):
        (WebCore::Internals::setMediaSessionRestrictions):
        (WebCore::Internals::postRemoteControlCommand):

2015-05-29  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Decrease maxNFASize
        https://bugs.webkit.org/show_bug.cgi?id=145461

        Reviewed by Gavin Barraclough.

        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::compileRuleList):
        Decrease maxNFASize based on analysis of memory usage and compiling and interpreting time.

2015-05-29  Brady Eidson  <beidson@apple.com>

        WebSQL default functions can bypass authorizer.
        <rdar://problem/21048994> and https://bugs.webkit.org/show_bug.cgi?id=145463

        Reviewed by Sam Weinig and Alexey Proskuryakov.

        No new tests yet.

        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::unauthorizedSQLFunction): Function to install into SQLite to override some built-in functions.
        (WebCore::SQLiteDatabase::open):
        (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): Install function overrides for functions that
           take arbitrary input that are also meant to be disabled by virtue of them not being whitelisted.
        * platform/sql/SQLiteDatabase.h:

2015-05-29  Roger Fong  <roger_fong@apple.com>

        Unreviewed. Shift fullscreen controls down 20px.
        <rdar://problem/21161523>

        * Modules/mediacontrols/mediaControlsApple.css:
        (video:-webkit-full-screen::-webkit-media-controls-panel):
        Fullscreen control panel is too high and overlaps with caption menu.
        Shift it down 20px.

2015-05-28  Simon Fraser  <simon.fraser@apple.com>

        Some assertion failures in compositing code after r183820
        https://bugs.webkit.org/show_bug.cgi?id=144630

        Reviewed by Alexey Proskuryakov.

        Reinstate the assertion commented out in r183843. Fixed by having blending no longer
        escape the media elements, which was fixed via bug 145420.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):

2015-05-29  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
        https://bugs.webkit.org/show_bug.cgi?id=145425

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * plugins/DOMMimeTypeArray.cpp:
        (WebCore::DOMMimeTypeArray::canGetItemsForName):
        * plugins/DOMPlugin.cpp:
        (WebCore::DOMPlugin::canGetItemsForName):
        * plugins/DOMPluginArray.cpp:
        (WebCore::DOMPluginArray::canGetItemsForName):
        * plugins/PluginData.cpp:
        (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
        * plugins/PluginMainThreadScheduler.cpp:
        (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
        (WebCore::PluginMainThreadScheduler::dispatchCalls):
        * storage/StorageEventDispatcher.cpp:
        (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
        (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
        (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
        * storage/StorageMap.cpp:
        (WebCore::StorageMap::importItems):
        * style/StyleResolveTree.cpp:
        (WebCore::Style::pseudoStyleCacheIsInvalid):
        * testing/Internals.cpp:
        (WebCore::Internals::nodesFromRect):
        * workers/Worker.cpp:
        (WebCore::networkStateChanged):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::importScripts):

2015-05-29  Alex Christensen  <achristensen@webkit.org>

        Unreviewed build fix when using content extensions debugging.

        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::compileRuleList):
        Update variable name.

2015-05-29  Brady Eidson  <beidson@apple.com>

        Typo followup to r184987

        Unreviewed.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURLIntoChildFrame): Misplaced brace.

2015-05-29  Brady Eidson  <beidson@apple.com>

        Small FrameLoader refactoring.
        https://bugs.webkit.org/show_bug.cgi?id=145459

        Reviewed by Alex Christensen.

        No new tests (No behavior change).

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURLIntoChildFrame):
        (WebCore::FrameLoader::loadFrameRequest):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::loadPostRequest):
        * loader/FrameLoader.h:

2015-05-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        MediaDevices.getUserMedia should reject promise instead of throwing exceptions
        https://bugs.webkit.org/show_bug.cgi?id=145282

        Reviewed by Darin Adler.

        Ensuring at the custom binding level that all potential errors are used to reject promise.
        Cleaned up the wrappers by removing unneeded RefPtr.

        Covered by modified test.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::getUserMedia):
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::create):
        * bindings/js/JSMediaDevicesCustom.cpp:
        (WebCore::JSMediaDevices::getUserMedia):

2015-05-28  Hunseop Jeong  <hs85.jeong@samsung.com>

        Replaced 0 with nullptr in WebCore/accessibility.
        https://bugs.webkit.org/show_bug.cgi?id=145309

        Reviewed by Chris Fleizach.

        No new tests, no behavior change.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::mathPrescripts):
        (WebCore::AccessibilityRenderObject::mathPostscripts):
        * accessibility/AccessibilityScrollView.cpp:
        (WebCore::AccessibilityScrollView::scrollBar):
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::notifyChildrenSelectionChange):
        * accessibility/atk/WebKitAccessibleHyperlink.cpp:
        (webkitAccessibleHyperlinkInit):
        * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
        (webkitAccessibleDocumentGetAttributes):
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        (getAttributeSetForAccessibilityObject):
        (attributeSetDifference):
        * accessibility/atk/WebKitAccessibleUtil.h:
        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleRefChild):
        (webkitAccessibleGetAttributes):
        (webkitAccessibleGetObjectLocale):
        (getInterfaceMaskFromObject):
        (objectFocusedAndCaretOffsetUnignored):
        (cacheAndReturnAtkProperty):

2015-05-28  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: Pixel crack in text selection of simple text in <textarea>.
        https://bugs.webkit.org/show_bug.cgi?id=145393
        rdar://problem/19918941

        Reviewed by Darin Adler.

        Float to LayoutUnit conversion is lossy. To ensure that selection
        painting always lines up (snaps) properly, the calculated width needs to
        be adjusted by ceiling the float to the next LayoutUnit value.

        Test: fast/text/hidpi-text-selection-gap-between-words.html

        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::adjustSelectionRectForSimpleText):
        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::FontCascade::adjustSelectionRectForComplexText):

2015-05-28  Andreas Kling  <akling@apple.com>

        GraphicsLayerCA should start out with m_intersectsCoverageRect=false
        <https://webkit.org/b/145443>
        <rdar://problem/19685798>

        Reviewed by Simon Fraser.

        Since the coverage rect of a newly-constructed GraphicsLayerCA is always empty,
        there's no way that the layer's own bounding box can intersect with it.
        Hence the m_intersectsCoverageRect flag should be false after construction.

        This fixes an issue where compositing layers in subframes would be marked as
        non-volatile, despite being far outside the viewport and coverage rect.

        Test: compositing/visible-rect/iframe-with-layers-outside-viewport.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::GraphicsLayerCA):

2015-05-28  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r184796 and r184832.
        https://bugs.webkit.org/show_bug.cgi?id=145449

        2% performance regression (Requested by litherum on #webkit).

        Reverted changesets:

        "[Cocoa] Use CTFontDrawGlyphs() instead of
        CGContextShowGlyphsWithAdvances()/CGContextShowGlyphsAtPositions()"
        https://bugs.webkit.org/show_bug.cgi?id=145234
        http://trac.webkit.org/changeset/184796

        "Cleanup after r184796"
        https://bugs.webkit.org/show_bug.cgi?id=145333
        http://trac.webkit.org/changeset/184832

2015-05-28  Matt Rajca  <mrajca@apple.com>

        Rename HTMLMediaSession to MediaElementSession to reserve "media session" for the Media Session API.
        https://bugs.webkit.org/show_bug.cgi?id=145440

        Reviewed by Eric Carlson.

        * CMakeLists.txt:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::loadInternal):
        (WebCore::HTMLMediaElement::loadResource):
        (WebCore::HTMLMediaElement::suspend):
        (WebCore::HTMLMediaElement::resume):
        (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
        (WebCore::HTMLMediaElement::mediaState):
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::mediaSession):
        * html/MediaElementSession.cpp: Renamed from Source/WebCore/html/HTMLMediaSession.cpp.
        (WebCore::restrictionName):
        (WebCore::MediaElementSession::MediaElementSession):
        (WebCore::MediaElementSession::registerWithDocument):
        (WebCore::MediaElementSession::unregisterWithDocument):
        (WebCore::MediaElementSession::addBehaviorRestriction):
        (WebCore::MediaElementSession::removeBehaviorRestriction):
        (WebCore::MediaElementSession::playbackPermitted):
        (WebCore::MediaElementSession::dataLoadingPermitted):
        (WebCore::MediaElementSession::fullscreenPermitted):
        (WebCore::MediaElementSession::pageAllowsDataLoading):
        (WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming):
        (WebCore::MediaElementSession::showPlaybackTargetPicker):
        (WebCore::MediaElementSession::hasWirelessPlaybackTargets):
        (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
        (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
        (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
        (WebCore::MediaElementSession::setPlaybackTarget):
        (WebCore::MediaElementSession::targetAvailabilityChangedTimerFired):
        (WebCore::MediaElementSession::externalOutputDeviceAvailableDidChange):
        (WebCore::MediaElementSession::canPlayToWirelessPlaybackTarget):
        (WebCore::MediaElementSession::isPlayingToWirelessPlaybackTarget):
        (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
        (WebCore::MediaElementSession::mediaStateDidChange):
        (WebCore::MediaElementSession::effectivePreloadForElement):
        (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
        (WebCore::MediaElementSession::mediaEngineUpdated):
        (WebCore::MediaElementSession::allowsAlternateFullscreen):
        (WebCore::MediaElementSession::maximumMediaSourceBufferSize):
        * html/MediaElementSession.h: Renamed from Source/WebCore/html/HTMLMediaSession.h.
        * testing/Internals.cpp:
        (WebCore::Internals::setMediaElementRestrictions):
        (WebCore::Internals::setAudioContextRestrictions):

2015-05-28  Myles C. Maxfield  <mmaxfield@apple.com>

        Crash under ICU with ASAN during editing/selection/move-by-word-visually-crash-test-5.html
        https://bugs.webkit.org/show_bug.cgi?id=145429
        <rdar://problem/20992218>

        Reviewed by Alexey Proskuryakov.

        WebKit uses some strings which contain the lower 8-bits of UTF-16 (thereby saving space). However,
        ICU doesn't understand this encoding. When we want to use ICU functions with strings in this encoding,
        we create a UTextProvider which converts our encoded strings to UTF-16 for ICU, one chunk at a time.
        This object contains a vtable which we populate to perform the conversion.

        The WebKit function which actually returns the UTF-16 chunks has two relevant arguments: an index into
        the encoded string which ICU is requesting, and a direction from that index which ICU is interested
        in. This function populates a "chunk" which is characterized by a pointer to a buffer, the length of
        the populated data in the buffer, and an offset into the chunk which represents the index that the
        requested character was put into.

        When ICU requests data going backward, we fill in the chunk accordingly, with the requested character
        all the way at the end. We then set the offset equal to the length of the buffer. However, this length
        value is stale from the previous time the function ran. Therefore, ICU was reading the wrong index in
        the chunk when expecting the requested character.

        Covered by editing/selection/move-by-word-visually-crash-test-5.html.

        * platform/text/icu/UTextProviderLatin1.cpp:
        (WebCore::uTextLatin1Access):

2015-05-28  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Fix controls bug caused by r184794
        https://bugs.webkit.org/show_bug.cgi?id=145445

        Reviewed by Dean Jackson.

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.showControls): Check video.controls instead of trying to call
        showInlinePlaybackPlaceholderOnly, which doesn't exist.

2015-05-28  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Code clean up for extracting information from the mix of WritingMode and TextDirection
        https://bugs.webkit.org/show_bug.cgi?id=143399

        Reviewed by Darin Adler.
        
        There should be eight TextFlows. A TextFlow consists of two directions.
        The first one controls the inline growing direction and the second one
        controls the block growing direction. We are going to use the cardinal
        directions to define these combinations.

        We need to extract the following information easily from the TextFlow

        -- isTextFlowReversed() // RTL
        -- isTextFlowFlipped()  // the opposite direction to normal
        -- isTextFlowVertical() // The line grows vertically
        
        Mixing WritingMode and TextDirection into TextFlow and choosing their values
        carefully to ease implementing the above functions can make things clearer.

        * Modules/notifications/Notification.h:
        * platform/graphics/TextRun.h:
        * platform/ios/SelectionRect.h:
        * platform/text/BidiResolver.h:
        * platform/text/StringWithDirection.h:
        * platform/text/TextFlags.h:
        (WebCore::isLeftToRightDirection): Deleted.
        enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
        WritingMode.h instead of including TextFlags.h.
        
        * css/CSSProperty.cpp:
        (WebCore::resolveToPhysicalProperty): Instead of handling the eight possible
        cases of the text flows one by one, we can map from a LogicalSide to a
        PhysicalSide using the TextFlow value.
        
        * platform/LengthBox.h:
        (WebCore::BoxExtent::before):
        (WebCore::BoxExtent::after):
        (WebCore::BoxExtent::start):
        (WebCore::BoxExtent::end):
        Use mapLogicalSideToPhysicalSide() to convert from a LogicalSide to a PhysicalSide.
        
        * platform/text/WritingMode.h:
        (WebCore::isLeftToRightDirection): Usually the default enum is defined
        first. And usually the default value is equal to zero. Since LTR is the
        default for the text direction, it should be defined before RTL.
        
        (WebCore::makeTextFlow): Returns a TextFlow given a WritingMode and a
        TextDirection.
        
        (WebCore::isReversedTextFlow): Returns true if the text direction is RTL.
        
        (WebCore::isFlippedTextFlow):
        (WebCore::isFlippedWritingMode): Returns true if the block growing direction
        is in the opposite direction of normal.
        
        (WebCore::isVerticalTextFlow):
        (WebCore::isVerticalWritingMode): Returns true if the line grows vertically.
               
        (WebCore::isHorizontalWritingMode):
        (WebCore::isFlippedLinesWritingMode): Use isVerticalWritingMode() and 
        isFlippedWritingMode() to answer these questions.
        
        (WebCore::isHorizontalPhysicalSide): 
        (WebCore::mirrorPhysicalSide): top <-> bottom and left <-> right conversion.
        (WebCore::rotatePhysicalSide): top <-> left and right <-> bottom conversion.
        
        (WebCore::mapLogicalSideToPhysicalSide): Maps a LogicalSide to a PhysicalSide
        using either the TextFlow or the WritingMode.
        
        (WebCore::isFlippedBlocksWritingMode): Deleted.
        * rendering/RenderMultiColumnSet.cpp:
        (WebCore::RenderMultiColumnSet::collectLayerFragments):
        (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
        * rendering/shapes/Shape.cpp:
        (WebCore::physicalRectToLogical):
        (WebCore::physicalPointToLogical):
        * rendering/style/RenderStyle.h:
        Rename isFlippedBlocksWritingMode() to be isFlippedWritingMode() so we can
        be consistent with other WritingMode query functions.

2015-05-28  Matt Rajca  <mrajca@apple.com>

        Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
        https://bugs.webkit.org/show_bug.cgi?id=145415

        Reviewed by Eric Carlson.

        * Configurations/FeatureDefines.xcconfig:

2015-05-28  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] ReadableStreamReader should not be exposed
        https://bugs.webkit.org/show_bug.cgi?id=143564

        Reviewed by Darin Adler.

        Covered by rebased tests.

        * Modules/streams/ReadableStreamReader.idl: Adding NoInterfaceObject to ReadableStreamReader.idl.

2015-05-28  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [CMake] Improve detection and usage of GL/GLES/EGL libraries.
        https://bugs.webkit.org/show_bug.cgi?id=145408

        Reviewed by Carlos Garcia Campos.

        No new tests, no behavior changes.

        * CMakeLists.txt: Ensure that we include the libraries and includes
        for the GL/GLESv2/EGL libraries before including the ANGLE directories.
        Define also any CFLAG that the system GL/GLESv2/EGL libraries may need.
        * PlatformEfl.cmake: Remove some includes that are now unneeded,
        because we are including now the EGL libraries on CMakeLists.txt
        * PlatformGTK.cmake: Remove unneeded include (We are including the EGL
        libraries now on CMakeLists.txt)

2015-05-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Binding generator should support interfaces with CustomConstructor and NoInterfaceObject
        https://bugs.webkit.org/show_bug.cgi?id=145016

        Reviewed by Darin Adler.

        Updated code generator to generate the necessary declarations (constructor property in the prototype, the constructor class).
        In the case of CustomConstructor with NoInterfaceObject, the implementation of the constructor property related JS function is changed as follow:
        It creates a constructor object and shadows the constructor property JS function with this object.
        This ensures that only one constructor object is created per prototype.
        The constructor is not exposed as it is not added to the global object constructor map.

        NoInterfaceObject is asking to not make the interface visible, which is contradictory with having a visible constructor of the interface.
        The case for having NoInterfaceObject and CustomConstructor is the following:
        We do not want to expose the interface but we still want to have a constructor property on the prototype of objects implementing the interface.
        One such case is https://streams.spec.whatwg.org/#globals

        Added TestCustomConstructorWithNoInterfaceObject.idl to check that case.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateAttributesHashTable):
        (GenerateImplementation):
        (HasConstructorProperty):
        * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.cpp: Added.
        (WebKit::kit):
        (WebKit::core):
        (WebKit::wrapTestCustomConstructorWithNoInterfaceObject):
        (webkit_dom_test_custom_constructor_with_no_interface_object_finalize):
        (webkit_dom_test_custom_constructor_with_no_interface_object_constructor):
        (webkit_dom_test_custom_constructor_with_no_interface_object_class_init):
        (webkit_dom_test_custom_constructor_with_no_interface_object_init):
        * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.h: Added.
        * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObjectPrivate.h: Added.
        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Added.
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::create):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
        (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getConstructor):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
        (WebCore::toJS):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Added.
        (WebCore::wrapperOwner):
        (WebCore::toJS):
        * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Added.
        * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Added.
        (-[DOMTestCustomConstructorWithNoInterfaceObject dealloc]):
        (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]):
        (core):
        (kit):
        * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Added.
        * bindings/scripts/test/TestCustomConstructor.idl: Added.

2015-05-19  Jon Honeycutt  <jhoneycutt@apple.com>

        [iOS] When viewing an MJPEG stream as the main resource, only the first
        frame paints

        <https://bugs.webkit.org/show_bug.cgi?id=145185>
        <rdar://problem/20124694>

        This bug is caused by state not being restored between successive loads
        of multipart/x-mixed-replace content. Each part of the stream is not
        treated as a wholly new load, so if state is cleared as part of the
        previous page being destroyed, it may not be restored when loading
        the next stream part.

        On WK1, tile cache updates are disabled in FrameView::clear(), which is
        called as the previous page is destroyed, but were not being
        reenabled when loading new replacement content from the stream.

        On WK2, the exposed content rect was being reset to an empty rect as
        the previous page was destroyed, but it was not being reset by loading
        replacement content.

        To fix these issues, I added two WebFrameLoaderClient callbacks;
        willReplaceMultipartContent() and didReplaceMultipartContent(). These
        are used to save and restore state between successive loads.

        Reviewed by Darin Adler.

        * loader/DocumentLoader.cpp:
        Call the new client callbacks.
        (WebCore::DocumentLoader::commitLoad):
        If replacing content in a multipart/x-mixed-replace stream, call the
        WebFrameLoaderClient's didReplaceMultipartContent().

        (WebCore::DocumentLoader::setupForReplace):
        Call the WebFrameLoaderClient's willReplaceMultipartContent().

        * loader/EmptyClients.h:

        * loader/FrameLoaderClient.h:

        * page/FrameView.cpp:
        (WebCore::FrameView::didReplaceMultipartContent):
        Re-enable tile cache updates that were disabled in FrameView::clear().
        This fixes the issue for WK1.

        * page/FrameView.h:
        Declare an exported function, didReplaceMultipartContent(), that WebKit
        can call.

2015-05-27  Brady Eidson  <beidson@apple.com>

        Remove unused ResourceRequest "user initiated" flag.
        https://bugs.webkit.org/show_bug.cgi?id=145428

        Reviewed by Alexey Proskuryakov.

        No new tests (No change in behavior).

        * platform/ios/WebCoreSystemInterfaceIOS.mm:
        * platform/mac/WebCoreSystemInterface.mm:

        * platform/network/ResourceRequestBase.h:
        (WebCore::ResourceRequestBase::initiatedByUserGesture): Deleted.
        (WebCore::ResourceRequestBase::setInitiatedByUserGesture): Deleted.
        (WebCore::ResourceRequestBase::encodeWithoutPlatformData): Deleted.
        (WebCore::ResourceRequestBase::decodeWithoutPlatformData): Deleted.

        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
        (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.

        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
        (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.

2015-05-27  Brady Eidson  <beidson@apple.com>

        Add a "should open urls externally" flag to DocumentLoader.
        rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417

        Reviewed by Geoff Garen.

        No new tests (No change in behavior, testable at API level with a followup patch)

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setTriggeringAction): Apply the current flag value to the 
          new NavigationAction so it can be used later.
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setShouldOpenExternalURLsPolicy):
        (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy):
        (WebCore::DocumentLoader::setTriggeringAction): Deleted.

        FrameLoadRequest should hold the new flag to pass into FrameLoader machinery:
        * loader/FrameLoadRequest.h:
        (WebCore::FrameLoadRequest::setShouldOpenExternalURLsPolicy):
        (WebCore::FrameLoadRequest::shouldOpenExternalURLsPolicy):

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::load): Set the flag on the newly created DocumentLoader but
          only if it is for the main frame.

        * loader/FrameLoaderTypes.h: Add a new enum for the flag.

        Navigation action should hold the new flag to pass to the policy delegate:
        * loader/NavigationAction.cpp:
        (WebCore::NavigationAction::NavigationAction):
        * loader/NavigationAction.h:
        (WebCore::NavigationAction::shouldOpenExternalURLsPolicy):
        (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy):

        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::checkNavigationPolicy): Include the flag from the DocumentLoader
          in the NavigationAction.

2015-05-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr in WebCore/Modules - 2
        https://bugs.webkit.org/show_bug.cgi?id=145304

        Reviewed by Darin Adler.

        As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.

        No new tests, no behavior changes

        * Modules/mediasource/SourceBufferList.h:
        * Modules/mediastream/AllAudioCapabilities.h:
        (WebCore::AllAudioCapabilities::create):
        * Modules/mediastream/AllVideoCapabilities.h:
        (WebCore::AllVideoCapabilities::create):
        * Modules/mediastream/CapabilityRange.cpp:
        (WebCore::CapabilityRange::create):
        * Modules/mediastream/CapabilityRange.h:
        * Modules/mediastream/MediaSourceStates.cpp:
        (WebCore::MediaSourceStates::create):
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::create):
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::create):
        * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
        (WebCore::MediaStreamTrackSourcesRequest::create):
        * Modules/mediastream/MediaTrackConstraint.cpp:
        (WebCore::MediaTrackConstraint::create):
        * Modules/mediastream/MediaTrackConstraint.h:
        * Modules/mediastream/RTCConfiguration.h:
        (WebCore::RTCConfiguration::create):
        * Modules/mediastream/RTCIceServer.h:
        (WebCore::RTCIceServer::create):
        * Modules/mediastream/RTCSessionDescription.cpp:
        (WebCore::RTCSessionDescription::create):
        * Modules/mediastream/RTCSessionDescription.h:
        * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
        (WebCore::RTCSessionDescriptionRequestImpl::create):
        * Modules/mediastream/RTCStatsReport.cpp:
        (WebCore::RTCStatsReport::create):
        * Modules/mediastream/RTCStatsReport.h:
        * Modules/mediastream/RTCStatsRequestImpl.cpp:
        (WebCore::RTCStatsRequestImpl::create):
        * Modules/mediastream/RTCStatsRequestImpl.h:
        * Modules/mediastream/RTCStatsResponse.cpp:
        (WebCore::RTCStatsResponse::create):
        * Modules/mediastream/RTCStatsResponse.h:
        * Modules/mediastream/RTCVoidRequestImpl.cpp:
        (WebCore::RTCVoidRequestImpl::create):
        * Modules/mediastream/RTCVoidRequestImpl.h:
        * Modules/mediastream/SourceInfo.cpp:
        (WebCore::SourceInfo::create):
        * Modules/mediastream/SourceInfo.h:
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::create):
        * Modules/mediastream/UserMediaRequest.h:
        * Modules/quota/StorageInfo.h:
        (WebCore::StorageInfo::create):
        * Modules/quota/StorageQuota.h:
        (WebCore::StorageQuota::create):
        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::create):
        * Modules/speech/SpeechSynthesis.h:
        * Modules/speech/SpeechSynthesisUtterance.cpp:
        (WebCore::SpeechSynthesisUtterance::create):
        * Modules/speech/SpeechSynthesisUtterance.h:
        * Modules/speech/SpeechSynthesisVoice.cpp:
        (WebCore::SpeechSynthesisVoice::create):
        * Modules/speech/SpeechSynthesisVoice.h:
        * Modules/webaudio/ChannelMergerNode.cpp:
        (WebCore::ChannelMergerNode::create):
        * Modules/webaudio/ChannelMergerNode.h:
        * Modules/webaudio/ChannelSplitterNode.cpp:
        (WebCore::ChannelSplitterNode::create):
        * Modules/webaudio/ChannelSplitterNode.h:
        * Modules/webaudio/DefaultAudioDestinationNode.h:
        (WebCore::DefaultAudioDestinationNode::create):
        * Modules/webaudio/GainNode.h:
        (WebCore::GainNode::create):
        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
        (WebCore::MediaElementAudioSourceNode::create):
        * Modules/webaudio/MediaElementAudioSourceNode.h:
        * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
        (WebCore::MediaStreamAudioDestinationNode::create):
        * Modules/webaudio/MediaStreamAudioDestinationNode.h:
        * Modules/webaudio/MediaStreamAudioSource.cpp:
        (WebCore::MediaStreamAudioSource::create):
        * Modules/webaudio/MediaStreamAudioSource.h:
        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
        (WebCore::MediaStreamAudioSourceNode::create):
        * Modules/webaudio/MediaStreamAudioSourceNode.h:
        * Modules/webaudio/OscillatorNode.cpp:
        (WebCore::OscillatorNode::setType):
        * Modules/webaudio/PannerNode.h:
        (WebCore::PannerNode::create):
        * Modules/webaudio/PeriodicWave.cpp:
        (WebCore::PeriodicWave::create):
        (WebCore::PeriodicWave::createSine):
        (WebCore::PeriodicWave::createSquare):
        (WebCore::PeriodicWave::createSawtooth):
        (WebCore::PeriodicWave::createTriangle):
        * Modules/webaudio/PeriodicWave.h:
        * Modules/webaudio/ScriptProcessorNode.cpp:
        (WebCore::ScriptProcessorNode::create):
        * Modules/webaudio/ScriptProcessorNode.h:
        * Modules/webaudio/WaveShaperNode.h:
        (WebCore::WaveShaperNode::create):

2015-05-27  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos
        https://bugs.webkit.org/show_bug.cgi?id=145420

        Reviewed by Dean Jackson.

        After r183820, the media controls no longer had a wrapper that created CSS stacking context.
        The media controls on Mac use mix-blend-mode, which causes the compositing code to look for
        a stacking context ancestor and make it composited. After this change, it would walk up
        to a layer outside of the media element (e.g. the document element's layer), and make
        that composited. This triggered bugs with root background painting.

        Prevent mix-blend-mode affecting content outside the media elements by having the media element's
        layer act as a stacking context.

        Test: media/controls-layers.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        * rendering/RenderLayer.h:

2015-05-27  Andreas Kling  <akling@apple.com>

        [WK2] Local storage areas should get torn down when they have no remaining references.
        <https://webkit.org/b/143339>
        <rdar://problem/20156436>

        Reviewed by Darin Adler.

        Add StorageArea::securityOrigin() implementations.

        * loader/EmptyClients.cpp:
        * storage/StorageArea.h:

2015-05-27  Dean Jackson  <dino@apple.com>

        img.currentSrc problem in strict mode with old picturefill
        https://bugs.webkit.org/show_bug.cgi?id=144095
        <rdar://problem/21087013>

        Reviewed by Simon Fraser.

        Add a PICTURE_SIZES flag. This allows us to easily remove the currentSrc
        attribute on HTMLImageElement, which is causing some issues with
        <picture> polyfills.

        * Configurations/FeatureDefines.xcconfig:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate): Add guard around use of m_currentSrc.
        * html/HTMLImageElement.h:
        * html/HTMLImageElement.idl: Guard the currentSrc attribute.
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

2015-05-27  Daniel Bates  <dabates@apple.com>

        Attempt to fix internal build following <http://trac.webkit.org/changeset/184760>
        (https://bugs.webkit.org/show_bug.cgi?id=145289)

        Reviewed by Jer Noble.

        * platform/spi/mac/AVFoundationSPI.h:

2015-05-27  Jeremy Jones  <jeremyj@apple.com>

        Refactor WebKit1 specific threading code out of WebVideoFullscreen code that is shared with WebKit2.
        https://bugs.webkit.org/show_bug.cgi?id=143954

        Reviewed by Darin Adler.

        WebVideoFullscreenInterfaceAVKit is used in both WebKit1 and WebKit2. In WebKit1, the model runs in the WebThread, while
        the interface is on the main thread. So there is code to dispatch between these two thread when communicating between the
        interface and the model. In WebKit2, this is handled automatically by the IPC mechanism. As a result, the threading code
        in WebVideoFullscreenbInterfaceAVKit and in WebVideoFullscreenModelVideoElement is redundant in WebKit2 and relies on
        WebThreadRun being a no-op in WebKit2.

        This change clarifies this and simplifies the WebKit2 path by moving the WebKit1 specific threading code into
        WebVideoFullscreenControllerContext, which is the WebKit1 specific controller.

        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (WebVideoFullscreenControllerContext::WebVideoFullscreenControllerContext):
        (WebVideoFullscreenControllerContext::setController):
        (WebVideoFullscreenControllerContext::didSetupFullscreen):
        (WebVideoFullscreenControllerContext::didExitFullscreen):
        (WebVideoFullscreenControllerContext::didCleanupFullscreen):
        (WebVideoFullscreenControllerContext::fullscreenMayReturnToInline):
        (WebVideoFullscreenControllerContext::resetMediaState):
        (WebVideoFullscreenControllerContext::setDuration):
        (WebVideoFullscreenControllerContext::setCurrentTime):
        (WebVideoFullscreenControllerContext::setBufferedTime):
        (WebVideoFullscreenControllerContext::setRate):
        (WebVideoFullscreenControllerContext::setVideoDimensions):
        (WebVideoFullscreenControllerContext::setSeekableRanges):
        (WebVideoFullscreenControllerContext::setCanPlayFastReverse):
        (WebVideoFullscreenControllerContext::setAudioMediaSelectionOptions):
        (WebVideoFullscreenControllerContext::setLegibleMediaSelectionOptions):
        (WebVideoFullscreenControllerContext::setExternalPlayback):
        (WebVideoFullscreenControllerContext::play):
        (WebVideoFullscreenControllerContext::pause):
        (WebVideoFullscreenControllerContext::togglePlayState):
        (WebVideoFullscreenControllerContext::beginScrubbing):
        (WebVideoFullscreenControllerContext::endScrubbing):
        (WebVideoFullscreenControllerContext::seekToTime):
        (WebVideoFullscreenControllerContext::fastSeek):
        (WebVideoFullscreenControllerContext::beginScanningForward):
        (WebVideoFullscreenControllerContext::beginScanningBackward):
        (WebVideoFullscreenControllerContext::endScanning):
        (WebVideoFullscreenControllerContext::requestExitFullscreen):
        (WebVideoFullscreenControllerContext::setVideoLayerFrame):
        (WebVideoFullscreenControllerContext::setVideoLayerGravity):
        (WebVideoFullscreenControllerContext::selectAudioMediaOption):
        (WebVideoFullscreenControllerContext::selectLegibleMediaOption):
        (WebVideoFullscreenControllerContext::fullscreenModeChanged):
        (WebVideoFullscreenControllerContext::setupFullscreen):
        (WebVideoFullscreenControllerContext::exitFullscreen):
        (WebVideoFullscreenControllerContext::requestHideAndExitFullscreen):
        (-[WebVideoFullscreenController init]):
        (-[WebVideoFullscreenController dealloc]):
        (-[WebVideoFullscreenController enterFullscreen:mode:]):
        (-[WebVideoFullscreenController exitFullscreen]):
        (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
        (-[WebVideoFullscreenController didFinishFullscreen:]):
        (WebVideoFullscreenControllerChangeObserver::setTarget): Deleted.
        (-[WebVideoFullscreenController didSetupFullscreen]): Deleted.
        (-[WebVideoFullscreenController didEnterFullscreen]): Deleted.
        (-[WebVideoFullscreenController didExitFullscreen]): Deleted.
        (-[WebVideoFullscreenController didCleanupFullscreen]): Deleted.
        (-[WebVideoFullscreenController fullscreenMayReturnToInline]): Deleted.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVVideoLayer setBounds:]):
        (-[WebAVVideoLayer resolveBounds]):
        (WebVideoFullscreenInterfaceAVKit::resetMediaState):
        (WebVideoFullscreenInterfaceAVKit::setDuration):
        (WebVideoFullscreenInterfaceAVKit::setCurrentTime):
        (WebVideoFullscreenInterfaceAVKit::setBufferedTime):
        (WebVideoFullscreenInterfaceAVKit::setRate):
        (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
        (WebVideoFullscreenInterfaceAVKit::setSeekableRanges):
        (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse):
        (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions):
        (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions):
        (WebVideoFullscreenInterfaceAVKit::setExternalPlayback):
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
        (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
        (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard):
        (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
        (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
        (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
        (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
        (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::willCancelOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen):
        (WebVideoFullscreenInterfaceAVKit::setVideoLayerFrame):
        (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Deleted.
        * platform/ios/WebVideoFullscreenModel.h:
        * platform/ios/WebVideoFullscreenModelVideoElement.h:
        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
        (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
        (WebVideoFullscreenModelVideoElement::play):
        (WebVideoFullscreenModelVideoElement::pause):
        (WebVideoFullscreenModelVideoElement::togglePlayState):
        (WebVideoFullscreenModelVideoElement::beginScrubbing):
        (WebVideoFullscreenModelVideoElement::endScrubbing):
        (WebVideoFullscreenModelVideoElement::seekToTime):
        (WebVideoFullscreenModelVideoElement::fastSeek):
        (WebVideoFullscreenModelVideoElement::beginScanningForward):
        (WebVideoFullscreenModelVideoElement::beginScanningBackward):
        (WebVideoFullscreenModelVideoElement::endScanning):
        (WebVideoFullscreenModelVideoElement::requestExitFullscreen):
        (WebVideoFullscreenModelVideoElement::fullscreenModeChanged):
        (WebVideoFullscreenModelVideoElement::videoLayerFrame): Deleted.
        (WebVideoFullscreenModelVideoElement::videoLayerGravity): Deleted.

2015-05-27  Eric Carlson  <eric.carlson@apple.com>

        [Mac] short-circuit MIME type lookup when possible
        https://bugs.webkit.org/show_bug.cgi?id=145362

        Reviewed by Jer Noble.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::isUnsupportedMIMEType): Renamed from unsupportedMIMEType. Convert type to lower case
        once instead of calling equalIgnoringCase many times.
        (WebCore::staticMIMETypeList): Renamed from staticMimeTypeCache. Initialize static set in a lambda,
        using an array of C strings in a loop.
        (WebCore::avfMIMETypes): Renamed from avfMimeTypeCache. Initialize static set in a lambda.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): avfMimeTypeCache -> avfMIMETypes.
        (WebCore::keySystemIsSupported): equalIgnoringCase -> equalIgnoringASCIICase.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): unsupportedMIMEType -> 
        isUnsupportedMIMEType, equalIgnoringCase -> equalIgnoringASCIICase, staticMimeTypeCache -> 
        staticMIMETypeList, avfMimeTypeCache -> avfMIMETypes.
        (WebCore::unsupportedMIMEType): Deleted.
        (WebCore::staticMimeTypeCache): Deleted.
        (WebCore::avfMimeTypeCache): Deleted.

2015-05-27  Eric Carlson  <eric.carlson@apple.com>

        [Mac] short-circuit MIME type lookup when possible
        https://bugs.webkit.org/show_bug.cgi?id=145362

        Reviewed by Dean Jackson.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::unsupportedMIMEType): New, reject types known to not be supported.
        (WebCore::staticMimeTypeCache): Accept MIME types known to be supported.
        (WebCore::avfMimeTypeCache): Renamed from mimeTypeCache.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): mimeTypeCache -> staticMimeTypeCache.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Return immediately if
        unsupportedMIMEType returns true, don't call AVFoundation if staticMimeTypeCache returns true.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): Ditto.
        (WebCore::mimeTypeCache): Deleted.

2015-05-27  Eric Carlson  <eric.carlson@apple.com>

        [Mac] occasional crash in MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest
        https://bugs.webkit.org/show_bug.cgi?id=145409

        Reviewed by Dean Jackson.

        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
        (WebCore::WebCoreAVFResourceLoader::stopLoading): NULL-check m_avRequest.

2015-05-26  Dean Jackson  <dino@apple.com>

        Backdrop filters don't animate
        https://bugs.webkit.org/show_bug.cgi?id=145386
        <rdar://problem/21110037>

        Reviewed by Simon Fraser.

        Add support for animation of backdrop filters.

        Note that, at the moment, we can only animate/transition
        backdrop-filter if it is already present on the element. See
        https://bugs.webkit.org/show_bug.cgi?id=145107

        Test: css3/filters/backdrop/animation.html

        * page/animation/AnimationBase.h: Add m_backdropFilterFunctionListsMatch and backdropFilterFunctionListsMatch.
        (WebCore::AnimationBase::backdropFilterFunctionListsMatch):

        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc): backdrop-filter is also supported.
        (WebCore::PropertyWrapperAcceleratedBackdropFilter::PropertyWrapperAcceleratedBackdropFilter): Added. Works
        similarly to the PropertyWrapperAcceleratedFilter.
        (WebCore::PropertyWrapperAcceleratedBackdropFilter::animationIsAccelerated):
        (WebCore::PropertyWrapperAcceleratedBackdropFilter::blend):
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Construct the
        PropertyWrapperAcceleratedBackdropFilter.

        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::reset): Call checkForMatchingBackdropFilterFunctionLists.
        (WebCore::ImplicitAnimation::validateTransformFunctionList): Fix typo.
        (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists): Remove whitespace.
        (WebCore::ImplicitAnimation::checkForMatchingBackdropFilterFunctionLists): New method that
        checks if the individual filters in a filter list match.
        * page/animation/ImplicitAnimation.h: Add checkForMatchingBackdropFilterFunctionLists.

        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::KeyframeAnimation): Call checkForMatchingBackdropFilterFunctionLists.
        (WebCore::KeyframeAnimation::checkForMatchingBackdropFilterFunctionLists): Copied from
        checkForMatchingFilterFunctionLists, but calls backdropFilter() instead of filter().
        (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): This was accidentally checking
        for backdrop filters as well, but it wouldn't have worked.
        * page/animation/KeyframeAnimation.h: Add checkForMatchingBackdropFilterFunctionLists.

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::validateFilterOperations): Modify the ASSERT to allow AnimatedPropertyWebkitBackdropFilter.
        * platform/graphics/GraphicsLayerClient.h: Add AnimatedPropertyWebkitBackdropFilter to the enum.

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::propertyIdToString): Support new enum.
        (WebCore::GraphicsLayerCA::addAnimation): Support AnimatedPropertyWebkitBackdropFilter.
        (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes): Ditto.
        (WebCore::GraphicsLayerCA::animatedLayer): Use a switch statement now that we have more than
        two options, and handle AnimatedPropertyWebkitBackdropFilter.
        (WebCore::GraphicsLayerCA::updateAnimations): Deleted a blank line.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::startAnimation): Support animation of backdrop-filter.
        (WebCore::RenderLayerBacking::startTransition): Ditto. Copied the code from the filter transition.
        (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
        (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):

2015-05-27  Jeremy Jones  <jeremyj@apple.com>

        Handle case where -startOptimizedFullscreen fails.
        https://bugs.webkit.org/show_bug.cgi?id=145340

        Reviewed by Eric Carlson.

        Add new AVPlayerViewController delegate methods and remove old ones.
        -startOptimizedFullscreen can either fail silently because it is not allowed or it will call a delegate.
        We prevent silent failure by testing preconditions in enterFullscreenOptimized, and add the 
        delegate -playerViewControllerFailedToStartOptimizedFullscreen to handle explicitly failure.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.h: added/removed method declarations.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
        (-[WebAVPlayerController playerViewControllerFailedToStartOptimizedFullscreen:withError:]): Added.
        (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized): Handle silent failure.
        (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen): Hide window on main thread.
        (WebVideoFullscreenInterfaceAVKit::failedToStartOptimizedFullscreen): Added
        (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]): Deleted.
        (-[WebAVPlayerController playerViewControllerDidCancelOptimizedFullscreen:]): Deleted.
        (WebVideoFullscreenInterfaceAVKit::willCancelOptimizedFullscreen): Deleted.
        (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Deleted.
        * platform/spi/cocoa/AVKitSPI.h: Remove dead SPI. Add isOptimizedFullscreenPossible.

2015-05-27  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Arabic ligatures are broken in Google Maps
        https://bugs.webkit.org/show_bug.cgi?id=145336
        <rdar://problem/20689607>

        Reviewed by Darin Adler.

        When we fall off the end of the font fallback list, we ask the platform for which particular font we should use
        to display a particular codepoint. When we do this, we supply the font which is first in the fallback list so
        that the platform can try to match it as best it can. However, web fonts' FontPlatformData have a null m_font
        property, which means that we were passing nullptr to this platform fallback function.

        The solution is something I've wanted to do for a while, which is migrate webfonts from using
        CGDataProviderCreateWithCFData() to using CTFontManagerCreateFontDescriptorFromData(). This call creates a
        CoreText font for an in-memory buffer (the old call was creating a CoreGraphics front from the same thing).
        This means that we can use the FontPlatformData constructor which accepts a CoreText font, thereby making web
        fonts not have a null m_font property. Note that not all platforms can use this call, which means that this
        new codepath is gated to only certain OSes (which is okay because only certain OSes use the
        CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage() call inside FontCache). Because web fonts are the
        only user of the constructor which just takes a CG font, we can make the constructor private to the
        FontPlatformData class (as soon as all platforms can use this new codepath).

        Test: platform/ios-simulator/fast/text/arabic-with-no-supporting-webfont.html

        * platform/graphics/FontPlatformData.h: Make the FontPlatformData constructor which takes a CGFontRef private.
        * platform/graphics/mac/FontCustomPlatformData.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData): Use the CoreText type instead of the CoreGraphics type.
        (WebCore::createFontCustomPlatformData): Migrate to CTFontManagerCreateFontDescriptorFromData().
        * platform/graphics/mac/FontCustomPlatformData.h:
        (WebCore::FontCustomPlatformData::FontCustomPlatformData): Store a CTFontDescriptorRef instead of a CGFontRef.

2015-05-26  Said Abou-Hallawa  <sabouhallawa@apple.com>

        An SVG with no intrinsic size does not draw correct slices when used as a border-image for an HTML element.
        https://bugs.webkit.org/show_bug.cgi?id=139405

        Reviewed by Darin Adler.
        
        When using a non-intrinsic-sized image as an image-border, all the source
        slices have to be extracted from the top-left corner of the source image.
        This is because the right and bottom sides of the image can not be known.
        Also all the slices should not be stretched. In other words, the sizes of
        source slices for a non-intrinsic-sized image should be equal to the sizes
        of the destination container slices.

        This is not compliant with the css3 w3c specs. I think the specs makes it
        harder to predict what exactly will be drawn for the image-border in this
        case. See http://www.w3.org/TR/css3-background/#border-image-slice. This
        approach is implemented by FireFox. And I think it gives a more predictable 
        rendering for image-border in the case of non-intrinsic-sized images.
        
        Test: fast/borders/border-image-fill-no-intrinsic-size.html

        * CMakeLists.txt:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/LengthBox.cpp: Removed.
        * platform/graphics/LayoutBoxExtent.cpp: Removed.
        * platform/graphics/LayoutBoxExtent.h: Removed.
        * platform/graphics/LayoutRect.h:
        Delete LengthBox.cpp and move all the functionalities to LengthBox.h.
        Delete LayoutBoxExtent.cpp since it is the same class as LengthBox.
        
        * css/CSSProperty.cpp:
        * platform/text/WritingMode.h:
        Move the enums LogicalBoxSide and PhysicalBoxSide
        from CSSProperty.cpp to WritingMode.h so it can be used by other classes.
        
        * css/CSSToStyleMap.cpp:
        (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
        (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
        * css/CSSToStyleMap.h:
        * inspector/InspectorOverlay.cpp:
        (WebCore::buildRendererHighlight):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
        * rendering/RenderBox.h:
        (WebCore::RenderBox::marginLogicalLeft):
        (WebCore::RenderBox::marginLogicalRight):
        (WebCore::RenderBox::setMarginBefore):
        (WebCore::RenderBox::setMarginAfter):
        (WebCore::RenderBox::setMarginStart):
        (WebCore::RenderBox::setMarginEnd):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::setClip):
        (WebCore::RenderStyle::noneDashboardRegions):
        * rendering/style/RenderStyle.h:
        Use the new BoxExtent access methods for getting and settings the sides of
        LengthBox and LayoutBoxExtent.
        
        * platform/LengthBox.h:
        (WebCore::BoxExtent::BoxExtent):
        (WebCore::BoxExtent::at):
        (WebCore::BoxExtent::top):
        (WebCore::BoxExtent::right):
        (WebCore::BoxExtent::bottom):
        (WebCore::BoxExtent::left):
        (WebCore::BoxExtent::setAt):
        (WebCore::BoxExtent::setTop):
        (WebCore::BoxExtent::setRight):
        (WebCore::BoxExtent::setBottom):
        (WebCore::BoxExtent::setLeft):
        (WebCore::BoxExtent::before):
        (WebCore::BoxExtent::end):
        (WebCore::BoxExtent::after):
        (WebCore::BoxExtent::start):
        (WebCore::BoxExtent::setBefore):
        (WebCore::BoxExtent::setEnd):
        (WebCore::BoxExtent::setAfter):
        (WebCore::BoxExtent::setStart):
        (WebCore::BoxExtent::operator==):
        (WebCore::BoxExtent::operator!=):
        (WebCore::LengthBox::LengthBox):
        (WebCore::LengthBox::isZero):
        (WebCore::LengthBox::left): Deleted.
        (WebCore::LengthBox::right): Deleted.
        (WebCore::LengthBox::top): Deleted.
        (WebCore::LengthBox::bottom): Deleted.
        (WebCore::LengthBox::operator==): Deleted.
        (WebCore::LengthBox::operator!=): Deleted.
        (WebCore::LengthBox::nonZero): Deleted.
        Define a new template class for 'BoxExtent'. A 'BoxExtent' represents the
        extent of four sides of a box. Use this class template to define the exiting 
        classes 'LengthBox' and 'LayoutBoxExtent'. Use it also to and define the
        new class FloatBoxExtent
            
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
        * rendering/RenderBoxModelObject.h:
        (WebCore::RenderBoxModelObject::calculateFillTileSize):
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::updateContent):
        * rendering/shapes/ShapeOutsideInfo.cpp:
        (WebCore::ShapeOutsideInfo::createShapeForImage):
        Change the return value of calculateImageIntrinsicDimensions() to be a
        bool which indicates whether the image has an intrinsic size or not. Add
        a new reference argument to this function receive the resolved image size.
        
        (WebCore::RenderBoxModelObject::paintNinePieceImage): Move all the painting
        code of this function to NinePieceImage::paint()
        
        (WebCore::computeBorderImageSide): Deleted.
        Renamed to be NinePieceImage::computeSlice().
        
        * rendering/style/BorderData.h:
        (WebCore::BorderData::borderWidth): Add a new method to return the extents
        of the border in a FloatBoxExtent.
        
        * rendering/style/NinePieceImage.cpp:
        (WebCore::NinePieceImage::computeSlice): Moved from NinePieceImage::computeSlice().
        
        (WebCore::NinePieceImage::computeSlices): The first version of this function
        computes the slices given their lengths. The slices have to be clamped to
        the container size. The second version of this function computes the slices
        given their lengths, their actual extents and their source slices.
        
        (WebCore::NinePieceImage::scaleSlicesIfNeeded):  Reduce the slices if they
        are too large.
        
        (WebCore::NinePieceImage::isEmptyPieceRect): Returns true if an ImagePiece
        should not be drawn.
        
        (WebCore::NinePieceImage::horizontalTileRules):
        (WebCore::NinePieceImage::verticalTileRules):
        Fill vectors of tiling rules to be passed to GraphicsContext::drawTiledImage()
        
        (WebCore::NinePieceImage::computeIntrinsicRects): Computes the nine pieces
        rectangles for an intrinsic-sized container.
        
        (WebCore::NinePieceImage::computeNonIntrinsicRects): Computes the nine
        pieces rectangles for an non-intrinsic-sized source image. The computed
        rectangles have to start at (0, 0) and their sizes should be equal to
        the sizes of the nine pieces rectangles of the destination container.
        
        (WebCore::NinePieceImage::computeIntrinsicSideTileScale):
        (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale):
        (WebCore::NinePieceImage::computeIntrinsicTileScales):
        (WebCore::NinePieceImage::computeNonIntrinsicTileScales):
        Computes the scaling factors for drawing the tiles. For non-intrinsic source
        images, there should not be any scaling factors. 
        
        (WebCore::NinePieceImage::paint): Moved from RenderBoxModelObject::paintNinePieceImage()
        but simplified and restructured.
        
        (WebCore::NinePieceImageData::NinePieceImageData): Use nullptr instead of 0.
        
        * rendering/style/NinePieceImage.h:
        (WebCore::operator++):
        (WebCore::isCornerPiece): 
        (WebCore::isMiddlePiece):
        (WebCore::imagePieceHorizontalSide):
        (WebCore::imagePieceVerticalSide):
        Add helper functions for the enum ImagePiece.

2015-05-26  Andreas Kling  <akling@apple.com>

        <font face> doesn't support plus character in font family names.
        <https://webkit.org/b/145400>
        <rdar://problem/21097484>

        Reviewed by Darin Adler.

        Turn CSSParser::parseFontFaceValue() into a fast-path parser for
        <font face> attributes.
        Going through the full CSS parser was hurting us here, as it would
        misunderstand unquoted family names and choke on e.g '+'.

        Test: fast/dom/HTMLFontElement/face-attribute.html

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

2015-05-26  Chris Fleizach  <cfleizach@apple.com>

        AX: display:none content exposed to accessibility when aria-hidden is toggled on ancestor element
        https://bugs.webkit.org/show_bug.cgi?id=139142

        Reviewed by Darin Adler.
     
        Amend the code that determines when an invisible, but aria-hidden=false, element is exposed to accessibility.

        The new guideline is that you must have aria-hidden=false on every node that is not rendered (except text which inherits)
        otherwise the element will not be visible.

        Modified existing test: accessibility/aria-hidden-false-works-in-subtrees.html

        * accessibility/AXObjectCache.cpp:
        (WebCore::isNodeAriaVisible):
        (WebCore::AXObjectCache::rootWebArea):

2015-05-26  Roger Fong  <roger_fong@apple.com>

        Enable element unsigned index in WebGL2 again.
        https://bugs.webkit.org/show_bug.cgi?id=145392
        <rdar://problem/21112585>.

        Reviewed by Dean Jackson.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::validateDrawElements):
        Fix some incorrect logic that disables the feature for WebGL2.

2015-05-26  Chris Dumez  <cdumez@apple.com>

        Add assertions to make sure pages in the PageCache are not loading
        https://bugs.webkit.org/show_bug.cgi?id=145397
        <rdar://problem/20613631>

        Reviewed by Antti Koivisto.

        Add assertions to make sure pages in the PageCache are not loading.
        These will hopefully help track down why PacheCache entries sometimes
        have pending subresource loads when being destroyed.

        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::CachedFrame):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::stopLoadingSubresources):
        (WebCore::DocumentLoader::addSubresourceLoader):

2015-05-26  Commit Queue  <commit-queue@webkit.org>

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

        Bindings tests broken on the bots. (Requested by dethbakin on
        #webkit).

        Reverted changeset:

        "Binding generator should support interfaces with
        CustomConstructor and NoInterfaceObject"
        https://bugs.webkit.org/show_bug.cgi?id=145016
        http://trac.webkit.org/changeset/184872

2015-05-26  Zalan Bujtas  <zalan@apple.com>

        Overhanging float sets are not cleaned up properly when floating renderer is destroyed.
        https://bugs.webkit.org/show_bug.cgi?id=145323
        rdar://problem/20980628

        Reviewed by Dave Hyatt.

        This patch ensures when an overhanging float renderer is destroyed,
        all the sibling containers' floating object set(m_floatingObjects) gets properly cleaned up.

        When an overhanging float is present, we cache the renderer on the parent and on the affected
        sibling containers too. (RenderBlockFlow::m_floatingObjects) These caches(sets) get cleared and repopulated
        during ::layout(). In order to have a float renderer removed from a set, a layout needs to be initiated on the container.
        This is normally done through RenderBlockFlow::markSiblingsWithFloatsForLayout() and RenderBlockFlow::markAllDescendantsWithFloatsForLayout().
        However, when the float container's parent's writing direction changes (and we promote the children containers to new formatting contexts),
        the layout propagation through siblings does not work anymore.

        The avoidsFloats() check in RenderBlockFlow::markSiblingsWithFloatsForLayout() has very little performance gain, but it prevents us
        from propagating layout to siblings when certain properties of the parent container changes.

        Test: fast/block/float/crash-when-floating-object-is-removed.xhtml

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
        * rendering/RenderBox.cpp:
        (WebCore::outermostBlockContainingFloatingObject):
        (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
        (WebCore::RenderBox::outermostBlockContainingFloatingObject): Deleted.
        * rendering/RenderBox.h:

2015-05-26  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL][CoordinatedGraphics] Remove CoordinatedTileClient and CoordinatedTileBackend
        https://bugs.webkit.org/show_bug.cgi?id=133337

        Reviewed by Darin Adler.

        This patch simplifies relationship between CoordinatedGraphicsLayer and TiledBackingStore
        by removing TiledBackingStoreBackend because TiledBackingStore only support
        CoordinatedTileBackend.
        And it also moves CoordinatedTileClient interface to TiledBackingStoreClient.

        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::createBackingStore):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
        * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
        (WebCore::CoordinatedTile::create):
        (WebCore::CoordinatedTile::CoordinatedTile):
        (WebCore::CoordinatedTile::~CoordinatedTile):
        (WebCore::CoordinatedTile::updateBackBuffer):
        (WebCore::CoordinatedTileBackend::CoordinatedTileBackend): Deleted.
        (WebCore::CoordinatedTileBackend::createTile): Deleted.
        (WebCore::CoordinatedTileBackend::paintCheckerPattern): Deleted.
        * platform/graphics/texmap/coordinated/CoordinatedTile.h:
        (WebCore::CoordinatedTile::create): Deleted.
        (WebCore::CoordinatedTileClient::~CoordinatedTileClient): Deleted.
        * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
        (WebCore::TiledBackingStore::TiledBackingStore):
        (WebCore::TiledBackingStore::createTiles):
        * platform/graphics/texmap/coordinated/TiledBackingStore.h:
        * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Removed.
        (WebCore::TiledBackingStoreBackend::~TiledBackingStoreBackend): Deleted.
        * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:

2015-05-26  Daegyu Lee  <daegyu.lee@navercorp.com>

        Fullscreen video does not display on platforms without accelerated video rendering
        https://bugs.webkit.org/show_bug.cgi?id=145118

        In order to paint video contents in fullscreen mode, add supportsAcceleratedRendering condition. 

        Reviewed by Simon Fraser.

        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::paintReplaced):

2015-05-26  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVG fragment identifier rendering issue
        https://bugs.webkit.org/show_bug.cgi?id=137328

        Reviewed by Darin Adler.

        This is a follow up for http://trac.webkit.org/changeset/164983. In this
        changeset, scrolling to the fragment should have been added before the
        the paint to guarantee setting the proper display position for the SVG
        fragment.

        Test: svg/css/svg-resource-fragment-identifier-order.html

        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::draw): Move view->scrollToFragment() before calling 
        view->paint().

2015-05-26  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Binding generator should support interfaces with CustomConstructor and NoInterfaceObject
        https://bugs.webkit.org/show_bug.cgi?id=145016

        Reviewed by Darin Adler.

        Updated code generator to generate the necessary declarations (constructor property in the prototype, the constructor class).
        In the case of CustomConstructor with NoInterfaceObject, the implementation of the constructor property related JS function is changed as follow:
        It creates a constructor object and shadows the constructor property JS function with this object.
        This ensures that only one constructor object is created per prototype.
        The constructor is not exposed as it is not added to the global object constructor map.

        NoInterfaceObject is asking to not make the interface visible, which is contradictory with having a visible constructor of the interface.
        The case for having NoInterfaceObject and CustomConstructor is the following:
        We do not want to expose the interface but we still want to have a constructor property on the prototype of objects implementing the interface.
        One such case is https://streams.spec.whatwg.org/#globals

        Added TestCustomConstructorWithNoInterfaceObject.idl to check that case.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateAttributesHashTable):
        (GenerateImplementation):
        (HasConstructorProperty):
        * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.cpp: Added.
        (WebKit::kit):
        (WebKit::core):
        (WebKit::wrapTestCustomConstructorWithNoInterfaceObject):
        (webkit_dom_test_custom_constructor_with_no_interface_object_finalize):
        (webkit_dom_test_custom_constructor_with_no_interface_object_constructor):
        (webkit_dom_test_custom_constructor_with_no_interface_object_class_init):
        (webkit_dom_test_custom_constructor_with_no_interface_object_init):
        * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.h: Added.
        * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObjectPrivate.h: Added.
        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Added.
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::create):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
        (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getConstructor):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
        (WebCore::toJS):
        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Added.
        (WebCore::wrapperOwner):
        (WebCore::toJS):
        * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Added.
        * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Added.
        (-[DOMTestCustomConstructorWithNoInterfaceObject dealloc]):
        (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]):
        (core):
        (kit):
        * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Added.
        * bindings/scripts/test/TestCustomConstructor.idl: Added.

2015-05-26  Joseph Pecoraro  <pecoraro@apple.com>

        CSS properties (font-synthesis, column-fill) are missing in getComputedStyles
        https://bugs.webkit.org/show_bug.cgi?id=145343

        Reviewed by Timothy Hatcher.

        * css/CSSComputedStyleDeclaration.cpp:

2015-05-26  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21104551> Update build settings

        Reviewed by Anders Carlsson.

        * Configurations/DebugRelease.xcconfig:
        * Configurations/FeatureDefines.xcconfig:
        * Configurations/Version.xcconfig:

2015-05-26  Csaba Osztrogonác  <ossy@webkit.org>

        [ARM] Build SVGPathElement.cpp with -O2 due to a GCC bug
        https://bugs.webkit.org/show_bug.cgi?id=145377

        Reviewed by Carlos Garcia Campos.

        * CMakeLists.txt:

2015-05-25  Dan Bernstein  <mitz@apple.com>

        Fixed a failing bindings test after r184853.

        * bindings/scripts/CodeGeneratorObjC.pm:
        (GenerateImplementation): Removed an extraneous semicolon.

2015-05-25  Dan Bernstein  <mitz@apple.com>

        ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
        https://bugs.webkit.org/show_bug.cgi?id=145372

        Reviewed by Sam Weinig.

        * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.

        * bindings/objc/DOMAbstractView.mm:
        (-[DOMAbstractView dealloc]): Removed use of DOM_ASSERT_MAIN_THREAD.
        (kit): Ditto.

        * bindings/objc/ExceptionHandlers.h: Removed definition of DOM_ASSERT_MAIN_THREAD.

        * bindings/scripts/CodeGeneratorObjC.pm:
        (GenerateImplementation): Don’t emit DOM_ASSERT_MAIN_THREAD.

        Updated expected bindings test results:
        * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
        * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
        * bindings/scripts/test/ObjC/DOMTestCallback.mm:
        * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
        * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
        * bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
        * bindings/scripts/test/ObjC/DOMTestException.mm:
        * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
        * bindings/scripts/test/ObjC/DOMTestInterface.mm:
        * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
        * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
        * bindings/scripts/test/ObjC/DOMTestNode.mm:
        * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
        * bindings/scripts/test/ObjC/DOMTestObj.mm:
        * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
        * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
        * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
        * bindings/scripts/test/ObjC/DOMattribute.mm:
        * bindings/scripts/test/ObjC/DOMreadonly.mm:

2015-05-25  Hunseop Jeong  <hs85.jeong@samsung.com>

        Replaced 0 with nullptr in WebCore/svg.
        https://bugs.webkit.org/show_bug.cgi?id=145367

        Reviewed by Gyuyoung Kim.

        No new tests, no behavior changes.

        * svg/PatternAttributes.h:
        (WebCore::PatternAttributes::PatternAttributes):
        * svg/SVGAnimatedType.h:
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::cursorElementRemoved):
        (WebCore::SVGElement::cursorImageValueRemoved):
        (WebCore::SVGElement::getPresentationAttribute):
        * svg/SVGException.cpp:
        (WebCore::SVGException::initializeDescription):
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::clearResourceReferences):
        * svg/SVGFontFaceElement.cpp:
        (WebCore::SVGFontFaceElement::SVGFontFaceElement):
        (WebCore::SVGFontFaceElement::removedFrom):
        * svg/SVGFontFaceUriElement.cpp:
        (WebCore::SVGFontFaceUriElement::loadFont):
        * svg/SVGLength.h:
        (WebCore::SVGLength::blend):
        * svg/SVGPathBlender.cpp:
        (WebCore::SVGPathBlender::SVGPathBlender):
        (WebCore::SVGPathBlender::cleanup):
        * svg/SVGPathBuilder.cpp:
        (WebCore::SVGPathBuilder::SVGPathBuilder):
        * svg/SVGPathBuilder.h:
        * svg/SVGPathByteStreamBuilder.cpp:
        (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
        * svg/SVGPathByteStreamBuilder.h:
        * svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::dPropertyInfo):
        * svg/SVGPathParser.cpp:
        (WebCore::SVGPathParser::SVGPathParser):
        (WebCore::SVGPathParser::cleanup):
        * svg/SVGPathSegListBuilder.cpp:
        (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
        * svg/SVGPathSegListBuilder.h:
        * svg/SVGPathTraversalStateBuilder.cpp:
        (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
        * svg/SVGPathUtilities.cpp:
        (WebCore::globalSVGPathBuilder):
        (WebCore::globalSVGPathSegListBuilder):
        (WebCore::globalSVGPathByteStreamBuilder):
        (WebCore::globalSVGPathStringBuilder):
        (WebCore::globalSVGPathTraversalStateBuilder):
        (WebCore::globalSVGPathParser):
        (WebCore::globalSVGPathBlender):
        * svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::pointsPropertyInfo):
        * svg/SVGTRefElement.cpp:
        (WebCore::SVGTRefTargetEventListener::cast):
        (WebCore::SVGTRefTargetEventListener::SVGTRefTargetEventListener):
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::textLengthPropertyInfo):
        * svg/SVGURIReference.h:
        * svg/SVGViewSpec.cpp:
        (WebCore::SVGViewSpec::viewBoxPropertyInfo):
        (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
        (WebCore::SVGViewSpec::transformPropertyInfo):
        * svg/SVGViewSpec.h:
        (WebCore::SVGViewSpec::resetContextElement):
        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::updateAnimations):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::ConditionEventListener::cast):
        (WebCore::ConditionEventListener::disconnectAnimation):
        (WebCore::SVGSMILElement::SVGSMILElement):
        (WebCore::SVGSMILElement::removedFrom):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::drawForContainer):
        * svg/graphics/filters/SVGFEImage.cpp:
        (WebCore::FEImage::FEImage):
        * svg/graphics/filters/SVGFilterBuilder.cpp:
        (WebCore::SVGFilterBuilder::clearEffects):
        * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
        (WebCore::SVGAnimatedPathSegListPropertyTearOff::animationEnded):
        (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
        * svg/properties/SVGAnimatedPropertyDescription.h:
        (WebCore::SVGAnimatedPropertyDescription::SVGAnimatedPropertyDescription):
        * svg/properties/SVGAnimatedPropertyTearOff.h:
        (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff):
        * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
        (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
        (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
        * svg/properties/SVGPropertyTearOff.h:
        (WebCore::SVGPropertyTearOff::SVGPropertyTearOff):

2015-05-24  Sam Weinig  <sam@webkit.org>

        Crash when using a removed ScriptMessageHandler
        <rdar://problem/20888499>
        https://bugs.webkit.org/show_bug.cgi?id=145359

        Reviewed by Dan Bernstein.

        Added tests:
            WKUserContentController.ScriptMessageHandlerBasicRemove
            WKUserContentController.ScriptMessageHandlerCallRemovedHandler

        * page/UserMessageHandler.cpp:
        (WebCore::UserMessageHandler::~UserMessageHandler):
        (WebCore::UserMessageHandler::postMessage):
        (WebCore::UserMessageHandler::name):
        * page/UserMessageHandler.h:
        (WebCore::UserMessageHandler::create):
        * page/UserMessageHandler.idl:
        * page/UserMessageHandlerDescriptor.cpp:
        (WebCore::UserMessageHandlerDescriptor::UserMessageHandlerDescriptor):
        * page/UserMessageHandlerDescriptor.h:
        (WebCore::UserMessageHandlerDescriptor::client):
        (WebCore::UserMessageHandlerDescriptor::invalidateClient):
        Add support for invalidating the descriptor and throw an exception if someone tries
        to post a message using an invalidated descriptor.

        * page/UserMessageHandlersNamespace.cpp:
        (WebCore::UserMessageHandlersNamespace::handler):
        Add logic to remove message handlers if their descriptor has been invalidated.

2015-05-23  Dan Bernstein  <mitz@apple.com>

        Remove unused definitions of WEBKIT_VERSION_MIN_REQUIRED
        https://bugs.webkit.org/show_bug.cgi?id=145345

        Reviewed by Sam Weinig.

        * Configurations/WebCore.xcconfig: Also changed to use $(inherited).

2015-05-24  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/svg.
        https://bugs.webkit.org/show_bug.cgi?id=145209

        Reviewed by Darin Adler.

        No new tests, no behavior changes.

        * svg/SVGAnimateElementBase.cpp:
        (WebCore::propertyTypesAreConsistent):
        * svg/SVGAnimatedPath.cpp:
        (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
        * svg/SVGAnimatedTypeAnimator.h:
        (WebCore::SVGAnimatedTypeAnimator::executeAction):
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::parseAttribute):
        * svg/SVGCursorElement.cpp:
        (WebCore::SVGCursorElement::~SVGCursorElement):
        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::pauseAnimations):
        (WebCore::SVGDocumentExtensions::unpauseAnimations):
        (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
        (WebCore::SVGDocumentExtensions::isElementWithPendingResources):
        (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
        (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
        * svg/SVGElement.cpp:
        (WebCore::populateAttributeNameToCSSPropertyIDMap):
        (WebCore::populateAttributeNameToAnimatedPropertyTypeMap):
        (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
        (WebCore::hasLoadListener):
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
        (WebCore::SVGKerningMap::insert):
        (WebCore::stringMatchesUnicodeRange):
        * svg/SVGPathByteStream.h:
        (WebCore::SVGPathByteStream::append):
        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::setElapsed):
        (WebCore::SMILTimeContainer::updateAnimations):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::parseBeginOrEnd):
        (WebCore::SVGSMILElement::connectConditions):
        (WebCore::SVGSMILElement::disconnectConditions):
        (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
        (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
        * svg/graphics/filters/SVGFilterBuilder.cpp:
        (WebCore::SVGFilterBuilder::clearResultsRecursive):
        * svg/graphics/filters/SVGFilterBuilder.h:
        (WebCore::SVGFilterBuilder::addBuiltinEffects):
        * svg/properties/SVGAnimatedProperty.cpp:
        (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
        * svg/properties/SVGListProperty.h:
        (WebCore::SVGListProperty::detachListWrappersAndResize):
        * svg/properties/SVGPathSegListPropertyTearOff.cpp:
        (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):

2015-05-24  Jeremy Jones  <jeremyj@apple.com>

        Register media MIME types as supported by HTML view in WebKit1.
        https://bugs.webkit.org/show_bug.cgi?id=145356

        Reviewed by Eric Carlson.

        getSupportedMediaMIMETypes is now used in WebKit1.

        * platform/MIMETypeRegistry.h: Export getSupportedMediaMIMETypes.

2015-05-23  Antti Koivisto  <antti@apple.com>

        Permanent redirects should have long implicit cache lifetime
        https://bugs.webkit.org/show_bug.cgi?id=145348
        rdar://problem/20680519

        Reviewed by Sam Weinig.

        301 Moved Permanently response that doesn't specify explicit lifetime should have long implicit lifetime.
        This matches other browsers.

        * platform/network/CacheValidation.cpp:
        (WebCore::computeFreshnessLifetimeForHTTPFamily):

            Give 301 Moved Permanently (and similarly semantically permanent 410 Gone) long implicit lifetime.

        (WebCore::updateRedirectChainStatus):

2015-05-23  Myles C. Maxfield  <mmaxfield@apple.com>

        Cleanup after r184796
        https://bugs.webkit.org/show_bug.cgi?id=145333

        Reviewed by Alexey Proskuryakov.

        No new tests because there is no behavior change.

        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
        (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.

2015-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>

        Introduce UniquedStringImpl and SymbolImpl to separate symbolic strings from AtomicStringImpl
        https://bugs.webkit.org/show_bug.cgi?id=144848

        Reviewed by Darin Adler.

        Use UniquedStringImpl, SymbolImpl and AtomicStringImpl.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::write):

2015-05-23  Zalan Bujtas  <zalan@apple.com>

        Simple line layout: Ignore -webkit-flow-*content while collecting text content for innerText.
        https://bugs.webkit.org/show_bug.cgi?id=145344
        rdar://problem/20959522

        Reviewed by Antti Koivisto.

        This patch ensures that when a -webkit-flow-into content is present in a simple line layout container,
        we skip it while collecting the text content for innerText.
        It's not always guaranteed that a simple line layout container only contains simple text nodes. In such cases,
        we need to ensure that text offset computing only takes the simple text nodes into account.

        Test: fast/text/simple-line-layout-inner-text-with-flow-content.html

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        * editing/TextIterator.h:

2015-05-22  Mark Lam  <mark.lam@apple.com>

        Document::ensurePlugInsInjectedScript() should evaluate the injected script on its own frame.
        https://bugs.webkit.org/show_bug.cgi?id=145328

        Reviewed by Jon Lee.

        trac.webkit.org/r184329 fixed HTMLPlugInImageElement::didAddUserAgentShadowRoot()
        to use the document's frame instead of the page's main frame.  However,
        Document::ensurePlugInsInjectedScript() is still evaluating the injected script on
        the main frame.

        As a result, HTMLPlugInImageElement::didAddUserAgentShadowRoot()'s attempt to get
        the injected createOverlay function from the document frame's global object will
        fail.  Fixing Document::ensurePlugInsInjectedScript() to evaluating the injected
        script on the document's frame fixes the issue.

        No new tests.

        * dom/Document.cpp:
        (WebCore::Document::ensurePlugInsInjectedScript):

2015-05-22  Eric Carlson  <eric.carlson@apple.com>

        MediaPlayer doesn't need isPlayingToWirelessPlaybackTarget and isCurrentPlaybackTargetWireless
        https://bugs.webkit.org/show_bug.cgi?id=145325

        Reviewed by Brent Fulgham.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Call isCurrentPlaybackTargetWireless
        directly.
        (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): Ditto.
        (WebCore::HTMLMediaElement::isPlayingToWirelessPlaybackTarget): Ditto.
        (WebCore::HTMLMediaElement::mediaState): Ditto.

        * html/HTMLMediaSession.cpp:
        (WebCore::HTMLMediaSession::currentPlaybackTargetIsWireless): Deleted.
        * html/HTMLMediaSession.h:

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::isPlayingToWirelessPlaybackTarget): Deleted.
        * platform/graphics/MediaPlayer.h:

        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::isPlayingToWirelessPlaybackTarget): Deleted.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Deleted.

        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
        (WebVideoFullscreenModelVideoElement::updateForEventName): Call webkitCurrentPlaybackTargetIsWireless.

2015-05-22  Jon Lee  <jonlee@apple.com>

        Rename MediaPlaybackAllowsInline
        https://bugs.webkit.org/show_bug.cgi?id=145315

        Reviewed by Eric Carlson.

        Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.

        * page/Settings.cpp: Update the static variable name as well as the setting.
        * page/Settings.in: Ditto.

        * Modules/mediacontrols/MediaControlsHost.idl: Rename to allowsInlineMediaPlayback.
        Affects the media controls code.
        * Modules/mediacontrols/MediaControlsHost.h:
        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::allowsInlineMediaPlayback):
        (WebCore::MediaControlsHost::mediaPlaybackAllowsInline): Deleted.

        Update to use the new name in the media controls.
        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.shouldHaveControls):
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.shouldHaveStartPlaybackButton):

        * css/MediaQueryEvaluator.cpp:
        (WebCore::video_playable_inlineMediaFeatureEval):
        * html/HTMLMediaSession.cpp:
        (WebCore::HTMLMediaSession::requiresFullscreenForVideoPlayback):

2015-05-22  Jon Lee  <jonlee@apple.com>

        Rename MediaPlaybackAllowsAirPlay
        https://bugs.webkit.org/show_bug.cgi?id=145316

        Reviewed by Eric Carlson.

        In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
        to allowsAirPlayForMediaPlayback.

        * page/Settings.in: Update the setting name.

        * html/HTMLMediaSession.cpp:
        (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Update the call to settings.
        * testing/InternalSettings.h: Update the name of the member variable.
        * testing/InternalSettings.cpp: Update the names and calls to settings.
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::InternalSettings):
        (WebCore::InternalSettings::resetToConsistentState):
        (WebCore::InternalSettings::setWirelessPlaybackDisabled):

2015-05-22  Jon Lee  <jonlee@apple.com>

        Rename MediaPlaybackRequiresUserGesture
        https://bugs.webkit.org/show_bug.cgi?id=145314

        Reviewed by Anders Carlsson.

        In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
        to requiresUserGestureForMediaPlayback.

        * page/Settings.cpp: update static const default variable name.
        * page/Settings.in: update the setting name and static const default variable name.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::constructCommon): Update settings call.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.

2015-05-22  Joanmarie Diggs  <jdiggs@igalia.com>

        AX: Figure out why list-detection2.html test fails on GTK
        https://bugs.webkit.org/show_bug.cgi?id=145273

        Reviewed by Chris Fleizach.

        Only consider the text under the pseudo element for GTK and EFL.
        The other platforms expose rendered text content through their
        own accessible objects. This will fix the crash on Windows until
        it can be looked into properly.

        No new tests. This should stop list-detection2.html to stop crashing on Windows.

        * accessibility/AccessibilityList.cpp:
        (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):

2015-05-22  Jer Noble  <jer.noble@apple.com>

        [Mac] Audio tracks tagged as 'describes-video' are not automatically selected when that system accessibility option is set.
        https://bugs.webkit.org/show_bug.cgi?id=145228

        Reviewed by Eric Carlson.

        Tests: http/tests/media/hls/hls-accessiblity-describes-video.html
               media/accessiblity-describes-video.html

        Add support to CaptionUserPreferences to return the user's preferred audio characteristics,
        including "public.accessibility.describes-video". When the media accessibility options change,
        trigger the HTMLMediaElement to update the list of tracks, and chose a new audio track if
        appropriate. Manually filter those tracks matching the requested characteristics in
        MediaSelectionGroupAVFObjC.  Allow these characteristics to be overrided by Internals for
        testing purposes.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::captionPreferencesChanged): Call tracksChanged().
        (WebCore::HTMLMediaElement::mediaPlayerPreferredAudioCharacteristics): Pass through to the page's caption preferences.
        * html/HTMLMediaElement.h:
        * page/CaptionUserPreferences.cpp:
        (WebCore::CaptionUserPreferences::setPreferredAudioCharacteristic): Simple setter.
        (WebCore::CaptionUserPreferences::preferredAudioCharacteristics): Simple getter.
        * page/CaptionUserPreferences.h:
        * page/CaptionUserPreferencesMediaAF.cpp:
        (WebCore::CaptionUserPreferencesMediaAF::~CaptionUserPreferencesMediaAF): Unregister for audio characteristics change notifications.
        (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Register for same.
        (WebCore::CaptionUserPreferencesMediaAF::setPreferredAudioCharacteristic): If in testing mode, pass to superclass; otherwise no-op.
        (WebCore::CaptionUserPreferencesMediaAF::preferredAudioCharacteristics): If in testing mode, pass to superclass;
            otherwise, ask the media accessibility framework.
        * page/CaptionUserPreferencesMediaAF.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::tracksChanged): Pass through to m_private.
        (WebCore::MediaPlayer::preferredAudioCharacteristics): Pass through to HTMLMediaElement.
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerPreferredAudioCharacteristics): Added; return empty vector by default.
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::tracksChanged): Added; no-op by default.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
        * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
        (WebCore::MediaSelectionGroupAVFObjC::create): Added characteristics parameter.
        (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC): Ditto.
        (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Add an additional filter against the
            passed-in characteristics.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::determineChangedTracksFromNewTracksAndOldItems): Pass the characteristics to the media selection group.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Pass in the user's preferred characteristics.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Pass in an empty vector.
        * testing/Internals.cpp:
        (WebCore::Internals::userPreferredAudioCharacteristics): Added; return the current setting.
        (WebCore::Internals::setUserPreferredAudioCharacteristic): Added; pass through to CaptionUserPreferences.
        * testing/Internals.h:
        * testing/Internals.idl:

        Add soft link macros which account for a possible failure to look up constants.

        * platform/cf/MediaAccessibilitySoftLink.cpp:
        * platform/cf/MediaAccessibilitySoftLink.h:
        * platform/mac/SoftLinking.h:
        * platform/win/SoftLinking.h:

2015-05-22  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Use CTFontDrawGlyphs() instead of CGContextShowGlyphsWithAdvances()/CGContextShowGlyphsAtPositions()
        https://bugs.webkit.org/show_bug.cgi?id=145234

        Reviewed by Enrica Casucci.

        Eventually, we want to migrate entirely off of text-related CoreGraphics calls
        and onto CoreText calls (in order to reduce complexity as well as eventually
        removing the need for FontPlatformData to hold a CGFontRef). There is an
        equivalent call to CGContextShowGlyphsWithAdvances() and
        CGContextShowGlyphsAtPositions(), namely, CTFontDrawGlyphs(), which we have
        found is as performant as its CoreGraphics counterparts. This patch simply
        migrates these two CG calls to its CT counterpart.

        Performance was measured on a iPhone 4s as well as a Mid 2010 Mac Pro.

        No new tests because there is no behavior change.

        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::showGlyphsWithAdvances):
        (WebCore::FontCascade::drawGlyphs):

2015-05-22  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Don't show default controls after playing to wireless target
        https://bugs.webkit.org/show_bug.cgi?id=145317

        Reviewed by Dean Jackson.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.handlePanelTransitionEnd): Don't show controls unless the video
        element has the 'controls' attribute.
        (Controller.prototype.setPlaying): Check this.video.controls directly because we never want
        to show controls unless the attribute is present.
        (Controller.prototype.showControls): Ditto.
        (Controller.prototype.updateWirelessPlaybackStatus): Call reconnectControls.
        (Controller.prototype.handleWirelessPlaybackChange): Don't call reconnectControls, it will
        happen in updateWirelessPlaybackStatus.
        (Controller.prototype.showInlinePlaybackPlaceholderOnly): Deleted.

2015-05-22  Chris Dumez  <cdumez@apple.com>

        [CG] Regression(r78652): Partially decoded images are not properly removed from MemoryCache when pruning
        https://bugs.webkit.org/show_bug.cgi?id=145310

        Reviewed by Antti Koivisto.

        r78652 added partially decoded images to the MemoryCache's list of live
        decoded resources so that they can be pruned on memory pressure. This
        was needed because CG decodes part of the image to determine its
        properties (e.g. its size). On memory pressure, we call
        BitmapImage::destroyDecodedData() which clears the ImageSource and
        frees up this extra decoded data.

        However, we would fail to remove such partially decoded images from the
        MemoryCache's list of live resources when pruning. This is because
        BitmapImage::destroyMetadataAndNotify() fails to take into account the
        decoded properties size when no frame has been cleared. We would thus
        fail to detect a decoded size change and not call
        CachedImage::decodedSizeChanged(). As a result, the CachedImage's
        decoded size is not reset to 0 and we don't remove it from live decoded
        resources.

        This patch updates BitmapImage::destroyMetadataAndNotify() to account
        for m_decodedPropertiesSize even if frameBytesCleared is 0. This way,
        images for which we have't decoded any frames yet will correctly report
        that we cleared the decoded data used to determine the image properties
        and their decoded size will be properly reset to 0. As a result, these
        will be removed from the MemoryCache's list of live decoded resources.

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::destroyDecodedData):
        (WebCore::BitmapImage::destroyMetadataAndNotify):
        (WebCore::BitmapImage::dataChanged):
        * platform/graphics/BitmapImage.h:

2015-05-22  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Unable to get cursor in new Rule section after creating multiple New Rules
        https://bugs.webkit.org/show_bug.cgi?id=145294

        Reviewed by Timothy Hatcher.

        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyleSheet::ensureParsedDataReady):
        Allow stylesheets with mutations for the inspector stylesheet
        which we control mutations of.

2015-05-22  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Device picker menu should be persistent
        https://bugs.webkit.org/show_bug.cgi?id=145311

        Reviewed by Brent Fulgham.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Add logging.
        (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Ditto.
        (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
        (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Ditto.
        (WebCore::WebMediaSessionManager::clientStateDidChange): Ditto.
        (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Ditto.
        (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Ditto.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaState): Don't set ExternalDeviceAutoPlayCandidate unless
        there is an event listener.

        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Release the menu
        controller and remove observers.
        (WebCore::MediaPlaybackTargetPickerMac::create): Add logging.
        (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Ditto.
        (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Ditto.
        (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Ditto.
        (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Ditto.
        (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): Start the timer after
        a brief pause to debounce multiple identical notifications. 
        (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Add logging.
        (WebCore::MediaPlaybackTargetPickerMac::startingMonitoringPlaybackTargets): Add logging.
        (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Don't release
        the menu controller delegate.
        (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Add logging.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Update logging.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Ditto.

2015-05-22  Alexey Proskuryakov  <ap@apple.com>

        Build fix. Added a platform ifdef.

        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::isUserInitiatedKey):

2015-05-22  Tim Horton  <timothy_horton@apple.com>

        Remove action menu support
        https://bugs.webkit.org/show_bug.cgi?id=145305
        <rdar://problem/21070771>

        Reviewed by Anders Carlsson.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/spi/mac/NSMenuSPI.h:
        * platform/spi/mac/NSViewSPI.h: Removed.
        Remove some SPI.

2015-05-22  Antti Koivisto  <antti@apple.com>

        MaskImageOperation code does not manage CachedImageClients correctly
        https://bugs.webkit.org/show_bug.cgi?id=145276
        rdar://problem/20959822

        * rendering/RenderLayerMaskImageInfo.cpp:
        (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients):

            Followup fix: clear m_maskImageOperations vector.

2015-05-22  Brady Eidson  <beidson@apple.com>

        Rework how the ResourceRequest user initiated property key is used.
        Followup to https://bugs.webkit.org/show_bug.cgi?id=145281

        Reviewed by Dan Bernstein.

        * platform/mac/WebCoreSystemInterface.h:

        * platform/network/cf/ResourceRequest.h:
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::ResourceRequest::isUserInitiatedKey):

        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):

2015-05-22  Zalan Bujtas  <zalan@apple.com>

        Unreviewed build fix for ENABLE(TREE_DEBUGGING)

        * editing/VisibleSelection.h:
        * html/parser/HTMLElementStack.h:
        * html/parser/HTMLFormattingElementList.h:

2015-05-22  Joanmarie Diggs  <jdiggs@igalia.com>

        AX: Figure out why list-detection2.html test fails on GTK
        https://bugs.webkit.org/show_bug.cgi?id=145273

        Reviewed by Chris Fleizach.

        Platforms which expose rendered text content through the parent element "ignore" the
        child renderers. This was causing AccessibilityList::childHasPseudoVisibleListItemMarker
        to fail, which in turn caused the list detection heuristic to fail. Therefore add one
        final check to this method to look for non-empty, non-whitespace text under the ::before
        pseudo element.

        No new tests; list-detection2.html now passes on GTK.

        * accessibility/AccessibilityList.cpp:
        (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):

2015-05-21  Jer Noble  <jer.noble@apple.com>

        [iOS] Tell AVPlayerLayer when we enter optimized fullscreen mode.
        https://bugs.webkit.org/show_bug.cgi?id=145289

        Reviewed by Eric Carlson.

        AVFoundation would normally already know that its AVPlayerLayer is in optimized
        fullscreen mode, but because of the WebProcess/UIProcess split, they need to be
        told explicitly in the WebProcess when the UIProcess enters optimized fullscreen
        mode.

        * html/HTMLMediaElement.h:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::fullscreenModeChanged): Pass to private().
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setVideoFullscreenMode): Pass to m_private.
        (WebCore::MediaPlayer::fullscreenMode): Pass to m_client.
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerFullscreenMode): Default implementation returns None.
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenMode): Default implementation is a no-op.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Get the fullscreen
            mode from MediaPlayer and tell the AVPlayerLayer if the mode is optimized.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
            Ditto.
        * platform/spi/mac/AVFoundationSPI.h:

2015-05-21  Joanmarie Diggs  <jdiggs@igalia.com>

        AX: [GTK] Implement computedRoleString in AccessibilityUIElement
        https://bugs.webkit.org/show_bug.cgi?id=128420

        Reviewed by Chris Fleizach.

        Expose all ARIA roles (not just landmark-related roles) via an "xml-roles" AtkObject
        attribute as per http://www.w3.org/TR/core-aam-1.1/#roleMappingGeneralRules

        Expose non-empty computed role strings via AtkObject attribute named "computed-role".
        Currently the computed role and the ARIA role value happen to be the same string, but
        that might not always be the case. And AtkObject attributes are cheap.

        Test: platform/gtk/accessibility/xml-roles-exposed.html.

        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleGetAttributes):

2015-05-21  Antti Koivisto  <antti@apple.com>

        MaskImageOperation code does not manage CachedImageClients correctly
        https://bugs.webkit.org/show_bug.cgi?id=145276
        rdar://problem/20959822

        Reviewed by Andreas Kling.

        Test: css3/masking/mask-image-client-crash.html

        * platform/graphics/MaskImageOperation.cpp:
        (WebCore::MaskImageOperation::isMaskLoaded):
        (WebCore::MaskImageOperation::setImage):

            If image changes transfer the clients to the new image.

        (WebCore::MaskImageOperation::setRenderLayerImageClient):

            Always use setImage.

        (WebCore::MaskImageOperation::notifyFinished):
        * platform/graphics/MaskImageOperation.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerMaskImageInfo.cpp:
        (WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo):
        (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients):

            Store the MaskImageOperations where we added clients.

        (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients):

            Make sure we remove the clients from the same MaskImageOperations we added them to.

        * rendering/RenderLayerMaskImageInfo.h:

2015-05-21  Daniel Bates  <dabates@apple.com>

        Update Autofill button icon
        https://bugs.webkit.org/show_bug.cgi?id=145191
        <rdar://problem/20178942>

        Reviewed by Jessie Berlin.

        * css/html.css:
        (input::-webkit-auto-fill-button):
        (input::-webkit-auto-fill-button:active):
        (input::-webkit-auto-fill-button:hover):

2015-05-21  Brady Eidson  <beidson@apple.com>

        Add an "initiated by user gesture" flag to ResourceRequest.
        https://bugs.webkit.org/show_bug.cgi?id=145281

        Reviewed by Alex Christensen.

        Allow WebKit to tell WebCore what the new property key is:
        * platform/ios/WebCoreSystemInterfaceIOS.mm:
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:

        Add the flag to ResourceRequest, and make sure it encodes/decodes:
        * platform/network/ResourceRequestBase.h:
        (WebCore::ResourceRequestBase::initiatedByUserGesture):
        (WebCore::ResourceRequestBase::setInitiatedByUserGesture):
        (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
        (WebCore::ResourceRequestBase::decodeWithoutPlatformData):

        Set/get the property on native CFURLRequestRefs:
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):

        Set/get the property on native NSURLRequests:
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):

2015-05-21  Daniel Bates  <dabates@apple.com>

        Rollout <http://trac.webkit.org/changeset/183909>
        (https://bugs.webkit.org/show_bug.cgi?id=144657)

        Revert <http://trac.webkit.org/changeset/183909> since pausing the database
        thread prevents in-progress transactions from completing. We need to think
        about this change some more.

        * Modules/webdatabase/AbstractDatabaseServer.h:
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::setPauseAllDatabases): Deleted.
        * Modules/webdatabase/DatabaseManager.h:
        * Modules/webdatabase/DatabaseServer.cpp:
        (WebCore::DatabaseServer::setPauseAllDatabases): Deleted.
        * Modules/webdatabase/DatabaseServer.h:

2015-05-21  Jake Nielsen  <jacob_nielsen@apple.com>

        r184718 and r184725 caused four tests to begin crashing

        Unreviewed rollback.

        Tests that started crashing:

        svg/carto.net/textbox.svg svg/custom/tref-clone-crash.html svg/custom/use-animation-in-fill.html svg/custom/use-multiple-on-nested-disallowed-font.html

        * svg/SVGAnimateElementBase.cpp:
        (WebCore::propertyTypesAreConsistent):
        * svg/SVGAnimatedPath.cpp:
        (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
        * svg/SVGAnimatedTypeAnimator.h:
        (WebCore::SVGAnimatedTypeAnimator::executeAction):
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::parseAttribute):
        * svg/SVGCursorElement.cpp:
        (WebCore::SVGCursorElement::~SVGCursorElement):
        (WebCore::SVGCursorElement::isSupportedAttribute):
        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::pauseAnimations):
        (WebCore::SVGDocumentExtensions::unpauseAnimations):
        (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
        (WebCore::SVGDocumentExtensions::isElementWithPendingResources):
        (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
        (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
        (WebCore::SVGDocumentExtensions::rebuildElements):
        * svg/SVGElement.cpp:
        (WebCore::populateAttributeNameToCSSPropertyIDMap):
        (WebCore::populateAttributeNameToAnimatedPropertyTypeMap):
        (WebCore::attributeNameToAnimatedPropertyTypeMap):
        (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
        (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
        (WebCore::hasLoadListener):
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
        (WebCore::SVGKerningMap::insert):
        (WebCore::stringMatchesUnicodeRange):
        * svg/SVGPathByteStream.h:
        (WebCore::SVGPathByteStream::begin):
        (WebCore::SVGPathByteStream::end):
        (WebCore::SVGPathByteStream::append):
        (WebCore::SVGPathByteStream::clear):
        (WebCore::SVGPathByteStream::isEmpty):
        * svg/SVGPathUtilities.cpp:
        (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::setElapsed):
        (WebCore::SMILTimeContainer::updateAnimations):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::parseBeginOrEnd):
        (WebCore::SVGSMILElement::connectConditions):
        (WebCore::SVGSMILElement::disconnectConditions):
        (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
        (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
        * svg/graphics/filters/SVGFilterBuilder.cpp:
        (WebCore::SVGFilterBuilder::clearResultsRecursive):
        * svg/graphics/filters/SVGFilterBuilder.h:
        (WebCore::SVGFilterBuilder::addBuiltinEffects):
        * svg/properties/SVGAnimatedProperty.cpp:
        (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
        * svg/properties/SVGListProperty.h:
        (WebCore::SVGListProperty::detachListWrappersAndResize):
        * svg/properties/SVGPathSegListPropertyTearOff.cpp:
        (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):

2015-05-21  Brent Fulgham  <bfulgham@apple.com>

        Scroll-snap points needs to be updated during programmatic scrolls
        https://bugs.webkit.org/show_bug.cgi?id=145216
        <rdar://problem/21051039>

        Reviewed by Dean Jackson.

        Whenever we adjust the current scroll position, make sure we also update the current
        active scroll snap offset index (if applicable).

        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): Call the new 'updateActiveScrollSnapIndexForOffset'
        method after moving to a new position.
        (WebCore::ScrollAnimator::setCurrentPosition): Ditto.
        (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): New method. Asks the scroll controller to
        identify the closest scroll snap offset index. If it finds something relevant, update the ScrollableArea state
        to track these new values.
        * platform/ScrollAnimator.h:
        * platform/cocoa/ScrollController.h:
        (WebCore::ScrollController::activeScrollSnapIndexDidChange):
        (WebCore::ScrollController::setScrollSnapIndexDidChange):
        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset): Added. Find the closest relevant scroll snap offset
        index for the given scroll offset, and update the internal scroll snap state to reflect it.
        (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Given the x and y offset for a scroll,
        set the relevant scroll snap offset indices.
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::immediateScrollTo): Call the new 'updateActiveScrollSnapIndexForOffset' method
        after moving to a new position.
        (WebCore::ScrollAnimatorMac::immediateScrollBy): Ditto.

2015-05-21  Matt Baker  <mattbaker@apple.com>

        Unreviewed build fix.

        * svg/SVGAnimateElementBase.cpp:
        (WebCore::propertyTypesAreConsistent): should be type.properties, not type.properties().

2015-05-21  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] Remove ReadableStreamReader closed promise internal slot
        https://bugs.webkit.org/show_bug.cgi?id=145215

        Reviewed by Darin Adler.

        Using the new JSPromiseDeferred member generated by binding generator to handle closed promise attribute.
        Removed internal slots routines previously used to ensure persistency of the promise.

        Existing tests cover the changes.

        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::closed):
        (WebCore::JSReadableStreamReader::cancel): Deleted.
        (WebCore::JSReadableStreamReader::releaseLock): Deleted.
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::getPropertyFromObject): Deleted.
        (WebCore::callFunction): Deleted.
        (WebCore::ReadableJSStream::Source::create): Deleted.
        (WebCore::ReadableJSStream::Source::Source): Deleted.
        * bindings/js/ReadableJSStream.h:

2015-05-21  Roger Fong  <roger_fong@apple.com>

        Media Controls stop updating after hovering for a few seconds.
        https://bugs.webkit.org/show_bug.cgi?id=144770.
        <rdar://problem/19823121>

        Reviewed by Jer Noble.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.createBase):
        We should never hide controls immediately as a result of mousing out of the controls.
        It should only happen when the mouse leaves the video entirely.
        (Controller.prototype.updateTimelineMetricsIfNeeded):
        Don’t update if controls are hidden, timeline dimensions will be 0.
        (Controller.prototype.handlePanelTransitionEnd): 
        Instead of adjusting visibility via adding and removing classes,
        remove controls entirely from the tree.
        (Controller.prototype.showControls):
        Add controls back into the tree when showing controls.
        (Controller.prototype.updateForShowingControls):
        Helper method for showControls.
        (Controller.prototype.controlsAreHidden):
        Controls also hidden if removed from tree.

        Remove forceUpdate logic, no longer necessary.
        (Controller.prototype.handleDurationChange): 
        (Controller.prototype.updateProgress):
        (Controller.prototype.updateTime):

        Override methods to use add and remove panelContainer for iOS.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handlePanelTransitionEnd):
        (ControllerIOS.prototype.showControls):
        (ControllerIOS.prototype.controlsAreHidden):

2015-05-21  Chris Dumez  <cdumez@apple.com>

        Regression(r179293): We no longer call destroyDecodedData() on CachedResources on memory pressure
        https://bugs.webkit.org/show_bug.cgi?id=145270
        <rdar://problem/20734901>

        Reviewed by Andreas Kling.

        We no longer call destroyDecodedData() on CachedResources on memory
        pressure after r179293. In r179293, we started calling
        MemoryCache::evictResources() on memory pressure instead of
        MemoryCache::pruneToPercentage(0). However, unlike
        MemoryCache::pruneToPercentage(), it appears
        MemoryCache::evictResources() removes the CachedResources from the
        memory cache without calling destroyDecodedData() on them.
        This caused a regression on Membuster.

        This patch now calls MemoryCache::pruneLiveResourcesToSize(0) on
        critical memory pressure, instead of evictResources(). We don't need to
        call pruneDeadResourcesToSize(0) here because the non-critical memory
        pressure handler already takes care of this.

        During local testing, this change seemed to decrease the overall memory
        usage of WebProcesses by ~10MB on Membuster (tested on Yosemite).

        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
        (WebCore::MemoryPressureHandler::releaseCriticalMemory):

2015-05-21  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVG as image uses very tiny default font-size
        https://bugs.webkit.org/show_bug.cgi?id=68090

        Reviewed by Darin Adler.

        When loading a document, WebKit creates a Page object and then changes its setting
        from the browser's preferences. This is true for interactive resources also, such as a
        stand-alone SVG or an SVG embedded in an <object> tag for example. For non-interactive
        resources, like an SVG embedded in an <img> tag for example, this function is called
        after loading the resource is finished. This function creates an artificial page and
        fabricates a scoped settings for it. This turns out to be problematic for cases like
        the default font size because its initial value is zero. We cannot go from WebCore to
        WebKit to ask for the global settings. But we can inherit the global settings from the
        the master page. This is not the best solution because of two reasons. (1) Once the
        resource is cached and the styles for the text elements are calculated, nothing can
        change the values of styles except removing the resource itself from the cache if the
        browser's preferences change. Also there is no mechanism to notify this artificial
        page if the browser's preferences change. (2) An image like a non-interactive SVG,
        should be displayed the same way regardless of the browser's preferences. A user may
        be able to change the default font size for other text. But this should not affect
        images even if they are vector images like SVG. An easy and more agreeable solution
        is to hard-code the default font size for this case and do not depend on the global
        settings at all.

        Test: svg/text/text-default-font-size.html

        * page/Settings.in: Set the initial value of the setting defaultFontSize to be 16.
        
2015-05-21  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/svg.
        https://bugs.webkit.org/show_bug.cgi?id=145209

        Reviewed by Darin Adler.

        No new tests, no new tests.

        * svg/SVGAnimateElementBase.cpp:
        (WebCore::propertyTypesAreConsistent):
        * svg/SVGAnimatedPath.cpp:
        (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
        * svg/SVGAnimatedTypeAnimator.h:
        (WebCore::SVGAnimatedTypeAnimator::executeAction):
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::parseAttribute):
        * svg/SVGCursorElement.cpp:
        (WebCore::SVGCursorElement::~SVGCursorElement):
        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::pauseAnimations):
        (WebCore::SVGDocumentExtensions::unpauseAnimations):
        (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
        (WebCore::SVGDocumentExtensions::isElementWithPendingResources):
        (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
        (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
        * svg/SVGElement.cpp:
        (WebCore::populateAttributeNameToCSSPropertyIDMap):
        (WebCore::populateAttributeNameToAnimatedPropertyTypeMap):
        (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
        (WebCore::hasLoadListener):
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
        (WebCore::SVGKerningMap::insert):
        (WebCore::stringMatchesUnicodeRange):
        * svg/SVGPathByteStream.h:
        (WebCore::SVGPathByteStream::append):
        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::setElapsed):
        (WebCore::SMILTimeContainer::updateAnimations):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::parseBeginOrEnd):
        (WebCore::SVGSMILElement::connectConditions):
        (WebCore::SVGSMILElement::disconnectConditions):
        (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
        (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
        * svg/graphics/filters/SVGFilterBuilder.cpp:
        (WebCore::SVGFilterBuilder::clearResultsRecursive):
        * svg/graphics/filters/SVGFilterBuilder.h:
        (WebCore::SVGFilterBuilder::addBuiltinEffects):
        * svg/properties/SVGAnimatedProperty.cpp:
        (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
        * svg/properties/SVGListProperty.h:
        (WebCore::SVGListProperty::detachListWrappersAndResize):
        * svg/properties/SVGPathSegListPropertyTearOff.cpp:
        (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):

2015-05-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr in WebCore/Modules
        https://bugs.webkit.org/show_bug.cgi?id=145112

        Reviewed by Darin Adler.

        As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
        depends on null of return value.

        No new tests, no behavior changes.

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::create):
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::create):
        (WebCore::MediaKeys::createSession):
        * Modules/encryptedmedia/MediaKeys.h:
        * Modules/gamepad/Gamepad.h:
        * Modules/gamepad/NavigatorGamepad.cpp:
        (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
        * Modules/gamepad/deprecated/Gamepad.h:
        * Modules/geolocation/GeolocationError.h:
        (WebCore::GeolocationError::create):
        * Modules/geolocation/GeolocationPosition.h:
        (WebCore::GeolocationPosition::create):
        * Modules/geolocation/Geoposition.h:
        (WebCore::Geoposition::create):
        * Modules/geolocation/PositionError.h:
        (WebCore::PositionError::create):
        * Modules/geolocation/PositionOptions.h:
        (WebCore::PositionOptions::create):
        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::create):
        * Modules/mediacontrols/MediaControlsHost.h:
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::create):
        * Modules/mediasource/MediaSource.h:
        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::create):
        * Modules/mediastream/RTCDataChannel.h:
        * Modules/mediastream/RTCIceCandidate.cpp:
        (WebCore::RTCIceCandidate::create):
        * Modules/mediastream/RTCIceCandidate.h:
        * Modules/webaudio/OfflineAudioContext.cpp:
        (WebCore::OfflineAudioContext::create):
        * Modules/webaudio/OfflineAudioContext.h:
        * Modules/webaudio/OfflineAudioDestinationNode.h:
        (WebCore::OfflineAudioDestinationNode::create):
        * Modules/webaudio/OscillatorNode.cpp:
        (WebCore::OscillatorNode::create):
        * Modules/webaudio/OscillatorNode.h:
        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::runTransaction):
        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::originLockFor):
        * Modules/webdatabase/DatabaseTracker.h:
        * Modules/webdatabase/SQLError.h:
        (WebCore::SQLError::create):
        * Modules/webdatabase/SQLResultSet.h:
        (WebCore::SQLResultSet::create):
        * Modules/webdatabase/SQLResultSetRowList.h:
        (WebCore::SQLResultSetRowList::create):
        * Modules/webdatabase/SQLStatementBackend.cpp:
        (WebCore::SQLStatementBackend::create):
        * Modules/webdatabase/SQLStatementBackend.h:
        * Modules/webdatabase/SQLTransactionBackend.cpp:
        (WebCore::SQLTransactionBackend::create):
        * Modules/webdatabase/SQLTransactionBackend.h:
        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
        (WebCore::ThreadableWebSocketChannelClientWrapper::create):
        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::create):
        * Modules/websockets/WebSocket.h:
        * Modules/websockets/WebSocketChannel.h:
        (WebCore::WebSocketChannel::create):
        * Modules/websockets/WorkerThreadableWebSocketChannel.h:
        (WebCore::WorkerThreadableWebSocketChannel::create):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
        * editing/InsertListCommand.h:
        (WebCore::InsertListCommand::create):
        * workers/Worker.cpp:
        (WebCore::Worker::create):
        * workers/Worker.h:
        * xml/XPathExpression.cpp:
        (WebCore::XPathExpression::createExpression):
        (WebCore::XPathExpression::evaluate):
        * xml/XPathExpression.h:

2015-05-20  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r184667 and r184682.
        https://bugs.webkit.org/show_bug.cgi?id=145245

        Broke media/media-controls-timeline-updates.html on WebKit2
        (Requested by ap on #webkit).

        Reverted changesets:

        "Media Controls stop updating after hovering for a few
        seconds."
        https://bugs.webkit.org/show_bug.cgi?id=144770
        http://trac.webkit.org/changeset/184667

        "Unreviewed. Media Controls stop updating after hovering for a
        few seconds."
        https://bugs.webkit.org/show_bug.cgi?id=144770
        http://trac.webkit.org/changeset/184682

2015-05-20  Jon Lee  <jonlee@apple.com>

        [iOS] Update optimized fullscreen controls artwork
        https://bugs.webkit.org/show_bug.cgi?id=145208
        rdar://problem/21034032

        Reviewed by Jer Noble.

        Update the artwork when media goes into optimized fullscreen. Add a new UI part
        representing return-from-optimized.

        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::mediaUIImageData): Return data for the return button.
        * Modules/mediacontrols/MediaControlsHost.idl: Add a new part ID.
        * Modules/mediacontrols/mediaControlsApple.js: Add a new ClassName to apply to the
        button when in the proper state.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handlePresentationModeChange): Add the ClassName when the
        video goes into optimized fullscreen mode. Remove it otherwise.
        * platform/ios/WebCoreSystemInterfaceIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add the return button data to the
        stylesheet.

2015-05-20  Alex Christensen  <achristensen@webkit.org>

        [ContentExtensions] Properly initialize ActionKey.state
        https://bugs.webkit.org/show_bug.cgi?id=145237
        rdar://problem/20716683

        Reviewed by Benjamin Poulain.

        * contentextensions/DFAMinimizer.cpp:
        Initialize ActionKey.state to Valid if it is a valid ActionKey.
        Inlining can now be done safely.

2015-05-20  Roger Fong  <roger_fong@apple.com>

        Unreviewed. Media Controls stop updating after hovering for a few seconds.
        https://bugs.webkit.org/show_bug.cgi?id=144770.
        <rdar://problem/19823121>

        Followup to r184667.
        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.showControls):
        Only put controls back into the tree if they don’t yet exist in the tree.
        Otherwise we interrupt operations like scrubbing.

2015-05-20  Enrica Casucci  <enrica@apple.com>

        [iOS] Using CSS viewport units causes incorrect layout.
        https://bugs.webkit.org/show_bug.cgi?id=145225
        rdar://problem/20924495

        Reviewed by Benjamin Poulain.

        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::initialScaleFromSize):
        (WebCore::ViewportConfiguration::initialScale):
        (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize):
        * page/ViewportConfiguration.h:
        (WebCore::ViewportConfiguration::initialScaleFromSize):
        (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize):

2015-05-20  Chris Fleizach  <cfleizach@apple.com>

        AX: improve list heuristics (presentational use versus actual lists)
        https://bugs.webkit.org/show_bug.cgi?id=134187

        Reviewed by Darin Adler.

        Improve heuristics for list detection by:
            1. Not exposing lists without list markers (unless explicitly marked as lists)
            2. Recognizing css: before-content as list markers

        Test: accessibility/list-detection2.html

        * accessibility/AccessibilityList.cpp:
        (WebCore::AccessibilityList::isDescriptionList):
        (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
        (WebCore::AccessibilityList::determineAccessibilityRole):
        * accessibility/AccessibilityList.h:

2015-05-20  Antti Koivisto  <antti@apple.com>

        REGRESSION (r172591): Can no longer style <optgroup> with colors (LayoutTests/fast/forms/select/optgroup-rendering.html)
        https://bugs.webkit.org/show_bug.cgi?id=145227
        rdar://problem/20967472

        Reviewed by Darin Adler.

        Test: fast/forms/select/select-painting.html

        Use computedStyle() consistently for option and optgroup items.

        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintItemForeground):
        (WebCore::RenderListBox::paintItemBackground):

            We can always use computedStyle() and it can't be null. If there was renderer style it would return that.

        * rendering/RenderMenuList.cpp:
        (RenderMenuList::itemStyle):
        (RenderMenuList::getItemBackgroundColor):

2015-05-19  Jer Noble  <jer.noble@apple.com>

        Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
        https://bugs.webkit.org/show_bug.cgi?id=145193

        Reviewed by Eric Carlson.

        HTMLMediaElement.h and MediaPlayer.h are included in a number of headers solely for access to the enums
        defined within the classes contained within. Move these enums into their own--otherwise empty--classes.
        Then add `using` declarations to pull those inherited enums back into the namespace of HTMLMediaElement
        and MediaPlayer.

        Classes and headers which do not need to directly include HTMLMediaElement.h can now include HTMLMediaElementEnums.h
        instead; the same goes for MediaPlayer.h and MediaPlayerEnums.h.

        * WebCore.xcodeproj/project.pbxproj: Add new files to project.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Move definition here from the header.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::videoFullscreenGravity): MediaPlayer -> MediaPlayerEnums.
        (WebCore::HTMLMediaElement::preloadValue): Ditto.
        (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Deleted; moved to implementation file.
        * html/HTMLMediaElementEnums.h: Added.
        * html/MediaControllerInterface.h: Inherit from HTMLMediaElementEnums.
        * page/ChromeClient.h: HTMLMediaElement -> HTMLMediaElementEnums.
        * platform/graphics/MediaPlayer.h: MediaPlayer -> MediaPlayerEnums.
        * platform/graphics/MediaPlayerEnums.h: Added.
        * platform/ios/WebVideoFullscreenControllerAVKit.h:
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (-[WebVideoFullscreenController enterFullscreen:mode:]): HTMLMediaElement -> HTMLMediaElementEnums.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
        (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Ditto.
        (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
        (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
        (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Ditto.
        (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Ditto.
        (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen): Ditto.
        (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen): Ditto.
        (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Ditto.
        (WebVideoFullscreenInterfaceAVKit::setMode): Ditto.
        (WebVideoFullscreenInterfaceAVKit::clearMode): Ditto.
        * platform/ios/WebVideoFullscreenModel.h:
        * platform/ios/WebVideoFullscreenModelVideoElement.h:
        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
        (WebVideoFullscreenModelVideoElement::setVideoElement): Ditto.
        (WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Ditto.

2015-05-20  Roger Fong  <roger_fong@apple.com>

        Media Controls stop updating after hovering for a few seconds.
        https://bugs.webkit.org/show_bug.cgi?id=144770.
        <rdar://problem/19823121>

        Reviewed by Jer Noble.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.createBase):
        We should never hide controls immediately as a result of mousing out of the controls.
        It should only happen when the mouse leaves the video entirely.
        (Controller.prototype.updateTimelineMetricsIfNeeded):
        Don’t update if controls are hidden, timeline dimensions will be 0.
        (Controller.prototype.handlePanelTransitionEnd): 
        Instead of adjusting visibility via adding and removing classes,
        remove controls entirely from the tree.
        (Controller.prototype.showControls):
        Add controls back into the tree when showing controls.
        (Controller.prototype.updateForShowingControls):
        Helper method for showControls.
        (Controller.prototype.controlsAreHidden):
        Controls also hidden if removed from tree.

        Remove forceUpdate logic, no longer necessary.
        (Controller.prototype.handleDurationChange): 
        (Controller.prototype.updateProgress):
        (Controller.prototype.updateTime):

        Override methods to use add and remove panelContainer for iOS.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handlePanelTransitionEnd):
        (ControllerIOS.prototype.showControls):
        (ControllerIOS.prototype.controlsAreHidden):

2015-05-20  Eric Carlson  <eric.carlson@apple.com>

        [Mac] inform media session of all state changes
        https://bugs.webkit.org/show_bug.cgi?id=145222

        Reviewed by Dean Jackson.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::~HTMLMediaElement): Call updateMediaState.
        (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto.
        (WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable): Ditto.
        (WebCore::HTMLMediaElement::removeEventListener): Ditto.
        (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.

2015-05-20  Daniel Bates  <dabates@apple.com>

        AX: AutoFill button is not accessible with VoiceOver
        https://bugs.webkit.org/show_bug.cgi?id=145200
        <rdar://problem/20507480>

        Reviewed by Chris Fleizach.

        Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver
        can identify and interact with it.

        Test: accessibility/input-auto-fill-button.html

        * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button.
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes.
        * platform/LocalizedStrings.cpp:
        (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button.
        * platform/LocalizedStrings.h:
        * platform/efl/LocalizedStringsEfl.cpp:
        (WebCore::AXAutoFillButtonText): Ditto.
        * platform/gtk/LocalizedStringsGtk.cpp:
        (WebCore::AXAutoFillButtonText): Ditto.

2015-05-20  Dean Jackson  <dino@apple.com>

        Label text for default buttons don’t have the correct white color
        https://bugs.webkit.org/show_bug.cgi?id=145221
        <rdar://problem/20985817>

        Follow-up commit. After discussion with the AppKit team, we've
        concluded that a solid white is the color that best matches
        the system.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor): Use Color::white.

2015-05-20  Dean Jackson  <dino@apple.com>

        Label text for default buttons don’t have the correct white color
        https://bugs.webkit.org/show_bug.cgi?id=145221
        <rdar://problem/20985817>

        Reviewed by Tim Horton.

        Use a 85% solid white for the active text color on buttons.

        As has been disappointingly pointed out in other patches, we don't
        have a good way to test ActiveButtonText since it only applies at
        paint time.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor): Move to an 85% solid white.

2015-05-20  Alexey Proskuryakov  <ap@apple.com>

        ThreadableLoaderOptions::isolatedCopy() doesn't produce a copy that is safe for sending to another thread
        https://bugs.webkit.org/show_bug.cgi?id=145217

        Reviewed by Anders Carlsson.

        Caught by existing tests, rarely. I don't know how to catch such bugs more reliably.

        * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::isolatedCopy):
        * loader/ThreadableLoader.h:

2015-05-20  Tim Horton  <timothy_horton@apple.com>

        Add a mechanism to opt-out of the automatic scaling applied to not-really-responsive sites
        https://bugs.webkit.org/show_bug.cgi?id=144760

        Reviewed by Darin Adler.

        Add a new viewport property, shrink-to-fit, which can be used to disable
        the automatic scaling introduced in r181400. This provides sites with a
        way to tell WebKit that they're really sure they want to be laid out at
        window-width/height, even if they fail to fit within that size.

        * dom/ViewportArguments.cpp:
        (WebCore::ViewportArguments::resolve):
        (WebCore::findBooleanValue):
        (WebCore::setViewportFeature):
        * dom/ViewportArguments.h:
        (WebCore::ViewportArguments::ViewportArguments):
        (WebCore::ViewportArguments::operator==):
        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
        (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
        (WebCore::ViewportConfiguration::webpageParameters):
        (WebCore::ViewportConfiguration::textDocumentParameters):
        (WebCore::ViewportConfiguration::imageDocumentParameters):
        (WebCore::ViewportConfiguration::testingParameters):
        (WebCore::booleanViewportArgumentIsSet):
        (WebCore::ViewportConfiguration::updateConfiguration):
        (WebCore::ViewportConfigurationTextStream::operator<<):
        (WebCore::viewportArgumentUserZoomIsSet): Deleted.
        * page/ViewportConfiguration.h:
        (WebCore::ViewportConfiguration::Parameters::Parameters):
        Plumb the shrink-to-fit viewport property through.
        If shrink-to-fit is set to yes, or not set, we behave as usual; if it is
        set to no, we will bail from shouldIgnore[Horizontal|Vertical]ScalingConstraints,
        effectively disabling the automatic scaling introduced in r181400.

2015-05-20  Antti Koivisto  <antti@apple.com>

        Assertion failure in WebCore::BidiRun::BidiRun()
        https://bugs.webkit.org/show_bug.cgi?id=145203
        rdar://problem/20958973

        Reviewed by Andreas Kling.

        Test: fast/text/text-combine-crash.html

        * rendering/line/BreakingContext.h:
        (WebCore::BreakingContext::handleText):

            Renove !isCombined() check. RenderCombineText::combineText() doesn't
            do any work unless needed and text may become uncombined too.

        * rendering/line/LineBreaker.cpp:
        (WebCore::LineBreaker::skipLeadingWhitespace):

            Same here.

2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        AudioContext resume/close/suspend should reject promises with a DOM exception in lieu of throwing exceptions
        https://bugs.webkit.org/show_bug.cgi?id=145064

        Reviewed by Darin Adler.

        Rejecting resume/suspend/close promises with InvalidStateError values in case context is offline.
        Removed unneeded calls to postTask for resolving/rejecting promises.
        Adding promise rejection of DOM Exception values, 0 being equivalent of no error passed to reject callback.

        Test: webaudio/audiocontext-promise-throwing.html

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::suspendContext): Rejecting promise in lieu of throwing exception.
        (WebCore::AudioContext::resumeContext): Ditto.
        (WebCore::AudioContext::closeContext): Ditto.
        * Modules/webaudio/AudioContext.h:
        * bindings/js/JSAudioContextCustom.cpp:
        (WebCore::JSAudioContext::suspend): Removing ExceptionCode handling.
        (WebCore::JSAudioContext::resume): Ditto.
        (WebCore::JSAudioContext::close): Ditto.
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::createDOMException): Splitting DOM exception creation from throwing.
        (WebCore::setDOMException): Ditto.
        * bindings/js/JSDOMBinding.h: Adding createDOMException prototype.
        * bindings/js/JSDOMPromise.h:
        (WebCore::DeferredWrapper::reject<ExceptionCode>):

2015-05-20  Commit Queue  <commit-queue@webkit.org>

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

        Broken build (Requested by jacob_nielsen on #webkit).

        Reverted changeset:

        "AX: AutoFill button is not accessible with VoiceOver"
        https://bugs.webkit.org/show_bug.cgi?id=145200
        http://trac.webkit.org/changeset/184645

2015-05-20  Daniel Bates  <dabates@apple.com>

        AX: AutoFill button is not accessible with VoiceOver
        https://bugs.webkit.org/show_bug.cgi?id=145200
        <rdar://problem/20507480>

        Reviewed by Chris Fleizach.

        Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver
        can identify and interact with it.

        Test: accessibility/input-auto-fill-button.html

        * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button.
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes.
        * platform/LocalizedStrings.cpp:
        (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button.
        * platform/LocalizedStrings.h:
        * platform/efl/LocalizedStringsEfl.cpp:
        (WebCore::AXAutoFillButtonText): Ditto.
        * platform/gtk/LocalizedStringsGtk.cpp:
        (WebCore::AXAutoFillButtonText): Ditto.

2015-05-20  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Relax restrictions on triggers that match everything.
        https://bugs.webkit.org/show_bug.cgi?id=145069

        Reviewed by Benjamin Poulain.

        Added API tests that cover the new functionality and test for correctness in behavior.

        * contentextensions/CompiledContentExtension.cpp:
        (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::addUniversalActionsToDFA):
        (WebCore::ContentExtensions::compileRuleList):
        Put universalActionsWithoutDomains into the DFA from filtersWithoutDomains and
        put universalActionsWithDomains into the DFA from filtersWithDomains.        
        * contentextensions/ContentExtensionError.cpp:
        (WebCore::ContentExtensions::contentExtensionErrorCategory):
        * contentextensions/ContentExtensionError.h:
        Remove error codes for errors that are not errors any more.
        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
        * contentextensions/ContentExtensionsBackend.h:
        * contentextensions/DFABytecode.h:
        (WebCore::ContentExtensions::instructionSizeWithArguments):
        * contentextensions/DFABytecodeCompiler.cpp:
        (WebCore::ContentExtensions::set32Bits):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
        (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
        (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction): Deleted.
        * contentextensions/DFABytecodeCompiler.h:
        * contentextensions/DFABytecodeInterpreter.cpp:
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
        (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot): Deleted.
        * contentextensions/DFABytecodeInterpreter.h:
        Add a new bytecode AppendActionDefaultStylesheet to mark actions that are css-display-none
        that need to be put in the default stylesheet to be ignored or not as a whole.
        css-display-none actions with flags or domain rules and css-display-none actions 
        after ignore-previous-rules actions are not to be in this precompiled stylesheet, but
        they will be applied as needed per page.  The precompiled stylesheet is already applied
        if no ignore-previous-rules action is triggered.
        * loader/ResourceLoadInfo.h:

2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        JS binding generator should create a member variable for each Promise attribute of an interface
        https://bugs.webkit.org/show_bug.cgi?id=145056

        Reviewed by Darin Adler.

        For each attribute XXX whose type is Promise, a member m_XXXPromiseDeferred is created, its type being a JSC::Strong of JSPromiseDeferred.
        The purpose is to enable custom getters to create the JSPromiseDeferred and store ino the class member to ensure the same promise is returned each time
        the custom getter is called.
        This patch will enable simplifying ReadableStreamReader custom binding.

        Covered by added attribute in TestObj.idl.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
        (webkit_dom_test_obj_get_property):
        (webkit_dom_test_obj_class_init):
        (webkit_dom_test_obj_get_test_promise_attr):
        (webkit_dom_test_obj_set_nullable_string_value): Deleted.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjTestPromiseAttr):
        (WebCore::jsTestObjAttributeWithReservedEnumType): Deleted.
        * bindings/scripts/test/JS/JSTestObj.h:
        * bindings/scripts/test/ObjC/DOMTestObj.h:
        * bindings/scripts/test/ObjC/DOMTestObj.mm:
        (-[DOMTestObj testPromiseAttr]):
        (-[DOMTestObj attribute]): Deleted.
        * bindings/scripts/test/TestObj.idl:

2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        AudioContext suspend/resume/close should resolve promises immediately when state is already suspended/active/closed
        https://bugs.webkit.org/show_bug.cgi?id=145164

        Reviewed by Jer Noble.

        Test: webaudio/audiocontext-promise.html

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::suspendContext): Immediatly call callbacks whenever possible to resolve/reject promises.
        (WebCore::AudioContext::resumeContext): Ditto.
        (WebCore::AudioContext::closeContext): Ditto

2015-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r184420): [GTK] webkit_dom_html_element_get_children has been removed
        https://bugs.webkit.org/show_bug.cgi?id=145174

        Reviewed by Philippe Normand.

        children property has been moved to Element, Document and
        DocumentFragment to match the spec, so we need to expose the new
        get_children and bring back webkit_dom_html_element_get_children()
        as deprecated.

        * bindings/gobject/WebKitDOMDeprecated.cpp:
        (webkit_dom_html_element_get_children):
        * bindings/gobject/WebKitDOMDeprecated.h:
        * bindings/gobject/WebKitDOMDeprecated.symbols:
        * bindings/gobject/webkitdom.symbols:

2015-05-20  Hunseop Jeong  <hs85.jeong@samsung.com>

        nullptr cleanup in WebCore/xml.
        https://bugs.webkit.org/show_bug.cgi?id=145165

        Reviewed by Csaba Osztrogonác.

        No new tests, no behavior changes

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::responseXML):
        (WebCore::XMLHttpRequest::internalAbort):
        (WebCore::XMLHttpRequest::clearResponseBuffers):
        (WebCore::XMLHttpRequest::clearRequest):
        (WebCore::XMLHttpRequest::didFinishLoading):
        * xml/XMLHttpRequestProgressEventThrottle.cpp:
        (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
        * xml/XSLImportRule.cpp:
        (WebCore::XSLImportRule::XSLImportRule):
        (WebCore::XSLImportRule::~XSLImportRule):
        (WebCore::XSLImportRule::setXSLStyleSheet):
        (WebCore::XSLImportRule::loadSheet):
        * xml/XSLStyleSheet.h:
        * xml/XSLStyleSheetLibxslt.cpp:
        (WebCore::XSLStyleSheet::XSLStyleSheet):
        (WebCore::XSLStyleSheet::~XSLStyleSheet):
        (WebCore::XSLStyleSheet::clearDocuments):
        * xml/XSLTProcessorLibxslt.cpp:
        (WebCore::saveResultToString):
        (WebCore::xsltParamArrayFromParameterMap):
        (WebCore::xmlDocPtrFromNode):
        (WebCore::XSLTProcessor::transformToString):
        * xml/parser/XMLDocumentParser.cpp:
        (WebCore::XMLDocumentParser::clearCurrentNodeStack):
        (WebCore::XMLDocumentParser::exitText):
        (WebCore::XMLDocumentParser::notifyFinished):
        * xml/parser/XMLDocumentParser.h:
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::openFunc):
        (WebCore::XMLDocumentParser::XMLDocumentParser):
        * xml/parser/XMLDocumentParserScope.cpp:
        * xml/parser/XMLDocumentParserScope.h:

2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
        https://bugs.webkit.org/show_bug.cgi?id=144380

        Reviewed by Antti Koivisto.

        Add a soup implementation of SharedBuffer::tryReplaceContentsWithPlatformBuffer().

        Covered by http/tests/cache/disk-cache/ tests.

        * loader/cache/CachedResource.cpp: Define
        CachedResource::tryReplaceEncodedData() also for Soup.
        * loader/cache/CachedResource.h: Ditto.
        * platform/soup/SharedBufferSoup.cpp:
        (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer):

2015-05-17  Sam Weinig  <sam@webkit.org>

        Organize event handlers a bit
        https://bugs.webkit.org/show_bug.cgi?id=145106

        Reviewed by Darin Adler.

        - Add GlobalEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers)
          and move all event handlers shared by Element, Document and DOMWindow there. Put all the standard defined
          event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones
          at the bottom.

          There is one change in behavior here. Previously, the media related event handlers where only exposed on
          Element and DOMWindow. The spec says they should also be on Document, so this adds support for that (this
          is tested in fast/dom/event-handler-attributes.html).

        - Add WindowEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers)
          and move all event handlers shared by DOMWindow, HTMLBodyElement and HTMLFrameSetElement there. Put all the 
          standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the 
          non-standard ones at the bottom.

        - Group remaining event handlers in Element, Document, DOMWindow, HTMLBodyElement and HTMLFrameSetElement by
          their grouping, and add some FIXMEs for future cleaning.

        * CMakeLists.txt:
        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        - Add GlobalEventHandlers.idl and WindowEventHandlers.idl.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        Add special cases for WindowEventHandler when used on DOMWindow and DocumentEventHandler when used on Document
        so that event handlers using those extended attributes can be set on shared interfaces. This is used to allow
        DOMWindow to implement WindowEventHandlers.

        * dom/Document.idl:
        Move event handlers to GlobalEventHandlers and have Document implement it. Group remaining event handlers.

        * dom/Element.idl:
        Move event handlers to GlobalEventHandlers and have Element implement it. Group remaining event handlers.

        * dom/GlobalEventHandlers.idl:
        Added.

        * html/HTMLBodyElement.idl:
        Move event handlers to WindowEventHandlers and have HTMLBodyElement implement it. Group remaining event handlers.
        
        * html/HTMLFrameSetElement.idl:
        Move event handlers to WindowEventHandlers and have HTMLFrameSetElement implement it. Group remaining event handlers.

        * page/DOMWindow.idl:
        Move event handlers to GlobalEventHandlers and WindowEventHandlers and have DOMWindow implement both of them. Group 
        remaining event handlers.

        * page/WindowEventHandlers.idl:
        Added.

2015-05-19  Antti Koivisto  <antti@apple.com>

        Crash under WebCore::invalidateStyleRecursively
        https://bugs.webkit.org/show_bug.cgi?id=145186
        rdar://problem/19736838

        Reviewed by Andreas Kling

        We have seen crashes where we run out of stack under invalidateStyleRecursively in StyleInvalidationAnalysis
        on some devices.

        Switch to iterative algorithm.

        * css/StyleInvalidationAnalysis.cpp:
        (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
        (WebCore::invalidateIfNeeded):
        (WebCore::invalidateStyleForTree):
        (WebCore::StyleInvalidationAnalysis::invalidateStyle):
        (WebCore::invalidateStyleRecursively): Deleted.

2015-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>

        Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl
        https://bugs.webkit.org/show_bug.cgi?id=145109

        Reviewed by Darin Adler.

        * dom/TreeScope.cpp:
        (WebCore::TreeScope::getElementById):

2015-05-19  Jon Lee  <jonlee@apple.com>

        [iOS] Optimized fullscreen placeholder is incorrectly sized
        https://bugs.webkit.org/show_bug.cgi?id=145196
        rdar://problem/21031188

        Reviewed by Dean Jackson.

        Add a new media part UI for the placeholder text when entering optimized fullscreen,
        and use it as part of the title text in the placeholder. Now the wireless playback status
        div serves as a multi-purpose placeholder.

        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::mediaUIImageData): Return the placeholder text.
        * Modules/mediacontrols/MediaControlsHost.idl: Add a new UI part for placeholder text.
        * Modules/mediacontrols/mediaControlsApple.js: Add a new "optimized" ClassName when
        the presentation mode is set to optimized.

        * Modules/mediacontrols/mediaControlsiOS.css:
        (audio::-webkit-media-controls-wireless-playback-status): The text should be at
        medium weight, not light weight.
        (audio::-webkit-media-controls-wireless-playback-text-top): The title text should be
        white for both wireless playback and optimized fullscreen. It matches the style
        when taking a video fullscreen.

        Add new CSS rules when the placard is used for optimized fullscreen.
        (audio::-webkit-media-controls-wireless-playback-status.optimized): Accommodate the
        size of the graphic, and position appropriately.
        (audio::-webkit-media-controls-wireless-playback-text-top.optimized): One line is
        needed, so use this one, and place it where the bottom one is since more room is
        needed to accommodate the graphic.
        (audio::-webkit-media-controls-wireless-playback-text-bottom.optimized): One line is
        needed, so hide this one.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.createControls): Several of the container divs are already
        created in Controller.prototype.createControls(). Fly-by fix to avoid creation of
        those divs. Only the panelContainer is new for the iOS controls. Fly-by fix of a
        missing semicolon.
        (ControllerIOS.prototype.handlePresentationModeChange): When the presentation mode
        changes do several things:
            1- Update the background image. Clear the inline background image when going back
               to inline or in wireless playback.
            2- Add the "optimized" ClassName to the placeholder container, and the two text
               divs when entering optimized fullscreen. Remove them in other cases.
            3- Set -webkit-media-controls-wireless-playback-text-top to the placeholder text.
               This is better than embedding it inside the graphic. Clear the -bottom text.
        * platform/ios/WebCoreSystemInterfaceIOS.h: Add a new enum to obtain the placeholder
        text.

2015-05-19  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Use GSimpleProxyResolver instead of custom SoupProxyResolver
        https://bugs.webkit.org/show_bug.cgi?id=145154

        Reviewed by Gyuyoung Kim.

        SoupProxyResolver was deprecated since libsoup 2.42.
        So, this patch refactors the custom SoupProxyResolver to GSimpleProxyResolver
        which provides same functionality in gio.

        No new tests, because there is not behavior change.

        * PlatformEfl.cmake:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * platform/network/soup/ProxyResolverSoup.cpp: Removed.
        * platform/network/soup/ProxyResolverSoup.h: Removed.
        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::SoupNetworkSession::setHTTPProxy): Moved to private member.
        (WebCore::SoupNetworkSession::httpProxy): Deleted because nobody calls it.
        * platform/network/soup/SoupNetworkSession.h:

2015-05-19  Commit Queue  <commit-queue@webkit.org>

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

        Introduced a crash in 15 layout tests on Mavericks on #webkit
        (Requested by rniwa on #webkit).

        Reverted changeset:

        "Media Controls stop updating after hovering for a few
        seconds."
        https://bugs.webkit.org/show_bug.cgi?id=144770
        http://trac.webkit.org/changeset/184595

2015-05-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        REGRESSION(r181571): Build broken when USE(OPENGL_ES_2) is defined.
        https://bugs.webkit.org/show_bug.cgi?id=145156

        Reviewed by Alex Christensen.

        No new tests, no behavior changes.

        Vertex Array Objects are not available in OpenGLESv2.
        Add guards to avoid using this when building with GLESv2.

        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::createVertexArray):
        (WebCore::GraphicsContext3D::deleteVertexArray):
        (WebCore::GraphicsContext3D::isVertexArray):
        (WebCore::GraphicsContext3D::bindVertexArray):

2015-05-19  Roger Fong  <roger_fong@apple.com>

        Upper half of volume control should be filled, not hollow.
        https://bugs.webkit.org/show_bug.cgi?id=145187.
        <rdar://problem/21021970>

        Reviewed by Dean Jackson.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.drawVolumeBackground):

2015-05-19  Michael Saboff  <msaboff@apple.com>

        REGRESSION(183787): JIT is enabled for all builds
        https://bugs.webkit.org/show_bug.cgi?id=145179

        Reviewed by Geoffrey Garen.

        Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
        set it depending on OS and CPU type.

        Only changed the way build options are initialized.

        * Configurations/FeatureDefines.xcconfig:

2015-05-19  Chris Dumez  <cdumez@apple.com>

        [Mac] Font lookups are flakey due to caching
        https://bugs.webkit.org/show_bug.cgi?id=145180
        <rdar://problem/21012406>

        Reviewed by Darin Adler.

        Font lookups were flakey on Mac due to the cache in fontWithFamily().
        The reason is that the "desired family" to "available family" mapping
        is sometimes dependent on the desired traits. However, our cache was
        only using the "desired family" as key.

        This patch now uses a std::pair as key containing both the "desired
        family" and the "desired traits" for correctness. I also updated the
        cache to use WTF types instead of NS types.

        Test: platform/mac/fast/text/font-weights.html

        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::desiredFamilyToAvailableFamilyMap):
        (WebCore::hasDesiredFamilyToAvailableFamilyMapping):
        (WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
        (WebCore::fontWithFamily):
        (WebCore::invalidateFontCache):
        (WebCore::desiredFamilyToAvailableFamilyDictionary): Deleted.

2015-05-19  Brady Eidson  <beidson@apple.com>

        X-Frame-Options headers not respected when loading from application cache.
        <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800

        Reviewed by Alexey Proskuryakov.

        Test: http/tests/appcache/x-frame-options-prevents-framing.php

        This patch updates SubstituteData to hold on to a ResourceResponse instead of just a URL.
        
        It also updates all users of SubstituteData to reflect this.
        
        Finally it updates ApplicationCacheHost to put the full response (including x-frame-options header)
        in the SubstituteData so they can be checked at the appropriate times.
        
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
        (WebCore::DocumentLoader::responseReceived): Update an ASSERT to reflect that it's okay to not have
          a main resource as long as you have a substitute identifier for it.
        (WebCore::DocumentLoader::documentURL):
        (WebCore::DocumentLoader::contentFilterDidDecide):
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadArchive):
        (WebCore::FrameLoader::defaultSubstituteDataForURL):

        * loader/SubstituteData.h:
        (WebCore::SubstituteData::SubstituteData):
        (WebCore::SubstituteData::shouldRevealToSessionHistory):
        (WebCore::SubstituteData::mimeType):
        (WebCore::SubstituteData::textEncoding):
        (WebCore::SubstituteData::response):
        (WebCore::SubstituteData::responseURL): Deleted.

        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::maybeLoadMainResource): Put the full ResourceResponse here, which 
          includes x-frame-options headers sent back when the resources was initially loaded from the network.

        * platform/network/ResourceResponseBase.h:

2015-05-19  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) 
        https://bugs.webkit.org/show_bug.cgi?id=145175
        <rdar://problem/21023785>

        Reviewed by Beth Dakin.

        Extend the main-thread scrolling changes done in Bug 145140 to also handle Scrolling Thread snapping.
        The post-layout fixup (needed to handle window resize and device orientation changes) should not fire
        while Scrolling Thread scroll-snap animations are running, since these animations will most likely
        move the scroll view into the proper position. If we attempt to 'fix up' the scroll position before
        these animations finish, we get an ugly 'jump' in the display.

        * page/FrameView.cpp:
        (WebCore::FrameView::isScrollSnapInProgress): New method based on isRubberBandInProgress, which considers
        both the ScrollAnimator (main thread) scrolling, as well as the ScrollingCoordinator (Scrolling Thread)
        scrolling operations. Returns true if a scroll-snap animation is still active.
        * page/FrameView.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::isScrollSnapInProgress): Added. Returns scrolling tree's
        'isScrollSnapInProgress' state.
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::isScrollSnapInProgress): Added default 'false' stub.
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::ScrollingTree): Use modern C++11 initializers.
        (WebCore::ScrollingTree::isScrollSnapInProgress): Added.
        (WebCore::ScrollingTree::setMainFrameIsScrollSnapping): Added.
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): Update scrolling tree state to match the
        ScrollController's scroll-snap state.
        (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): Added. When starting a scroll snap timer,
        always set the scrolling tree scroll-snapping state to true.
        (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): Added. When ending a scroll snap timer,
        only set the scrolling tree scroll-snapping state to false if the other axis animator is inactive.
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::updateScrollSnapState): Revise implementation to use its 'isScrollSnapInProgress'
        method, rather than only looking at the ScrollAnimator (main thread) state.
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::isScrollSnapInProgress): Added.
        * platform/cocoa/ScrollController.h:
        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Added. Reports if the scroll snap animation
        timer on the requested axis is running or not.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::isScrollSnapInProgress): Added.
        * rendering/RenderLayer.h:

2015-05-19  Roger Fong  <roger_fong@apple.com>

        Media Controls stop updating after hovering for a few seconds.
        https://bugs.webkit.org/show_bug.cgi?id=144770.
        <rdar://problem/19823121>

        Reviewed by Jer Noble.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.createBase):
        We should never hide controls immediately as a result of mousing out of the controls.
        It should only happen when the mouse leaves the video entirely.
        (Controller.prototype.updateTimelineMetricsIfNeeded):
        Don’t update if controls are hidden, timeline dimensions will be 0.
        (Controller.prototype.handlePanelTransitionEnd): 
        Instead of adjusting visibility via adding and removing classes,
        remove controls entirely from the tree.
        (Controller.prototype.showControls):
        Add controls back into the tree when showing controls.
        (Controller.prototype.updateForShowingControls):
        Helper method for showControls.
        (Controller.prototype.controlsAreHidden):
        Controls also hidden if removed from tree.

        Remove forceUpdate logic, no longer necessary.
        (Controller.prototype.handleDurationChange): 
        (Controller.prototype.updateProgress):
        (Controller.prototype.updateTime):

        Override methods to use add and remove panelContainer for iOS.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handlePanelTransitionEnd):
        (ControllerIOS.prototype.showControls):
        (ControllerIOS.prototype.controlsAreHidden):

2015-05-19  Brent Fulgham  <bfulgham@apple.com>

        Scroll-snap animations should not start on axes with zero-delta
        https://bugs.webkit.org/show_bug.cgi?id=145148

        Reviewed by Dean Jackson.

        Don't begin a scroll snap animation on an axis that had no change in position (on that axis)
        during the gesture.

        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Don't begin a scroll snap
        animation if no movement on this axis was ever made.

2015-05-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        AudioContext should resolve promises with jsUndefined() and not jsNull()
        https://bugs.webkit.org/show_bug.cgi?id=145063

        Reviewed by Sam Weinig.

        Covered by updated test.

        * bindings/js/JSDOMPromise.h:
        (WebCore::DeferredWrapper::resolve): resolving std::nullptr_t as jsUndefined() and not jsNull()

2015-05-19  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] Migrate closed promise handling from ReadableStreamReader to ReadableStream
        https://bugs.webkit.org/show_bug.cgi?id=145110

        Reviewed by Darin Adler.

        Reader is now just checking whether it is the reader locking the stream or not.
        If not and stream is readable, it resolves the closed promise.
        Otherwise, it delegates the promise handling to its stream.

        No change in behavior.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::cleanCallbacks): Cleaning of closed callbacks.
        (WebCore::ReadableStream::changeStateToClosed): Resolving closed promise if set.
        (WebCore::ReadableStream::changeStateToErrored): Rejecting closed promise if set.
        (WebCore::ReadableStream::getReader): Removed reader state notification.
        (WebCore::ReadableStream::closed): Moved from reader to stream.
        * Modules/streams/ReadableStream.h:
        (WebCore::ReadableStream::reader): Added to allow reader to check whether it is locking its stream or not.
        (WebCore::ReadableStream::isReadable): Added as an improvement over internalState which is removed.
        (WebCore::ReadableStream::internalState): Deleted.
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::closed):
        * Modules/streams/ReadableStreamReader.h: Removed state and closed promise callbacks.
        * bindings/js/JSReadableStreamControllerCustom.cpp:
        (WebCore::JSReadableStreamController::close): Refactoring of internalState to isReadable.
        (WebCore::JSReadableStreamController::error): Ditto.
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::closed): Refactoring to have the promise value as callback parameter.

2015-05-19  Jeremy Jones  <jeremyj@apple.com>

        Remove use of deprecated AVKit SPI cancelOptimizedFullscreen.
        https://bugs.webkit.org/show_bug.cgi?id=145159

        Reviewed by Eric Carlson.

        Remove cancelOptimizedFullscreen, and use stopOptimizedFullscreen instead.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
        * platform/spi/cocoa/AVKitSPI.h: remove declaration.

2015-05-19  Zalan Bujtas  <zalan@apple.com>

        Merged anonymous blocks should invalidate simple line layout path.
        https://bugs.webkit.org/show_bug.cgi?id=145104
        rdar://problem/20980930

        Reviewed by Antti Koivisto.

        When anonymous blocks are merged together, it's not guaranteed that the final block can use simple line layout.
        This patch ensures that the flow block, where the other block's content gets moved to, is no longer on simple line layout path.
        Whether the final flow block ends up using inline boxes or simple line layout will be determined during the next layout.

        Test: fast/block/crash-when-anonymous-blocks-are-merged-with-simple-line-layout.html

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::insertChildInternal):

2015-05-19  Beth Dakin  <bdakin@apple.com>

        Crash in WebCore::RenderLayer::updateScrollbarsAfterLayout
        https://bugs.webkit.org/show_bug.cgi?id=145142

        Reviewed by Simon Fraser.

        I have not been able to reproduce this crash, but according to symbolication 
        m_vBar is null. It seems like this crash was probably caused by 
        http://trac.webkit.org/changeset/173668 which made it so that overflow:scroll 
        behaves like overflow:auto when the scrollbars are overlay. I can see how you 
        could encounter this crash with that change if the layout caused 
        styleRequiresScrollbar() to return true when it used to return false. Then this 
        code, by failing to null-check the scrollbars, assumes that 
        styleRequiresScrollbar() could not have changed based on a layout. But it could 
        change if the css changed the scrollbars to be custom or if the user managed 
        switch to legacy style scrollbars at just the wrong time. Or I suppose it could 
        also happen if the user has legacy scrollbars and the style switched from auto to 
        scroll during the layout.

        Anyway, we should null-check  the scrollbars. This is a speculative fix.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateScrollbarsAfterLayout):

2015-05-19  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern for-loops in WebCore/xml.
        https://bugs.webkit.org/show_bug.cgi?id=145046

        Reviewed by Chris Dumez.

        No new tests, no new tests.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
        * xml/XPathExpressionNode.cpp:
        (WebCore::XPath::Expression::setSubexpressions):
        * xml/XPathFunctions.cpp:
        (WebCore::XPath::FunSum::evaluate):
        (WebCore::XPath::populateFunctionMap):
        * xml/XPathNodeSet.cpp:
        (WebCore::XPath::NodeSet::traversalSort):
        * xml/XPathParser.cpp:
        (WebCore::XPath::populateAxisNamesMap):
        * xml/XPathPath.cpp:
        (WebCore::XPath::Filter::evaluate):
        (WebCore::XPath::LocationPath::evaluate):
        * xml/XPathPredicate.cpp:
        (WebCore::XPath::EqTestOp::compare):
        (WebCore::XPath::Union::evaluate):
        * xml/XPathStep.cpp:
        (WebCore::XPath::Step::optimize):
        (WebCore::XPath::Step::predicatesAreContextListInsensitive):
        (WebCore::XPath::Step::evaluate):
        (WebCore::XPath::nodeMatches):
        * xml/XSLStyleSheetLibxslt.cpp:
        (WebCore::XSLStyleSheet::~XSLStyleSheet):
        (WebCore::XSLStyleSheet::isLoading):
        (WebCore::XSLStyleSheet::clearDocuments):
        (WebCore::XSLStyleSheet::locateStylesheetSubResource):
        * xml/XSLTProcessorLibxslt.cpp:
        (WebCore::xsltParamArrayFromParameterMap):

2015-05-19  Jon Lee  <jonlee@apple.com>

        Improve text rendering of placeholder
        https://bugs.webkit.org/show_bug.cgi?id=145135

        Reviewed by Eric Carlson.

        * Modules/mediacontrols/mediaControlsApple.css: The <p> elements of the wireless playback
        text are being popped out into separate layers, causing the text to render antialiased, which
        looks bad on non-retina machines. Explicitly set the background color (which is ok since the
        container element for the placeholder is also black). Also extend the height out 1pt to prevent
        clipping of descenders.
        (audio::-webkit-media-controls-wireless-playback-text-top): Set background color to black and add
        1 to the height.
        (audio::-webkit-media-controls-wireless-playback-text-bottom): Ditto.

2015-05-19  Jon Lee  <jonlee@apple.com>

        [iOS] Current time display should be right-aligned
        https://bugs.webkit.org/show_bug.cgi?id=145163
        rdar://problem/21014339

        Reviewed by Eric Carlson.

        * Modules/mediacontrols/mediaControlsiOS.css: Use flex-start and flex-end
        instead of right and left, similar to the Mac controls.
        (video::-webkit-media-controls-current-time-display):
        (video::-webkit-media-controls-time-remaining-display):

2015-05-14  Chris Fleizach  <cfleizach@apple.com>

        AX: Select text mechanism returns results outside of text control regions
        https://bugs.webkit.org/show_bug.cgi?id=145041

        Reviewed by Mario Sanchez Prada.

        The behavior of the select text mechanism (inside accessibility) should make sure that results
        returned stay within text control elements if the search was initiated inside a text control element.

        Test: platform/mac/accessibility/select-text-stays-inside-text-controls.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::rangeClosestToRange):
        (WebCore::AccessibilityObject::selectText):

2015-05-19  Chris Dumez  <cdumez@apple.com>

        Mark static variables as const when possible
        https://bugs.webkit.org/show_bug.cgi?id=145161

        Reviewed by Andreas Kling.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        * Modules/mediasource/SourceBuffer.cpp:
        * Modules/webdatabase/SQLException.cpp:
        * dom/DOMCoreException.cpp:
        * inspector/NetworkResourcesData.cpp:
        * loader/icon/IconDatabase.cpp:
        (WebCore::urlForLogging):
        * page/AutoscrollController.cpp:
        * page/Page.cpp:
        * platform/RuntimeApplicationChecksIOS.mm:
        (WebCore::applicationIsAdSheet):
        (WebCore::applicationIsMobileMail):
        (WebCore::applicationIsMobileSafari):
        (WebCore::applicationIsDumpRenderTree):
        (WebCore::applicationIsWebApp):
        (WebCore::applicationIsOkCupid):
        (WebCore::applicationIsFacebook):
        (WebCore::applicationIsEpicurious):
        (WebCore::applicationIsDaijisenDictionary):
        (WebCore::applicationIsNASAHD):
        (WebCore::applicationIsMASH):
        (WebCore::applicationIsTheEconomistOnIPhone):
        (WebCore::applicationIsWebProcess):
        (WebCore::applicationIsIBooksOnIOS):
        * platform/audio/HRTFElevation.cpp:
        * platform/audio/mac/AudioHardwareListenerMac.cpp:
        (WebCore::processIsRunningPropertyDescriptor):
        (WebCore::outputDevicePropertyDescriptor):
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::toCoreTextFontWeight):
        (WebCore::toAppKitFontWeight):
        (WebCore::toNSFontWeight):
        * platform/mac/ScrollAnimatorMac.mm:
        (supportsUIStateTransitionProgress):
        (supportsExpansionTransitionProgress):
        (supportsContentAreaScrolledInDirection):
        * platform/mac/ScrollbarThemeMac.mm:
        * platform/mac/WebCoreNSURLExtras.mm:
        (WebCore::dataForURLComponentType):
        * platform/mock/ScrollbarThemeMock.cpp:
        * platform/text/icu/UTextProviderLatin1.cpp:
        * platform/text/ios/LocalizedDateCache.mm:
        (WebCore::LocalizedDateCache::calculateMaximumWidth):
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlockFlow::matchedEndLine):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
        * rendering/RenderFrameBase.cpp:
        (WebCore::shouldExpandFrame):
        * rendering/RenderTableSection.cpp:
        * rendering/RenderThemeIOS.mm:
        (WebCore::getInsetGradient):
        (WebCore::getShineGradient):
        (WebCore::getShadeGradient):
        (WebCore::getConvexGradient):
        (WebCore::getConcaveGradient):
        (WebCore::getSliderTrackGradient):
        (WebCore::getReadonlySliderTrackGradient):
        (WebCore::getSliderThumbOpaquePressedGradient):
        (WebCore::RenderThemeIOS::paintCheckboxDecorations):
        (WebCore::RenderThemeIOS::paintRadioDecorations):
        * rendering/RenderThemeMac.mm:
        (WebCore::toFontWeight):
        (WebCore::TopGradientInterpolate):
        (WebCore::BottomGradientInterpolate):
        (WebCore::MainGradientInterpolate):
        (WebCore::TrackGradientInterpolate):

2015-05-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Use Ref instead of PassRefPtr in WebCore/bindings
        https://bugs.webkit.org/show_bug.cgi?id=144981

        Reviewed by Darin Adler.

        As a step to purge PassRefPtr, remove PassRefPtr in WebCore/bindings.

        No new tests, no behavior changes.

        * bindings/gobject/GObjectNodeFilterCondition.h:
        (WebCore::GObjectNodeFilterCondition::create):
        * bindings/gobject/GObjectXPathNSResolver.h:
        (WebCore::GObjectXPathNSResolver::create):
        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::create):
        * bindings/js/JSCustomXPathNSResolver.h:
        * bindings/js/JSDOMGlobalObjectTask.cpp:
        * bindings/js/JSErrorHandler.h:
        (WebCore::JSErrorHandler::create):
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::createForNode):
        (WebCore::JSLazyEventListener::createForDOMWindow):
        * bindings/js/JSLazyEventListener.h:
        * bindings/js/JSMutationCallback.h:
        (WebCore::JSMutationCallback::create):
        * bindings/js/JSNodeFilterCondition.h:
        (WebCore::JSNodeFilterCondition::create):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::SerializedScriptValue::create):
        (WebCore::SerializedScriptValue::numberValue):
        (WebCore::SerializedScriptValue::undefinedValue):
        (WebCore::SerializedScriptValue::nullValue):
        * bindings/js/SerializedScriptValue.h:
        * bindings/objc/ObjCEventListener.h:
        * bindings/objc/ObjCEventListener.mm:
        (WebCore::ObjCEventListener::wrap):
        * bindings/objc/ObjCNodeFilterCondition.h:
        (WebCore::ObjCNodeFilterCondition::create):

2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>

        Fix uninitialized warnings in RealtimeMediaSourceCenterOwr.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145119

        Reviewed by Gyuyoung Kim.

        * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
        (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
        (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):

2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>

        [CMake] Ignore warnings in system headers
        https://bugs.webkit.org/show_bug.cgi?id=144747

        Reviewed by Darin Adler.

        Separate include directories into WebKit project includes and system includes. Suppress all
        warnings from headers in system include directories using the SYSTEM argument to
        the include_directories command.

        * CMakeLists.txt:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:

2015-05-18  Myles C. Maxfield  <mmaxfield@apple.com>

        Addressing post-review comments on r184353
        https://bugs.webkit.org/show_bug.cgi?id=145146

        Reviewed by Benjamin Poulain.

        See per-file comments.

        No new tests because there is no behavior change.

        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::fontWithFamilySpecialCase): Use equalIgnoringASCIICase() AtomicString overload.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Implement Ben's ideas for
        cheaply constructing AtomicStrings only when necessary.

2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>

        [ES6] Arrow function syntax. Feature flag for arrow function
        https://bugs.webkit.org/show_bug.cgi?id=145108

        Reviewed by Ryosuke Niwa.

        Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function

        * Configurations/FeatureDefines.xcconfig:

2015-05-18  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION(142590): Scroll-snap points are improperly snapping to earlier index values
        https://bugs.webkit.org/show_bug.cgi?id=145140
        <rdar://problem/21006738>

        Reviewed by Beth Dakin.

        The new "nearestActiveSnapPoint" logic is firing while scroll snap animations are running. We need
        to add an "isScrollSnapInProgress" predicate, much like the existing "isRubberBandInProgress" to avoid
        certain "fix-up" logic that we don't want running while we are in the process of moving to a new position.

        * platform/ScrollAnimator.h:
        (WebCore::ScrollAnimator::ScrollAnimator::isScrollSnapInProgress): Added.
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::updateScrollSnapState): If we are in the midst of a scroll snap operation,
        do not attempt to reset position to the current active snap point.
        * platform/cocoa/ScrollController.h:
        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::isScrollSnapInProgress): Added.
        * platform/mac/ScrollAnimatorMac.h:
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::isScrollSnapInProgress): Added.

2015-05-17  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
        https://bugs.webkit.org/show_bug.cgi?id=145021

        Like for flexboxes we've to take into account the scrollbar logical
        width while computing the intrinsic min and max logical widths.

        Reviewed by Sergio Villar Senin.

        Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar
        logical width.

2015-05-17  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>

        [Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
        https://bugs.webkit.org/show_bug.cgi?id=144907

        Reviewed by Darin Adler.

        Changed the link between readadable stream and reader.
        Controller ref()/deref() now increments/decrements its stream ref counter, similarly to ReadableStreamController.
        This ensures that even if JS scripts do not keep track of the readable stream,
        the readable stream will not be disposed as long as the JS script has access to its reader.

        All readers of a given stream are kept by the stream, either in an array (for released readers) 
        or and in ReadableStream::m_reader for the active reader.
        This removes the need for the code synchronizing stream and reader.

        As a reader can now already count on its stream, the reader no longer needs to store the error in errored state.
        Removal of ReadableJSStream::Reader as closed promise rejection error is directly retrieved from the ReadableStream.
        Moved the creation of reader directly in ReadableStream.

        Next step should be to remove ReadableStreamReader::m_state and to delegate the handling of ReadableStreamReader closed promise callbacks to ReadableStream.

        No change in behavior.

        * Modules/streams/ReadableStream.cpp:
        (WebCore::ReadableStream::changeStateToClosed):
        (WebCore::ReadableStream::changeStateToErrored):
        (WebCore::ReadableStream::getReader):
        * Modules/streams/ReadableStream.h:
        (WebCore::ReadableStream::reader):
        * Modules/streams/ReadableStreamReader.cpp:
        (WebCore::ReadableStreamReader::clean):
        (WebCore::ReadableStreamReader::ref):
        (WebCore::ReadableStreamReader::deref):
        (WebCore::ReadableStreamReader::closed):
        (WebCore::ReadableStreamReader::changeStateToClosed):
        (WebCore::ReadableStreamReader::changeStateToErrored):
        * Modules/streams/ReadableStreamReader.h:
        (WebCore::ReadableStreamReader::ReadableStreamReader):
        * Modules/streams/ReadableStreamReader.idl:
        * bindings/js/JSReadableStreamCustom.cpp:
        (WebCore::JSReadableStream::getReader):
        * bindings/js/JSReadableStreamReaderCustom.cpp:
        (WebCore::JSReadableStreamReader::closed):
        (WebCore::constructJSReadableStreamReader):
        * bindings/js/ReadableJSStream.cpp:
        (WebCore::ReadableJSStream::storeError):
        (WebCore::ReadableJSStream::ReadableJSStream): Deleted.
        * bindings/js/ReadableJSStream.h:

2015-05-17  Alexey Proskuryakov  <ap@apple.com>

        Crash when uploading huge files to YouTube or Google Drive
        https://bugs.webkit.org/show_bug.cgi?id=145083
        rdar://problem/15468529

        Reviewed by Darin Adler.

        This fixes the crash, but uploading will fail.

        * fileapi/FileReaderLoader.cpp:
        (WebCore::FileReaderLoader::start): Tell SubresourceLoader to not store a copy of
        all received data, FileReaderLoader has its own buffer.
        (WebCore::FileReaderLoader::didReceiveResponse): Fixed a bounds check - not every
        64-bit value that doesn't fit into 32 bits is negative. With this, FileReader fails
        on huge files right away, as intended.
        (WebCore::FileReaderLoader::didReceiveData): Fixed multiple bugs in code that's
        executed when size is not available upfront. This is the code that used to crash,
        but with the above fix, it's not executed by YouTube.
        Not only overflow was handled incorrectly, but even simply growing a buffer for
        append was buggy.

2015-05-16  Zalan Bujtas  <zalan@apple.com>

        REGRESSION (Subpixel): Dashed underline is missing when box is positioned at subpixels.
        https://bugs.webkit.org/show_bug.cgi?id=145097
        rdar://problem/18588415

        Reviewed by Simon Fraser.

        Dashed and dotted border painting needs clipping in order to properly display corners.
        Similarly to solid border's quad calculation, we pixelsnap the border positions before computing the clipping quad values.

        Test: fast/borders/dashed-border-on-subpixel-position.html
              fast/borders/dotted-border-on-subpixel-position.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::clipBorderSidePolygon):

2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove styleText() and applyStyleText() from InspectorStyle.
        https://bugs.webkit.org/show_bug.cgi?id=145093

        Reviewed by Darin Adler.

        styleText() and applyStyleText() in InspectorStyle are private aliases for the public
        accessors in the same class but are rarely used. I think it would be better off removing
        these aliases and updating all the current call sites to use the public accessors directly
        as noted in InspectorStyleSheet.h.

        No new tests, no behavior change.

        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyle::populateAllProperties):
        * inspector/InspectorStyleSheet.h:

2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove MessageType variant of addMessageToConsole() from ChromeClient.
        https://bugs.webkit.org/show_bug.cgi?id=145095

        Reviewed by Darin Adler.

        All addMessageToConsole() in ChromeClient are exactly the same thing.
        So there is no reason to keep all this methods.

        No new tests, no behavior change.

        * page/ChromeClient.h:
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::messageWithTypeAndLevel):

2015-05-15  Sam Weinig  <sam@webkit.org>

        Add getElementById to DocumentFragment
        https://bugs.webkit.org/show_bug.cgi?id=145094

        Reviewed by Alexey Proskuryakov.

        Match the latest DOM standard and other browsers by adding getElementById
        to DocumentFragment in addition to Document and SVGSVGElement. Add NonElementParentNode
        interface that the DOM standard defines.

        Test: fast/dom/DocumentFragment/getElementById.html

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        Add NonElementParentNode.idl

        * dom/Document.idl:
        Mark Document as implementing NonElementParentNode and remove now redundant getElementById
        declaration.

        * dom/DocumentFragment.cpp:
        (WebCore::DocumentFragment::getElementById):
        * dom/DocumentFragment.h:
        Add implementation of getElementById for DocumentFragments. Add a fast path for ShadowRoots
        which can take advantage of the fact that they are TreeScopes to use the elements by id cache
        in TreeScrope.

        * dom/DocumentFragment.idl:
        Mark DocumentFragment as implementing NonElementParentNode.

        * dom/NonElementParentNode.idl: Copied from Source/WebCore/dom/NonDocumentTypeChildNode.idl.
        Added.

        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::getElementById):
        * svg/SVGSVGElement.h:
        * svg/SVGSVGElement.idl:
        Convert to taking an AtomicString to match other getElementByIds.

2015-05-15  Antti Koivisto  <antti@apple.com>

        When redirecting to data URL use HTTP response for same origin policy checks
        https://bugs.webkit.org/show_bug.cgi?id=145054
        rdar://problem/20299050

        Reviewed by Alexey Proskuryakov.

        Test: http/tests/security/canvas-remote-read-data-url-image-redirect.html

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::notifyFinished):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::sanitizeScriptError):
        * html/canvas/CanvasRenderingContext.cpp:
        (WebCore::CanvasRenderingContext::wouldTaintOrigin):
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::notifyFinished):
        * loader/MediaResourceLoader.cpp:
        (WebCore::MediaResourceLoader::responseReceived):
        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::notifyFinished):
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::isOriginClean):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::passesAccessControlCheck):
        (WebCore::CachedResource::passesSameOriginPolicyCheck):

            Factor repeatedly used same origin policy test into a function.

        (WebCore::CachedResource::redirectReceived):

            When redirecting to a data URL save the redirect response.

        (WebCore::CachedResource::responseForSameOriginPolicyChecks):

            In case we got redirected to data use that response instead of the final data response for policy checks.

        * loader/cache/CachedResource.h:

2015-05-16  Jon Lee  <jonlee@apple.com>

        [iOS] wireless playback picker button is drawn incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=145057
        rdar://problem/20877518

        Reviewed by Jer Noble.

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.updateWirelessTargetPickerButton): This method is
        defined in Controller, but is only meant to run on Macs. Override it with
        an empty function for iOS.

2015-05-15  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r183300): Background missing on top links on apple.com
        https://bugs.webkit.org/show_bug.cgi?id=145079
        rdar://problem/20914252

        Reviewed by Tim Horton.
        
        Re-land r184421 with a fix to check against rects.coverageRect
        rather than the stale m_coverageRect.

        Test: compositing/visible-rect/backing-change-height-from-zero.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::shouldSkipLayerInDump):

2015-05-15  Matt Baker  <mattbaker@apple.com>

        Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
        https://bugs.webkit.org/show_bug.cgi?id=144882

        Reviewed by Joseph Pecoraro.

        A timeline recording will always be stopped before the end of the current run loop is observed. Before
        dispatching the recording stopped event, any events that are currently in progress should be considered
        complete and sent to the frontend.

        * inspector/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::internalStop):

2015-05-15  Commit Queue  <commit-queue@webkit.org>

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

        Introduced 42 layout test failures (Requested by rniwa on
        #webkit).

        Reverted changeset:

        "REGRESSION (r183300): Background missing on top links on
        apple.com"
        https://bugs.webkit.org/show_bug.cgi?id=145079
        http://trac.webkit.org/changeset/184421

2015-05-15  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r183300): Background missing on top links on apple.com
        https://bugs.webkit.org/show_bug.cgi?id=145079
        rdar://problem/20914252

        Reviewed by Tim Horton.

        GraphicsLayerCA::setVisibleAndCoverageRects() only set the m_intersectsCoverageRect
        flag if the coverage rect changed, but it doesn't if you simply change the size of
        the layer.

        Instead, always re-evaluate the intersection, and set the CoverageRectChanged bit
        if it changes.

        Test: compositing/visible-rect/backing-change-height-from-zero.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::shouldSkipLayerInDump): Don't skip any layers in a
        debug layer dump, to assist debugging.

2015-05-15  Sam Weinig  <sam@webkit.org>

        Move HTMLElement's children property to ParentNode
        https://bugs.webkit.org/show_bug.cgi?id=145072

        Reviewed by Chris Dumez.

        Match the latest DOM standard and other browsers by moving the children property
        to ParentNode, thus exposing it on Element, Document and DocumentFragment.

        Test: fast/dom/ParentNode-children.html

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::children):
        Moved implementation from HTMLElement to here.

        (WebCore::ContainerNode::ensureCachedHTMLCollection):
        (WebCore::ContainerNode::cachedHTMLCollection):
        Moved implementation from Element to here so that ContainerNode::children
        can use it.

        (WebCore::ContainerNode::firstElementChild):
        (WebCore::ContainerNode::lastElementChild):
        (WebCore::ContainerNode::childElementCount):
        Remove unnecessary assertions.

        * dom/ContainerNode.h:
        Moved declarations from HTMLElement and Element to here.

        * dom/Element.cpp:
        (WebCore::Element::ensureCachedHTMLCollection): Deleted.
        (WebCore::Element::cachedHTMLCollection): Deleted.
        * dom/Element.h:
        Moved to ContainerNode.

        * dom/Node.cpp:
        (WebCore::Node::previousElementSibling):
        (WebCore::Node::nextElementSibling):
        Remove unnecessary assertions.

        * dom/ParentNode.idl:
        Moved the children property here from HTMLElement.

        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::children): Deleted.
        * html/HTMLElement.h:
        Moved to ContainerNode.

        * html/HTMLElement.idl:
        Get rid of the children property for all bindings except Objective-C which needs
        to keep it to avoid changing the public API.

2015-05-15  Zalan Bujtas  <zalan@apple.com>

        WebCore ASan debug build fails. ERROR: WebCore has a weak external symbol in it.
        https://bugs.webkit.org/show_bug.cgi?id=145070

        Reviewed by David Kilzer.

        Build fix.

        * Configurations/WebCore.unexp:

2015-05-15  Beth Dakin  <bdakin@apple.com>

        Prefix force on MouseEvent and add constants for click and force click values
        https://bugs.webkit.org/show_bug.cgi?id=145065
        -and corresponding-
        rdar://problem/20770052

        Reviewed by Tim Horton.

        (WebCore::MouseEvent::webkitForce):
        * dom/MouseEvent.idl:

2015-05-15  Jer Noble  <jer.noble@apple.com>

        [MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac.
        https://bugs.webkit.org/show_bug.cgi?id=144973

        Reviewed by Dean Jackson.

        Pull improvements made to the iOS media controls back into the Mac controls by moving
        code from mediaControlsiOS.js into MediaControlsApple.js.

        The largest refactored feature is the ability to drop individual controls from the media
        controls when the video is too small to contain them. To allow these controls to resize
        dynamically, a new "resize" event is fired inside the media element's shadow DOM.

        * Modules/mediacontrols/mediaControlsApple.css:
        (audio::-webkit-media-controls-panel .dropped): Added; sets "display: none".
        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller): Set defaults for new variables.
        (Controller.prototype.updateControls): Update the controls width; moved from iOS.js.
        (Controller.prototype.handleReadyStateChange): Update the controls; moved from iOS.js.
        (Controller.prototype.handleTimeUpdate): Update the progress; moved from iOS.js.
        (Controller.prototype.handleTimelineInput): Pause if scrubbing; moved from iOS.js.
        (Controller.prototype.handleTimelineChange): Update the progress; moved from iOS.js.
        (Controller.prototype.showControls): Update the controls width; moved from iOS.js.
        (Controller.prototype.hideControls): Removed _potentiallyScrubbing check; not needed due to changes
            to controlsAlwaysVisible().
        (Controller.prototype.scheduleUpdateLayoutForDisplayedWidth): Moved from iOS.js.
        (Controller.prototype.isControlVisible): Added; checks whether control is parented & not hidden.
        (Controller.prototype.updateLayoutForDisplayedWidth): Moved from iOS.js and refactored.
        (Controller.prototype.controlsAlwaysVisible): Return true if scrubbing.
        (Controller.prototype.updateHasAudio): Check currentPlaybackTargetIsWireless(); moved from iOS.js.
        (Controller.prototype.get scrubbing): Simple getter for _scrubbing.
        (Controller.prototype.set scrubbing): Check play state if scrubbing; start playback (if necessary)
            if not scrubbing.
        (Controller.prototype.get pageScaleFactor): Moved from iOS.js.
        (Controller.prototype.set pageScaleFactor): Ditto.
        (Controller.prototype.handleRootResize): Schedule an update of the contrtols width.

        Remove a bunch of newly unnecessary code from the iOS media controls:

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS):
        (ControllerIOS.prototype.createControls): Remove ivars moved into Apple.js.
        (ControllerIOS.prototype.configureInlineControls): Remove spacer; made unnecessary.
        (ControllerIOS.prototype.showControls): Deleted.
        (ControllerIOS.prototype.updateTime): Deleted.
        (ControllerIOS.prototype.handleTimelineTouchStart): Just call "scrubbing = true", handled in Apple.js.
        (ControllerIOS.prototype.handleTimelineTouchEnd): Just call "scrubbing = false", handled in Apple.js.
        (ControllerIOS.prototype.handleReadyStateChange): Deleted.
        (ControllerIOS.prototype.setPlaying): Don't check _timelineIsHidden; not needed.
        (ControllerIOS.prototype.get pageScaleFactor): Deleted.
        (ControllerIOS.prototype.set pageScaleFactor): Deleted.
        (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Deleted.
        (ControllerIOS.prototypeupdateLayoutForDisplayedWidth): Deleted.

        Fire a "resize" event at the shadow DOM root when layout results in a size change.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::layoutSizeChanged): Fire the "resize" event at the shadow DOM.