ChangeLog   [plain text]


2015-06-08  Babak Shafiei  <bshafiei@apple.com>

        Merge r183682.

    2015-05-01  Brady Eidson  <beidson@apple.com>

            Add API to disable meta refreshes.
            <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269

            Reviewed by Alexey Proskuryakov.

            Test: loader/meta-refresh-disabled.html

            * dom/Document.cpp:
            (WebCore::Document::processHttpEquiv): Bail early if Settings have meta refreshes disabled.
            * page/Settings.in:

2015-05-31  Babak Shafiei  <bshafiei@apple.com>

        Merge r185018.

    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-31  Babak Shafiei  <bshafiei@apple.com>

        Merge r185003.

    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-19  Babak Shafiei  <bshafiei@apple.com>

        Merge r179010.

    2015-01-23  Jer Noble  <jer.noble@apple.com>

            Layout Test http/tests/media/track-in-band-hls-metadata.html is flaky
            https://bugs.webkit.org/show_bug.cgi?id=140827

            Reviewed by Eric Carlson.

            Create the m_metadataTrack by calling prepareMetadataTrack() before deref-ing it.

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

2015-05-19  Babak Shafiei  <bshafiei@apple.com>

        Merge r183788.

    2015-05-04  Zalan Bujtas  <zalan@apple.com>

            RenderWidget::setWidgetGeometry() can end up destroying *this*.
            https://bugs.webkit.org/show_bug.cgi?id=144601

            Reviewed by Andreas Kling.

            This is a speculative fix to ensure we don't crash on an invalid *this* renderer
            while flattening the current iframe.
            Calling RenderWidget::setWidgetGeometry() can result in destroying the current renderer.
            While it is not a issue in case of normal layout flow as widget positions are updated at post layout,
            frame flattening initiates this action in the middle of layout.
            This patch re-introduces refcount model for RenderWidgets so that the renderer is protected during layout
            when frame flattening is in use.

            * rendering/RenderFrameBase.cpp:
            (WebCore::RenderFrameBase::layoutWithFlattening): Let's be paranoid about child view.
            * rendering/RenderObject.cpp:
            (WebCore::RenderObject::destroy):
            * rendering/FrameView.cpp:
            (WebCore::FrameView::layout):
            * rendering/RenderView.h:
            * rendering/RenderWidget.cpp:
            (WebCore::RenderWidget::~RenderWidget):
            * rendering/RenderWidget.h:
            (WebCore::RenderWidget::ref):
            (WebCore::RenderWidget::deref):

2015-05-08  Babak Shafiei  <bshafiei@apple.com>

        Merge r183649.

    2015-04-30  Brady Eidson  <beidson@apple.com>

            Build fix after r183646 for less enlightened platforms.

            Unreviewed.

            * Modules/webdatabase/DatabaseBackendBase.cpp:
            (WebCore::fullyQualifiedInfoTableName): Windows doesn’t have stpcpy :(

2015-05-08  Babak Shafiei  <bshafiei@apple.com>

        Merge r183646.

    2015-04-30  Brady Eidson  <beidson@apple.com>

            Javascript using WebSQL can create their own WebKit info table.
            <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466

            Reviewed by Alex Christensen.

            Test: storage/websql/alter-to-info-table.html

            * Modules/webdatabase/DatabaseBackendBase.cpp:
            (WebCore::DatabaseBackendBase::databaseInfoTableName): Return the info table name.
            (WebCore::fullyQualifiedInfoTableName): Append "main." to the info table name.
            (WebCore::DatabaseBackendBase::DatabaseBackendBase): Use the fully qualified name.
            (WebCore::DatabaseBackendBase::performOpenAndVerify): Ditto.
            (WebCore::DatabaseBackendBase::getVersionFromDatabase): Ditto.
            (WebCore::DatabaseBackendBase::setVersionInDatabase): Ditto.

2015-04-28  Babak Shafiei  <bshafiei@apple.com>

        Merge r183280.

    2015-04-24  Brady Eidson  <beidson@apple.com>

            Origin header is preserved on cross-origin redirects.
            https://bugs.webkit.org/show_bug.cgi?id=144157.

            Reviewed by Sam Weinig.

            Tests: http/tests/security/cors-post-redirect-301.html
                   http/tests/security/cors-post-redirect-302.html
                   http/tests/security/cors-post-redirect-307.html
                   http/tests/security/cors-post-redirect-308.html

            * platform/network/cf/ResourceHandleCFNet.cpp:
            (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
            * platform/network/mac/ResourceHandleMac.mm:
            (WebCore::ResourceHandle::willSendRequest): Ditto.

2015-04-21  Lucas Forschler  <lforschler@apple.com>

        Merge r180110

    2015-02-14  Alexey Proskuryakov  <ap@apple.com>

            rel="noreferrer" should make window.opener null
            https://bugs.webkit.org/show_bug.cgi?id=141579

            Reviewed by Darin Adler.

            Tests: http/tests/navigation/target-blank-opener-post.html
                   http/tests/navigation/target-blank-opener.html

            We used to avoid passing window.opener policy by temporarily storing it in a FrameLoader
            member variable. This works for some clients - ones that invoke delegate callbacks
            synchronously - but not in the general case.

            So, changed to passing the policy explicitly.

            * WebCore.exp.in:
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::FrameLoader):
            (WebCore::FrameLoader::urlSelected):
            (WebCore::FrameLoader::loadURLIntoChildFrame):
            (WebCore::FrameLoader::loadFrameRequest):
            (WebCore::FrameLoader::loadURL):
            (WebCore::FrameLoader::load):
            (WebCore::FrameLoader::loadPostRequest):
            (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
            * loader/FrameLoader.h:
            (WebCore::FrameLoader::suppressOpenerInNewFrame): Deleted.
            * loader/FrameLoaderTypes.h:
            * loader/NavigationScheduler.cpp:
            * page/ContextMenuController.cpp:
            (WebCore::openNewWindow):
            (WebCore::ContextMenuController::contextMenuItemSelected):

2015-04-21  Lucas Forschler  <lforschler@apple.com>

        Merge r182835

    2015-04-14  Zalan Bujtas  <zalan@apple.com>

            Make inline continuation style change logic consistent.
            https://bugs.webkit.org/show_bug.cgi?id=143737
            rdar://problem/20486596

            Reviewed by Simon Fraser.

            Do not force RenderBlock type-casting on the first sibling of the continuation's container.
            The first sibling of the container of a continuation should be handled as the rest of the siblings.

            Test: fast/inline/inline-with-column-span-and-remove-block-child-crash.html

            * rendering/RenderInline.cpp:
            (WebCore::updateStyleOfAnonymousBlockContinuations):
            (WebCore::RenderInline::styleDidChange):

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

        Merge r181409

    2015-03-10  Andy Estes  <aestes@apple.com>

            REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
            https://bugs.webkit.org/show_bug.cgi?id=142526

            Reviewed by Darin Adler.

            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.

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

        Merge r182284

    2015-04-02  Alexey Proskuryakov  <ap@apple.com>

            Clean up access checks in JSHistoryCustom.cpp
            https://bugs.webkit.org/show_bug.cgi?id=143227

            Reviewed by Sam Weinig.

            * bindings/js/JSHistoryCustom.cpp:
            (WebCore::JSHistory::putDelegate):
            (WebCore::JSHistory::deleteProperty):
            (WebCore::JSHistory::deletePropertyByIndex):
            (WebCore::JSHistory::getOwnPropertyNames):
            (WebCore::JSHistory::pushState):
            (WebCore::JSHistory::replaceState):

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

        Merge r182051

    2015-03-26  Zalan Bujtas  <zalan@apple.com>

            Inline continuation code should not take anonymous containing wrapper granted.
            https://bugs.webkit.org/show_bug.cgi?id=133312

            Reviewed by Dave Hyatt.

            It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
            is an anonymous wrapper and its sibling might be a block level renderer.
            When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
            is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
            anonymous wrappers)

            Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html

            * rendering/RenderInline.cpp:
            (WebCore::updateStyleOfAnonymousBlockContinuations):
            (WebCore::RenderInline::styleDidChange):

2015-04-20  Lucas Forschler  <lforschler@apple.com>

        Merge r182076

    2015-03-27  Brent Fulgham  <bfulgham@apple.com>

            Null dereference in InbandMetadataTextTrack handling
            https://bugs.webkit.org/show_bug.cgi?id=143144
            <rdar://problem/18983250>

            Reviewed by Eric Carlson.

            * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
            (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
            'client()', just like we do in all other methods.

2015-04-20  Lucas Forschler  <lforschler@apple.com>

        Merge r179958

    2015-02-11  Chris Dumez  <cdumez@apple.com>

            Turn recent assertions into release assertions to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
            https://bugs.webkit.org/show_bug.cgi?id=141484
            <rdar://problem/13811738>

            Reviewed by Andy Estes.

            Turn recent assertions into release assertions to help track down crash in
            DocumentLoader::stopLoadingForPolicyChange(). This should increase the
            likelyhood of tripping them so that we better understand why this happens.

            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::~DocumentLoader):
            (WebCore::DocumentLoader::detachFromFrame):

2015-04-20  Lucas Forschler  <lforschler@apple.com>

        Merge r179895

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

            Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
            https://bugs.webkit.org/show_bug.cgi?id=141447
            <rdar://problem/13811738>

            Reviewed by Alexey Proskuryakov.

            Add another assertion to help track down crash in
            DocumentLoader::stopLoadingForPolicyChange().

            The trace seems to hint that frameLoader() returns null when
            stopLoadingForPolicyChange() is called. frameLoader() can only return
            null after DocumentLoader::detachFromFrame() has been called.
            Also, stopLoadingForPolicyChange() here is called from the
            DocumentLoader::continueAfterContentPolicy() policy callback which
            requires m_waitingForContentPolicy to be true. Therefore, we should
            assert that m_waitingForContentPolicy is false when m_frame is cleared
            in DocumentLoader::detachFromFrame().

            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::detachFromFrame):

2015-04-20  Lucas Forschler  <lforschler@apple.com>

        Merge r179880

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

            Add assertion to help track down WebCore::DocumentLoader::stopLoadingForPolicyChange() crash
            https://bugs.webkit.org/show_bug.cgi?id=141441
            <rdar://problem/13811738>

            Reviewed by Alexey Proskuryakov.

            Add assertion to help track down a crash in
            WebCore::DocumentLoader::stopLoadingForPolicyChange().

            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::~DocumentLoader):
            Make sure the DocumentLoader is not waiting for a content policy
            response when it is destroyed. If this were to happen, then the
            lambda function passed to PolicyChecker::checkContentPolicy()
            would outlive the DocumentLoader. This is an issue because
            that lambda function captures [this], which is the DocumentLoader.
            This would cause DocumentLoader::continueAfterContentPolicy() to
            be called after the DocumentLoader has been destroyed, which would
            explain the crash.

2015-04-20  Lucas Forschler  <lforschler@apple.com>

        Merge 181656 and 182985.

    2015-04-18  Simon Fraser  <simon.fraser@apple.com>

            REGRESSION (r181656): Animated tiled layers are missing content
            https://bugs.webkit.org/show_bug.cgi?id=143911
            rdar://problem/20596328

            Reviewed by Darin Adler.

            After r181656, all requestAnimationFrame was falling back to timers, and not
            using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
            fumble. As a result, GraphicsLayerUpdater (which updates tiled layers during
            animations) was failing to do any updates.
        
            Replace this confusing Optional<> code with simpler code that just forces the
            clients to make a DisplayRefreshMonitor if they can, first asking
            ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
        
            Make lots of things into references, and use C++11 initialization in some places.
        
            Add Internals API to allow a test to get the number of layer flushes that have
            occurred.
        
            * dom/ScriptedAnimationController.cpp:
            (WebCore::ScriptedAnimationController::ScriptedAnimationController):
            (WebCore::ScriptedAnimationController::windowScreenDidChange):
            (WebCore::ScriptedAnimationController::scheduleAnimation):
            (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
            * dom/ScriptedAnimationController.h:
            * page/ChromeClient.h:
            * platform/graphics/DisplayRefreshMonitor.cpp:
            (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor):
            (WebCore::DisplayRefreshMonitor::create):
            (WebCore::DisplayRefreshMonitor::addClient):
            (WebCore::DisplayRefreshMonitor::removeClient):
            (WebCore::DisplayRefreshMonitor::displayDidRefresh):
            * platform/graphics/DisplayRefreshMonitor.h:
            * platform/graphics/DisplayRefreshMonitorClient.cpp:
            (WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
            * platform/graphics/DisplayRefreshMonitorClient.h:
            * platform/graphics/DisplayRefreshMonitorManager.cpp:
            (WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
            (WebCore::DisplayRefreshMonitorManager::registerClient):
            (WebCore::DisplayRefreshMonitorManager::unregisterClient):
            (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
            (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
            (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
            * platform/graphics/DisplayRefreshMonitorManager.h:
            * platform/graphics/GraphicsLayerUpdater.cpp:
            (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
            (WebCore::GraphicsLayerUpdater::scheduleUpdate):
            (WebCore::GraphicsLayerUpdater::screenDidChange):
            (WebCore::GraphicsLayerUpdater::displayRefreshFired):
            (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
            * platform/graphics/GraphicsLayerUpdater.h:
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::RenderLayerCompositor):
            (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
            (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
            (WebCore::RenderLayerCompositor::flushLayersSoon):
            (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
            (WebCore::RenderLayerCompositor::startTrackingLayerFlushes):
            (WebCore::RenderLayerCompositor::layerFlushCount):
            * rendering/RenderLayerCompositor.h:
            * testing/Internals.cpp:
            (WebCore::Internals::startTrackingLayerFlushes):
            (WebCore::Internals::layerFlushCount):
            * testing/Internals.h:
            * testing/Internals.idl:

    2015-03-17  Timothy Horton  <timothy_horton@apple.com>

            Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
            https://bugs.webkit.org/show_bug.cgi?id=142776
            <rdar://problem/18921338>

            Reviewed by Alexey Proskuryakov.

            Test: fast/animation/request-animation-frame-unparented-iframe-crash.html

            In some cases (like the new test), we can end up trying to start
            requestAnimationFrame on a Document that has no Page. Most paths null-checked
            the Page and did the right thing, but one failed to do so. In addition,
            the current fallback (when Page is null) can result in us constructing
            the wrong kind of DisplayRefreshMonitor, which could lead to trouble
            down the road when it's reused. Instead, just completely avoid making a
            DisplayRefreshMonitor in the null-page case.

            * dom/ScriptedAnimationController.cpp:
            (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
            If the page is null, bail.

            * dom/ScriptedAnimationController.h:
            * platform/graphics/DisplayRefreshMonitor.cpp:
            (WebCore::DisplayRefreshMonitor::create):
            Use Optional<> to make it easy to distinguish between ChromeClient
            being unreachable (because we don't have a Page for some reason) and
            ChromeClient declaring that it doesn't want to override the type of
            DisplayRefreshMonitor that is created.

            If ChromeClient was unreachable for some reason, we'll get back an engaged
            nullptr and return it (instead of creating a DisplayRefreshMonitor based
            on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
            in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
            IFrame).

            If instead the client returns a disengaged Nullopt, we'll interpret that as
            "construct the default type", which falls back on the platform #ifdefs to
            decide what to make.2015-04-18  Simon Fraser  <simon.fraser@apple.com>

            REGRESSION (r181656): Animated tiled layers are missing content
            https://bugs.webkit.org/show_bug.cgi?id=143911
            rdar://problem/20596328

            Reviewed by Darin Adler.

            After r181656, all requestAnimationFrame was falling back to timers, and not
            using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
            fumble. As a result, GraphicsLayerUpdater (which updates tiled layers during
            animations) was failing to do any updates.
        
            Replace this confusing Optional<> code with simpler code that just forces the
            clients to make a DisplayRefreshMonitor if they can, first asking
            ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
        
            Make lots of things into references, and use C++11 initialization in some places.
        
            Add Internals API to allow a test to get the number of layer flushes that have
            occurred.
        
            * dom/ScriptedAnimationController.cpp:
            (WebCore::ScriptedAnimationController::ScriptedAnimationController):
            (WebCore::ScriptedAnimationController::windowScreenDidChange):
            (WebCore::ScriptedAnimationController::scheduleAnimation):
            (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
            * dom/ScriptedAnimationController.h:
            * page/ChromeClient.h:
            * platform/graphics/DisplayRefreshMonitor.cpp:
            (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor):
            (WebCore::DisplayRefreshMonitor::create):
            (WebCore::DisplayRefreshMonitor::addClient):
            (WebCore::DisplayRefreshMonitor::removeClient):
            (WebCore::DisplayRefreshMonitor::displayDidRefresh):
            * platform/graphics/DisplayRefreshMonitor.h:
            * platform/graphics/DisplayRefreshMonitorClient.cpp:
            (WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
            * platform/graphics/DisplayRefreshMonitorClient.h:
            * platform/graphics/DisplayRefreshMonitorManager.cpp:
            (WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
            (WebCore::DisplayRefreshMonitorManager::registerClient):
            (WebCore::DisplayRefreshMonitorManager::unregisterClient):
            (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
            (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
            (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
            * platform/graphics/DisplayRefreshMonitorManager.h:
            * platform/graphics/GraphicsLayerUpdater.cpp:
            (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
            (WebCore::GraphicsLayerUpdater::scheduleUpdate):
            (WebCore::GraphicsLayerUpdater::screenDidChange):
            (WebCore::GraphicsLayerUpdater::displayRefreshFired):
            (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
            * platform/graphics/GraphicsLayerUpdater.h:
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::RenderLayerCompositor):
            (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
            (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
            (WebCore::RenderLayerCompositor::flushLayersSoon):
            (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
            (WebCore::RenderLayerCompositor::startTrackingLayerFlushes):
            (WebCore::RenderLayerCompositor::layerFlushCount):
            * rendering/RenderLayerCompositor.h:
            * testing/Internals.cpp:
            (WebCore::Internals::startTrackingLayerFlushes):
            (WebCore::Internals::layerFlushCount):
            * testing/Internals.h:
            * testing/Internals.idl:

2015-04-20  Lucas Forschler  <lforschler@apple.com>

        Merge r180520

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

            [iOS] Max canvas size is lower than expected
            https://bugs.webkit.org/show_bug.cgi?id=141886
            <rdar://problem/19729246>

            Reviewed by Tim Horton.

            Use the same maximum canvas area for all ports,
            which bumps the iOS limit up from 4580 * 1145
            to 16k * 16k.

            * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.

2015-04-20  Lucas Forschler  <lforschler@apple.com>

        Merge r179850

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

            Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
            https://bugs.webkit.org/show_bug.cgi?id=141353

            Reviewed by Anders Carlsson.

            No new tests, because there's no behavior change.

            * platform/graphics/DisplayRefreshMonitorManager.cpp:
            (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
            (WebCore::DisplayRefreshMonitorManager::unregisterClient):
            (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
            * platform/graphics/DisplayRefreshMonitorManager.h:
            Use a Vector of RefPtr<DisplayRefreshMonitor> instead of a HashMap
            from uint64_t to RefPtr<DisplayRefreshMonitor>. There's usually only one
            display, so there's usually only one DisplayRefreshMonitor. Linear search
            on the Vector will be faster than the hash lookup in all conceivable cases.
            This also avoids the situation mentioned in the comments in DisplayRefreshMonitorManager.h
            where we don't know enough about PlatformDisplayID to safely hash it.

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

        Merge patch for rdar://problem/20128911.

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

        Merge r181351.

    2015-03-10  Enrica Casucci  <enrica@apple.com>

            Add support for more emoji with variation.
            https://bugs.webkit.org/show_bug.cgi?id=142548
            rdar://problem/20105008

            Reviewed by Tim Horton.

            Update ICU rules to support new emoji with variation.

            Test: editing/selection/extend-by-character-007.html

            * platform/text/TextBreakIterator.cpp:
            (WebCore::cursorMovementIterator):

2015-03-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r181123.

    2015-03-05  Dean Jackson  <dino@apple.com>

            [iOS Media] Web video on iPad appears black and missing the AirPlay placard when connected to an AirPlay route
            https://bugs.webkit.org/show_bug.cgi?id=142373
            <rdar://problem/19866072>

            Reviewed by Brent Fulgham.

            There was no style for the placard, which meant it had
            zero height (and thus was invisible).

            * Modules/mediacontrols/mediaControlsiOS.css:
            (audio::-webkit-media-controls-wireless-playback-status): Added.
            (audio::-webkit-media-controls-wireless-playback-status.hidden):

2015-03-06  Lucas Forschler  <lforschler@apple.com>

        Merge r180337

    2015-02-18  Andreas Kling  <akling@apple.com>

            REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
            <https://webkit.org/b/141788>

            Reviewed by Anders Carlsson.

            Once again we've fallen into the TemporaryChange trap:

                TemporaryChange<unsigned>(m_member, temporaryValue);

            The code above doesn't actually do anything. Since the TemporaryChange local is not named,
            it immediately goes out of scope and restores the original value of m_member.

            Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
            to catch bugs like this. Whatever we do will be done separately from this bug.

            Test: fast/history/page-cache-clearing.html

            * history/PageCache.cpp:
            (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.

            * testing/Internals.cpp:
            (WebCore::Internals::clearPageCache):
            (WebCore::Internals::pageCacheSize):
            * testing/Internals.h:
            * testing/Internals.idl: Add a way to clear the page cache and query its size from
            window.internals to facilitate writing a simple test for this bug.

2015-03-05  Dean Jackson  <dino@apple.com>

        Merge r180906. <rdar://problem/20058845>

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

            [iOS Media] Airplay button should be blue when active
            https://bugs.webkit.org/show_bug.cgi?id=142193

            Reviewed by Brent Fulgham.

            Add a blue form of the Airplay button that is used
            when we are actively displaying on another screen.

            * Modules/mediacontrols/mediaControlsiOS.css:
            (video::-webkit-media-controls-wireless-playback-picker-button):
            (video::-webkit-media-controls-wireless-playback-picker-button:active):
            (video::-webkit-media-controls-wireless-playback-picker-button.playing):
            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.updateWirelessPlaybackStatus):

2015-03-05  Dean Jackson  <dino@apple.com>

        Merge r181085. <rdar://problem/20058743>

    2015-03-04  Dean Jackson  <dino@apple.com>

            [iOS Media] Small inline controls can clip the time widgets
            https://bugs.webkit.org/show_bug.cgi?id=142319

            Reviewed by Eric Carlson.

            Start counting the number of digits in a duration so that
            we can assign classes to the time widgets that specify
            a minimum width.

            * Modules/mediacontrols/mediaControlsApple.css: Replace the hour-long and ten-hour-long
            classes with number of digits.
            (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
            (audio::-webkit-media-controls-current-time-display.five-digit-time):
            (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
            (audio::-webkit-media-controls-current-time-display.six-digit-time):
            (audio::-webkit-media-controls-time-remaining-display.hour-long-time): Deleted.
            (audio::-webkit-media-controls-current-time-display.hour-long-time): Deleted.
            (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time): Deleted.
            (audio::-webkit-media-controls-current-time-display.ten-hour-long-time): Deleted.

            * Modules/mediacontrols/mediaControlsApple.js: Add some new class names.
            (Controller.prototype.updateDuration): Set the class of the time
            widgets when we know how long the media runs.

            * Modules/mediacontrols/mediaControlsiOS.css: Values for iOS that
            are big enough to avoid clipping.
            (video::-webkit-media-controls-current-time-display):
            (video::-webkit-media-controls-time-remaining-display):
            (video::-webkit-media-controls-current-time-display.three-digit-time):
            (video::-webkit-media-controls-time-remaining-display.three-digit-time):
            (video::-webkit-media-controls-current-time-display.four-digit-time):
            (video::-webkit-media-controls-time-remaining-display.four-digit-time):
            (video::-webkit-media-controls-current-time-display.five-digit-time):
            (video::-webkit-media-controls-time-remaining-display.five-digit-time):
            (video::-webkit-media-controls-current-time-display.six-digit-time):
            (video::-webkit-media-controls-time-remaining-display.six-digit-time):
            (audio::-webkit-media-controls-timeline-container): Deleted.
            (video::-webkit-media-text-track-container): Deleted.

2015-03-04  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r180910. rdar://problem/19395137

    2015-03-02  Jeremy Jones  <jeremyj@apple.com>

            RenderVideo should not paint the video frame when video is fullscreen.
            https://bugs.webkit.org/show_bug.cgi?id=142097

            Reviewed by Eric Carlson.

            For performance and correctness, RenderVideo should not paint the current video frame
            inline when video is fullscreen. This happens when snapshots are taken and can have a
            negative performance impact.

            * rendering/RenderVideo.cpp:
            (WebCore::RenderVideo::paintReplaced):

2015-02-26  Babak Shafiei  <bshafiei@apple.com>

        Merge r173806.

    2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>

            [CSS Regions] Assertion failure and null dereference crash when using animations and regions
            https://bugs.webkit.org/show_bug.cgi?id=136918

            Reviewed by Andrei Bucur.

            In some situations, for instance when an image has an attached animation, the style change caused by the animation
            triggers a geometry update for the backing store associated with the image's layer. This may occur before
            the layout for the image has finished.

            Moreover, if the image in such situation - having a composited layer - is displayed in a region,
            sicne the layout did not finish yet, the mappings between the layers of the elements collected in the named flow
            and the regions associated with the named flow are not updated and cannot be used.

            Therefore in those situations, we have to bail out early and use these mappings only after the layout has finished.

            This patch also changes RenderLayerBacking method updateAfterDescendents -> updateAfterDescendants.

            Test: fast/regions/animated-image-in-region.html

            * rendering/RenderFlowThread.cpp:
            (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::calculateClipRects):
            * rendering/RenderLayerBacking.cpp:
            (WebCore::RenderLayerBacking::updateAfterDescendants):
            * rendering/RenderLayerBacking.h:
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
            (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
            (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):

2015-02-26  Babak Shafiei  <bshafiei@apple.com>

        Merge patch for r180129, r180133.

    2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>

            Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
            https://bugs.webkit.org/show_bug.cgi?id=141550.

            Reviewed by Darin Adler.

            Tests: LayoutTests/svg/dom/SVGTransformList-basics.xhtml: This test is modified to
            include a new test case.

            * svg/properties/SVGMatrixTearOff.h: m_value of SVGMatrixTearOff will be a null
            pointer. There is no point in having SVGMatrixTearOff points to the parent and
            the property of the parent at the same time.
        
            (WebCore::SVGMatrixTearOff::create): SVGMatrixTearOff will hold a pointer to
            the parent SVGPropertyTearOff<SVGTransform>. But it should overrides setValue()
            and propertyReference() so it can set and get the SVGMatrix from the SVGTransform
            parent.
        
            (WebCore::SVGMatrixTearOff::SVGMatrixTearOff): Pass a nullptr to the base class.
            SVGMatrixTearOff will act as a proxy of the parent. It does not hold any data by
            itself but it knows what property to set and get from the parent.
        
            * svg/properties/SVGPropertyTearOff.h:
            (WebCore::SVGPropertyTearOff::create): Add a create method which can take a pointer value.
        
            (WebCore::SVGPropertyTearOff::propertyReference):
            (WebCore::SVGPropertyTearOff::setValue): Make these functions virtual so concrete classes
            like SVGMatrixTearOff can override them.
        
            (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): Add a new constructor.

2015-02-26  Babak Shafiei  <bshafiei@apple.com>

        Merged r180087.

    2015-02-12  Enrica Casucci  <enrica@apple.com>

            Additional emoji group support.
            https://bugs.webkit.org/show_bug.cgi?id=141539
            rdar://problem/19727527

            Reviewed by Sam Weinig.

            Adding some new emoji ligatures.
            Updated existing test to include the new sequences.

            * platform/text/TextBreakIterator.cpp:
            (WebCore::cursorMovementIterator):
            * rendering/RenderText.cpp:
            (WebCore::isEmojiGroupCandidate):

2015-02-26  Lucas Forschler  <lforschler@apple.com>

        Merge r180174

    2015-02-16  Zalan Bujtas  <zalan@apple.com>

            RenderTableCell can't access its parent while in detached state.
            https://bugs.webkit.org/show_bug.cgi?id=141639
            rdar://problem/19850760

            Reviewed by Simon Fraser.

            Null check against ancestor chain so that certain methods in RenderTableCell can
            be called even if the renderer is not yet attached.

            Test: fast/table/table-cell-crash-when-detached-state.html

            * rendering/RenderTableCell.cpp:
            (WebCore::RenderTableCell::borderLeft):
            (WebCore::RenderTableCell::borderRight):
            (WebCore::RenderTableCell::borderTop):
            (WebCore::RenderTableCell::borderBottom):
            (WebCore::RenderTableCell::borderStart):
            (WebCore::RenderTableCell::borderEnd):
            (WebCore::RenderTableCell::borderBefore):
            (WebCore::RenderTableCell::borderAfter):
            * rendering/RenderTableCell.h:

2015-02-26  Lucas Forschler  <lforschler@apple.com>

        Merge r179480

    2015-02-02  Jeremy Jones  <jeremyj@apple.com>

            Prevent crash when accessing WebAVPlayerController.delegate.
            https://bugs.webkit.org/show_bug.cgi?id=140893

            Reviewed by Darin Adler.

            This patch aims to prevent a null delegate access during invalidation by adding null checks before accessing the delegate, by making explicit the recreation of m_playerController, and by consolidating and correcting the teardown sequence.

            * WebCore.exp.in:
            * platform/ios/WebVideoFullscreenInterface.h: add resetMediaState()
            * platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto.
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Check for null before accessing delegate.
            (-[WebAVPlayerController play:]): ditto.
            (-[WebAVPlayerController pause:]): ditto.
            (-[WebAVPlayerController togglePlayback:]): ditto.
            (-[WebAVPlayerController setPlaying:]): ditto.
            (-[WebAVPlayerController beginScrubbing:]): ditto.
            (-[WebAVPlayerController endScrubbing:]): ditto.
            (-[WebAVPlayerController seekToTime:]): ditto.
            (-[WebAVPlayerController beginScanningForward:]): ditto.
            (-[WebAVPlayerController endScanningForward:]): ditto.
            (-[WebAVPlayerController beginScanningBackward:]): ditto.
            (-[WebAVPlayerController endScanningBackward:]): ditto.
            (-[WebAVPlayerController seekToBeginning:]): ditto.
            (-[WebAVPlayerController seekToEnd:]): ditto.
            (-[WebAVPlayerController setCurrentAudioMediaSelectionOption:]): ditto.
            (-[WebAVPlayerController setCurrentLegibleMediaSelectionOption:]): ditto.
            (-[WebAVPlayerController layoutSublayersOfLayer:]): ditto.
            (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): initialize m_playerController
            (WebVideoFullscreenInterfaceAVKit::resetMediaState): Added.
            (WebVideoFullscreenInterfaceAVKit::setDuration): remove playerController()
            (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto.
            (WebVideoFullscreenInterfaceAVKit::setRate): ditto.
            (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto.
            (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto.
            (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): ditto.
            (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto.
            (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto.
            (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto.
            (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): ditto.
            (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): ditto.
            (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): consolidated cleanup code from invalidate()
            (WebVideoFullscreenInterfaceAVKit::invalidate): consolidate cleanup code.
            (WebVideoFullscreenInterfaceAVKit::playerController): Deleted.
            * platform/ios/WebVideoFullscreenModelVideoElement.mm:
            (WebVideoFullscreenModelVideoElement::setVideoElement): call resetMediaState()

2015-02-25  Babak Shafiei  <bshafiei@apple.com>

        Merge r180274.

    2015-02-18  Eric Carlson  <eric.carlson@apple.com>

            [iOS] pause video when a tab moves to the background on some devices
            https://bugs.webkit.org/show_bug.cgi?id=141753
            <rdar://problem/19814562>

            Reviewed by Jer Noble.

            Test: media/video-background-tab-playback.html

            * platform/audio/MediaSession.cpp:
            (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
                hidden if the BackgroundTabPlaybackRestricted is set.

            * platform/audio/MediaSessionManager.cpp:
            (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
                 to BackgroundProcessPlaybackRestricted.
            (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
            * platform/audio/MediaSessionManager.h:

            * platform/audio/ios/MediaSessionManagerIOS.mm:
            (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
                devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.

            * testing/Internals.cpp:
            (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
                BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.

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

        Merged r180588.

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

            [ios Media] the inline controls are visible after pressing Done on iPhone
            https://bugs.webkit.org/show_bug.cgi?id=141987
            <rdar://problem/19944110>

            Reviewed by Beth Dakin.

            When exiting out of a playing video, we should show the
            start playback button if we don't allow inline media
            (such as on iPhone).

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
            allowsInline as well.

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

        Merge r180583.

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

            [iOS Media] Be specific about which document to use for the timeline background canvas
            https://bugs.webkit.org/show_bug.cgi?id=141981

            Reviewed by Eric Carlson.

            In some cases, especially with nested iframes, the document
            reference for the shadow DOM might not be the one used
            to create a -webkit-canvas context for rendering via CSS.
            Explicitly get the context from the video's owner
            document.

            There is still a bug here:
            https://bugs.webkit.org/show_bug.cgi?id=141983

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.drawTimelineBackground):

2015-02-23  Babak Shafiei  <bshafiei@apple.com>

        Follow-up merge for r179877.

2015-02-22  David Kilzer  <ddkilzer@apple.com>

        Merge r180183, r180187.

    2015-02-16  Jer Noble  <jer.noble@apple.com>

        [iOS] Build fix: declare undeclared identifier 'credential'.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential):

    2015-02-16  Jer Noble  <jer.noble@apple.com>

        [iOS] Unable to play .mp4 file over http with basic http authentication
        https://bugs.webkit.org/show_bug.cgi?id=141503
        rdar://problem/15799844

        Reviewed by Alexey Proskuryakov.

        On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
        provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
        object by way of CFURLAuthChallengeRef.

        Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
        is to take AuthenticationChallengeClient callbacks and pass them along to a
        NSURLAuthenticationChallenge sender.

        Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
        that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
        them into that same header.

        * WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
            Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
            to the HTMLMediaElement.
        * platform/network/mac/AuthenticationMac.mm:
        * platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.

2015-02-20  Lucas Forschler  <lforschler@apple.com>

        Merge r180278

    2015-02-18  Myles C. Maxfield  <mmaxfield@apple.com>

            Justified ruby can cause lines to grow beyond their container
            https://bugs.webkit.org/show_bug.cgi?id=141732

            Reviewed by David Hyatt.

            After we re-layout RenderRubyRuns, this can change the environment upon which
            ruby's overhang calculation is sensitive to. Before this patch, we would recalculate
            the overhang after the RenderRubyRun gets relaid out. However, doing such causes the
            effective width of the RenderRubyRun to change, which causes out subsequent
            justification calculations to be off.

            Therefore, we have a cycle; the amount of ruby overhang can change the justification
            in a line, and the layout of the line affects the ruby overhang calculation. Instead
            of performing a layout in a loop until it converges, this patch simply observes that
            having a flush right edge is more valuable than having a perfectly correct overhang.
            It therefore simply removes the secondary overhang calculation.

            Test: fast/text/ruby-justification-flush.html

            * rendering/RenderBlockFlow.h:
            * rendering/RenderBlockLineLayout.cpp:
            (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
            (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
            (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):

2015-02-20  Lucas Forschler  <lforschler@apple.com>

        Merge r180150

    2015-02-12  David Hyatt  <hyatt@apple.com>

            text-underline-position:under has multiple correctness issues
            https://bugs.webkit.org/show_bug.cgi?id=141528

            Reviewed by Dean Jackson.

            Added a bunch of new tests in fast/text

            * rendering/InlineFlowBox.cpp:
            (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
            (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
            (WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
            * rendering/InlineFlowBox.h:
            These functions have been re-written to take an enclosing renderer that specified the
            decoration. This way they can properly limit the bottom/top computation to only line boxes
            that are contained inside the renderer.

            * rendering/InlineTextBox.cpp:
            (WebCore::InlineTextBox::paintDecoration):
            Tweak the call to get the decoration colors now that quirks mode has been removed.

            * rendering/RenderElement.cpp:
            (WebCore::RenderElement::enclosingRendererWithTextDecoration):
            * rendering/RenderElement.h:
            New function that finds the enclosing renderer that specified a text decoration. For now
            this is only used in the "under" position computation, but soon we'll be using it
            everywhere.

            * rendering/RenderObject.cpp:
            (WebCore::RenderObject::getTextDecorationColors):
            * rendering/RenderObject.h:
            Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

            * rendering/RootInlineBox.cpp:
            (WebCore::RootInlineBox::maxLogicalBottom): Deleted.
            * rendering/RootInlineBox.h:
            Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
            the InlineFlowBox functions directly.

            * style/InlineTextBoxStyle.cpp:
            (WebCore::computeUnderlineOffset):
            Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
            computation to limit which line boxes get included.

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

        <rdar://problem/19450275> Media player updates.

        Merge r179808, r180013, r180024, r180231, r180347.

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r180364.

    2015-02-19  David Hyatt  <hyatt@apple.com>

            Columns are splitting unsplittable content.
            https://bugs.webkit.org/show_bug.cgi?id=141807
            <rdar://problem/18387659>

            Reviewed by Dean Jackson.

            Added inline-table-dynamic-movement.html

            * rendering/RenderBlockFlow.cpp:
            (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
            (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
            Patch these functions to always check the layout state for a zero
            pageLogicalHeight, since that is actually our indicator that we're
            doing column balancing and don't have a height set yet.

            * rendering/RenderMultiColumnFlowThread.cpp:
            (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
            * rendering/RenderMultiColumnSet.cpp:
            (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
            (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
            (WebCore::RenderMultiColumnSet::prepareForLayout):
            * rendering/RenderMultiColumnSet.h:
            The function for deciding whether the logical height of the columns was
            known was checking for a zero computedColumnHeight. However, a column set
            can legitimately compute a zero column height, and with the fix to examine
            the layout state, this bug was exposed.

            The fix is to add a new variable that caches whether or not the column height
            has been computed, so that even if it computes to zero, we aren't fooled.

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r180147

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

            FEGaussianBlur::calculateUnscaledKernelSize does unspeakable things with signed and unsigned values
            https://bugs.webkit.org/show_bug.cgi?id=141596
            <rdar://problem/19837103>

            Reviewed by Zalan Bujtas.

            No new tests. Covered by css3/filters/huge-blur-value.html

            Avoid overflowing the signed integer values by not converting from unsigned
            until the maximum size has been clamped to the expected max.

            * platform/graphics/filters/FEGaussianBlur.cpp:
            (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r180191.

    2015-02-16  Enrica Casucci  <enrica@apple.com>

            Emoji sequences do not render properly.
            https://bugs.webkit.org/show_bug.cgi?id=141661
            rdar://problem/19820463

            Reviewed by Sam Weinig.

            Emoji sequences and emoji with variations should be rendered
            using the Complex code path and should be treated as graphemes.
            This change modifies advanceByCombiningCharacterSequence to add
            this logic.

            Test: fast/text/emoji.html

            * WebCore.xcodeproj/project.pbxproj:
            * platform/graphics/FontCascade.cpp:
            (WebCore::FontCascade::characterRangeCodePath):
            * platform/graphics/mac/ComplexTextController.cpp:
            (WebCore::advanceByCombiningCharacterSequence): Implements a simple
            logic to treat emoji sequences and emoji with variations as graphemes.
            * platform/text/CharacterProperties.h: Added.
            (WebCore::isEmojiGroupCandidate):
            (WebCore::isEmojiModifier):
            (WebCore::isVariationSelector):
            * rendering/RenderText.cpp:
            (WebCore::isEmojiGroupCandidate): Deleted.
            (WebCore::isEmojiModifier): Deleted.

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r180155.

    2015-02-16  David Hyatt  <hyatt@apple.com>

            Add ifdefs to avoid adjusting Ruby selection rects to avoid overlap on iOS.
            https://bugs.webkit.org/show_bug.cgi?id=141651
            <rdar://problem/19182526>

            Reviewed by Simon Fraser.

            * rendering/RootInlineBox.cpp:
            (WebCore::RootInlineBox::selectionTop):
            (WebCore::RootInlineBox::selectionBottom):

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r180128.

    2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>

            Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
            https://bugs.webkit.org/show_bug.cgi?id=141552.

            Reviewed by Darin Adler.

            Tests: LayoutTests/svg/dom/SVGLengthList-basics.xhtml: This test is modified to
            include a new test case.

            * svg/properties/SVGListPropertyTearOff.h: Commit the removal of the replacing item
            before trying to detach the wrapper of the item which going to be replaced.

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r180063.

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

            Crashes under RenderLayer::hitTestLayer under determinePrimarySnapshottedPlugIn()
            https://bugs.webkit.org/show_bug.cgi?id=141551

            Reviewed by Zalan Bujtas.

            It's possible for a layout to dirty the parent frame's state, via the calls to
            ownerElement()->scheduleSetNeedsStyleRecalc() that RenderLayerCompositor does when
            iframes toggle their compositing mode.

            That could cause FrameView::updateLayoutAndStyleIfNeededRecursive() to fail to 
            leave all the frames in a clean state. Later on, we could enter hit testing,
            which calls document().updateLayout() on each frame's document. Document::updateLayout()
            does layout on all ancestor documents, so in the middle of hit testing, we could
            layout a subframe (dirtying an ancestor frame), then layout another frame, which
            would forcing that ancestor to be laid out while we're hit testing it, thus
            corrupting the RenderLayer tree while it's being iterated over.

            Fix by having FrameView::updateLayoutAndStyleIfNeededRecursive() do a second
            layout after laying out subframes, which most of the time will be a no-op.

            Also add a stronger assertion, that this frame and all subframes are clean
            at the end of FrameView::updateLayoutAndStyleIfNeededRecursive() for the
            main frame.

            Various existing frames tests hit the new assertion if the code change is removed,
            so this is covered by existing tests.

            * page/FrameView.cpp:
            (WebCore::FrameView::needsStyleRecalcOrLayout):
            (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
            * page/FrameView.h:
            * rendering/RenderWidget.cpp:
            (WebCore::RenderWidget::willBeDestroyed):

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r180062.

    2015-02-12  Simon Fraser  <simon.fraser@apple.com>

            determinePrimarySnapshottedPlugIn() should only traverse visible Frames
            https://bugs.webkit.org/show_bug.cgi?id=141547
            Part of rdar://problem/18445733.

            Reviewed by Anders Carlsson.

            There's an expectation from clients that FrameView::updateLayoutAndStyleIfNeededRecursive()
            updates layout in all frames, but it uses the widget tree, so only hits frames
            that are parented via renderers (i.e. not display:none frames or their descendants).

            Moving towards a future where we remove Widgets, fix by adding a FrameTree 
            traversal function that only finds rendered frames (those with an ownerRenderer).

            Not testable.

            * page/FrameTree.cpp:
            (WebCore::FrameTree::firstRenderedChild):
            (WebCore::FrameTree::nextRenderedSibling):
            (WebCore::FrameTree::traverseNextRendered):
            (printFrames):
            * page/FrameTree.h:
            * page/FrameView.cpp:
            (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r179877.

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

            REGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThread::checkLinesConsistency
            https://bugs.webkit.org/show_bug.cgi?id=133462

            Reviewed by David Hyatt.

            RenderFlowThread::m_lineToRegionMap stores pointers to the root inlineboxes in the block flow.
            Normally root inlineboxes remove themselves from this map in their dtors. However when collapsing an anonymous block,
            we detach the inline tree first and destroy them after. The detached root boxes can't access
            the flowthread containing block and we end up with dangling pointers in this map.
            Call removeFlowChildInfo() before detaching the subtree to ensure proper pointer removal.

            Test: fast/multicol/newmulticol/crash-when-switching-to-floating.html

            * rendering/RenderBlock.cpp:
            (WebCore::RenderBlock::collapseAnonymousBoxChild):

2015-02-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r179776.

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

            ASSERT repaintContainer->hasLayer() in WebCore::RenderObject::repaintUsingContainer
            https://bugs.webkit.org/show_bug.cgi?id=140750

            Reviewed by Simon Fraser.

            There's a short period of time when RenderObject::layer() still returns a valid pointer
            even though we already cleared the hasLayer() flag.
            Do not use the layer as repaint container in such cases.

            Test: compositing/repaint-container-assertion-when-toggling-compositing.html

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

2015-02-13  Lucas Forschler  <lforschler@apple.com>

        Merge r179768

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

            [iOS] Implement audio track selection in fullscreen.
            https://bugs.webkit.org/show_bug.cgi?id=131236
            <rdar://problem/16552632>

            Reviewed by Eric Carlson.

            * platform/ios/WebVideoFullscreenModelVideoElement.h:
            * platform/ios/WebVideoFullscreenModelVideoElement.mm:
            (WebVideoFullscreenModelVideoElement::selectAudioMediaOption): Provide implementation.
            (WebVideoFullscreenModelVideoElement::updateLegibleOptions): Add audio track information
            to menu displayed to user.

2015-02-13  Lucas Forschler  <lforschler@apple.com>

        Merge r174823

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

            [Mac] Represent AVMediaSelectionOptions as AudioTracks
            https://bugs.webkit.org/show_bug.cgi?id=137474

            Reviewed by Brent Fulgham.

            Test: http/tests/media/hls/hls-audio-tracks.html

            Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
            as entries in the video's AudioTrackList.

            AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
            are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
            wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
            time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
            selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
            inconsistent. Because setting the selected option multiple times in the same run-loop can
            cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
            the actual selection in the next run-loop.

            * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
            (WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
            (WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
            (WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
            (WebCore::MediaSelectionGroupAVFObjC::options):  Simple accessor.
            (WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
            * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
            (WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
            (WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
            (WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
            (WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
            (WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
            (WebCore::MediaSelectionGroupAVFObjC::create):
            (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
            (WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
            (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
            (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
            (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.

            Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
            MediaSelectionOptionAVFObjC objects.

            * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
            (WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
            * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
            (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):  Simple constructor.
            (WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
            (WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
            (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
            (WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.

            Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
            a MediaSelectionOptionAVFObjC.

            * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
            (WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
            * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
            (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
            (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
            (WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
            * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
            (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
            (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
            (WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
            * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:

            Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
            use the index of the track or option instead of it's self-declared ID for ordering for the
            trackIndex.

            * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
            (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
            * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
            (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):

            Rather than making allowing the AVPlayerItem to automatically select the "best"
            AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
            and thereafter allow the users manual selections "stick".

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):

            Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
                AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.

            Add new files to project.
            * WebCore.xcodeproj/project.pbxproj:

2015-02-13  Lucas Forschler  <lforschler@apple.com>

        Merge r174402

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

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

            Reviewed by Brent Fulgham.

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

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

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

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

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

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

2015-02-13  Lucas Forschler  <lforschler@apple.com>

        Merge r179933

    2015-02-10  Alexey Proskuryakov  <ap@apple.com>

            URL::setUser and URL::setPass don't percent encode
            https://bugs.webkit.org/show_bug.cgi?id=141453
            rdar://problem/14844503&16551802&19623145

            Reviewed by Darin Adler.

            Tests: fast/url/url-credentials-escaping.html
                   http/tests/xmlhttprequest/basic-auth-credentials-escaping.html

            Start adding some code that performs escaping in a way that matches the URL Standard.
            Right now, it's only used where we failed to do any escaping at all, and over time,
            we'll be moving towards a new implementation.

            * html/URLUtils.h:
            (WebCore::URLUtils<T>::username):
            (WebCore::URLUtils<T>::password):
            * platform/URL.cpp:
            (WebCore::isSchemeFirstChar):
            (WebCore::URL::user):
            (WebCore::URL::pass):
            (WebCore::URL::encodedUser):
            (WebCore::URL::encodedPass):
            (WebCore::URL::setUser):
            (WebCore::URL::setPass):
            (WebCore::encodeWithURLEscapeSequences):
            * platform/URL.h:

2015-02-13  Lucas Forschler  <lforschler@apple.com>

        Merge r179772

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

            Invalid cast in WebCore::SVGAnimateElement::calculateAnimatedValue.
            https://bugs.webkit.org/show_bug.cgi?id=135171.

            Reviewed by Dean Jackson.

            The bug happens when an SVG element is animated by <animateMotion> followed by an
            <animateColor> or an <animate> and the values of the "attributeName" in both elements
            are the same. The problem is <animateMotion> should not have an attribute to animate.
            If it does by fuzz or by mistake, then we assume the <animateMotion> and the <animate>
            animate the same attribute for the same element target. Therefore we schedule them in
            the same AnimationVector in SMILTimeContainer::schedule(). When we call
            SVGAnimateElementBase::calculateAnimatedValue() for an SVGAnimateColorElement and the
            resultElement is SVGAnimateMotionElement, we fail to cast it to SVGAnimateElementBase
            because SVGAnimateMotionElement is derived from SVGAnimationElement which is the base
            class of all animate elements including SVGAnimateElementBase.

            The fix is to nullify setting "attributeName" of an SVGAnimationElement. By doing so,
            "attributeName" and its value will be ignored from the <animateMotion> which is correct.

            Tests: svg/animations/animate-montion-invalid-attribute.svg.

            * svg/SVGAnimateElementBase.cpp:
            (WebCore::SVGAnimateElementBase::setAttributeName):
            Do not call SVGAnimationElement::setAttributeName() since SVGAnimationElement should
            not have an attribute to animate. We prevent this by bypassing the parent in the class 
            hierarchy: SVGAnimationElement and calling SVGSMILElement::setAttributeName() directly.

            * svg/SVGAnimationElement.cpp:
            (WebCore::SVGAnimationElement::setAttributeName): Deleted.
            * svg/SVGAnimationElement.h:
            SVGAnimationElement should not have an attribute to animate. So implement its
            setAttributeName() as a null function.

2015-02-13  Lucas Forschler  <lforschler@apple.com>

        Merge r180053

    2015-02-13  Andreas Kling  <akling@apple.com>

            [iOS] Refine GC behavior in response to process suspension and memory pressure.
            <https://webkit.org/b/141543>
            <rdar://problem/19738024>

            Reviewed by Geoffrey Garen.

            Do an immediate full garbage collection when the web process is about to
            be suspended (when another tab is moving to the foreground on iOS.)
            This ensures that we make a best effort to reduce the process footprint
            before we lose the ability to execute code.

            When receiving a memory pressure warning, tell the garbage collector to
            accelerate its next collection (by calling garbageCollectSoon().)
            This gives us some confidence that a collection will happen within a
            reasonable timeframe, but doesn't risk dooming us to a loop of endless
            garbage collections.

            * platform/cocoa/MemoryPressureHandlerCocoa.mm:
            (WebCore::MemoryPressureHandler::platformReleaseMemory):

2015-02-13  Lucas Forschler  <lforschler@apple.com>

        Merge r179737

    2015-02-05  Andreas Kling  <akling@apple.com>

            [iOS] Run a full garbage collection on memory warning.
            <https://webkit.org/b/141313>
            <rdar://problem/19738024>

            Reviewed by Chris Dumez.

            Make sure that we run a full GC when trying to free up memory, as this might
            be our last chance to execute before the kernel suspends this process.

            This aligns WebKit2 with the old WebKit1 behavior.

            * platform/cocoa/MemoryPressureHandlerCocoa.mm:
            (WebCore::MemoryPressureHandler::platformReleaseMemory):

2015-02-13  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179771. rdar://problem/19395131

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

            Convert the compositing overlap map to use LayoutRects
            https://bugs.webkit.org/show_bug.cgi?id=141346
            rdar://problem/18206365

            Reviewed by Zalan Bujtas.

            If two compositing layers were adjoining but not overlapping, but happened to
            have non-integral offsets, then using enclosing IntRects in the overlap map
            would cause us to think they are overlapping, and create unnecessary backing store.

            Fix by converting the overlap map to use LayoutRects.

            Test: compositing/layer-creation/subpixel-adjacent-layers-overlap.html

            * rendering/RenderLayerCompositor.cpp:
            (WebCore::OverlapMapContainer::add):
            (WebCore::OverlapMapContainer::overlapsLayers):
            (WebCore::RenderLayerCompositor::OverlapMap::add):
            (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
            (WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
            (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
            (WebCore::RenderLayerCompositor::logLayerInfo):
            (WebCore::RenderLayerCompositor::addToOverlapMap):
            (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
            (WebCore::RenderLayerCompositor::computeCompositingRequirements):
            * rendering/RenderLayerCompositor.h:

2015-02-12  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179883. rdar://problem/19790645

    2015-02-09  David Hyatt  <hyatt@apple.com>

            text-underline-position: under is broken
            https://bugs.webkit.org/show_bug.cgi?id=141400
            <rdar://problem/18569583>

            Reviewed by Simon Fraser.

            Added fast/text/text-underline-position-under.html

            * rendering/InlineFlowBox.cpp:
            (WebCore::InlineFlowBox::computeMaxLogicalBottom):
            (WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
            * rendering/InlineFlowBox.h:
            Switch to using the bottom to compute the offset. Using the top is incorrect, since
            the heights of boxes can vary.

            Fix a bug where the y() of the box was being used instead of the logical value, making the result
            wrong for vertical text.

            * rendering/RootInlineBox.cpp:
            (WebCore::RootInlineBox::maxLogicalBottom):
            (WebCore::RootInlineBox::maxLogicalTop): Deleted.
            Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
            since the old code just ignored the root's placement.

            * rendering/RootInlineBox.h:
            * style/InlineTextBoxStyle.cpp:
            (WebCore::computeUnderlineOffset):
            Call the bottom function now instead of the top.

2015-02-13  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179771. rdar://problem/19395131

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

            Convert the compositing overlap map to use LayoutRects
            https://bugs.webkit.org/show_bug.cgi?id=141346
            rdar://problem/18206365

            Reviewed by Zalan Bujtas.

            If two compositing layers were adjoining but not overlapping, but happened to
            have non-integral offsets, then using enclosing IntRects in the overlap map
            would cause us to think they are overlapping, and create unnecessary backing store.

            Fix by converting the overlap map to use LayoutRects.

            Test: compositing/layer-creation/subpixel-adjacent-layers-overlap.html

            * rendering/RenderLayerCompositor.cpp:
            (WebCore::OverlapMapContainer::add):
            (WebCore::OverlapMapContainer::overlapsLayers):
            (WebCore::RenderLayerCompositor::OverlapMap::add):
            (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
            (WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
            (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
            (WebCore::RenderLayerCompositor::logLayerInfo):
            (WebCore::RenderLayerCompositor::addToOverlapMap):
            (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
            (WebCore::RenderLayerCompositor::computeCompositingRequirements):
            * rendering/RenderLayerCompositor.h:

2015-02-13  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179750. rdar://problem/19719085

    2015-02-06  Maciej Stachowiak  <mjs@apple.com>

            REGRESSION(r179706): Caused memory corruption on some tests (Requested by _ap_ on #webkit).
            https://bugs.webkit.org/show_bug.cgi?id=141324

            Reviewed by Alexey Proskuryakov.

            No new tests. This is caught by existing tests under ASAN, and I don't know how to reproduce
            it without ASAN.

            * rendering/RenderLineBoxList.cpp:
            (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Give up
            and just always invalidate the next line. It's too hard to come up
            with the condition that catches all needed cases, doesn't itself
            cause a crash, and isn't overzealous. And we do this for the
            previous line anyway.  Also clean up the code a bit since it
            confusingly reuses a variable, and declares it uninitialized, for
            no good reason.

2015-02-13  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179706. rdar://problem/19719085

    2015-02-05  Maciej Stachowiak  <mjs@apple.com>

            Crash due to failing to dirty a removed text node's line box
            https://bugs.webkit.org/show_bug.cgi?id=136544

            Reviewed by David Hyatt.

            Test: fast/text/remove-text-node-linebox-not-dirty-crash.html

            * rendering/RenderLineBoxList.cpp:
            (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
            line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
            being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.

2015-02-13  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179691. rdar://problem/19719089

    2015-02-05  Zalan Bujtas  <zalan@apple.com>

            Do not destroy RenderQuote's text fragment child when quotation mark string is changing.
            https://bugs.webkit.org/show_bug.cgi?id=141271
            rdar://problem/18169375

            Reviewed by Antti Koivisto.

            Similar approach as https://codereview.chromium.org/679593004/

            This patch ensures that laying out a RenderQuote does not force a sibling RenderQuote's
            child renderer(RenderText) to be destroyed.
            BreakingContext holds a pointer to the next renderer on the line (BreakingContext::m_nextObject).
            While laying out the line, initiated by BreakingContext, placing the current renderer could end up destroying the "next" renderer.
            This happens when the pseudo after quotation mark(RenderQuote) becomes floated, the sibling <q>'s pseudo
            before text needs to be changed (from " to ') so that we don't end up with 2 sets of the same opening
            strings.
            The fix is to reuse the RenderTextFragment object instead of destroy/recreate it.

            Test: fast/css/content/quote-crash-when-floating.html

            * rendering/RenderQuote.cpp:
            (WebCore::RenderQuote::RenderQuote):
            (WebCore::fragmentChild):
            (WebCore::RenderQuote::updateText):
            * rendering/RenderQuote.h:
            * rendering/RenderTextFragment.cpp:
            (WebCore::RenderTextFragment::setText):
            (WebCore::RenderTextFragment::setContentString):
            * rendering/RenderTextFragment.h:

2015-02-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r179843.

    2015-02-09  Jer Noble  <jer.noble@apple.com>

            [Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
            https://bugs.webkit.org/show_bug.cgi?id=141399

            Reviewed by Eric Carlson.

            Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
            the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
            the requested value even if time is not progressing.

            We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
            be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
            very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
            estimation, means we should probably turn it off for iOS and Yosemite.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.

2015-02-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r178571.

    2015-01-15  Ryosuke Niwa  <rniwa@webkit.org>

            Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
            https://bugs.webkit.org/show_bug.cgi?id=140523
            <rdar://problem/19464329>

            Reviewed by Chris Dumez.

            The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
            unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.

            Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
            we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".

            See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.

            * html/HTMLElement.cpp:
            (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):

2015-02-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r178490.

    2015-01-14  Simon Fraser  <simon.fraser@apple.com>

            Graphics corruption after Find on some pages
            https://bugs.webkit.org/show_bug.cgi?id=140489

            Reviewed by Zalan Bujtas.

            After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
            garbage could appear on some parts of the page. This is caused by creating
            a compositing layer which is marked as opaque, yet failing to paint the entire
            layer contents.

            This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
            logic. On the page in question, doing a Find could cause overflow:hidden sections
            to get scrolled (since Find can reveal the selection by scrolling overflow).
            However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
            fails to take overflow scrolling into account, so gives the wrong answer
            in some content configurations. As a result, we'd think that the background
            is obscured, and never paint it.

            Conservative fix is to have isCandidateForOpaquenessTest() return false
            when the content has any non-zero scroll offset.

            Tests: compositing/contents-opaque/opaque-with-scrolled.html
                   fast/backgrounds/opaque-scrolled-paint-background.html

            * rendering/RenderBox.cpp:
            (WebCore::isCandidateForOpaquenessTest):

2015-02-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r178426.

    2015-01-14  Jer Noble  <jer.noble@apple.com>

            Null-deref crash when seeking immediately before looping.
            https://bugs.webkit.org/show_bug.cgi?id=140394

            Reviewed by Eric Carlson.

            It is possible for finishSeek() to be called when a seek() has caused a pending seek task
            to be scheduled, but before that pending seek task is run. In this case, if a seek request
            is issued, the existing pending seek task will not be cancelled, which will cause a crash
            when the pending seek task is run.

            When checking whether an existing seek task needs to be cancelled, check the actual timer,
            rather than the m_seeking boolean, so that this case is covered.

            Test: media/video-ended-seek-crash.html

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::seekWithTolerance):

2015-02-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r176240.

    2014-11-17  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
            https://bugs.webkit.org/show_bug.cgi?id=138815
            rdar://problem/18746203

            Reviewed by Tim Horton.

            The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews,
            so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage.

            We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same
            between WK1 and WK2 for now.

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

2015-02-05  Lucas Forschler  <lforschler@apple.com>

        Merge r179567

    2015-02-02  Enrica Casucci  <enrica@apple.com>

            Additional emoji support.
            https://bugs.webkit.org/show_bug.cgi?id=141047
            rdar://problem/19045135

            Reviewed by Darin Adler.

            Adds support for emoji modifiers and group emoji.

            Test: editing/deleting/delete-emoji.html

            * platform/graphics/FontCascade.cpp:
            (WebCore::FontCascade::characterRangeCodePath):
            * platform/text/TextBreakIterator.cpp:
            (WebCore::cursorMovementIterator):
            * rendering/RenderText.cpp:
            (WebCore::isEmojiGroupCandidate):
            (WebCore::isEmojiModifier):
            (WebCore::RenderText::previousOffsetForBackwardDeletion):

2015-02-05  David Kilzer  <ddkilzer@apple.com>

        Merge r176473.

        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseFor): Change from
        r176473 not listed in that ChangeLog.
        (WebCore::SimpleLineLayout::createLineRuns): Call
        nextBreakablePositionNonLoosely() in place of
        nextBreakablePosition().

    2014-11-21  Glenn Adams  <glenn@skynav.com> and Myles C. Maxfield  <mmaxfield@apple.com>

        Add support to -webkit-line-break property for CSS3 Text line-break property values and semantics.
        https://bugs.webkit.org/show_bug.cgi?id=89235

        Reviewed by Eric Seidel and Dave Hyatt.

        This patch adds semantic support for the CSS3 line-break property (qua -webkit-line-break),
        and enables testing on (apple) mac ports. Follow on patches will enable these tests on
        other ports as they are incrementally verified.

        See also wiki documentation at:
        [1] http://trac.webkit.org/wiki/LineBreaking
        [2] http://trac.webkit.org/wiki/LineBreakingCSS3Mapping

        Tests: css3/line-break/line-break-auto-centered.html
               css3/line-break/line-break-auto-half-kana.html
               css3/line-break/line-break-auto-hyphens.html
               css3/line-break/line-break-auto-inseparables.html
               css3/line-break/line-break-auto-iteration-marks.html
               css3/line-break/line-break-auto-postfixes.html
               css3/line-break/line-break-auto-prefixes.html
               css3/line-break/line-break-auto-sound-marks.html
               css3/line-break/line-break-loose-centered.html
               css3/line-break/line-break-loose-half-kana.html
               css3/line-break/line-break-loose-hyphens.html
               css3/line-break/line-break-loose-inseparables.html
               css3/line-break/line-break-loose-iteration-marks.html
               css3/line-break/line-break-loose-postfixes.html
               css3/line-break/line-break-loose-prefixes.html
               css3/line-break/line-break-loose-sound-marks.html
               css3/line-break/line-break-normal-centered.html
               css3/line-break/line-break-normal-half-kana.html
               css3/line-break/line-break-normal-hyphens.html
               css3/line-break/line-break-normal-inseparables.html
               css3/line-break/line-break-normal-iteration-marks.html
               css3/line-break/line-break-normal-postfixes.html
               css3/line-break/line-break-normal-prefixes.html
               css3/line-break/line-break-normal-sound-marks.html
               css3/line-break/line-break-strict-centered.html
               css3/line-break/line-break-strict-half-kana.html
               css3/line-break/line-break-strict-hyphens.html
               css3/line-break/line-break-strict-inseparables.html
               css3/line-break/line-break-strict-iteration-marks.html
               css3/line-break/line-break-strict-postfixes.html
               css3/line-break/line-break-strict-prefixes.html
               css3/line-break/line-break-strict-sound-marks.html

        These tests were previously added in http://trac.webkit.org/changeset/143378, but skipped
        in generic TestExpectations. In this patch, they are marked as Pass for the (apple) mac ports.

        * platform/text/LineBreakIteratorPoolICU.h:
        (WebCore::LineBreakIteratorPool::makeLocaleWithBreakKeyword):
        Add static function to construct ICU locale argument (also used as pool key) with additional
        break keyword.
        (LineBreakIteratorPool):
        (WebCore::LineBreakIteratorPool::take):
        (WebCore::LineBreakIteratorPool::put):
        Remove direct dependency from ICU library (and types), moving that dependency into
        new {open,close}LineBreakIterator() functions (defined in TextBreakIteratorICU.cpp).
        Update to take line break mode into account.
        Create (and cache) different break iterators depending on line break mode (in addition to locale),
        which entails expanding pool entry key format to optionally append "@break=" +
        "loose"|"normal"|"strict" keyword to locale string.

        * platform/text/TextBreakIterator.h:
        (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
        (WebCore::LazyLineBreakIterator::isLooseCJKMode):
        (WebCore::LazyLineBreakIterator::get):
        (WebCore::LazyLineBreakIterator::reset):
        (LazyLineBreakIterator):
        Define LineBreakIteratorMode enumeration for use in TextBreakIterator et al.
        Add state member to indicate line break mode.

        * platform/text/TextBreakIteratorICU.cpp:
        (WebCore::acquireLineBreakIterator):
        Use new line break mode when making iterator from pool.
        Handle change of return type of LineBreakIteratorPool::take() to non-ICU type,
        i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
        (WebCore::releaseLineBreakIterator):
        Handle change of parameter type of LineBreakIteratorPool::put() to non-ICU type,
        i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
        (WebCore):
        (WebCore::isCJKLocale):
        New functions for determining if CJK rules apply.
        (WebCore::openLineBreakIterator):
        New function for abstracting opening of ICU style line break iterator. This is now
        used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
        This function also takes into account the line break mode.

        Note that this function only calls ubrk_openRules() when the author has opted-in via
        using the -webkit-line-break CSS property. Eventually, we would like to be able to
        customize the rules that ICU's line breaking algorithm uses (especially for CJK text);
        however, ubrk_openRules() currently parses its input string to create a DFA and is
        therefore very slow. In fact, it's so slow that increasing our cache size in
        LineBreakIteratorPool doesn't actually help enough. Also note that the default value
        for the line-break CSS property is 'auto'.
        (WebCore::closeLineBreakIterator):
        (WebCore::mapLineIteratorModeToRules):
        New function for abstracting closing of ICU style line break iterator. This is now
        used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.

        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
        Pass line break iterator mode flag when reseting LazyLineBreakIterator.
        Add looseMode local variable to prevent need for computing under isBreakable().

        * rendering/RenderText.cpp:
        (WebCore::mapLineBreakToIteratorMode):
        Add implementation for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
        and RenderBlock::LineBreaker::nextLineBreak.
        (WebCore):
        (WebCore::RenderText::computePreferredLogicalWidths):
        Ensure (lazy line) breakIterator is initialized for line break mode.
        Ensure isBreakable() is passed loose mode flag to match behavior in RenderBlock::LineBreaker::nextLineBreak.

        * rendering/RenderText.h:
        (WebCore):
        Add declaration for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
        and RenderBlock::LineBreaker::nextLineBreak.

        * rendering/break_lines.cpp:
        (WebCore):
        Introduce (local) enum NBSPBehavior for expanding template on nextBreakablePosition.
        (WebCore::isBreakableSpace):
        Add externally specified loose mode parameter to prevent need to invoke line break iterator
        accessor method on each invocation. Use new loose mode flavors off NBP functions.
        (WebCore::needsLineBreakIterator):
        Use enum NBSP behavior template parameter rather than boolean.
        (WebCore::nextBreakablePositionNonLoosely):
        Extend name to distinguish from loose flavor of this function.
        (WebCore::nextBreakablePositionLoosely):
        Add loose flavor of NBP invoked only when loose mode applies, in which case ASCII shortcut
        table cannot be used.
        (WebCore::nextBreakablePosition):
        (WebCore::nextBreakablePositionIgnoringNBSP):
        Use (renamed) non-loose flavor of NBP.
        (WebCore::nextBreakablePositionLoose):
        (WebCore::nextBreakablePositionIgnoringNBSPLoose):
        Introduce loose flavor of NBP template expansions.

        * rendering/break_lines.h:
        (WebCore):
        (WebCore::isBreakable):
        Add externally specified loose mode parameter to prevent need to invoke line break iterator
        accessor method on each invocation.

2015-02-05  Lucas Forschler  <lforschler@apple.com>

    Rollout r179711

2015-02-05  Lucas Forschler  <lforschler@apple.com>

        Merge r179627

    2015-02-03  David Hyatt  <hyatt@apple.com>

            Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
            https://bugs.webkit.org/show_bug.cgi?id=141207
            <rdar://problem/18387659>

            Reviewed by Dean Jackson.

            Added fast/multicol/table-dynamic-movement.html

            Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

            Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
            ended up getting marked for relayout.

            Make sure rows do the right thing as well.

            * rendering/RenderBlock.cpp:
            (WebCore::RenderBlock::layoutPositionedObjects):
            (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
            * rendering/RenderBlock.h:
            * rendering/RenderBlockFlow.cpp:
            (WebCore::RenderBlockFlow::layoutBlockChild):
            (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
            (WebCore::RenderBlockFlow::positionNewFloats):
            * rendering/RenderDeprecatedFlexibleBox.cpp:
            (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
            (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
            * rendering/RenderTable.cpp:
            (WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
            * rendering/RenderTable.h:
            * rendering/RenderTableRow.cpp:
            (WebCore::RenderTableRow::layout):
            * rendering/RenderTableSection.cpp:
            (WebCore::RenderTableSection::layout):

2015-02-05  Lucas Forschler  <lforschler@apple.com>

        Merge r179366

    2015-01-20  David Hyatt  <hyatt@apple.com>

            Japanese line breaking rules need to be respected before and after Ruby.
            https://bugs.webkit.org/show_bug.cgi?id=91588
            <rdar://problem/17306535>

            Reviewed by Dean Jackson.

            Added fast/ruby/ruby-punctuation-avoid-breaking.html.

            This patch has to add support for following line breaking rules at both
            sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
            just hard-code the rules (and apply this hard-coding only to Ruby and not
            to other inline replaced elements).

            For breaking after a Ruby we do better. The Ruby run caches its prior characters
            and line layout is able to obtain them and use them when deciding whether or not
            to break. This means for the "after" side of a Ruby, we're able to behave the same
            as if no Ruby was used.

            * rendering/RenderBlockFlow.h:
            (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):
            * rendering/RenderBlockLineLayout.cpp:
            (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
            * rendering/RenderRubyBase.cpp:
            (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):
            * rendering/RenderRubyBase.h:
            * rendering/RenderRubyRun.cpp:
            (WebCore::RenderRubyRun::RenderRubyRun):
            (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
            (WebCore::RenderRubyRun::canBreakBefore):
            * rendering/RenderRubyRun.h:
            * rendering/RenderRubyText.cpp:
            (WebCore::RenderRubyText::canBreakBefore):
            * rendering/RenderRubyText.h:
            * rendering/line/BreakingContextInlineHeaders.h:
            (WebCore::BreakingContext::handleReplaced):
            (WebCore::BreakingContext::canBreakAtThisPosition):
            (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

2015-02-05  Lucas Forschler  <lforschler@apple.com>

        Merge r179567

    2015-02-02  Enrica Casucci  <enrica@apple.com>

            Additional emoji support.
            https://bugs.webkit.org/show_bug.cgi?id=141047
            rdar://problem/19045135

            Reviewed by Darin Adler.

            Adds support for emoji modifiers and group emoji.

            Test: editing/deleting/delete-emoji.html

            * platform/graphics/FontCascade.cpp:
            (WebCore::FontCascade::characterRangeCodePath):
            * platform/text/TextBreakIterator.cpp:
            (WebCore::cursorMovementIterator):
            * rendering/RenderText.cpp:
            (WebCore::isEmojiGroupCandidate):
            (WebCore::isEmojiModifier):
            (WebCore::RenderText::previousOffsetForBackwardDeletion):

2015-02-04  Lucas Forschler  <lforschler@apple.com>

        Merge r178661

    2015-01-19  Brent Fulgham  <bfulgham@apple.com>

            Layers need to be already updated before we call adjustViewSize
            https://bugs.webkit.org/show_bug.cgi?id=135514

            Reviewed by Simon Fraser.

            Tested by 'fast/dynamic/layer-no-longer-paginated.html'

            Defer painting operations until we have finished layout. This
            has a couple of benefits:
            (1) We do not attempt to modify render layers during layout.
            (2) In WK1 we do not attempt to paint during layout.

            Add a new virtual predicate to ScrollView indicating when we are in
            layout so that calls to setContentsSize do not attempt
            to adjust scrollbars.

            Modify FrameView to set its ScrollView state to block paint
            operations during layout. Also add a post-layout handler to
            complete the scrollbar updates after layout is finished.

            * WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
            * page/FrameView.cpp:
            (WebCore::FrameView::layout):
            (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
            (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed).
            (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed)
            (WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
            * page/FrameView.h:
            * platform/ScrollView.cpp:
            (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer
            painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not.
            (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added.
            (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
            (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
            the scroll delta and apply it after the layout is complete.
            (WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method
            so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
            * platform/ScrollView.h:
            (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.

2015-02-04  Lucas Forschler  <lforschler@apple.com>

        Merge r178363

    2015-01-13  Andreas Kling  <akling@apple.com>

            Element::normalizeAttributes() needs to handle arbitrary JS executing between loop iterations.
            <https://webkit.org/b/140379>
            <rdar://problem/19446901>

            Reviewed by Benjamin Poulain.

            Since DOM mutation events may arise below the call to Node::normalize(),
            have the loop in Element::normalizeAttributes() make a copy of the Attr nodes
            beforehand, to guard against mutations.

            Based on a patch by Chris "Chris Dumez" Dumez.

            Test: fast/dom/Element/normalize-crash2.html

            * dom/Element.cpp:
            (WebCore::Element::normalizeAttributes):

2015-02-04  Lucas Forschler  <lforschler@apple.com>

        Merge r177165

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

            InstancedArray crashes attempting to draw out of bounds
            https://bugs.webkit.org/show_bug.cgi?id=139521

            Reviewed by Simon Fraser.

            We were not doing index validation correctly for instancing.

            Test: fast/canvas/webgl/angle-instanced-arrays-out-of-bounds.html

            * html/canvas/WebGLRenderingContext.cpp:
            (WebCore::WebGLRenderingContext::validateVertexAttributes): We need to check
            the number of instances drawn against the amount of instance data that has
            been provided, taking into account the number of repeats (the divisor).
            (WebCore::WebGLRenderingContext::drawArrays): Added some whitespace to make it more clear.
            (WebCore::WebGLRenderingContext::validateDrawElements): This needs to take a primcount
            parameter so that it can correctly validate the call (when used from drawElementsInstanced).
            (WebCore::WebGLRenderingContext::drawElements): New signature to validate.
            (WebCore::WebGLRenderingContext::drawArraysInstanced): Rearrange this a bit. The
            primcount validation is already being done by the validateDrawArrays call. Also, there
            was a bogus UNUSED_PARAM hanging around.
            (WebCore::WebGLRenderingContext::drawElementsInstanced): Similar rearrangement. Use
            the primcount parameter.
            * html/canvas/WebGLRenderingContext.h:

2015-02-04  Lucas Forschler  <lforschler@apple.com>

        Merge r177089

    2014-12-10  Antti Koivisto  <antti@apple.com>

            Crash when creating CSSCalcBinaryOperation
            https://bugs.webkit.org/show_bug.cgi?id=134886
            rdar://problem/17663561

            Reviewed by Chris Dumez.

            Test: fast/css/calc-binary-operation-crash.html

            * css/CSSCalculationValue.cpp:
            (WebCore::determineCategory):

            Ensure that both axis are within the addSubtractResult table.
            Remove unneeded CalcOther test. The call site guarantees it doesn't happen and the normal cases would handle it anyway.
            Also strengthen some asserts.

2015-02-04  Lucas Forschler  <lforschler@apple.com>

        Merge r176750

    2014-12-03  Zalan Bujtas  <zalan@apple.com>

            ASSERTION: RenderMultiColumnFlowThread::processPossibleSpannerDescendant() when column spanner's parent is not a RenderBlockFlow.
            https://bugs.webkit.org/show_bug.cgi?id=139188
            rdar://problem/18502182

            Reviewed by David Hyatt.

            This patch ensures that the validation check for spanner in isValidColumnSpanner() is in synch
            with the expectation in RenderMultiColumnFlowThread::processPossibleSpannerDescendant().
            (descendant's parent is expected to be a RenderBlockFlow)

            Test: fast/multicol/svg-content-as-column-spanner-crash.html

            * rendering/RenderMultiColumnFlowThread.cpp:
            (WebCore::isValidColumnSpanner):

2015-02-04  Lucas Forschler  <lforschler@apple.com>

        Merge r175641

    2014-11-04  David Hyatt  <hyatt@apple.com>

            Descendant ends up in wrong flow thread with nested columns and spans.
            https://bugs.webkit.org/show_bug.cgi?id=137273

            Reviewed by Simon Fraser.

            Unskipped the two problematic span tests.

            * rendering/RenderMultiColumnFlowThread.cpp:
            (WebCore::isValidColumnSpanner):
            Remove the guard and comment and added the assertion back in.

            (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
            Changed to no longer use handleSpannerRemoval. Because the spanner was removed from the flow thread's map,
            handleSpannerRemoval was a no-op. So instead I just removed the placeholder by hand.

            The second fix was to stop destroying the placeholder. Since the placeholder can just have been inserted, you
            can't delete it, since otherwise code further up the stack will access the deleted object. For now, we just
            leak the placeholder.

            The third fix is to make sure the subtreeRoot is properly updated to be the new placeholder.

2015-02-04  Lucas Forschler  <lforschler@apple.com>

        Merge r174085

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

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

            Reviewed by Dean Jackson.

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

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

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

            The stale placeholder is then removed and destroyed after the spanner has been put back
            into place.

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

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

2015-02-04  Babak Shafiei  <bshafiei@apple.com>

        Merge r178969.

    2015-01-22  Jer Noble  <jer.noble@apple.com>

            [iOS] Media controls disappear when loading a HLS live stream
            https://bugs.webkit.org/show_bug.cgi?id=140792
            rdar://problem/19491658

            Reviewed by Dean Jackson.

            Overload reconnectControls to reconnect the "start playback" button
            if the control type has been set to "StartPlaybackButton".

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.reconnectControls):

2015-02-04  Babak Shafiei  <bshafiei@apple.com>

        Merge r172257.

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

            Create UTF-8 string from in-band VTT cues
            https://bugs.webkit.org/show_bug.cgi?id=135716

            Reviewed by Brent Fulgham.

            Tests will be added in https://bugs.webkit.org/show_bug.cgi?id=135717.

            * platform/graphics/ISOVTTCue.cpp:
            (WebCore::ISOBox::peekString): Call String::fromUTF8 because we know that VTT is always
                UTF-8.

2015-01-28  David Kilzer  <ddkilzer@apple.com>

        run-webkit-tests: Merge 46 commits from trunk to make it work

        r171686, r171687, r171789, r171800, r171967, r171968, r171969,
        r172115, r172117, r172118, r172174, r172602, r172942, r172967,
        r173129, r173452, r173647, r173937, r174406, r174626, r174628,
        r174634, r174642, r174650, r174702, r174728, r174824, r174835,
        r174844, r175204, r176669, r176677, r176872, r176880, r176885,
        r176897, r177129, r177363, r177370, r177510, r178444, r178570,
        r178601, r178656, r178867, r178925

        * platform/ios/wak/WAKWindow.h:
        * platform/ios/wak/WAKWindow.mm:
        (-[WAKWindow setEntireWindowVisibleForTesting:]):
        (-[WAKWindow _visibleRectRespectingMasksToBounds:]):

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

        iOS DRT snapshots are limited to the page visible area
        https://bugs.webkit.org/show_bug.cgi?id=137650

        Reviewed by Daniel Bates.

        LegacyTileCache drawing was limited to the window's visible area, found by
        crawling up the layer hierarchy to the root layer. This caused test snapshots to
        be missing non-composited content outside the iPhone visible area, which hinders
        testing.
        
        Fix by adding a test-only mode where the window visible area is the entire window.

        * platform/ios/wak/WAKWindow.h:
        * platform/ios/wak/WAKWindow.mm:
        (-[WAKWindow setEntireWindowVisibleForTesting:]):
        (-[WAKWindow _visibleRectRespectingMasksToBounds:]):

2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r179027

    2015-01-23  Enrica Casucci  <enrica@apple.com>

            Hit test returns incorrect results when performed in paginated content over the page gaps.
            https://bugs.webkit.org/show_bug.cgi?id=140837
            rdar://problem/17494390

            Reviewed by Dave Hyatt.

            Tests: fast/multicol/pagination/LeftToRight-tb-hittest.html
                   fast/multicol/pagination/RightToLeft-rl-hittest.html

            When hittesting reaches the RenderView we need to check if we are
            in paginated content and use the correct class to compute hittest results.

            * rendering/RenderView.cpp:
            (WebCore::RenderView::updateHitTestResult):
2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r178380

    2015-01-13  Dean Jackson  <dino@apple.com>

            Filters aren't applied to elements in columns after the first
            https://bugs.webkit.org/show_bug.cgi?id=140331

            Reviewed by Simon Fraser.

            The important bits of this change came from Simon.

            Filters and clipping were not taking columns into
            account when using their offset rectangles. The fix
            is to recalculate the rects if you're in such a
            situation.

            Tests: fast/multicol/clip-in-columns.html
                   fast/multicol/filter-in-columns.html

            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::hasFilterThatIsPainting): New method used
            to check if we're about to paint a filter.
            (WebCore::RenderLayer::setupFilters): Use the new helper if possible.
            (WebCore::RenderLayer::paintLayerContents): If we're in columns,
            and we either have a clip or a filter, recalculate the offset rectangles.
            * rendering/RenderLayer.h:

2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r178175

    2015-01-08  Enrica Casucci  <enrica@apple.com>

            [iOS] Cannot paste an image URL in a plain text field in a page.
            https://bugs.webkit.org/show_bug.cgi?id=140274
            rdar://problem/18590809

            Reviewed by Alexey Proskuryakov.

            When we want to get plain text from the pasteboard, we
            should also try kUTTypeURL if there is no kUTTypeText available.

            * WebCore.exp.in:
            * platform/ios/PasteboardIOS.mm:
            (WebCore::Pasteboard::read):
            * platform/ios/PlatformPasteboardIOS.mm:
            (WebCore::PlatformPasteboard::readString):

2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r178038

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

            AX: Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse + 149
            https://bugs.webkit.org/show_bug.cgi?id=139929

            Reviewed by Darin Adler.

            When a frame is replaced, there were instances when it was not clearing its associated nodes in the accessibility text marker -> Node cache.
            This caused dead Nodes to be left in the cache which would eventually be accessed when the cache was cleaned out at a later time.

            To fix this we should be clearing out the cache in Document::prepareForDestruction, instead of Frame::disconnectOwnerElement.

            While working on this, it also exposed a problem where when a frame goes away, it doesn't inform its parent to update its children,
            which causes an ASSERT to be hit with this test as well.

            Tests: accessibility/frame-disconnect-textmarker-cache-crash.html

            * dom/Document.cpp:
            (WebCore::Document::prepareForDestruction):
            * page/Frame.cpp:
            (WebCore::Frame::disconnectOwnerElement):
                Remove cache management from here since it is superceded by code in Document::prepareForDestruction
            * page/FrameView.cpp:
            (WebCore::FrameView::removeFromAXObjectCache):

2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r177850

    2015-01-01  Chris Dumez  <cdumez@apple.com>

            [iOS] Fix memory leak in FeatureCounter
            https://bugs.webkit.org/show_bug.cgi?id=140029
            <rdar://problem/19255690>

            Reviewed by Darin Adler.

            Fix memory leak in FeatureCounter. The NSString for the counter key
            was allocated but never released. The patch switches to using a
            RetainPtr instead of a raw pointer to avoid the issue.

            * platform/ios/FeatureCounter.mm:
            (WebCore::FeatureCounter::incrementKey):
            (WebCore::FeatureCounter::setKey):

2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r177738

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

            [iOS] Log better using FeatureCounter why PageCache is failing due to pruned resources
            https://bugs.webkit.org/show_bug.cgi?id=139921

            Reviewed by Gavin Barraclough and Alexey Proskuryakov.

            Log better using FeatureCounter why PageCache is failing due to pruned
            resources. In particular, we now distinguish if the resource was pruned
            due to:
            - Memory pressure
            - Page cache capacity reached
            - WebProcess suspended (WK2)

            * WebCore.exp.in:
            * history/HistoryItem.cpp:
            (WebCore::HistoryItem::HistoryItem):
            * history/HistoryItem.h:
            * history/PageCache.cpp:
            (WebCore::PageCache::pruneToCapacityNow):
            (WebCore::PageCache::setCapacity):
            (WebCore::pruningReasonToFeatureCounterKey):
            (WebCore::PageCache::add):
            (WebCore::PageCache::take):
            (WebCore::PageCache::get):
            (WebCore::PageCache::prune):
            * history/PageCache.h:
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::commitProvisionalLoad):
            * platform/FeatureCounterKeys.h:
            * platform/MemoryPressureHandler.cpp:
            (WebCore::MemoryPressureHandler::releaseCriticalMemory):

2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r177681

    2014-12-22  Chris Dumez  <cdumez@apple.com>

            [iOS] Log which type of resources are commonly loaded using FeatureCounter
            https://bugs.webkit.org/show_bug.cgi?id=139890

            Reviewed by Darin Adler.

            Log which type of resources are commonly loaded using FeatureCounter
            (e.g. stylesheets, scripts, fonts, images, ...).

            * loader/SubresourceLoader.cpp:
            (WebCore::logResourceLoadedUsingFeatureCounter):
            (WebCore::SubresourceLoader::didFinishLoading):
            * platform/FeatureCounterKeys.h:

2015-01-28  Lucas Forschler  <lforschler@apple.com>

        Merge r177680

    2014-12-22  Chris Dumez  <cdumez@apple.com>

            [iOS] Log using FeatureCounter when a PacheCache fails due to memory pressure
            https://bugs.webkit.org/show_bug.cgi?id=139874
            <rdar://problem/19255690>

            Reviewed by Darin Adler.

            Log using FeatureCounter when a PacheCache fails due to memory
            pressure. To detect this, a flag is added to HistoryItem to mark
            items that are no longer in the page becaused they were pruned
            (either because of a low memory handling or because the page cache
            reached its maximum capacity).

            * history/HistoryItem.cpp:
            (WebCore::HistoryItem::HistoryItem):
            * history/HistoryItem.h:
            * history/PageCache.cpp:
            (WebCore::PageCache::add):
            (WebCore::PageCache::take):
            (WebCore::PageCache::get):
            (WebCore::PageCache::prune):
            * platform/FeatureCounterKeys.h:

2015-01-27  Lucas Forschler  <lforschler@apple.com>

        Merge r177666

    2014-12-22  Chris Dumez  <cdumez@apple.com>

            [iOS] Log using FeatureCounter user-triggered zooming
            https://bugs.webkit.org/show_bug.cgi?id=139879
            <rdar://problem/19329130>

            Reviewed by Benjamin Poulain.

            Log using FeatureCounter user-triggered zooming on iOS.

            * WebCore.exp.in:
            * WebCore.xcodeproj/project.pbxproj:
            * platform/FeatureCounter.h:
            * platform/FeatureCounterKeys.h:

2015-01-27  Lucas Forschler  <lforschler@apple.com>

        Merge r177647

    2014-12-22  Chris Dumez  <cdumez@apple.com>

            [iOS] Log using FeatureCounter when a PacheCache entry is not reused because it expired
            https://bugs.webkit.org/show_bug.cgi?id=139869
            <rdar://problem/19255690>

            Reviewed by Darin Adler.

            Log using FeatureCounter when a PacheCache entry is not reused because
            it expired.

            * history/PageCache.cpp:
            (WebCore::PageCache::take):
            (WebCore::PageCache::get):
            * history/PageCache.h:
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::commitProvisionalLoad):
            (WebCore::FrameLoader::loadDifferentDocumentItem):
            * loader/HistoryController.cpp:
            (WebCore::HistoryController::invalidateCurrentItemCachedPage):
            * platform/FeatureCounterKeys.h:

2015-01-27  Lucas Forschler  <lforschler@apple.com>

        Merge r177591

    2014-12-19  Chris Dumez  <cdumez@apple.com>

            [iOS] Log how often media element playback happens using FeatureCounter
            https://bugs.webkit.org/show_bug.cgi?id=139819
            <rdar://problem/19309988>

            Reviewed by Eric Carlson.

            Log using FeatureCounter how often we start loading for audio / video
            elements, and how often they end up being played.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::HTMLMediaElement):
            Add flag to identify when a media element starts playing for the first
            time.

            (WebCore::HTMLMediaElement::loadResource):
            Log when a media element starts loading.

            (WebCore::HTMLMediaElement::updatePlayState):
            Log when a media element starts playing for the first time.

            * html/HTMLMediaElement.h:
            Add flag to identify when a media element starts playing for the first
            time.

            * platform/FeatureCounterKeys.h:
            Add FeatureCounter keys for HTMLMediaElement loading / playback.

2015-01-27  Lucas Forschler  <lforschler@apple.com>

        Merge r177581

    2014-12-19  Chris Dumez  <cdumez@apple.com>

            [iOS] Log how successful the memory cache is using FeatureCounter
            https://bugs.webkit.org/show_bug.cgi?id=139802

            Reviewed by Andreas Kling.

            Log how successful the memory cache is using FeatureCounter and why we
            choose not to use the resource in the memory cache when it is present.

            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::requestResource):
            (WebCore::CachedResourceLoader::determineRevalidationPolicy):
            * platform/FeatureCounterKeys.h:

2015-01-27  Lucas Forschler  <lforschler@apple.com>

        Merge r177504

    2014-12-18  Chris Dumez  <cdumez@apple.com>

            [iOS] Log navigation types using FeatureCounter API
            https://bugs.webkit.org/show_bug.cgi?id=139753

            Reviewed by Darin Adler.

            Log navigation types using FeatureCounter API.

            No new tests, no behavior change other than additional feature
            counting.

            * loader/FrameLoader.cpp:
            (WebCore::logNavigationWithFeatureCounter):
            (WebCore::FrameLoader::loadWithDocumentLoader):
            * platform/FeatureCounterKeys.h:

2015-01-27  Lucas Forschler  <lforschler@apple.com>

        Merge r177499

    2014-12-18  Chris Dumez  <cdumez@apple.com>

            [iOS] Log why cached resources are being revalidated using FeatureCounter API
            https://bugs.webkit.org/show_bug.cgi?id=139759
            <rdar://problem/19288177>

            Reviewed by Antti Koivisto.

            Log why cached resources are being revalidated using FeatureCounter API.
            Also log if revalidation is successful or not.

            No new tests, no behavior change.

            * loader/SubresourceLoader.cpp:
            (WebCore::SubresourceLoader::willSendRequest):
            (WebCore::SubresourceLoader::didReceiveResponse):
            * loader/cache/CachedImage.cpp:
            (WebCore::CachedImage::mustRevalidateDueToCacheHeaders):
            * loader/cache/CachedImage.h:
            * loader/cache/CachedResource.cpp:
            (WebCore::CachedResource::failBeforeStarting):
            (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
            * loader/cache/CachedResource.h:
            (WebCore::CachedResource::loader):
            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::determineRevalidationPolicy):
            * platform/FeatureCounterKeys.h:

2015-01-27  Lucas Forschler  <lforschler@apple.com>

        Merge r177455

    2014-12-17  Chris Dumez  <cdumez@apple.com>

            [iOS] Make it possible to toggle FeatureCounter support at runtime
            https://bugs.webkit.org/show_bug.cgi?id=139688
            <rdar://problem/19266254>

            Reviewed by Andreas Kling.

            Make it possible to toggle FeatureCounter support at runtime by adding
            a setting (disabled by default) and moving the API to a new
            FeatureCounter class under WebCore/plattorm which only logs if the
            setting is enabled. For privacy reasons, FeatureCounter logging is also
            disabled for private / ephemeral sessions.

            No new tests, no behavior change.

            * CMakeLists.txt:
            * Configurations/WebCore.xcconfig:
            * WebCore.vcxproj/WebCore.vcxproj:
            * WebCore.vcxproj/WebCore.vcxproj.filters:
            * WebCore.xcodeproj/project.pbxproj:
            * history/PageCache.cpp:
            (WebCore::logCanCacheFrameDecision):
            (WebCore::logCanCachePageDecision):
            * page/Settings.in:
            * platform/FeatureCounter.cpp: Renamed from Source/WTF/wtf/FeatureCounter.cpp.
            (WebCore::FeatureCounter::shouldUseForPage):
            (WebCore::FeatureCounter::incrementKey):
            (WebCore::FeatureCounter::setKey):
            * platform/FeatureCounter.h: Renamed from Source/WTF/wtf/FeatureCounter.h.
            * platform/FeatureCounterKeys.h:
            * platform/ios/FeatureCounter.mm: Renamed from Source/WTF/wtf/ios/FeatureCounter.mm.
            (WebCore::FeatureCounter::incrementKey):
            (WebCore::FeatureCounter::setKey):

2015-01-26  Lucas Forschler  <lforschler@apple.com>

        Merge r177328

    2014-12-15  Chris Dumez  <cdumez@apple.com>

            [iOS] Add feature counting support
            https://bugs.webkit.org/show_bug.cgi?id=139652
            <rdar://problem/19255690>

            Reviewed by Gavin Barraclough.

            Use FeatureCounter API to log PageCache failure reasons
            as well as its success rate.

            No new tests, no behavior change.

            * history/PageCache.cpp:
            (WebCore::logCanCacheFrameDecision):
            (WebCore::logCanCachePageDecision):
            (WebCore::PageCache::canCache):
            * platform/FeatureCounterKeys.h: Added.

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r177927.

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

        Regression(r163928): Animated images are not resumed on window resizing
        https://bugs.webkit.org/show_bug.cgi?id=139714
        <rdar://problem/18855285>

        Reviewed by Darin Adler.

        After r163928, animated images were not resumed if they became visible
        after resizing the window. This patch calls resumes animated images if
        necessary in FrameView::setFrameRect() to handle this case properly.

        Tests: fast/images/animated-gif-window-resizing.html
               fast/images/animated-gif-zooming.html

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

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r177404.

    2014-12-16  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Cherokee language is drawn as boxes
        https://bugs.webkit.org/show_bug.cgi?id=139706

        Reviewed by Simon Fraser.

        Test: platform/ios-simulator/fast/text/cherokee.html

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::languageSpecificFallbackFont):

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r177398.

    2014-12-16  Myles C. Maxfield  <mmaxfield@apple.com>

        Ruby overhang uses ints instead of floats
        https://bugs.webkit.org/show_bug.cgi?id=139624

        Reviewed by Dave Hyatt.

        Simply change the type.

        Updated existing tests.

        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlockFlow::setMarginsForRubyRun):
        * rendering/RenderRubyRun.cpp:
        (WebCore::RenderRubyRun::getOverhang):
        * rendering/RenderRubyRun.h:
        * rendering/line/LineWidth.cpp:
        (WebCore::LineWidth::applyOverhang):

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r177377.

    2014-12-16  Myles C. Maxfield  <litherum@gmail.com>

        Ruby does not preserve expansion opportunities from enclosing context
        https://bugs.webkit.org/show_bug.cgi?id=139618

        Reviewed by David Hyatt.

        There is currently no sharing of expansion opportunity information between
        ruby bases and the text surrounding the ruby. This patch adds a bit on
        RenderText, m_contentIsKnownToFollow, which affects how expansion
        opportunities are handled at paint-time, as well as a bit on RenderRubyBase,
        m_isAfterExpansion, which affects how expansions are calculated when laying
        out a line. This patch also adds a field to RenderRubyBase which represents
        the base's starting position within a ruby. This field is necessary because
        an expansion from a line might occur at the very beginning of a ruby base,
        so we have to remember some state from expansion time to RenderRubyBase
        layout time.

        Added more tests to fast/ruby/ruby-justification.html.

        * rendering/InlineBox.h:
        (WebCore::InlineBox::setExpansionWithoutGrowing):
        (WebCore::InlineBox::expansion):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::removeChild): Keep the bit on InlineTextBox up to
        date.
        (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): Set expansion
        information in InlineFlowBoxes so the total expansion for a whole line
        is held in the RootInlineBox's expansion.
        * rendering/InlineTextBox.h:
        (WebCore::InlineTextBox::expansionBehavior):
        * rendering/RenderBlockFlow.h:
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
        updateRubyForJustifiedText() had a bunch of problems with it. First of all,
        it didn't actually set the InlineBoxes as dirty, so the second layout pass
        sometimes wouldn't perform any updates. Secondarily, it didn't take
        overhangs into account. Thirdly, it didn't mark the ruby base and text as
        needing layout so that subsequent layouts would actually traverse into them.
        (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
        This nested if triangle is super nasty, but I'm not sure of a better way to
        write it.
        (WebCore::updateRubyForJustifiedText): Deleted.
        (WebCore::computeExpansionForJustifiedText): Deleted.
        * rendering/RenderRubyBase.cpp:
        (WebCore::RenderRubyBase::RenderRubyBase):
        (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
        * rendering/RenderRubyBase.h:
        * rendering/RenderRubyRun.cpp:
        (WebCore::RenderRubyRun::layout):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::RenderText):
        * rendering/RenderText.h:
        (WebCore::RenderText::contentIsKnownToFollow):
        (WebCore::RenderText::setContentIsKnownToFollow):

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r177360.

    2014-12-16  Chris Dumez  <cdumez@apple.com>

        REGRESSION (r163928): Animated GIFs are not resumed when translated into view using -webkit-transform
        https://bugs.webkit.org/show_bug.cgi?id=139672
        <rdar://problem/19260797>

        Reviewed by Antti Koivisto.

        After r163928, animated GIFs were not resumed when translated into view
        using '-webkit-transform' CSS property.

        This broke animated gifs on the mobile version of weibo.com (which is
        one of the most popular blogging sites in China) on iPhone. e.g.
        http://m.weibo.cn/page/tpl?containerid=1005052150182731_-_WEIBO_SECOND_PROFILE_WEIBO&itemid=&title=全部微博

        This patch calls FrameView::resumeVisibleImageAnimationsIncludingSubframes()
        after style recalc so that we resume animated images if they become visible
        after the style has changed. Doing so after layout wouldn't work because
        no layout happens in this case.

        Test: fast/images/animated-gif-webkit-transform.html

        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r176384.

    2014-11-20  Antti Koivisto  <antti@apple.com>

        REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF
        https://bugs.webkit.org/show_bug.cgi?id=138807
        <rdar://problem/18829540>

        Reviewed by Simon Fraser.

        Animation gets paused because WebKit thinks the GIF is outside of the view.

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

        We need to convert to window coordinates in paintsEntireContents mode too so these functions are consistent.
        This matters with some WK1 API clients.

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r172854.

    2014-08-21  Antti Koivisto  <antti@apple.com>

        Animated GIFs scrolled out of view still cause titlebar blur to update, on tumblr.com page
        https://bugs.webkit.org/show_bug.cgi?id=136139

        Reviewed by Simon Fraser.

        The mechanism for pausing GIF images outside the viewport did not work for subframes.

        Test: fast/repaint/no-animation-outside-viewport-subframe.html

        * WebCore.exp.in:
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollPositionChanged):
        (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):

            Add a function for resuming animations as needed in all subframes.
            This is used after scrolling instead of calling the RenderView function directly.

        * page/FrameView.h:
        * page/Page.cpp:
        (WebCore::Page::resumeAnimatingImages):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::newImageAnimationFrameAvailable):

            Determine the overall visible rect so that it is correct in subframes too.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollTo):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r177135.

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

        http://omfgdogs.info/ only animates when you resize the window
        https://bugs.webkit.org/show_bug.cgi?id=139435
        <rdar://problem/19190493>

        Reviewed by Simon Fraser.

        After r163928, we would fail to animate a gif if:
        - it is used as a background image of a 0-height html element
        - it is used as a background image of a 0-height body element whose
          background is delegated to the root (because the root has no
          background).

        This is because in such cases, shouldRepaintForImageAnimation()
        should use the background rect instead of the renderer's overflow
        rect to determine if the image is inside the viewport. Both cases
        are addressed in this patch.

        Tests: fast/images/animated-gif-body-delegated-background-image.html
               fast/images/animated-gif-body-outside-viewport.html
               fast/images/animated-gif-html-background-image.html

        * rendering/RenderElement.cpp:
        (WebCore::shouldRepaintForImageAnimation):
        * testing/Internals.cpp:
        (WebCore::Internals::hasPausedImageAnimations):
        * testing/Internals.h:
        * testing/Internals.idl:

2015-01-26  David Kilzer  <ddkilzer@apple.com>

        Merge r177292.

    2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>

        [iOS] Codepoints not associated with languages are drawn as boxes
        https://bugs.webkit.org/show_bug.cgi?id=138906

        Reviewed by Darin Adler.

        Use SPI CTFontCreateForCharacters(), but only if we don't already know what to do
        with the characters.

        Test: platform/ios-simulator/fast/text/non-language-font-fallback.html

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::FontCache::systemFallbackForCharacters):
        * platform/spi/cocoa/CoreTextSPI.h:

2015-01-25  David Kilzer  <ddkilzer@apple.com>

        Merge r177449.

    2014-12-17  Myles C. Maxfield  <mmaxfield@apple.com>

        Test fix after r177444.

        Unreviewed.

        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySliderThumb::elementRect):

2015-01-25  David Kilzer  <ddkilzer@apple.com>

        Merge r177444.

    2014-12-16  Myles C. Maxfield  <mmaxfield@apple.com>

        Addressing more post-review comments in r177035

        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySliderThumb::elementRect):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setupDateTimeChooserParameters):

2015-01-25  David Kilzer  <ddkilzer@apple.com>

        Merge r177306.

    2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>

        Unreviewed build fix after r177301

        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::elementRectRelativeToRootView):

2015-01-25  David Kilzer  <ddkilzer@apple.com>

        Merge r177301.

        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::InputFieldSpeechButtonElement::startSpeechInput):

    2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>

        Addressing post-review comments in r177035
        https://bugs.webkit.org/show_bug.cgi?id=139557

        Reviewed by Darin Adler.

        This patch deletes the helper functions rendererBoundingBox() and rendererAnchorRect() and
        migrates callers to using renderers directly.

        It also improves the comment in RenderElement.h regarding RenderElement::anchorRect().

        No new tests because this is simply refactoring.

        * WebCore.exp.in: Delete exported symbol for rendererBoundingBox()
        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySliderThumb::elementRect): Migrate off rendererBoundingBox()
        * dom/ContainerNode.cpp:
        (WebCore::rendererAnchorRect): Deleted.
        * dom/ContainerNode.h:
        * dom/Node.cpp:
        (WebCore::rendererBoundingBox): Deleted.
        * dom/Node.h:
        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::elementRectRelativeToRootView): Migrate off rendererBoundingBox().
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
        * html/ValidationMessage.cpp:
        (WebCore::ValidationMessage::buildBubbleTree): Ditto.
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollElementToRect): Migrate off rendererAnchorRect().
        (WebCore::FrameView::scrollToAnchor): Ditto.
        * page/SpatialNavigation.cpp:
        (WebCore::nodeRectInAbsoluteCoordinates): Migrate off rendererBoundingBox().
        * rendering/RenderElement.h:

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r177050.

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

        Scrolling to anchor tags does nothing in vertical-rl writing mode
        https://bugs.webkit.org/show_bug.cgi?id=137838

        Reviewed by David Hyatt.

        Scroll to a particular tag, and make sure the viewport is rendered as expected.

        Tests: fast/events/scroll-to-anchor-vertical-lr-writing-mode.html
               fast/events/scroll-to-anchor-vertical-writing-mode-contained-2.html
               fast/events/scroll-to-anchor-vertical-writing-mode-contained.html
               fast/events/scroll-to-anchor-vertical-writing-mode.html

        * page/FrameView.cpp:
        (WebCore::FrameView::scrollToAnchor):
        * rendering/ScrollBehavior.cpp:
        * rendering/ScrollBehavior.h:

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r177041.

        Already fixed by previous merge.

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

        Fix iOS build after r177035.

        Unreviewed.

        I accidentally added my line to WebCore.exp.in inside an
        #IF PLATFORM(MAC) block.

        * WebCore.exp.in:

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r177035.

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

        Delete Node::boundingBox()
        https://bugs.webkit.org/show_bug.cgi?id=139333

        Conceptually, boundingBox() should be on RenderInline. In addition,
        Node::boundingBox() is completely broken for inline elements: it
        makes a rect from the top left of the first inline child to the
        bottom right of the last inline child, disregarding the intermediate
        inline children. This breaks with vertical text and with line
        breaks.

        What makes this problem worse is that some functions actually rely
        on this bad behavior. These functions are functions that use the
        Node's so-called "bounding box" to scroll to an anchor tag.

        This patch goes through all the call sites of Node::boundingBox(),
        and segregates them into calls that expect the true bounding box
        and calls that need this false bounding box. This patch then moves
        this false bounding box into RenderElement, using the name
        anchorRect(). Callers what want the correct bounding box have been
        updated to use RenderElement::absoluteBoundingBoxRect().

        Reviewed by Zalan Bujtas.

        No new tests because there should be no behavior change.

        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySliderThumb::elementRect): Use
        RenderObject::absoluteBoundingBoxRect()
        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::getUpperLeftCorner): Deleted.
        (WebCore::ContainerNode::getLowerRightCorner): Deleted.
        (WebCore::ContainerNode::boundingBox): Deleted.
        * dom/ContainerNode.h:
        * dom/Element.cpp:
        (WebCore::Element::scrollIntoView): Use RenderElement::anchorRect().
        (WebCore::Element::scrollIntoViewIfNeeded): Ditto.
        (WebCore::Element::updateFocusAppearance): Ditto.
        * dom/Node.cpp:
        (WebCore::Node::boundingBox): Deleted.
        * dom/Node.h:
        (WebCore::Node::pixelSnappedBoundingBox): Deleted.
        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::elementRectRelativeToRootView): Use
        RenderObject::absoluteBoundingBoxRect()
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
        * html/ValidationMessage.cpp:
        (WebCore::ValidationMessage::buildBubbleTree): Ditto.
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollElementToRect): Use
        RenderElement::anchorRect().
        (WebCore::FrameView::scrollToAnchor): Ditto.
        * page/SpatialNavigation.cpp:
        (WebCore::nodeRectInAbsoluteCoordinates): Use
        RenderObject::absoluteBoundingBoxRect()
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::getUpperLeftCorner): Moved from ContainerNode.
        (WebCore::RenderElement::getLowerRightCorner): Moved from
        ContainerNode.
        (WebCore::RenderElement::anchorRect): Moved from ContainerNode.
        * rendering/RenderObject.h:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::topOfFirstText): Helper for
        RenderElement::anchorRect()
        * rendering/RenderText.h:

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r176725.

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

        [Mac] Hang when calling -[AVAsset resolvedURL].
        https://bugs.webkit.org/show_bug.cgi?id=139223

        Reviewed by Eric Carlson.

        On a particularly slow-loading site, a call to -[AVAsset resolvedURL] can take an arbitrarily long
        time. Treat this AVAsset property similar to other "metadata" properties, and check the load status
        of the property before requesting it.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check the load state of -resolvedURL.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL): Ditto.
        (WebCore::assetMetadataKeyNames): Add @"resolvedURL".

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge 'resolvedURL' changes from r176108.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::resolvedURL): Add.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL): Add.

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r176475.

    2014-11-21  Jer Noble  <jer.noble@apple.com>

        [Mac] Delay of 1-2s after the first paint of a video frame.
        https://bugs.webkit.org/show_bug.cgi?id=138979

        Reviewed by Eric Carlson.

        Only bother waiting for a signal that a new image is ready when the image isn't ready in the first place.

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

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r175251.

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

        [Mac] The first software paint of a <video> element takes up to 2.5s.
        https://bugs.webkit.org/show_bug.cgi?id=137754

        Reviewed by Brent Fulgham.

        It turns out that, if you pass nil to -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
        the video output will not attempt to conform the resulting pixel buffers into a particular format.
        This means that adding such a video output to a AVPlayerItem should have almost no performance
        penalty, since the video output does not even copy the resulting buffers, but rather just retains
        and returns the ones from the AVPlayerLayer.

        Create and attach an AVPlayerItemVideoOutput after creating the AVPlayerItem, but before attaching
        the player item to the AVPlayer. This eliminates the reconfigure step which occurs after attaching
        a video output to an already attached AVPlayerItem.

        When creating the AVPlayerItemVideoOutput, pass in `nil` for the pixelBufferAttributes parameter.

        Instead of blocking waiting for output from the AVPlayerItemVideoOutput during creating, block and
        whait when asked to paint with the video output.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r176321.

    2014-11-19  Chris Fleizach  <cfleizach@apple.com>

        AX: Safari fails to load a web page with VoiceOver
        https://bugs.webkit.org/show_bug.cgi?id=138849

        Reviewed by Mario Sanchez Prada.

        Sometimes an inlineElementContinuation will continue to an inline RenderBlock, so we case this incorrectly and bad things happen.

        Test: accessibility/inline-block-assertion.html

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

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r176262.

    2014-11-17  David Hyatt  <hyatt@apple.com>

        Improve Ruby selection (getting rid of overlap and improving gap filling)
        https://bugs.webkit.org/show_bug.cgi?id=138250

        Reviewed by Dean Jackson.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::selectionGaps):
        (WebCore::RenderBlock::blockSelectionGaps):
        Add Ruby text in along with the Ruby base.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::inlineSelectionGaps):
        Don't let block gaps get filled in here.

        * rendering/RenderRubyBase.h:
        Expose accessor to the ruby run.

        * rendering/RenderRubyText.cpp:
        (WebCore::RenderRubyText::rubyRun):
        * rendering/RenderRubyText.h:
        Add accessor to the ruby run.

        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::selectionTop):
        (WebCore::RootInlineBox::selectionBottom):
        Improve selectionTop and selectionBottom of ruby bases to avoid the
        ruby text. Improve the selectionTop and selectionBottom of ruby texts
        to fill the gap up to the previous/next line as appropriate.

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r175260.

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

        Selection gap painting is ugly for ruby bases.
        https://bugs.webkit.org/show_bug.cgi?id=138136

        Reviewed by Dean Jackson.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::selectionGaps):
        For ruby bases don't fill to the end of the block (in the block direction),
        since ideographic baselines push that end below the text baseline.

        (WebCore::RenderBlock::blockSelectionGaps):
        * rendering/RenderBlockFlow.cpp:
        Skip ruby bases for block selection gap filling.

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r175976.

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

        [iOS] cleanup wireless route monitoring
        https://bugs.webkit.org/show_bug.cgi?id=138614

        Reviewed by Jer Noble.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
        (WebCore::HTMLMediaElement::removeEventListener): Ditto.
        (WebCore::HTMLMediaElement::createMediaPlayer): Ditto.

        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
        (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
        (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
        (-[WebMediaSessionHelper initWithCallback:]): Ditto.
        (-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
            on the main thread.
        (-[WebMediaSessionHelper clearCallback]): Add logging.
        (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
            the main thread.
        (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
        (-[WebMediaSessionHelper interruption:]): Add logging.
        (-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
        (-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
        (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
        (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r175585.

    2014-11-04  Reza Abbasian  <rabbasian@apple.com>

        [iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal.
        https://bugs.webkit.org/show_bug.cgi?id=137930.

        Reviewed by Jer Noble.

        When a fullscreen video gets dismissed programmatically, for instance for removing
        a webview from the view hierarchy, it can put the device in an incorrect orientation.
        Make sure we retain the window of parentView when we attempt to go to fullscreen and use
        the retained window for putting the device in correct orientation after dismissal.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
        (WebVideoFullscreenInterfaceAVKit::invalidate):

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r174860.

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

        AX: Tables with <colgroups> are not reporting table column headers
        https://bugs.webkit.org/show_bug.cgi?id=137846

        Reviewed by Mario Sanchez Prada.

        The code to search for header objects was getting stuck on anonymous RenderTableSections.
        We also need to check more rows for headers, in case the first row or more is not visible or is empty.

        Test: accessibility/table-column-headers-with-captions.html

        * accessibility/AccessibilityTableColumn.cpp:
        (WebCore::AccessibilityTableColumn::headerObject):
        (WebCore::AccessibilityTableColumn::headerObjectForSection):

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r175085.

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

        [iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
        https://bugs.webkit.org/show_bug.cgi?id=137999
        rdar://problem/18425550

        Reviewed by Zalan Bujtas.
        
        When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
        we'd fail to do a compositing layer rebuild, which caused various issues like unparented
        descendants, and misplaced and unrepainted content.
        
        This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
        with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
        updateCompositingLayers() would be a no-op.
        
        Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
        of an element changes, as we do for changes in clip.

        Test: compositing/scrolling/touch-scroll-to-clip.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::isScrollableOverflow):
        (WebCore::styleHasTouchScrolling):
        (WebCore::styleChangeRequiresLayerRebuild):

2015-01-24  David Kilzer  <ddkilzer@apple.com>

        Merge r174356.

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

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

        Reviewed by Zalan Bujtas.

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

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

2015-01-23  Pratik Solanki  <psolanki@apple.com>

        <rdar://problem/19564738> Stowe: CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::SharedBuffer::createPurgeableBuffer const + 14

        Reviewed by David Kilzer.

        Speculative fix for the above crash. The current theory is that a timer is being fired for a
        CachedResource that has been freed. Add a marker field in CachedResource to do an early
        return from CachedResource::makePurgeable() when this happens.

        No new tests because I can't reproduce the crash.

        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::~CachedResource):
        (WebCore::CachedResource::makePurgeable):
        * loader/cache/CachedResource.h:

2015-01-23  Lucas Forschler  <lforschler@apple.com>

        Build fix after r179028, r179030, r179031, r179032. 

        Reviewed by Dana Burkart.

        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::WidthIterator):
        * platform/graphics/mac/ComplexTextController.cpp:
        (WebCore::ComplexTextController::ComplexTextController):
        * rendering/RenderBlockLineLayout.cpp:
        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):

2015-01-23  Lucas Forschler  <lforschler@apple.com>

        Merge r174489

    2014-10-08  Myles C. Maxfield  <litherum@gmail.com>

            Inline ruby does not get justified correctly
            https://bugs.webkit.org/show_bug.cgi?id=137421

            Reviewed by Dave Hyatt.

            We justify text in two passes: one counts expansion opportunities within a line,
            and the other doles out widths and expansion amounts to constituent inline boxes.
            This patch simply modifies both passes to descend into ruby bases. Once it has
            done so, we then re-layout the ruby run with the newly found width.

            Tests: fast/ruby/ruby-justification-hittest.html
                   fast/ruby/ruby-justification.html

            * rendering/InlineBox.h:
            (WebCore::InlineBox::setExpansion): updateRubyForJustifiedText() has to set the
            expansion for an inline box, so make setExpansion() public.
            * rendering/RenderBlockLineLayout.cpp:
            (WebCore::updateRubyForJustifiedText): Given values that have already been
            computed in computeInlineDirectionPositionsForSegment(), adjust the widths and
            expansion values for all the various pieces of ruby.
            (WebCore::computeExpansionForJustifiedText): Call updateRubyForJustifiedText() if
            necessary.
            (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): When
            counting expansion opportunities in a line, include ruby bases.
            * rendering/RenderRubyRun.h: Fix grammar in comment.
            * rendering/RenderText.cpp:
            (WebCore::RenderText::stringView): Give default arguments to function.
            * rendering/RenderText.h: Ditto.

2015-01-23  Lucas Forschler  <lforschler@apple.com>

        Merge r174373

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

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

            Unreviewed.

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

2015-01-23  Lucas Forschler  <lforschler@apple.com>

        Merge r174297

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

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

            Reviewed by Dean Jackson.

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

            No new tests because there is no behavior change.

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

2015-01-23  Lucas Forschler  <lforschler@apple.com>

        Merge r174233

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

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

            Reviewed by Zalan Bujtas.

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

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

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

2015-01-22  David Kilzer  <ddkilzer@apple.com>

        Merge r174250.

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

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

        Reviewed by Tim Horton.

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

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

2015-01-22  David Kilzer  <ddkilzer@apple.com>

        Merge r173741.

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

        Improve fullscreen video rotation animation.
        https://bugs.webkit.org/show_bug.cgi?id=136870

        Reviewed by Simon Fraser.

        Instead of setting the frame on the video layer, set position and bounds separately. This allows the position to be synchronized with the rest of the animation.
        When using a fencePort to synchronize animations, if the fence times out, pivoting around the center provides a better fallback.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVVideoLayer setVideoSublayer:]): added
        (-[WebAVVideoLayer videoSublayer]): added
        (-[WebAVVideoLayer setBounds:]):  set position and bounds insted of frame.
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): use setVideoSublayer
        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
        (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): set bounds and anchorPoint instead of frame
        (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): set bounds instead of frame.

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

        Merge r178072.

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

            Can't copy URL for images and paste it into plain text fields.
            https://bugs.webkit.org/show_bug.cgi?id=140230
            rdar://problem/18736680

            Reviewed by Dan Bernstein.

            The incorrect objective C type was being written to the pasteboard.

            * platform/ios/PlatformPasteboardIOS.mm:
            (WebCore::PlatformPasteboard::write):

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

        Merge r177000.

    2014-12-08  Dean Jackson  <dino@apple.com>

            [Apple] Use Accelerate framework to speed-up FEGaussianBlur
            https://bugs.webkit.org/show_bug.cgi?id=139310
            <rdar://problem/18434594>

            Reviewed by Simon Fraser.

            Using Apple's Accelerate framework provides faster blurs
            than the parallel jobs approach, especially since r168577
            which started performing retina-accurate filters.

            Using Accelerate.framework to replace the existing box blur (what
            we use to approximate Gaussian blurs) gets about a 20% speedup on
            desktop class machines, but between a 2x-6x speedup on iOS hardware.
            Obviously this depends on the size of the content being blurred,
            but it is still good.

            The change is to intercept the platformApply function on
            FEGaussianBlur and send it off to Accelerate.

            There is an interactive performance test: PerformanceTests/Interactive/blur-filter-timing.html

            * platform/graphics/filters/FEGaussianBlur.cpp:
            (WebCore::kernelPosition): Move this to a file static function from the .h.
            (WebCore::accelerateBoxBlur): The Accelerate implementation.
            (WebCore::standardBoxBlur): The default generic/standard implementation.
            (WebCore::FEGaussianBlur::platformApplyGeneric): Use accelerate or the default form.
            (WebCore::FEGaussianBlur::platformApply): Don't try the parallelJobs approach if Accelerate is available.
            * platform/graphics/filters/FEGaussianBlur.h:
            (WebCore::FEGaussianBlur::kernelPosition): Deleted. Move into the .cpp.

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

        Merge r176977.

    2014-12-08  Eric Carlson  <eric.carlson@apple.com>

            [iOS] YouTube plug-in replacement should support partial urls
            https://bugs.webkit.org/show_bug.cgi?id=139400

            Reviewed by Alexey Proskuryakov.

            * Modules/plugins/YouTubePluginReplacement.cpp:
            (WebCore::YouTubePluginReplacement::youTubeURL): Call Document::completeURL.

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

        Merge r176971.

    2014-12-08  Myles C. Maxfield  <mmaxfield@apple.com>

            [iOS] Narrow non-breaking space does not fall back to a correct font
            https://bugs.webkit.org/show_bug.cgi?id=139335

            Reviewed by Enrica Casucci.

            Test: fast/text/narrow-non-breaking-space.html

            * platform/graphics/ios/FontCacheIOS.mm:
            (WebCore::requiresCustomFallbackFont):
            (WebCore::FontCache::getCustomFallbackFont):

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

        Merge r176948.

    2014-12-08  Chris Fleizach  <cfleizach@apple.com>

            AX: iOS: VoiceOver gets hung on some websites consistently.
            https://bugs.webkit.org/show_bug.cgi?id=139331

            Reviewed by Mario Sanchez Prada.

            iFrames are attachments on iOS, but they do not have attachment views. As a result, 
            WebCore would return incorrect information for the element count and index of children elements.

            No tests. Bug only manifests itself when iOS accessibility frameworks call into WebCore.

            * accessibility/AccessibilityMockObject.h:
            (WebCore::AccessibilityMockObject::isDetachedFromParent):
            * accessibility/AccessibilityObject.h:
            (WebCore::AccessibilityObject::isDetachedFromParent):
            * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
            (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
            (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
            (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
            (-[WebAccessibilityObjectWrapper accessibilityContainer]):

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

        Merge r176904.

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

            AX: I cannot activate links on the mobile version of news.google.com
            https://bugs.webkit.org/show_bug.cgi?id=139330

            Reviewed by Simon Fraser.

            This website only listens for touch events. VoiceOver normally dispatches click and mouse events,
            so on iOS this falls and VoiceOver is not able to activate anything.

            The solution here is to dispatch simulated touch down/up events.

            Test: platform/ios-simulator/ios-accessibility/press-fires-touch-events.html

            * accessibility/AccessibilityObject.cpp:
            (WebCore::AccessibilityObject::press):
            (WebCore::AccessibilityObject::dispatchTouchEvent):
            * accessibility/AccessibilityObject.h:
            (WebCore::AccessibilityObject::isDetachedFromParent):
            * page/EventHandler.h:
            * page/ios/EventHandlerIOS.mm:
            (WebCore::EventHandler::dispatchSimulatedTouchEvent):
            * platform/ios/PlatformEventFactoryIOS.h:
            * platform/ios/PlatformEventFactoryIOS.mm:
            (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
            (WebCore::PlatformEventFactory::createPlatformSimulatedTouchEvent):

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

        Merge r176768.

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

            List markers in RTL languages do not draw the first character.
            https://bugs.webkit.org/show_bug.cgi?id=139244

            Reviewed by Simon Fraser.

            Off-by-one error when reversing the string (from LTR to RTL)

            Test: fast/lists/rtl-marker.html

            * rendering/RenderListMarker.cpp:
            (WebCore::RenderListMarker::paint):

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

        Merge r176734.

    2014-12-03  Jeremy Jones  <jeremyj@apple.com>

            Subtitle menu should only appear when useful.
            https://bugs.webkit.org/show_bug.cgi?id=139133

            Reviewed by Eric Carlson.

            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (-[WebAVPlayerController hasLegibleMediaSelectionOptions]): only enable when there are non default options.
            (-[WebAVPlayerController hasAudioMediaSelectionOptions]): only enable when there is more than one option.

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

        Merge r176484.

    2014-11-21  Chris Fleizach  <cfleizach@apple.com>

            AX: com.apple.WebKit.WebContent crashed at WebCore: WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const
            https://bugs.webkit.org/show_bug.cgi?id=138905

            Reviewed by Mario Sanchez Prada.

            The crash log indicates that m_renderer is null at the time we ask ancestorsOfType(). 
            This is more of a speculative fix, since I am not entirely sure m_renderer is null when we enter the method.

            Unable to determine cause of crash or how to reproduce on demand.

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

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

        Merge r176471.

    2014-11-21  Eric Carlson  <eric.carlson@apple.com>

            [iOS] allocate volume view on the main thread
            https://bugs.webkit.org/show_bug.cgi?id=138971
            rdar://problem/18016958

            Reviewed by Jer Noble.

            * platform/audio/ios/MediaSessionManagerIOS.mm:
            (-[WebMediaSessionHelper allocateVolumeView]): New, dispatch to the main thread if necessary before allocating
                the volume view.
            (-[WebMediaSessionHelper initWithCallback:]): Call allocateVolumeView.

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

        Merge r176447.

    2014-11-21  Chris Fleizach  <cfleizach@apple.com>

            AX: MathML expressions are misread by VoiceOver
            https://bugs.webkit.org/show_bug.cgi?id=138948

            Reviewed by Mario Sanchez Prada.

            The logic for deciding what's the radicand and an index was too tied to children placement.
            We should instead pull directly from the source.

            Test: platform/mac/accessibility/mathml-root.html

            * accessibility/AccessibilityRenderObject.cpp:
            (WebCore::AccessibilityRenderObject::mathRadicandObject):
            (WebCore::AccessibilityRenderObject::mathRootIndexObject):
            * rendering/mathml/RenderMathMLRoot.h:

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

        Merge r176372.

    2014-11-19  Myles C. Maxfield  <mmaxfield@apple.com>

            [OS X] Upright vertical text is completely broken for multi-code-unit codepoints
            https://bugs.webkit.org/show_bug.cgi?id=138891

            Reviewed by Dan Bernstein.

            We were assuming that we can use the string index (in UTF-16) as the glyph
            index. This falls down when a single codepoint (and glyph) contians
            multiple code units.

            Test: platform/mac/fast/text/multiple-codeunit-vertical-upright.html

            * platform/graphics/GlyphPage.h:
            * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
            (WebCore::GlyphPage::fill):

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

        Merge r176354.

    2014-11-19  David Hyatt  <hyatt@apple.com>

            Images/replaced elements that are as tall as a page should be on their own page
            https://bugs.webkit.org/show_bug.cgi?id=138886 - <rdar://problem/18296371>

            Reviewed by Dean Jackson.

            Added fast/multicol/tall-image-behavior.html (and RL/LR variants)

            * rendering/InlineFlowBox.cpp:
            (WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom):
            * rendering/InlineFlowBox.h:
            Add a new method that computes the line top and line bottom ignoring all margins,
            overflow and line-height. This allows us to see if a line that is taller than a page
            can be made to fit if we ignored margins and unused descent.

            * rendering/RenderBlockFlow.cpp:
            (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
            Call the new helper function, computeReplacedAndTextLineTopAndBottom and push
            to a new page if we see that we can fit on a page by ourselves without blank space
            included.

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

        Merge r176318.

    2014-11-19  Chris Fleizach  <cfleizach@apple.com>

            AX: Screen braille input doesn't work on forms.
            https://bugs.webkit.org/show_bug.cgi?id=138804

            Reviewed by Mario Sanchez Prada.

            Allow iOS to set values of text fields through the API.

            Test: platform/ios-sim/accessibility/set-value.html

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

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

        Merge r176285.

    2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>

            Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
            https://bugs.webkit.org/show_bug.cgi?id=138204

            Reviewed by Dave Hyatt.

            This code is responsible for pushing block elements to the next column if
            the "orphans" CSS property is triggered. The mechanism by which this is
            achieved is to push the block down such that the origin of the block is
            at the origin of the next column. However, if there is negative line
            spacing, the top portion of the text might actually be on top of the
            origin of the block. Therefore, the block wasn't being pushed down enough
            to entirely contain its text, so the top pieces were being drawn on the
            previous column.

            Test: fast/multicol/orphans-negative-line-spacing.html

            * rendering/RenderBlockFlow.cpp:
            (WebCore::RenderBlockFlow::adjustLinePositionForPagination):

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

        Merge r175818.

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

            [iOS WK2] Layers with negative z position disapear behind the page tiles
            https://bugs.webkit.org/show_bug.cgi?id=138571
            rdar://problem/18873480

            Reviewed by Dean Jackson.

            Some crufty iOS-only code in RenderLayerBacking::parentForSublayers() caused us to fail
            to use the m_childContainmentLayer as the ancestor for descendants, so layers with
            negative z position would get depth-sorted behind the tiles.

            Fix by removing that code.

            This should have been detected by compositing/tile-cache-must-flatten.html, but
            testing infrastructure suck prevented us from doing so.

            * rendering/RenderLayerBacking.cpp:
            (WebCore::RenderLayerBacking::parentForSublayers):
            * rendering/RenderLayerBacking.h: Just some nullptr cleanup.

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

        Merge r175812.

    2014-11-10  Eric Carlson  <eric.carlson@apple.com>

            [iOS] wireless playback placeholder UI doesn't always draw
            https://bugs.webkit.org/show_bug.cgi?id=138548

            While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event
            when we are displaying inline controls because listening for it increases power consumption,
            we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because
            it controls whether or not we draw the placeholder UI which is always visible during wireless
            playback.

            Reviewed by Brent Fulgham.

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.addVideoListeners): Always listen for the
                'webkitcurrentplaybacktargetiswirelesschanged' event.
            (ControllerIOS.prototype.removeVideoListeners): Always stop listening for the 
                'webkitcurrentplaybacktargetiswirelesschanged' event.
            (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update 
                the type of controls rendered and start listening for wireless target changes immediately.
            (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop 
                listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it.

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

        Merge r175771.

    2014-11-07  Alexey Proskuryakov  <ap@apple.com>

            CSP is enforced for eval in report-only mode on first page load
            https://bugs.webkit.org/show_bug.cgi?id=138492
            rdar://problem/15782525

            Reviewed by Daniel Bates.

            This is covered by existing tests when running as one test per process invocation.

            * page/ContentSecurityPolicy.cpp:
            (WebCore::CSPDirectiveList::allowEval): Allow when in report only mode. The allowEval
            function itself needs to return false, because it's used in checkEvalAndReportViolation().
            (WebCore::CSPDirectiveList::allowJavaScriptURLs): Apply the same fix, although it's
            not changing the behavior - this function is never called with ContentSecurityPolicy::SuppressReport.
            (WebCore::CSPDirectiveList::allowInlineEventHandlers): Ditto.
            (WebCore::CSPDirectiveList::allowInlineScript): Ditto.
            (WebCore::CSPDirectiveList::allowInlineStyle): Ditto.
            (WebCore::CSPDirectiveList::allowPluginType): Ditto.
            (WebCore::CSPDirectiveList::allowScriptFromSource): Ditto.
            (WebCore::CSPDirectiveList::allowObjectFromSource): Ditto.
            (WebCore::CSPDirectiveList::allowChildFrameFromSource): Ditto.
            (WebCore::CSPDirectiveList::allowImageFromSource): Ditto.
            (WebCore::CSPDirectiveList::allowStyleFromSource): Ditto.
            (WebCore::CSPDirectiveList::allowFontFromSource): Ditto.
            (WebCore::CSPDirectiveList::allowMediaFromSource): Ditto.
            (WebCore::CSPDirectiveList::allowConnectToSource): Ditto.
            (WebCore::CSPDirectiveList::allowFormAction): Ditto.
            (WebCore::CSPDirectiveList::allowBaseURI): Ditto.
            (WebCore::ContentSecurityPolicy::didReceiveHeader): Remove isReportOnly() check,
            which is now inside allowEval().

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

        Merge r175718.

    2014-11-06  Yongjun Zhang  <yongjun_zhang@apple.com>

            Don't send identifierForInitialRequest callback method for request with DoNotSendCallbacks option.
            https://bugs.webkit.org/show_bug.cgi?id=138473

            The iOS specific code that sets up a valid m_identifier is not needed any more, since this
            will be done later in ResourceLoader::willSendRequest. This also matches the behavior that
            we don't call assignIdentifierToInitialRequest callback method if the reqeust has
            DoNotSendCallbacks option.

            Reviewed by Pratik Solanki.

            * loader/ResourceLoader.cpp: 
            (WebCore::ResourceLoader::willSendRequest): Remove iOS specific block for setting up a valid
                m_identifier. In iOS, also make sure we still bail out if the resource loader was stopped
                in assignIdentifierToInitialRequest callback by a client.

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

        Merge r175277.

    2014-10-24  Jeffrey Pfau  <jpfau@apple.com>

            FrameProgressTracker expects Page to not have detached
            https://bugs.webkit.org/show_bug.cgi?id=138061

            Reviewed by Alexey Proskuryakov.

            In some cases, a Page may be detached from a Frame before its
            FrameLoader is torn down, causing FrameProgressTracker's destructor
            to hit a null pointer.

            No new tests; it is impossible to reliably simulate the null pointer
            case without intrusive code changes.

            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):

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

        Merge r175236.

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

            text-combine needs to center text within the vertical space using glyph bounds
            https://bugs.webkit.org/show_bug.cgi?id=138056
            <rdar://problem/15403667>

            Reviewed by Dean Jackson.

            Added fast/text/tatechuyoko.html

            * rendering/RenderCombineText.cpp:
            (WebCore::RenderCombineText::RenderCombineText):
            (WebCore::RenderCombineText::adjustTextOrigin):
            (WebCore::RenderCombineText::combineText):
            * rendering/RenderCombineText.h:

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r175241.

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

            AX: input type=hidden is being exposed when aria-hidden=false
            https://bugs.webkit.org/show_bug.cgi?id=138106

            Reviewed by Benjamin Poulain.

            If an input type=hidden was inside an aria-hidden=false, it would appear because
            the lack of a RenderObject behind that object was not blocking its adoption into the AX tree.
            We should explicity check for whether the type is hidden and then return an appropriate role. 

            Test: accessibility/input-type-hidden-in-aria-hidden-false.html

            * accessibility/AccessibilityNodeObject.cpp:
            (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
            (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r175131.

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

            [Mac] Safari cannot play 'audio/amr' content.
            https://bugs.webkit.org/show_bug.cgi?id=137894

            Reviewed by Eric Carlson.

            Test: media/media-can-play-case-insensitive.html

            Sites are returning 'video/amr' for AMR audio content, but the IANA spec says 'audio/AMR', which is also what
            AVFoundation claims to support.  However, MIME types are supposed to be case-insensitive. When creating our
            mime type cache, case-fold to lower all MIME types given to us by our media frameworks.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::mimeTypeCache):
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::addFileTypesToCache):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174832.

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

            [Media] Always update controls for <audio> since they are always visible
            https://bugs.webkit.org/show_bug.cgi?id=137829
            <rdar://problem/18693987>

            Reviewed by Brent Fulgham.

            Revision 174756 made a change to only update the display of the controls
            while they are visible. However, <audio> elements didn't detect visibility
            the same way, since their controls do not auto-hide.

            Change controlsAreHidden to check if we're an audio element.

            * Modules/mediacontrols/mediaControlsApple.js:
            (Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174756.

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

            [Media] Reduce style updates (painting) in controls
            https://bugs.webkit.org/show_bug.cgi?id=137763
            <rdar://problem/17833045>

            Reviewed by Simon Fraser.

            Media controls were causing a lot of repaints they were
            constantly updating the style of the widgets, the value
            of the forms, or the text in the display.

            This is necessary when the controls are visible, but not
            necessary when they are hidden. Return immediately in that case.

            * Modules/mediacontrols/mediaControlsApple.js:
            (Controller.prototype.createControls): Initialise the slider to a zero value.
            (Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
            (Controller.prototype.updateProgress): Don't update if we're hidden.
            (Controller.prototype.updateTime): Ditto.
            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.updateProgress): Ditto.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174741.

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

            AX: Going back is broken for VoiceOver
            https://bugs.webkit.org/show_bug.cgi?id=137382

            Reviewed by Darin Adler.

            There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
              1) Existing AXLoadComplete does not get fired when you just move through page history. 
                   There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
              2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
                   Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
                   array everytime it's asked for. Since there's only ever 3 elements (web area + 2 scroll bars) this should not be a performance hit.

            Tests are not possible since they require monitoring notifications across multiple page loads.

            * accessibility/AXObjectCache.h:
            * accessibility/AccessibilityScrollView.cpp:
            (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
            * accessibility/ios/AXObjectCacheIOS.mm:
            (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
            * accessibility/mac/AXObjectCacheMac.mm:
            (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
            * dom/Document.cpp:
            (WebCore::Document::implicitClose):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174716.

    2014-10-14  Zalan Bujtas  <zalan@apple.com>

            REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
            https://bugs.webkit.org/show_bug.cgi?id=137205

            Reviewed by Simon Fraser.

            Child layer should not reset radius clipping behaviour.

            Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html

            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::calculateClipRects):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174712.

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

            URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
            https://bugs.webkit.org/show_bug.cgi?id=137718

            Reviewed by Alexey Proskuryakov.

            Added cases to fast/loader/url-parse-1.html.

            * platform/URL.cpp:
            (WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
            slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
            URL spec.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174540.

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

            RenderMathMLUnderOver adds spacing to the child operator indefinitely when resizing the window.
            https://bugs.webkit.org/show_bug.cgi?id=137330

            Reviewed by Darin Adler.

            The layout for the <mundercover> math object happens in two separate passes. The first pass runs
            the layout for the two children and then calculates the maximum child width.  It then sets the 
            stretch size for the math operator child.  And finally it runs the second layout pass by calling
            the base class layout() function. The base class function then runs the layout for the children
            rendering blocks.  In the operator child function computePreferredLogicalWidths(), the stretch 
            size is used to adjust the width (or the height) of the operator. Then it adds the leading and
            trailing spaces and the total will be the operator child width.

            When resizing or zooming the window, the render objects are just invalidated but marked as 'needs-
            Layout'.  The problem is happening because the stretch size of the math operator is not reset
            before running the layout.  The old logical width (or height) of the the math operator child which
            is equal to the stretch size plus the leading and trailing spaces for is compared with the glyph
            size if the old logical width ( or height) is larger, it is set to be the stretch size.  When it
            is used again because of invalidation, new leading and trailing spaces are included in the new
            logical width.  So with every zooming-in or out or window resizing, new leading and trailing 
            spaces are added to the logical width of the math operator child or the math <munderober> object.

            Ensure the stretch size of the math operator render object is reset before running its layout.
            Running the layout means either the page is just loaded or it's invalidated which means, no 
            layout stall data should be used.

            Test: mathml/opentype/munderover-window-resize.html

            * rendering/mathml/RenderMathMLOperator.cpp:
            (WebCore::RenderMathMLOperator::resetStretchSize):
            * rendering/mathml/RenderMathMLOperator.h:
            resetStretchSize() sets the stretch size to its original value when the class is created.
            * rendering/mathml/RenderMathMLUnderOver.cpp:
            (WebCore::RenderMathMLUnderOver::layout):
            Make sure the operator stretch size is reset before calling its layout. Also make sure the new 
            maximum stretch size to the operator objects that were invalid and needsLayout.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174345.

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

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

            Reviewed by Mario Sanchez Prada.

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

            No new functionality. Existing tests cover changes.

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

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r174330.

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

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

            Reviewed by Mario Sanchez Prada.

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

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

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

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r173790.

    2014-09-19  Jer Noble  <jer.noble@apple.com>

            [Media][Mac] Buffered range slides around as you resize a window
            https://bugs.webkit.org/show_bug.cgi?id=136960

            Reviewed by Dean Jackson.

            Rather than using a canvas as the background image for the timeline slider, use a generated SVG image
            to represent the buffered ranges.

            * Modules/mediacontrols/mediaControlsApple.css:
            (audio::-webkit-media-controls-timeline):
            * Modules/mediacontrols/mediaControlsApple.js:
            (Controller.prototype.createControls):
            (Controller.prototype.updateProgress):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r173688.

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

            filterRootById accidentally clears inAdjacentChain flag
            https://bugs.webkit.org/show_bug.cgi?id=136851

            Reviewed by Benjamin Poulain.

            Test: fast/selectors/filter-root-node-with-selector-contains-adjacents.html

            * dom/SelectorQuery.cpp:
            (WebCore::filterRootById):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r173504.

    2014-09-10  Timothy Horton  <timothy_horton@apple.com>

            Fix the build.

            * platform/network/ResourceHandle.h:
            * platform/network/mac/ResourceHandleMac.mm:

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r173501.

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

            Call setCollectsTimingData only once, and before making any {CF,NS}URLConnections
            https://bugs.webkit.org/show_bug.cgi?id=136731
            <rdar://problem/18252844>

            Reviewed by Simon Fraser.

            * platform/network/cf/ResourceHandleCFNet.cpp:
            (WebCore::ResourceHandle::start):
            Move setCollectsTimingData to before createCFURLConnection, so the first connection
            has timing data associated with it.

            * platform/network/mac/ResourceHandleMac.mm:
            (WebCore::ResourceHandle::createNSURLConnection):
            Move setCollectsTimingData to before we create our NSURLConnection, so the first connection
            has timing data associated with it.
            Use setCollectsTimingData instead of the NSURLConnection SPI directly.

            (WebCore::ResourceHandle::setCollectsTimingData):
            Only call _setCollectsTimingData once.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r173071.

    2014-08-27  Enrica Casucci  <enrica@apple.com>

            textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
            https://bugs.webkit.org/show_bug.cgi?id=136323
            rdar://problem/18141964

            Reviewed by Antti Koivisto.

            For underline style we need to check typingStyle first and use that information to populate
            the dictionary. If there is no typing style we can use the render style.

            * WebCore.exp.in:
            * editing/ios/EditorIOS.mm:
            (WebCore::Editor::fontAttributesForSelectionStart):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r172797.

    2014-08-20  Zalan Bujtas  <zalan@apple.com>

            Dashed/dotted borders do not paint.
            https://bugs.webkit.org/show_bug.cgi?id=135898

            Reviewed by Simon Fraser.

            Remove the empty line checks for drawLines. There's no need to protect the graphics
            context from empty lines.

            Tests: fast/borders/border-painting-dashed-at-all.html
                   fast/borders/border-painting-dashed.html
                   fast/borders/border-painting-dotted-at-all.html
                   fast/borders/border-painting-dotted.html
                   fast/borders/border-painting-double-at-all.html
                   fast/borders/border-painting-double.html
                   fast/borders/border-painting-groove-at-all.html
                   fast/borders/border-painting-inset-at-all.html
                   fast/borders/border-painting-inset.html
                   fast/borders/border-painting-outset-at-all.html
                   fast/borders/border-painting-outset.html
                   fast/borders/border-painting-ridge-at-all.html
                   fast/borders/border-painting-solid-at-all.html
                   fast/borders/border-painting-solid.html
                   fast/borders/hidpi-border-painting-groove.html
                   fast/borders/hidpi-border-painting-ridge.html

            * rendering/RenderObject.cpp:
            (WebCore::RenderObject::drawLineForBoxSide):
            (WebCore::drawBorderLineRect): Deleted.
            (WebCore::drawBorderLine): Deleted.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r172504.

    2014-08-12  Myles C. Maxfield  <mmaxfield@apple.com>

            Fonts forced to use non synthetic italics might be laid out with the incorrect baseline
            https://bugs.webkit.org/show_bug.cgi?id=135403

            Reviewed by Darin Adler.

            When italics is specified on a font, and the font isn't coming from the cache, we ask
            the SimpleFontData to provide a non-synthetic-italic version of itself. Our current
            implementation doesn't preserve whether or not the SimpleFontData includes vertical
            glyphs (glyphs that are not rotated when drawn in the vertical writing mode), which
            determines which baseline we use to lay out the text. By passing "false" to
            the isTextOrientationFallback argument to SimpleFontData::create(), we preserve this
            hasVerticalGlyphs flag.

            Test: fast/text/international/synthesized-italic-vertical-latin-double.html

            * platform/graphics/SimpleFontData.cpp:
            (WebCore::SimpleFontData::nonSyntheticItalicFontData):
            * testing/Internals.cpp:
            (WebCore::Internals::invalidateFontCache): Add "invalidateFontCache" to window.internals.
            * testing/Internals.h: Ditto.
            * testing/Internals.idl: Ditto.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r172326.

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

            Subpixel rendering: Border thickness and length flooring can result empty borders
            due to losing precision during multiple float <-> LayoutUnit conversions.
            https://bugs.webkit.org/show_bug.cgi?id=135686

            Reviewed by Simon Fraser.

            The combination of losing precision and flooring the border thickness/length to avoid
            empty border rect drawing can lead to false positives of missing borders.
            This patch moves empty border checking right before painting where we can safely use round
            instead of floor.

            Tests: fast/borders/hidpi-border-width-flooring.html

            * rendering/RenderObject.cpp:
            (WebCore::drawBorderLineRect):
            (WebCore::drawBorderLine):
            (WebCore::RenderObject::drawLineForBoxSide):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r172215.

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

            Random resource replacement on beta.icloud.com
            https://bugs.webkit.org/show_bug.cgi?id=135685
            <rdar://problem/17937975>

            Reviewed by Alexey Proskuryakov.

            Revert the performance optimization in r170499. It turns out we could get a delayed disk
            cache notification for a resource that has since been changed in WebCore. In such a case, we
            were replacing the newer resource data with the older disk cached resource data. This was
            happening for cached POST content on beta.icloud.com. Fix this by forcing a memcmp of data
            contents before replacing it which is what we used to do before.

            * loader/cache/CachedResource.cpp:
            (WebCore::CachedResource::tryReplaceEncodedData):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r171984.

    2014-08-03  Dan Bernstein  <mitz@apple.com>

            <rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user-agent string is the host OS’s
            https://bugs.webkit.org/show_bug.cgi?id=135549

            Reviewed by Mark Rowe.

            * platform/cocoa/SystemVersion.mm:
            (WebCore::createSystemMarketingVersion): On the iOS Simulator, locate the system Library
            directory relative to the Simulator root.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r171941.

    2014-07-30  Myles C. Maxfield  <mmaxfield@apple.com>

            URLs in srcset attributes are not made absolute upon copy and paste
            https://bugs.webkit.org/show_bug.cgi?id=135448

            Reviewed by Ryosuke Niwa.

            When pasting, canonicalize URLs in srcset the same way we do with src.

            Test: editing/pasteboard/img-srcset-copy-paste-canonicalization.html

            * dom/Element.cpp:
            (WebCore::Element::completeURLsInAttributeValue): Initial implemention, moved from markup.cpp.
            * dom/Element.h:
            (WebCore::Element::attributeContainsURL): New function for completeURLs to call.
            (WebCore::Element::completeURLsInAttributeValue): Only called if attributeContainsURL returns
            true. Default implementation simply calls isURLAttribute().
            * editing/markup.cpp:
            (WebCore::completeURLs): Call attributeContainsURL() and completeURLsInAttributeValue() to
            complete the URL, so nodes can perform their own behavior.
            * html/HTMLImageElement.cpp:
            (WebCore::HTMLImageElement::attributeContainsURL): Return true for srcset.
            (WebCore::HTMLImageElement::completeUrlAttributeValue): Use our existing srcset parser to
            parse the srcset attribute, then use its output to canonicalize URLs, and build it back up
            into a string.
            * html/HTMLImageElement.h:
            (WebCore::HTMLImageElement::attributeContainsURL):
            (WebCore::HTMLImageElement::completeUrlAttributeValue):
            * html/parser/HTMLSrcsetParser.cpp: Make parseImageCandidatesFromSrcsetAttribute() public
            and change its signature to return its result.
            (WebCore::parseImageCandidatesFromSrcsetAttribute):
            * html/parser/HTMLSrcsetParser.h: Ditto.

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r171708.

    2014-07-28  Brady Eidson  <beidson@apple.com>

            REGRESSION(168376): Standalone images pasted to Outlook 2011 don't display
            <rdar://problem/17768371> and https://bugs.webkit.org/show_bug.cgi?id=135363

            Reviewed by Tim Horton.

            Outlook isn’t prepared to handle the resource load callbacks when sent synchronously.

            r168376 was an optimization that we no longer need, so the simplest fix is to roll it out.

            * editing/mac/EditorMac.mm:
            (WebCore::Editor::WebContentReader::readImage):

            * loader/archive/ArchiveResource.cpp:
            (WebCore::ArchiveResource::ArchiveResource):
            * loader/archive/ArchiveResource.h:
            (WebCore::ArchiveResource::setShouldLoadImmediately): Deleted.
            (WebCore::ArchiveResource::shouldLoadImmediately): Deleted.

            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::requestResource):

2015-01-20  Babak Shafiei  <bshafiei@apple.com>

        Merge r171692.

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

            REGRESSION (r160806): CSS zoom property doesn't work on anything inside anchors.
            <https://webkit.org/b/135344>
            <rdar://problem/17759577>

            When DeprecatedStyleBuilder applies the CSS zoom property (ApplyPropertyZoom)
            it first resets the "effective zoom" by calling RenderStyle::setEffectiveZoom().

            This mechanism was not resistent to being called multiple times, due to the
            optimization in RenderStyle::setZoom() to avoid copy-on-writing the shared data
            when setting some property to the already-set value.

            The bug would happen in this sequence:

            ApplyPropertyZoom:
                - setEffectiveZoom(1);
                - setZoom(2); // this updates the effective zoom
            ApplyPropertyZoom:
                - setEffectiveZoom(1);
                - setZoom(2); // this doesn't update the effective zoom

            When we run the second setZoom(2); call, the RenderStyle's zoom value is 2
            already and we'll early return without updating the effective zoom.

            This change moves the updating of the effective zoom in setZoom() to take place
            before the early return due to overwriting with the same value.

            Note: the fact that we're apply the zoom property twice is an inefficiency that
            we should figure out a way to avoid in the future.

            Reviewed by Simon Fraser.

            Test: fast/css/zoom-inside-link.html

            * rendering/style/RenderStyle.h:
            (WebCore::RenderStyle::setZoom):

2014-12-19  Babak Shafiei  <bshafiei@apple.com>

        Merge r177566.

    2014-12-18  Jeremy Jones  <jeremyj@apple.com>

            dispatch to main thread before accessing playerController() in WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse
            https://bugs.webkit.org/show_bug.cgi?id=139809

            Reviewed by Dan Bernstein.

            This prevents a race in playerController().

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

2014-12-17  Babak Shafiei  <bshafiei@apple.com>

        Merge build fix for r177375.

    2014-12-16  Jer Noble  <jer.noble@apple.com>

            Unreviewed build fix after r177375; explicitly cast to NSUInteger.

            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions):
            (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions):

2014-12-17  Babak Shafiei  <bshafiei@apple.com>

        Merge patch for r177375.

    2014-12-16  Jer Noble  <jer.noble@apple.com>

            [iOS] Crash in WebKit::WebPageProxy::dispatchViewStateChange() tapping a link from another app while playing a video
            https://bugs.webkit.org/show_bug.cgi?id=139550

            Reviewed by Anders Carlsson.

            The existing "dispatch to WebThread, then release" model is insufficient and still
            can result in RefPtr race conditions between the main thread and the web thread.
            Make WebVideoFullscreenInterfaceAVKit a thread-safe ref-counted class, which
            eliminates the necessity of disptaching back to the web thread before releasing.

            * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (WebVideoFullscreenInterfaceAVKit::setDuration): Use a strongThis model.
            (WebVideoFullscreenInterfaceAVKit::setCurrentTime): Ditto.
            (WebVideoFullscreenInterfaceAVKit::setRate): Ditto.
            (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): Ditto.
            (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): Ditto.
            (mediaSelectionOptions): Return a RetainPtr object.
            (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): Use a strongThis model.
            (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): Ditto.
            (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): Ditto.
            (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
            (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
            (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Ditto.
            (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Ditto.
            (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Added utility
                function. Lets us use the implied this pointer rather than an explicit
                strongThis.
            (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized): Ditto.
            (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): Ditto.
            (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
            (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
            (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Use a strongThis model.

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r176803.

    2014-12-04  Oliver Hunt  <oliver@apple.com>

            Serialization of MapData object provides unsafe access to internal types
            https://bugs.webkit.org/show_bug.cgi?id=138653

            Reviewed by Geoffrey Garen.

            We now keep the value portion of the key/value pair in MapData as a
            separate stack. This allows us to maintain the spec semantic of
            "atomic" serialisation of the key/value pair without retaining the
            use of a potentially invalid iterator.

            * bindings/js/SerializedScriptValue.cpp:
            (WebCore::CloneSerializer::serialize):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r175974.

    2014-11-11  David Kilzer  <ddkilzer@apple.com>

            Protect Document in ProcessingInstruction::setXSLStyleSheet()
            <http://webkit.org/b/138621>

            Reviewed by Andreas Kling.

            The patch is inspired by the following Blink revision by
            <tasak@google.com>:
            <https://src.chromium.org/viewvc/blink?view=rev&revision=182309>

            * dom/ProcessingInstruction.cpp:
            (WebCore::ProcessingInstruction::setXSLStyleSheet):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r175347.

    2014-10-29  Alexey Proskuryakov  <ap@apple.com>

            Notify Settings object when its Page object goes away.
            https://bugs.webkit.org/show_bug.cgi?id=138183
            rdar://problem/18786900

            Reviewed by Andreas Kling.

            I could not make a test for this issue.

            * page/Page.cpp:
            (WebCore::Page::~Page):
            * page/Settings.cpp:
            (WebCore::setImageLoadingSettings):
            (WebCore::Settings::Settings):
            (WebCore::Settings::setTextAutosizingEnabled):
            (WebCore::Settings::setTextAutosizingWindowSizeOverride):
            (WebCore::Settings::setTextAutosizingFontScaleFactor):
            (WebCore::Settings::setMediaTypeOverride):
            (WebCore::Settings::setScriptEnabled):
            (WebCore::Settings::setUserStyleSheetLocation):
            (WebCore::Settings::setMinDOMTimerInterval):
            (WebCore::Settings::minDOMTimerInterval):
            (WebCore::Settings::domTimerAlignmentInterval):
            (WebCore::Settings::setUsesPageCache):
            (WebCore::Settings::setScreenFontSubstitutionEnabled):
            (WebCore::Settings::setFontRenderingMode):
            (WebCore::Settings::setDNSPrefetchingEnabled):
            (WebCore::Settings::setStorageBlockingPolicy):
            (WebCore::Settings::setBackgroundShouldExtendBeyondPage):
            (WebCore::Settings::setScrollingPerformanceLoggingEnabled):
            (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
            (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
            (WebCore::Settings::setFontFallbackPrefersPictographs):
            * page/Settings.h:
            (WebCore::Settings::pageDestroyed):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r175345.

    2014-10-29  Zalan Bujtas  <zalan@apple.com>

            Remove invalid float from RootInlineBox.
            https://bugs.webkit.org/show_bug.cgi?id=137707

            Reviewed by Antti Koivisto.

            In certain cases, floating boxes get attached to the last (root) inline box.
            When this particular floating box gets destroyed, it also needs to be detached
            from the last inline box.
            1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat())
            2. Ensure that it is called when the floating box is being destroyed.

            Test: fast/inline/crash-when-inline-box-has-invalid-float.html

            * rendering/RenderBlockFlow.cpp:
            (WebCore::RenderBlockFlow::removeFloatingObject):
            (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while
            tearing down the render tree, we can get to a state where a block element has both inline and block children.
            It happens when the style change on an element makes sibling anonymous block wrappers detached.
            In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the
            block child elements as we return early at the childrenInline() check.
            * rendering/RootInlineBox.h:
            (WebCore::RootInlineBox::removeFloat):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r175197.

    2014-10-24  Said Abou-Hallawa  <sabouhallawa@apple.com>

            Clamp wordSpacing percentage value.
            https://bugs.webkit.org/show_bug.cgi?id=129350.

            Reviewed by Zalan Bujtas.

            When the CSS wordSpacing property is percentage, its value has to be within the
            pre-defined min/max values for the CSS length type. This is done the same way
            the wordSpacing of type <length> is handled.

            Tests: css3/infinite-word-spacing.html.

            Move the definitions of minValueForCssLength and maxValueForCssLength from the
            .cpp file to the .h file.
            * css/CSSPrimitiveValue.cpp:
            * css/CSSPrimitiveValue.h:

            Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
            its type is percentage.
            * css/DeprecatedStyleBuilder.cpp:
            (WebCore::ApplyPropertyWordSpacing::applyValue):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r176735.

    2014-12-03  Dana Burkart  <dburkart@apple.com>

            Fix merge-related build failure.

            * rendering/RenderBlock.cpp:
            (WebCore::RenderBlock::blockSelectionGaps):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r176295.

    2014-11-18  David Hyatt  <hyatt@apple.com>

            REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
            https://bugs.webkit.org/show_bug.cgi?id=137590

            Reviewed by Dean Jackson.

            Added fast/block/selection-block-gaps-crash.html

            * rendering/RenderBlock.cpp:
            (WebCore::RenderBlock::blockSelectionGaps):
            Check that we really are a RenderBlock before recurring.

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r175074.

    2014-10-22  Said Abou-Hallawa  <sabouhallawa@apple.com>

            SVG loaded through html <img> can't request to load any external resources.
            https://bugs.webkit.org/show_bug.cgi?id=137762.

            Reviewed by Daniel Bates.

            SVG images have unique security rules that prevent them from loading any external
            resources. This patch enforces these rules in CachedResourceLoader::canRequest for
            all non-data-uri resources.

            The fix and the tests are ported but modified a little from the chromium fix:
            http://src.chromium.org/viewvc/blink?view=rev&rev=176084

            Test: http/tests/security/svg-image-with-cached-remote-image.html
                  http/tests/security/svg-image-with-css-cross-domain.html

            For the SVG image, prevent loading any external sub-resource except for data urls.
            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::canRequest):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r174946.

    2014-10-21  Manuel Rego Casasnovas  <rego@igalia.com>

            ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
            https://bugs.webkit.org/show_bug.cgi?id=136939

            Reviewed by Darin Adler.

            In some particular situations computeIntrinsicLogicalWidths() is called
            in the middle of layoutGridItems(). In these cases we do not need to
            populate the grid again, so we should avoid calling placeItemsOnGrid().
            In addition, we do not need to clean the grid either, as that will be
            done later by layoutGridItems().

            Test: fast/css-grid-layout/grid-was-populated-assert.html

            * rendering/RenderGrid.cpp:
            (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
            placeItemsOnGrid() and clearGrid() if the grid was already populated.
            * rendering/RenderGrid.h: Move gridWasPopulated() header out of the
            debug ifdefs.

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r174922.

    2014-10-17  Jeffrey Pfau  <jpfau@apple.com>

            Ensure attached frame count doesn't exceed the maximum allowed frames
            https://bugs.webkit.org/show_bug.cgi?id=136457

            Reviewed by Alexey Proskuryakov.

            Test: fast/frames/exponential-frames.html

            * html/HTMLFrameElementBase.cpp:
            (WebCore::HTMLFrameElementBase::isURLAllowed):

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r173845.

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

            Bad cast in isValidColumnSpanner.
            https://bugs.webkit.org/show_bug.cgi?id=133380.

            Reviewed by Simon Fraser.

            Added fast/multicol/multicol-crazy-nesting.html

            * rendering/RenderMultiColumnFlowThread.cpp:
            (WebCore::isValidColumnSpanner):
            The crawl up the chain looking for unsplittable objects should use containing blocks
            and not be casting to parent boxes. You can have an inline in the parent chain, so
            this was not the right way to walk up the tree.

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r173843.

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

            ASSERT in RenderMultiColumnSet::requiresBalancing.
            https://bugs.webkit.org/show_bug.cgi?id=136376.

            Reviewed by David Kilzer.

            Added fast/multicol/multicol-selection.html.

            * rendering/RenderMultiColumnFlowThread.cpp:
            (WebCore::isValidColumnSpanner):
            Don't allow an object to become a spanner if it does not have the flow
            thread as its containing block. Otherwise the flow thread won't get notified
            of spanner placeholder insertions, and so the spanner ends up orphaned.

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r173738.

    2014-09-18  Daniel Bates  <dabates@apple.com>

            REGRESSION (r168921): SVG elements may be unnecessarily rebuilt
            https://bugs.webkit.org/show_bug.cgi?id=136373

            Reviewed by David Kilzer.

            Fixes an issue where a SVG element may be unnecessarily rebuilt. In particular,
            it is unnecessary to rebuild a SVG element that will be removed from the document.

            Test: svg/custom/remove-subtree-including-use-with-child-textpath-that-references-earlier-path.html

            * svg/SVGDocumentExtensions.cpp:
            (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Modified to remove a SVG element
            from the list of elements to be rebuilt.

2014-12-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r173424.

    2014-09-08  Mihnea Ovidenie  <mihnea@adobe.com>

            [CSSRegions]Incorrect layout for multicol element transformed into region
            https://bugs.webkit.org/show_bug.cgi?id=136459

            Reviewed by David Hyatt.

            Until we will support the multicolumn region functionality, a multicolumn element
            that also has flow-from style is not transformed into a region (https://bugs.webkit.org/show_bug.cgi?id=135153).
            However, when a multicolumn element with flow-from style dynamically loses
            its multicolumn style while keeping the flow-from style, we have to transform
            the element into a region by detaching and attaching the associated DOM node,
            in the same way we are proceeding when an element receives a different flow-from style.

            Test: fast/regions/multicol/nested-multicol-into-region-dynamic.html

            * style/StyleResolveTree.cpp:
            (WebCore::Style::determineChange):

2014-12-09  Babak Shafiei  <bshafiei@apple.com>

        Merge r173061.

    2014-08-28  Mihnea Ovidenie  <mihnea@adobe.com>

            [CSSRegions] Incorrect selection clearing on a document without regions
            https://bugs.webkit.org/show_bug.cgi?id=134901

            Reviewed by David Hyatt.

            When we select all the content of document with named flows but without regions,
            the start and end points of selection is cached in RenderView. However, since
            the document has named flows, the selection is split between the subtrees. During the split,
            it is possible that the cached end-points of the original selection are not included
            in any of the resulting subtree selection and they are not marked accordingly.
            In order to process the selection clearing correctly, we have to take the original
            selection end-points into account.

            Test: fast/regions/selection/select-all-without-regions.html

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

2014-12-09  Babak Shafiei  <bshafiei@apple.com>

        Merge r173046.

    2014-08-27  Daniel Bates  <dabates@apple.com>

            Scrollbar corner can be drawn outside containing frame
            https://bugs.webkit.org/show_bug.cgi?id=133131
            <rdar://problem/16382769>

            Reviewed by Simon Fraser.

            Merged from Blink (patch by Levi Weintraub):
            <https://src.chromium.org/viewvc/blink?revision=170625&view=revision>

            Fixes an issue where the scroll corner may be painted outside the rectangle of
            its associated frame by setting a clip rectangle before painting the scroll bar(s)
            and scroll corner.

            Test: scrollbars/custom-scrollbars-paint-outside-iframe.html

            * platform/ScrollView.cpp:
            (WebCore::ScrollView::paint):

2014-12-09  Babak Shafiei  <bshafiei@apple.com>

        Merge r171849.

    2014-07-31  Andrei Bucur  <abucur@adobe.com>

            [CSS Multicolumn] Clear the lines when switching to multi-column layout
            https://bugs.webkit.org/show_bug.cgi?id=135127

            Reviewed by Alexandru Chiculita.

            When switching an element to multi-column layout it becomes a container of block
            children. When this happens the existing line boxes must be deleted in addition
            to clearing the hasInlineChildren flag.

            Tests: fast/multicol/inline-container-to-multicol.html
                   fast/multicol/inline-container-to-multicol-float.html
                   fast/multicol/inline-container-to-multicol-positioned.html

            * rendering/RenderBlockFlow.cpp:
            (WebCore::RenderBlockFlow::createMultiColumnFlowThread):

2014-10-27  Babak Shafiei  <bshafiei@apple.com>

        Merge r175158.

    2014-10-23  Zalan Bujtas  <zalan@apple.com>

            WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
            https://bugs.webkit.org/show_bug.cgi?id=138035

            Reviewed by Antti Koivisto.

            NULL-check element().renderer() before using it.

            * html/SearchInputType.cpp:
            (WebCore::SearchInputType::didSetValueByUserEdit):

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r174827.

    2014-10-17  Alexey Proskuryakov  <ap@apple.com>

            [iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
            https://bugs.webkit.org/show_bug.cgi?id=137826
            rdar://problem/17329599

            Reviewed by Brady Eidson.

            No new tests, as we don't have a way to simulate details of user interaction with
            an auth dialog.

            * platform/network/cf/ResourceHandleCFNet.cpp:
            (WebCore::ResourceHandle::receivedCredential):
            (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
            (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
            (WebCore::ResourceHandle::receivedChallengeRejection):
            Added null checks before passing m_connection for CFNetwork functions, making this
            match what Mac code does when sending a message to a nil receiver.

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r174846.

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

            [iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
            https://bugs.webkit.org/show_bug.cgi?id=137837
            rdar://problem/18545452

            Reviewed by Tim Horton.

            Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
            in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
            and a null check.

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

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r174787.

    2014-10-16  Alexey Proskuryakov  <ap@apple.com>

            Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
            https://bugs.webkit.org/show_bug.cgi?id=137779
            rdar://problem/18679320

            Reviewed by Brady Eidson.

            * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
            (WebCore::ResourceHandleCFURLConnectionDelegate::retain):
            (WebCore::ResourceHandleCFURLConnectionDelegate::release):
            (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
            * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
            Implemented retain/release. They are necessary, as ResourceHandle goes away when
            it's canceled, and there is noone else to keep the client object alive but
            CFURLConnection itself.

            * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
            (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
            Added a FIXME about potential improvements that I spotted while invsestigating this.

2014-10-22  Babak Shafiei  <bshafiei@apple.com>

        Merge r173974.

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

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

            Reviewed by Eric Carlson.

            Add WebThreadRun to prevent race with RefPtr of WebVideoFullscreenInterfaceAVKit.

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

2014-10-22  Babak Shafiei  <bshafiei@apple.com>

        Merge r173848.

    2014-09-22  Alexey Proskuryakov  <ap@apple.com>

            WebSocket crash when a connection is closed from server side
            https://bugs.webkit.org/show_bug.cgi?id=137009
            rdar://problem/18333977
            rdar://problem/12708225

            Reviewed by Brady Eidson.

            I don't think that this can be tested with our test server.

            * Modules/websockets/WebSocketChannel.cpp:
            (WebCore::WebSocketChannel::WebSocketChannel): Added logging.
            (WebCore::WebSocketChannel::~WebSocketChannel): Ditto.
            (WebCore::WebSocketChannel::close): Protect self, because startClosingHandshake
            can release the last reference.
            (WebCore::WebSocketChannel::fail): Added an assertion that the channel is always
            closed after this function.
            (WebCore::WebSocketChannel::startClosingHandshake): Protect self, and don't change
            the stack from closed back to closing if after failing to send closing handshake.
            (WebCore::WebSocketChannel::processOutgoingFrameQueue): Protect self.

2014-10-19  Babak Shafiei  <bshafiei@apple.com>

        Merge r174651.

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

            [iOS] Stop listening for wireless playback target availability when the default controls are hidden.
            https://bugs.webkit.org/show_bug.cgi?id=137633

            Reviewed by Dean Jackson.

            In order to minimize the excess bandwidth and power consumption required for actively listening
            for wireless playback target availablity, unregister for those notifications while the controls
            are hidden due to playback, or when the element's document is hidden.

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
            (ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
                instead of setShouldListenForPlaybackTargetAvailabilityEvent()
            (ControllerIOS.prototype.hideControls): Ditto.
            (ControllerIOS.prototype.showControls): Ditto.
            (ControllerIOS.prototype.updateStatusDisplay): Ditto.
            (ControllerIOS.prototype.handleVisibilityChange): Ditto.
            (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
                for target availability when the video has no errors, is not in the initial "big play button"
                controls state, and when the controls are not hidden.
            * platform/audio/ios/MediaSessionManagerIOS.mm:
            (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
                rather than waiting for the autoreleasepool to destroy our routing controller.

2014-10-19  Babak Shafiei  <bshafiei@apple.com>

        Merge r174073.

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

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

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

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

2014-10-03  Babak Shafiei  <bshafiei@apple.com>

        Merge r174277.

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

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

            Reviewed by Eric Carlson.

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

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

2014-10-03  Babak Shafiei  <bshafiei@apple.com>

        Merge r174244.

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

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

            Reviewed by Alexey Proskuryakov.

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

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

2014-10-02  Babak Shafiei  <bshafiei@apple.com>

        Merge r174199.

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

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

            Reviewed by Sam Weinig.

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

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

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

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

2014-09-18  Babak Shafiei  <bshafiei@apple.com>

        Merge patch for <rdar://problem/18382131>.

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

            CSS JIT: The backtracking register can be ignored from the minimumRegisterRequirements
            https://bugs.webkit.org/show_bug.cgi?id=136906
            rdar://problem/18368294

            Reviewed by Darin Adler.

            This patch is for WebKit branches that do not include r173229.

            * cssjit/SelectorCompiler.cpp:
            (WebCore::SelectorCompiler::minimumRegisterRequirements):
            In the worst case, the nth-child() filter can take up to 6 registers:
            1) currentElement, the state register.
            2) parentElement for tree marking on style resolution.
            3) elementCounter to count elements pior to current.
            4) previousSibling when walking the previous siblings.
            5) elementRareData to access the index cache.
            6) cachedChildIndex, the value of the index cache.

            If the backtracking register is also used, the total of "in-flight" registers is 7,
            one more than "minimumRequiredRegisterCount". This needs to be taken into account
            in minimumRegisterRequirements() or we will run out of registers when hitting the worst case.

2014-09-15  Babak Shafiei  <bshafiei@apple.com>

        <rdar://problem/18327341> Disable Web Timing on this branch.

        Reviewed originally by Sam Weinig.

        Disable:
        - WEB_TIMING

        * Configurations/FeatureDefines.xcconfig:

2014-09-11  Babak Shafiei  <bshafiei@apple.com>

        Merge r173016.

    2014-08-27  Timothy Hatcher  <timothy@apple.com>

            Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB)
            https://bugs.webkit.org/show_bug.cgi?id=136293

            Reviewed by Joseph Pecoraro.

            * inspector/InspectorIndexedDBAgent.cpp:
            (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from
            IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing.

2014-09-10  Babak Shafiei  <bshafiei@apple.com>

        Merge r173345.

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

            [iOS] Work around bug 136593 by disabling the PDFDocumentImage live resize optimization there
            https://bugs.webkit.org/show_bug.cgi?id=136594
            rdar://problem/17457013

            Reviewed by Simon Fraser.

            * platform/graphics/cg/PDFDocumentImage.cpp:
            (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
            Disable the optimization on iOS, because bug 136593 rears its head
            most often on iOS because it is more common to have contexts that always
            use low-quality image interpolation on that platform.

2014-09-08  Babak Shafiei  <bshafiei@apple.com>

        Merge r173344.

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

            Doing a navigation on a non-opaque WKWebView can result in an empty layer tree
            https://bugs.webkit.org/show_bug.cgi?id=136590
            <rdar://problem/18234000>

            Reviewed by Simon Fraser.

            * page/FrameView.cpp:
            (WebCore::FrameView::setTransparent):
            Avoid scheduling a compositing layer update if the RenderView isn't the
            one associated with this FrameView. This can happen during a navigation,
            before the new Document (and RenderView) is swapped in. This is particularly
            bad in the case of setTransparent because it is called from Frame::createView,
            which is right in the middle of that transition window. If we let the compositing
            layer update go ahead, it can end up detaching the new Document's layer tree,
            and we have no mechanism that would cause it to reattach.

2014-08-18  Babak Shafiei  <bshafiei@apple.com>

        Merge r172213.

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

            [Mac, iOS] Captions are appearing multiple times during repeated video play through
            https://bugs.webkit.org/show_bug.cgi?id=135680
            <rdar://problem/17926802>

            Reviewed by Eric Carlson.

            Test: media/track/track-in-band-cues-added-once.html

            Revert TextTrackCueGeneric::isOrderedBefore logic to its original form, and add
            a new 'isOrderedBeforeDuringDisplay' for the special case of displaying captions.

            * html/shadow/MediaControlElements.cpp:
            (WebCore::compareCueIntervalForDisplay): Added helper function.
            (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Use the new
            'isOrderedBeforeDuringDisplay' to order the cues for display.
            * html/track/TextTrackCue.h:
            (WebCore::TextTrackCue::isOrderedBeforeDuringDisplay): Added. This just
            calls the existing 'isOrderedBefore' method.
            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGeneric::isOrderedBefore): Revert to logic used
            prior to r171700.
            (WebCore::TextTrackCueGeneric::isOrderedBeforeDuringDisplay): New method that
            implements the behavior in r171700.
            * html/track/TextTrackCueGeneric.h:

2014-08-18  Babak Shafiei  <bshafiei@apple.com>

        Merge r172317.

    2014-08-07  Simon Fraser  <simon.fraser@apple.com>

            HTML <sub> and <sup> elements do not work in some 64-bit builds
            https://bugs.webkit.org/show_bug.cgi?id=135736

            Reviewed by Tim Horton.
        
            RootInlineBox::verticalPositionForBox() had some implicit conversions between
            LayoutUnit and int that caused overflow, and resulted in different comparison
            behavior with an int constant in different architectures, since overflow behavior
            is undefined.
        
            Specifically, VerticalPositionCache was written in terms of ints with a special
            0x80000000 "not found" value. However, 0x80000000 was being assigned to
            a LayoutUnit, which multiplies by 64 causing overflow. The result was then
            compared again with 0x80000000 which could pass or fail depending on overflow
            behavior.
        
            Fix by converting VerticalPositionCache to use LayoutUnits, and to have a bool
            return value with a result out param, instead of a special return value.

            Not easily testable, since the difference does not show in DRT output,
            and a ref test would be flakey.

            * rendering/RootInlineBox.cpp:
            (WebCore::RootInlineBox::ascentAndDescentForBox):
            * rendering/VerticalPositionCache.h:
            (WebCore::VerticalPositionCache::get):
            (WebCore::VerticalPositionCache::set):

2014-08-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172603. <rdar://problem/18008488>

    2014-08-14  Martin Hock  <mhock@apple.com>

            IndexedDB should respect SchemeRegistry's database access setting.
            https://bugs.webkit.org/show_bug.cgi?id=135890
            <rdar://problem/17989469>

            Reviewed by Alexey Proskuryakov.

            Test: storage/indexeddb/open-db-private-browsing.html

            * Modules/indexeddb/IDBFactory.cpp:

2014-08-15  Lucas Forschler  <lforschler@apple.com>

        Merge r172502

    2014-08-12  Pratik Solanki  <psolanki@apple.com>

            Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
            https://bugs.webkit.org/show_bug.cgi?id=135727
            <rdar://problem/17947880>

            Reviewed by Darin Adler.

            Add SharedBuffer::existingCFData() which returns CFDataRef if it has one. Refactor
            this code out of createCFData().

            * WebCore.exp.in:
            * platform/SharedBuffer.h:
            * platform/mac/SharedBufferMac.mm:
            (WebCore::SharedBuffer::existingCFData): Added.
            (WebCore::SharedBuffer::createCFData):

2014-08-15  Lucas Forschler  <lforschler@apple.com>

        Merge r171675

    2014-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>

            CSS: Fix :visited behavior for SubSelectors
            https://bugs.webkit.org/show_bug.cgi?id=135324

            Reviewed by Benjamin Poulain.

            Disable :visited match for the selectors that has SubSelectors.

            Tests: fast/history/nested-visited-test-complex.html
                   fast/history/sibling-visited-test-complex.html

            * css/SelectorChecker.cpp:
            (WebCore::SelectorChecker::matchRecursively):

2014-08-11  Babak Shafiei  <bshafiei@apple.com>

        Merge r172422. <rdar://problem/17912361>

    2014-08-11  Jer Noble  <jer.noble@apple.com>

            [iOS] <video> element requests are missing session cookies; sometimes persistant cookies.
            https://bugs.webkit.org/show_bug.cgi?id=135816

            Reviewed by Alexey Proskuryakov.

            On iOS, the AVFoundation framework will copy appropriate cookies for the requested URL across to the
            mediaserverd process. For WebKit2, the WebProcess does not have access to session cookies for the 
            current browsing session. When creating an AVURLAsset, fetch the appropriate cookies for the requested
            URL, and pass them into AVURLAsset in the options dictionary.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::mediaPlayerGetRawCookies): Call CookieJar's equivalent method.
            * html/HTMLMediaElement.h:
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::getRawCookies): Pass to HTMLMediaElement.
            * platform/graphics/MediaPlayer.h:
            (WebCore::MediaPlayerClient::mediaPlayerGetRawCookies):
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::toNSHTTPCookie): Convert a WebCore Cookie -> NSHTTPCookie.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Fetch cookies for the requested
                URL, and if successful, add them to the AVURLAsset options dictionary.

2014-08-07  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172275. <rdar://problem/17886686>

    2014-08-07  Daniel Bates  <dabates@apple.com>
    
            Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
            https://bugs.webkit.org/show_bug.cgi?id=135688
            <rdar://problem/17886686>
    
            Reviewed by Alexey Proskuryakov.
    
            Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
            function may not be executed and hence Gmail will not display the list of messages and
            will subsequently display an error message.
    
            When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
            may still load the main resource, say if substitute data is available for it, and defer executing
            tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
            of pending tasks for the associated Document. This list of pending tasks is never processed when
            a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
            execute a SQLTransactionCallback function that was deferred.
    
            Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
            be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
            lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
            script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
            it's sufficient to only defer executing tasks when either there are existing pending tasks or the
            page defers loading and active DOM objects in the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
    
            * dom/Document.cpp:
            (WebCore::Document::postTask):
    
2014-08-07  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172244. <rdar://problem/17939895>

    2014-08-06  Jeremy Jones  <jeremyj@apple.com>
    
            Disable implicit animations on video layer.
            https://bugs.webkit.org/show_bug.cgi?id=135679
    
            Reviewed by Eric Carlson.
    
            Disable implicit animations on AVPlayerLayer except when setting fullscreen frame.
            This prevents unwanted animations.
    
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): disable implicit animations
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): allow implicit animations while changing fullscreen frame.
    
2014-08-07  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172197. <rdar://problem/17855327>

    2014-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
    
            [iOS] Make document marker assets not specific to particular scale factors
            https://bugs.webkit.org/show_bug.cgi?id=135671
    
            Reviewed by Simon Fraser.
    
            No new tests.
    
            * WebCore.xcodeproj/project.pbxproj:
            * platform/ios/wak/WKGraphics.mm:
            (imageResourcePath):
            (WKGraphicsCreateImageFromBundleWithName):
    
2014-08-07  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172191. <rdar://problem/17895138>

    2014-08-06  Andy Estes  <aestes@apple.com>
    
            [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
            https://bugs.webkit.org/show_bug.cgi?id=135676
    
            Reviewed by David Kilzer.
    
            * loader/DocumentLoader.h:
            (WebCore::DocumentLoader::setQuickLookHandle):
            (WebCore::DocumentLoader::quickLookHandle):
    
2014-08-07  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172183. <rdar://problem/17908085>

    2014-08-06  Simon Fraser  <simon.fraser@apple.com>
    
            REGRESSION (r168119): Album flipping animation doesn’t work
            https://bugs.webkit.org/show_bug.cgi?id=132801
            <rdar://problem/16878497>, <rdar://problem/17908085>
    
            Reviewed by Dean Jackson.
            
            In r168119 I avoided creating backing store for backface-visibility:hidden unless
            some ancestor was 3d-transformed. However, when starting transitions or animations
            that apply transforms, we don't do a layout, and therefore don't update the RenderLayer
            flags that mark an ancestor as having a transform. This broke various content which
            used backface-visibility:hidden for "flip" animations.
            
            Make a low-risk fix that looks for the pattern of CSS properties used for flipping,
            making a compositing layer for backface-visibility:hidden if the stacking context element
            has transform-style: preserve-3d.
    
            Test: compositing/backing/backface-visibility-flip.html
    
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility):
    
2014-08-07  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172006. <rdar://problem/17947503>

    2014-08-04  Joseph Pecoraro  <pecoraro@apple.com>
    
            Always clear ConsoleClient when Page/WindowShell is destroyed
            https://bugs.webkit.org/show_bug.cgi?id=135569
    
            Reviewed by Mark Lam.
    
            * bindings/js/ScriptController.cpp:
            (WebCore::ScriptController::~ScriptController):
            Whenever a window shell goes away, clear the console client.
            We did this in clearWindowShell but not before destroying.
    
2014-08-06  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172172. <rdar://problem/17862892>

    2014-08-06  Alexey Proskuryakov  <ap@apple.com>
    
            REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
            https://bugs.webkit.org/show_bug.cgi?id=135667
            <rdar://problem/17862892>
    
            Reviewed by Anders Carlsson.
    
            Moved a function that computes default encoding from WebKit to WebCore, so that
            it could be shared with WebKit2.
    
            * WebCore.exp.in:
            * platform/ios/WebCoreSystemInterfaceIOS.mm:
            * platform/mac/WebCoreSystemInterface.h:
            * platform/mac/WebCoreSystemInterface.mm:
            * platform/text/TextEncodingRegistry.cpp:
            (WebCore::defaultTextEncodingNameForSystemLanguage):
            * platform/text/TextEncodingRegistry.h:
    
2014-08-06  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172159. <rdar://problem/17869353>

    2014-08-06  Andy Estes  <aestes@apple.com>
    
            [iOS] QuickLook returns an invalid MIME type for some documents
            https://bugs.webkit.org/show_bug.cgi?id=135651
    
            Reviewed by David Kilzer.
    
            r172151 ensured that we ignore QuickLook delegate messages after an error, but neglected to do so for
            connectionDidFinishLoading:. Do not call ResourceLoader::didFinishLoading() if an error has occurred.
    
            * platform/network/ios/QuickLook.mm:
            (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]):
    
2014-08-06  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172151. <rdar://problem/17869353>

    2014-08-06  Andy Estes  <aestes@apple.com>
    
            [iOS] QuickLook returns an invalid MIME type for some documents
            https://bugs.webkit.org/show_bug.cgi?id=135651
    
            Reviewed by David Kilzer.
    
            In some cases QuickLook indicates a failure by returning a nil MIME type in -[QLPreviewConverter previewResponse]
            rather than calling connection:didFailWithError:. Calling ResourceLoader::didReceiveResponse() with a response
            containing a nil MIME type leads to a crash.
    
            Stop loading the resource and display an error page if QuickLook cannot provide a MIME type for the converted response.
    
            No new tests. QuickLook is not testable from WebKit.
    
            * platform/network/ios/QuickLook.mm:
            (-[WebResourceLoaderQuickLookDelegate _sendDidReceiveResponseIfNecessary]): Called ResourceLoader::didFail() if
            MIME type was nil. Called ResourceLoader::didReceiveResponse() otherwise.
            (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Called -_sendDidReceiveResponseIfNecessary.
            (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
            (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
    
2014-08-06  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172035. <rdar://problem/17869353>

    2014-08-04  Andy Estes  <aestes@apple.com>
    
            [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
            https://bugs.webkit.org/show_bug.cgi?id=135596
    
            Reviewed by David Kilzer.
    
            Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
            QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
            QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
            be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.
    
            Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
            ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
            that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.
    
            No new tests. QuickLook is not testable from WebKit.
    
            * platform/network/ios/QuickLook.mm:
            (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
            called, call it now with QuickLookHandle::nsResponse().
            (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
            (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
            (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
            (-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
            (WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
            the newly created QuickLookHandle.
    
2014-08-06  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172112. <rdar://problem/17802174>

    2014-08-05  Simon Fraser  <simon.fraser@apple.com>
    
            [iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants)
            https://bugs.webkit.org/show_bug.cgi?id=135629
            <rdar://problem/17802174>
    
            Reviewed by Tim Horton.
            
            In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees
            of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until
            they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap,
            which holds raw pointers to them.
            
            However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is
            sometimes non-empty at this point. When that happened, we would destroy nodes which
            were still referenced by m_stateNodeMap, with the result that a later query for the
            same nodeID would hand back a pointer to a deleted object.
            
            Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes
            before clearing it, which removes them and all their descendants from the state node map.
    
            Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html
    
            * page/scrolling/ScrollingStateTree.cpp:
            (WebCore::ScrollingStateTree::clear):
            (WebCore::ScrollingStateTree::commit):
    
2014-08-05  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172083. <rdar://problem/17849206>

    2014-08-05  Dean Jackson  <dino@apple.com>
    
            [iOS] Media controls layout incorrectly in RTL content
            https://bugs.webkit.org/show_bug.cgi?id=135621
            <rdar://problem/17849206>
    
            Reviewed by Eric Carlson.
    
            Media controls should always layout in LTR mode, even when the
            page content is RTL. There already was a rule to do this on
            non-iOS systems, but it wasn't getting included for iOS.
            In this case I put the rule on the composited parent of the
            controls in order to maintain the padding of the control panel.
            This should still leave the captions unaffected.
    
            * Modules/mediacontrols/mediaControlsiOS.css:
            (video::-webkit-media-controls-panel-composited-parent): Add direction: ltr.
    
2014-08-05  Matthew Hanson  <matthew_hanson@apple.com>

        Roll out r172035. <rdar://problem/17869353>

    2014-08-05  Matthew Hanson  <matthew_hanson@apple.com>

            Merge r172035. <rdar://problem/17869353>

        2014-08-04  Andy Estes  <aestes@apple.com>

                [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
                https://bugs.webkit.org/show_bug.cgi?id=135596

                Reviewed by David Kilzer.

                Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
                QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
                QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
                be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.

                Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
                ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
                that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.

                No new tests. QuickLook is not testable from WebKit.

                * platform/network/ios/QuickLook.mm:
                (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
                called, call it now with QuickLookHandle::nsResponse().
                (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
                (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
                (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
                (-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
                (WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
                the newly created QuickLookHandle.

2014-08-05  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172053. <rdar://problem/17876385>

    2014-08-05  Antti Koivisto  <antti@apple.com>
    
            REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
            https://bugs.webkit.org/show_bug.cgi?id=135603
            <rdar://problem/17876385>
            
            This hit ASSERT(frame().isMainFrame()) in FrameView::updateLayerFlushThrottling
            running scrollbars/scrollbar-iframe-click-does-not-blur-content.html and a few other tests.
    
            * page/FrameView.cpp:
            (WebCore::FrameView::setWasScrolledByUser): Only invoke updateLayerFlushThrottling for the main frame.
    
2014-08-05  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172039. <rdar://problem/17876385>

    2014-08-05  Antti Koivisto  <antti@apple.com>
    
            REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
            https://bugs.webkit.org/show_bug.cgi?id=135603
            <rdar://problem/17876385>
    
            Reviewed by Andreas Kling.
    
            * page/FrameView.cpp:
            (WebCore::determineLayerFlushThrottleState):
            
                Disable throttling after user has scrolled the page.
                This is consistent with the speculative tiling. It also gets enabled on first scroll.
    
            (WebCore::FrameView::setWasScrolledByUser):
    
2014-08-05  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172035. <rdar://problem/17869353>

    2014-08-04  Andy Estes  <aestes@apple.com>

            [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
            https://bugs.webkit.org/show_bug.cgi?id=135596

            Reviewed by David Kilzer.

            Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
            QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
            QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
            be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.

            Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
            ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
            that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.

            No new tests. QuickLook is not testable from WebKit.

            * platform/network/ios/QuickLook.mm:
            (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
            called, call it now with QuickLookHandle::nsResponse().
            (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
            (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
            (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
            (-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
            (WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
            the newly created QuickLookHandle.

2014-08-04  Lucas Forschler  <lforschler@apple.com>

        Merge r171882

    2014-07-31  Andrei Bucur  <abucur@adobe.com>

            REGRESSION: Search highlight is broken in RTL multicolumn content
            https://bugs.webkit.org/show_bug.cgi?id=135452

            Reviewed by Simon Fraser.

            The offsets for elements inside RTL multi-column elements are incorrectly computed because
            the columns don't calculate their left position according to the writing direction.

            The patch extracts the column position computation in two helper functions (for top and left)
            so they can be used when needed in different parts of the code. In our case, the |columnLogicalLeft|
            function should be used inside |columnTranslationForOffset|.

            Test: fast/multicol/content-bounding-box-rtl.html

            * rendering/RenderMultiColumnSet.cpp:
            (WebCore::RenderMultiColumnSet::columnLogicalLeft): Return the logical left of a column relative to the set.
            (WebCore::RenderMultiColumnSet::columnLogicalTop): Return the logical top of a column relative to the set.
            (WebCore::RenderMultiColumnSet::columnRectAt): Split the code between columnLogicalLeft and columnLogicalTop.
            (WebCore::RenderMultiColumnSet::collectLayerFragments): Make code clearer by adding a new line.
            (WebCore::RenderMultiColumnSet::columnTranslationForOffset): Use columnLogicalLeft instead of duplicating logic.
            * rendering/RenderMultiColumnSet.h:

2014-08-03  Babak Shafiei  <bshafiei@apple.com>

        Merge r171973.

    2014-08-02  Jeremy Jones  <jeremyj@apple.com>

            Support both window and view based video fullscreen.
            https://bugs.webkit.org/show_bug.cgi?id=135525

            Reviewed by Simon Fraser.

            Presenting in a separate window gives greater flexibility for rotation separately from the app.
            Presenting in the same window works better if the interface is rehosted in another process.

            * platform/ios/WebVideoFullscreenControllerAVKit.mm:
            (-[WebVideoFullscreenController enterFullscreen:]): Use clientRect instead of screenRect.
            * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add m_window and m_parentView.
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
            (-[WebAVVideoLayer setBounds:]): Parent view might not be fullscreen; use window instead.
            (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Conditionally create UIWindow and UIViewController for fullscreen.
            (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Video, not the container should have black background.
            (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Conditionally translate finalRect.
            (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Clean up UIWindow and force status bar to correct orientation.
            (WebVideoFullscreenInterfaceAVKit::invalidate): Clean up UIWindow.
            (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Hide window and exit without animation.
            * platform/ios/WebVideoFullscreenModelMediaElement.mm:
            (WebVideoFullscreenModelMediaElement::setVideoFullscreenLayer): Apply frame, because it may have been set before the layer.

2014-08-03  Babak Shafiei  <bshafiei@apple.com>

        Merge r171944.

    2014-07-31  Dean Jackson  <dino@apple.com>

            [Media iOS] Ensure there is a nice default fallback for missing wireless target names
            https://bugs.webkit.org/show_bug.cgi?id=135488
            <rdar://problem/17879156>

            Reviewed by Eric Carlson.

            We occasionally run into cases where this.host.externalDeviceDisplayName
            is empty or null, creating a pretty ugly/confusing string in the
            wireless playback status screen.

            If this happens, we should default to using "Apple TV".

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
            is empty or null, and fall back to "Apple TV" if so.

2014-07-31  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171259. <rdar://problem/17718984>

    2014-07-20  Eric Carlson  <eric.carlson@apple.com>

            [iOS] ignore requests to set volume
            https://bugs.webkit.org/show_bug.cgi?id=135081

            Applied post-review comments from Darin Adler.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Don't include unreachable
                code on iOS.

2014-07-31  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171259. <rdar://problem/17718984>

    2014-07-18  Eric Carlson  <eric.carlson@apple.com>

            [iOS] ignore requests to set volume
            https://bugs.webkit.org/show_bug.cgi?id=135081

            Reviewed by Jer Noble.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Do nothing on iOS.

2014-07-31  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171895. <rdar://problem/17835345>

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

            [iOS] Video in an <embed> has a bad aspect ratio when in fullscreen mode.
            https://bugs.webkit.org/show_bug.cgi?id=135481

            Reviewed by Simon Fraser.

            Do not change the gravity of our AVPlayerLayer when in full screen mode; its gravity
            is controlled by setVideoFullscreenGravity(), and should not be affected by style changes.

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

2014-07-31  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171866. <rdar://problem/17872676>

    2014-07-31  Joseph Pecoraro  <pecoraro@apple.com>
    
            Web Inspector: console.profile missing profile information
            https://bugs.webkit.org/show_bug.cgi?id=135432
    
            Reviewed by Timothy Hatcher.
    
            By switching console.profile to start/stop the timeline we would
            not have a chance to recompile JS functions with profiling information.
            This used to work because whenever the inspector was open we would
            have profiling information enabled. Go back to that behavior.
    
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::profilerEnabled):
            Instead of checking if the timeline agent has started, check if the
            timeline agent has been created. Going back to the normal behavior
            of always having profiling information when the inspector is open.
    
            * inspector/InspectorTimelineAgent.h:
            * inspector/InspectorTimelineAgent.cpp:
            (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
            Recompile initializing the timeline agent to include profiling information.
    
            (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
            Recompile destrying the timeline agent, only if needed.
    
            (WebCore::InspectorTimelineAgent::willCallFunction):
            (WebCore::InspectorTimelineAgent::didCallFunction):
            (WebCore::InspectorTimelineAgent::willEvaluateScript):
            (WebCore::InspectorTimelineAgent::didEvaluateScript):
            Using a boolean to track nested calls would not give expected
            behavior when un-nesting. Switch to a counter to ensure that
            as we start profiling in the outermost level we then stop
            profiling at that same level and not inside an inner nesting.
    
2014-07-31  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171851. <rdar://problem/17719026>

    2014-07-31  Jer Noble  <jer.noble@apple.com>
    
            REGRESSION(??): [iOS] Disabling MediaPlaybackRequiresUserGesture does not remove user gesture requirement for entering full screen.
            https://bugs.webkit.org/show_bug.cgi?id=135443
    
            Reviewed by Dean Jackson.
    
            Allow full screen mode to be entered without a user gesture if the gesture requirement for media playback
            has been unset.
    
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::HTMLMediaElement):
    
2014-07-30  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171766. <rdar://problem/17824645>

    2014-07-29  Pratik Solanki  <psolanki@apple.com>
    
            [iOS] REGRESSION(r171526): PDF documents fail to load in WebKit1 with disk image caching enabled
            https://bugs.webkit.org/show_bug.cgi?id=135359
            <rdar://problem/17824645>
    
            Reviewed by Darin Adler.
    
            r171526 broke the case where we have a memory mapped file from the DiskImageCache in the
            SharedBuffer. In such a case, m_buffer is empty and createCFData() returned an
            WebCoreSharedBufferData with an empty buffer.
    
            Fix this by taking the easy route of bringing back the old code for the disk image cache
            file backed case. In the long run we probably want to remove the iOS specific disk image
            cache anyway.
    
            Review also uncovered another bug in r171526 where we were balancing an Objective-C alloc
            with a CFRelease which is incorrect when running under GC. Fix that by using adoptNS along
            with adoptCF which is what the code did before.
    
            No new tests because the bug only occurs on device and we can't run tests on device yet.
    
            * platform/mac/SharedBufferMac.mm:
            (-[WebCoreSharedBufferData initWithDiskImageSharedBuffer:]):
            (-[WebCoreSharedBufferData length]):
            (-[WebCoreSharedBufferData bytes]):
            (WebCore::SharedBuffer::createCFData):
    
2014-07-30  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171702. <rdar://problem/16828238>

    2014-07-28  Antti Koivisto  <antti@apple.com>
    
            <embed> videos flashes constantly while playing inline on iPad, making it unwatchable
            https://bugs.webkit.org/show_bug.cgi?id=135356
            <rdar://problem/16828238>
    
            Reviewed by Simon Fraser.
            
            The shadow tree for media controls is scheduling style recalc. The general silliness of
            HTMLPlugInImageElement::willRecalcStyle/willDetachRenderers is turning those into render
            tree reconstructions causing flicker.
    
            * html/HTMLPlugInImageElement.cpp:
            (WebCore::HTMLPlugInImageElement::willRecalcStyle):
            
                Don't do the forced renderer reconstruction if there is no style change for the element
                or its ancestors. This way recalcs scheduled by the shadow tree don't trigger the widget
                update code path.
    
2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Rollout r171675. <rdar://problem/17826572>

    2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

            Merge r171675. <rdar://problem/17826572>

        2014-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
        
                CSS: Fix :visited behavior for SubSelectors
                https://bugs.webkit.org/show_bug.cgi?id=135324
        
                Reviewed by Benjamin Poulain.
        
                Disable :visited match for the selectors that has SubSelectors.
        
                Tests: fast/history/nested-visited-test-complex.html
                       fast/history/sibling-visited-test-complex.html
        
                * css/SelectorChecker.cpp:
                (WebCore::SelectorChecker::matchRecursively):

2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Rollout r171702. <rdar://problem/16828238>

    2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

            Merge r171702. <rdar://problem/16828238>

        2014-07-28  Antti Koivisto  <antti@apple.com>
        
                <embed> videos flashes constantly while playing inline on iPad, making it unwatchable
                https://bugs.webkit.org/show_bug.cgi?id=135356
                <rdar://problem/16828238>
        
                Reviewed by Simon Fraser.
                
                The shadow tree for media controls is scheduling style recalc. The general silliness of
                HTMLPlugInImageElement::willRecalcStyle/willDetachRenderers is turning those into render
                tree reconstructions causing flicker.
        
                * html/HTMLPlugInImageElement.cpp:
                (WebCore::HTMLPlugInImageElement::willRecalcStyle):
                
                    Don't do the forced renderer reconstruction if there is no style change for the element
                    or its ancestors. This way recalcs scheduled by the shadow tree don't trigger the widget
                    update code path.

2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Rollout r171703. <rdar://problem/17833422>

    2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

            Merge r171703. <rdar://problem/17833422>

        2014-07-28  Mark Hahnenberg  <mhahnenberg@apple.com>
        
                ASSERTION FAILED: m_heap->vm()->currentThreadIsHoldingAPILock()
                https://bugs.webkit.org/show_bug.cgi?id=135352
        
                Reviewed by Oliver Hunt.
        
                * Modules/plugins/QuickTimePluginReplacement.mm:
                (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): This should be taking a 
                JSLock like its sibling methods do (e.g. installReplacement).

2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Rollout r171708. <rdar://problem/17844894>

    2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

            Merge r171708. <rdar://problem/17844894>

        2014-07-28  Brady Eidson  <beidson@apple.com>
        
                REGRESSION(168376): Standalone images pasted to Outlook 2011 don't display
                <rdar://problem/17768371> and https://bugs.webkit.org/show_bug.cgi?id=135363
        
                Reviewed by Tim Horton.
        
                Outlook isn’t prepared to handle the resource load callbacks when sent synchronously.
        
                r168376 was an optimization that we no longer need, so the simplest fix is to roll it out.
        
                * editing/mac/EditorMac.mm:
                (WebCore::Editor::WebContentReader::readImage):
        
                * loader/archive/ArchiveResource.cpp:
                (WebCore::ArchiveResource::ArchiveResource):
                * loader/archive/ArchiveResource.h:
                (WebCore::ArchiveResource::setShouldLoadImmediately): Deleted.
                (WebCore::ArchiveResource::shouldLoadImmediately): Deleted.
        
                * loader/cache/CachedResourceLoader.cpp:
                (WebCore::CachedResourceLoader::requestResource):

2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171711. <rdar://problem/17756281>

    2014-07-28  Dean Jackson  <dino@apple.com>
    
            [Media iOS] Touching play button feels unresponsive
            https://bugs.webkit.org/show_bug.cgi?id=135370
            <rdar://problem/17756281>
    
            Reviewed by Simon Fraser.
    
            Add an :active rule that shows a slightly darker button when touched.
    
            * Modules/mediacontrols/mediaControlsiOS.css:
            (audio::-webkit-media-controls-start-playback-button:active):

2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171708. <rdar://problem/17844894>

    2014-07-28  Brady Eidson  <beidson@apple.com>
    
            REGRESSION(168376): Standalone images pasted to Outlook 2011 don't display
            <rdar://problem/17768371> and https://bugs.webkit.org/show_bug.cgi?id=135363
    
            Reviewed by Tim Horton.
    
            Outlook isn’t prepared to handle the resource load callbacks when sent synchronously.
    
            r168376 was an optimization that we no longer need, so the simplest fix is to roll it out.
    
            * editing/mac/EditorMac.mm:
            (WebCore::Editor::WebContentReader::readImage):
    
            * loader/archive/ArchiveResource.cpp:
            (WebCore::ArchiveResource::ArchiveResource):
            * loader/archive/ArchiveResource.h:
            (WebCore::ArchiveResource::setShouldLoadImmediately): Deleted.
            (WebCore::ArchiveResource::shouldLoadImmediately): Deleted.
    
            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::requestResource):
    
2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171703. <rdar://problem/17833422>

    2014-07-28  Mark Hahnenberg  <mhahnenberg@apple.com>
    
            ASSERTION FAILED: m_heap->vm()->currentThreadIsHoldingAPILock()
            https://bugs.webkit.org/show_bug.cgi?id=135352
    
            Reviewed by Oliver Hunt.
    
            * Modules/plugins/QuickTimePluginReplacement.mm:
            (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): This should be taking a 
            JSLock like its sibling methods do (e.g. installReplacement).
    
2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171702. <rdar://problem/16828238>

    2014-07-28  Antti Koivisto  <antti@apple.com>
    
            <embed> videos flashes constantly while playing inline on iPad, making it unwatchable
            https://bugs.webkit.org/show_bug.cgi?id=135356
            <rdar://problem/16828238>
    
            Reviewed by Simon Fraser.
            
            The shadow tree for media controls is scheduling style recalc. The general silliness of
            HTMLPlugInImageElement::willRecalcStyle/willDetachRenderers is turning those into render
            tree reconstructions causing flicker.
    
            * html/HTMLPlugInImageElement.cpp:
            (WebCore::HTMLPlugInImageElement::willRecalcStyle):
            
                Don't do the forced renderer reconstruction if there is no style change for the element
                or its ancestors. This way recalcs scheduled by the shadow tree don't trigger the widget
                update code path.
    
2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171700. <rdar://problem/17844901>

    2014-07-27  Brent Fulgham  <bfulgham@apple.com>
    
            [Mac, iOS] Paint-on closed captions get out-of-order in Safari
            https://bugs.webkit.org/show_bug.cgi?id=135332
            <rdar://problem/15317278>
    
            Reviewed by Brent Fulgham.
    
            * html/shadow/MediaControlElements.cpp:
            (WebCore::MediaControlTextTrackContainerElement::updateDisplay): If the
            number of active cues is greater than the current set of CSS boxes representing
            the cues, throw away the CSS boxes and re-layout all the cues.
            * html/track/InbandGenericTextTrack.cpp:
            (WebCore::InbandGenericTextTrack::addGenericCue): Add some logging.
            (WebCore::InbandGenericTextTrack::removeGenericCue): Ditto.
            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGeneric::isOrderedBefore): Revise ordering rules so that we put
            newer cues earlier in the layout order so they are drawn towards the bottom
            of the screen. Only do this for Generic captions.
            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
            (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Adjust logging
            messages.
            (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Add logging.
    
2014-07-29  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171675. <rdar://problem/17826572>

    2014-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
    
            CSS: Fix :visited behavior for SubSelectors
            https://bugs.webkit.org/show_bug.cgi?id=135324
    
            Reviewed by Benjamin Poulain.
    
            Disable :visited match for the selectors that has SubSelectors.
    
            Tests: fast/history/nested-visited-test-complex.html
                   fast/history/sibling-visited-test-complex.html
    
            * css/SelectorChecker.cpp:
            (WebCore::SelectorChecker::matchRecursively):
    
2014-07-27  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171661. <rdar://problem/17315237>

    2014-07-27  Daniel Bates  <dabates@apple.com>
    
            [WK2] Crash when accessing window.localStorage after calling window.close()
            https://bugs.webkit.org/show_bug.cgi?id=135328
            <rdar://problem/17315237>
    
            Reviewed by Sam Weinig.
    
            Fixes an issue where accessing local storage for the first time after calling window.close()
            causes a crash.
    
            For now, we should disallow accessing local storage after calling window.close() regardless of
            whether it's the first access to local storage as this seems like a bad idiom to support. Note,
            this represents a change in behavior from WebKit1. If such usage of window.localStorage turns
            out to be reasonable then we can visit this decision again in <https://bugs.webkit.org/show_bug.cgi?id=135330>.
    
            Tests: storage/domstorage/localstorage/access-storage-after-window-close.html
                   storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close.html
                   storage/domstorage/localstorage/set-value-in-storage-after-window-close.html
    
            * page/DOMWindow.cpp:
            (WebCore::DOMWindow::localStorage): Modified to only return the cached local storage or
            create a new local storage so long as the page isn't being closed. Also, substitute nullptr
            for 0.
            (WebCore::DOMWindow::close): Call Page::setIsClosing() to mark that the page is closing.
            * page/Page.cpp:
            (WebCore::Page::Page): Initialize m_isClosing to false.
            * page/Page.h:
            (WebCore::Page::setIsClosing): Added.
            (WebCore::Page::isClosing): Added.
    
2014-07-27  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171647. <rdar://problem/17315168>

    2014-07-26  Timothy Horton  <timothy_horton@apple.com>
    
            Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
            https://bugs.webkit.org/show_bug.cgi?id=135319
            <rdar://problem/17315168>
    
            Reviewed by Darin Adler and Antti Koivisto.
    
            * dom/Document.h:
            * dom/Document.cpp:
            (WebCore::Document::Document):
            (WebCore::Document::prepareForDestruction):
            Add a flag on Document, m_hasPreparedForDestruction, which ensures
            that each Document only goes through prepareForDestruction() once.
            prepareForDestruction() can be called a number of times during teardown,
            but it's only necessary to actually execute it once.
            
            This was previously achieved by virtue of all callers of prepareForDestruction()
            first checking hasLivingRenderTree, and prepareForDestruction() tearing down
            the render tree, but that meant that prepareForDestruction() was not called
            for Documents who never had a render tree in the first place.
    
            The only part of prepareForDestruction() that is now predicated on hasLivingRenderTree()
            is the call to destroyRenderTree(); the rest of the function has the potential to be relevant
            for non-rendered placeholder documents and can safely deal with them in other ways.
    
            It is important to call prepareForDestruction() on non-rendered placeholder documents
            because some of the cleanup (like disconnectFromFrame()) is critical to safe destruction.
    
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::clear):
            Call prepareForDestruction() even if we don't have a living render tree.
            For the sake of minimizing change, removeFocusedNodeOfSubtree still
            depends on having a living render tree before calling prepareForDestruction().
    
            * page/Frame.cpp:
            (WebCore::Frame::setView):
            (WebCore::Frame::setDocument):
            Call prepareForDestruction() even if we don't have a living render tree.
    
2014-07-27  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171640. <rdar://problem/17812921>

    2014-07-25  Zalan Bujtas  <zalan@apple.com>
    
            Subpixel rendering: Rounded rect gets non-renderable at certain subpixel size.
            https://bugs.webkit.org/show_bug.cgi?id=135314
            <rdar://problem/17812921>
    
            Reviewed by Tim Horton.
    
            While calculating the rounded rect for painting, the radius is adjusted to compensate
            for the pixel snapped size. However while scaling the radius, certain values overflow
            (float) mantissa and it produces a non-renderable rounded rect where the radius becomes bigger
            than the rectangle dimensions. In such cases, we need to shrink the radius to make it
            renderable again.
    
            Test: transitions/rounded-rect-becomes-non-renderable-while-transitioning.html
    
            * platform/graphics/RoundedRect.cpp:
            (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): shrink the radius by
            one device pixel. It is as good as any other small value.
    
2014-07-27  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171624. <rdar://problem/17715503>

    2014-07-25  Jer Noble  <jer.noble@apple.com>
    
            [MSE] Playback stalls & readyState drops to HAVE_CURRENT_DATA at end of stream with unbalanced buffered SourceBuffers
            https://bugs.webkit.org/show_bug.cgi?id=135291
            <rdar://problem/17715503>
    
            Reviewed by Sam Weinig.
    
            Test: media/media-source/media-source-end-of-stream-buffered.html
    
            When determining the correct ReadyState for the MediaSource in monitorSourceBuffers(), use the same
            definition of "buffered" as is used in the calculation of HTMLMediaElement.buffered and in the
            Stream Ended algorithm. Namely, when the stream has ended, treat each SourceBuffer as if its last
            buffered range extends to the duration of the stream. This allows playback to continue through to
            the duration without stalling due to monitorSourceBuffers().
    
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::bufferedAccountingForEndOfStream): Added; extends the last range in buffered
                to MediaSource::duration() if the MediaSource is ended.
            (WebCore::SourceBuffer::hasCurrentTime): Uses bufferedAccountingForEndOfStream().
            (WebCore::SourceBuffer::hasFutureTime): Ditto.
            (WebCore::SourceBuffer::canPlayThrough): Ditto.
            * Modules/mediasource/SourceBuffer.h:
    
            Add a convenience method for determining whether the MediaSource has ended:
            * Modules/mediasource/MediaSource.cpp:
            (WebCore::MediaSource::isEnded):
            * Modules/mediasource/MediaSource.h:
    
            Add start() and end() methods that don't take a (usually ignored) isValid inout parameter. Add duration()
            and maximumBufferedTime() convenience methods:
            * platform/graphics/PlatformTimeRanges.cpp:
            (WebCore::PlatformTimeRanges::start):
            (WebCore::PlatformTimeRanges::end):
            (WebCore::PlatformTimeRanges::duration):
            (WebCore::PlatformTimeRanges::maximumBufferedTime):
            * platform/graphics/PlatformTimeRanges.h:
    
2014-07-27  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171616. <rdar://problem/17736875>

    2014-07-25  Jer Noble  <jer.noble@apple.com>
    
            [MSE] High CPU usage in SampleMap::findSamplesWithinPresentationRange() with a large number of buffered samples.
            https://bugs.webkit.org/show_bug.cgi?id=135247
    
            Reviewed by Geoffrey Garen.
    
            Anchor our search for overlapping frames to the end of the search range when the overlap range is sufficiently
            close to the end of the search range. The common case for this search is when a sample is about to be appended
            to the end of the sample queue, so this should turn most searches into no-ops.
    
            * Modules/mediasource/SampleMap.cpp:
            (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
            * Modules/mediasource/SampleMap.h:
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
    
2014-07-27  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171609. <rdar://problem/17043792>

    2014-07-25  David Hyatt  <hyatt@apple.com>
    
            [New Multicolumn] RenderViews paginated as RL or LR don't handle percentage widths correctly.
            REGRESSION: Images don’t scale to fit in page in vertical text books
    
            https://bugs.webkit.org/show_bug.cgi?id=135204
            <rdar://problem/17043792>
            
            Reviewed by Simon Fraser.
    
            Added fast/multicol/pagination/RightToLeft-max-width.html
    
            * rendering/RenderView.cpp:
            (WebCore::RenderView::availableLogicalHeight):
            Put back in the same code that used to exist for the old columns (but ported to the new
            columns).
    
2014-07-25  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171632. <rdar://problem/17817223>

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

            [EME][Mac] CDM error messages not piped through to MediaKeySession correctly; clients don't receive error events
            https://bugs.webkit.org/show_bug.cgi?id=135312
            <rdar://problem/17817223>

            Reviewed by Brent Fulgham.

            Set (and clear) the client interface so that errors can be piped from the CDMSession up to the MediaKeySession.

            * Modules/encryptedmedia/MediaKeySession.cpp:
            (WebCore::MediaKeySession::MediaKeySession):
            (WebCore::MediaKeySession::close):

2014-07-25  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171619. <rdar://problem/17811922>

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

            [iOS] REGRESSION(r171526): Images fail to load sometimes
            https://bugs.webkit.org/show_bug.cgi?id=135304
            <rdar://problem/17811922>

            Reviewed by Alexey Proskuryakov.

            SharedBuffer::createCFData() calls data() as a way to coalesce the data array elements and
            segments into m_buffer. However, data() has an optimization where if we had a single element
            in the data array, it would just return that and not do coalescing. So when we passed
            m_buffer to WebCoreSharedData, we passed a buffer with no data in it.

            Fix this by bringing the optimization to createCFData() and return the CFDataRef from the
            data array if we just have a single element.

            No new tests. Should be covered by existing tests.

            * platform/mac/SharedBufferMac.mm:
            (WebCore::SharedBuffer::createCFData):

2014-07-25  Lucas Forschler  <lforschler@apple.com>

        Merge r171593

    2014-07-25  Zalan Bujtas  <zalan@apple.com>

            Subpixel rendering: iOS video playback controls look blurry.
            https://bugs.webkit.org/show_bug.cgi?id=135245
            <rdar://problem/16878037>

            Reviewed by Simon Fraser.

            This patch introduces a compositing parent of the overlay control panel so that
            the transformed overlay panel becomes sharp. This is a workaround for webkit.org/b/135246.

            Can't find a way to test it yet.

            * Modules/mediacontrols/mediaControlsApple.css:
            (video::-webkit-media-controls-panel-composited-parent):
            * Modules/mediacontrols/mediaControlsApple.js:
            (Controller.prototype.createControls):
            (Controller.prototype.addControls):
            * Modules/mediacontrols/mediaControlsiOS.css:
            (video::-webkit-media-controls-panel-composited-parent):
            * Modules/mediacontrols/mediaControlsiOS.js: This is a workaround for webkit.org/b/135248
            It pushes the overlay panel down to close the gap with the video element. Since the
            panel's size in css pixels is scale dependent, the gap needs to be scale dependent too.
            (ControllerIOS.prototype.set pageScaleFactor):

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171203

    2014-07-17  Enrica Casucci  <enrica@apple.com>

            [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
            https://bugs.webkit.org/show_bug.cgi?id=135023
            <rdar://problem/17617282>

            Reviewed by Benjamin Poulain.

            Adding some exports.

            * WebCore.exp.in:

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171580

    2014-07-24  Ryosuke Niwa  <rniwa@webkit.org>

            REGRESSION(r164401): Placing a caret doesn't bring up autocorrection panel
            https://bugs.webkit.org/show_bug.cgi?id=135278

            Reviewed by Tim Horton.

            The bug was caused by editorUIUpdateTimerFired calling respondToChangedSelection only if the selection was
            triggered by dictation instead of only if it was NOT triggered by dictation.

            Prior to r164401, AlternativeTextController::respondToMarkerAtEndOfWord exited early when SetSelectionOptions
            had DictationTriggered set. r164401 intended to move this check to editorUIUpdateTimerFired to avoid passing
            options around but the boolean condition was erroneously flipped.

            Fixed the bug by negating the condition in editorUIUpdateTimerFired.

            No new tests for now since autocorrection panel cannot be tested automatically. (We should really automate this!)

            * editing/Editor.cpp:
            (WebCore::Editor::editorUIUpdateTimerFired):

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171577

    2014-07-24  Tim Horton  <timothy_horton@apple.com>

            Crashes under scanSelectionForTelephoneNumbers in Range::text() on some sites
            https://bugs.webkit.org/show_bug.cgi?id=135281
            <rdar://problem/17803347>

            Reviewed by Ryosuke Niwa.

            * editing/Editor.cpp:
            (WebCore::Editor::scanSelectionForTelephoneNumbers):
            toNormalizedRange is not guaranteed to return a non-null range.
            If it returns null, pass the empty markedRanges down to the client as our new set.

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171567

    2014-07-24  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK1] CSS viewport units use the wrong viewport size in WebKit1
            https://bugs.webkit.org/show_bug.cgi?id=135254
            <rdar://problem/17781423>

            Reviewed by Tim Horton.

            Test: fast/css/viewport-units-dynamic.html

            In WebKit1 on iOS, we want to resolve viewport units against the visible
            viewport, not the legacy WK1 notion of the "viewport" which is the entire document.

            Fixes rendering of medium.com articles in WK1 views on iPad.

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

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171561

    2014-07-24  Myles C. Maxfield  <mmaxfield@apple.com>

            Crash when measuring a glyphs from a fallback SVG font
            https://bugs.webkit.org/show_bug.cgi?id=135264

            Reviewed by Simon Fraser.

            We can't realize font data for all fallback fonts ahead
            of time, but we don't have all the necessary context to
            realize SVG fallback data when it's needed. For now, we
            can just bail; however, a larger, more invasive fix is
            in order.

            Test: svg/text/svg-fallback-font-crash.html

            * platform/graphics/WidthIterator.cpp:
            (WebCore::applyFontTransforms):

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171559

    2014-07-24  Daniel Bates  <dabates@apple.com>
                And Alexey Proskuryakov  <ap@apple.com>

            [iOS] REGRESSION (WebKit2): Can't login to Wordpress.com, facebook.com when always allowing cookies
            https://bugs.webkit.org/show_bug.cgi?id=135273
            <rdar://problem/17598815>

            Reviewed by Alexey Proskuryakov.

            Fixes an issue where cookies may be created in the wrong cookie store.

            Currently, when we update the CFURLRequest object associated with a ResourceRequest object
            we explicitly set a cookie storage, cookie accept policy, and SSL properties based on the
            corresponding values in the old CFURLRequest object (if we have one). This ultimately leads
            to CFNetwork associating the cookies for the request with a different cookie store when we
            handle the request in the NetworkProcess. Instead, we shouldn't set these properties
            explicitly as we already copy them implicitly earlier (via CFURLRequestCreateMutableCopy()).

            * platform/network/cf/ResourceRequestCFNet.cpp:
            (WebCore::ResourceRequest::doUpdatePlatformRequest):

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171505

    2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>

            ScriptController::updateDocument ASSERT mutating map while iterating map
            https://bugs.webkit.org/show_bug.cgi?id=135211

            Reviewed by Oliver Hunt.

            Avoid iterating over m_windowShells in more places. This prevents
            the possibility of a collection during JSC allocation which might
            cause a mutation to m_windowShells (HTMLMediaElement destruction).

            Have ScriptController defriend ScriptCachedFrameData by providing
            a getter for the list of window shells.

            * bindings/js/ScriptCachedFrameData.cpp:
            (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
            (WebCore::ScriptCachedFrameData::restore):
            * bindings/js/ScriptController.cpp:
            (WebCore::ScriptController::windowShells):
            (WebCore::ScriptController::clearWindowShell):
            (WebCore::ScriptController::attachDebugger):
            (WebCore::ScriptController::updateDocument):
            * bindings/js/ScriptController.h:

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171554

    2014-07-24  Dan Bernstein  <mitz@apple.com>

            Fixed Windows build fix.

            * platform/network/cf/AuthenticationCF.cpp:

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171545

    2014-07-24  Dan Bernstein  <mitz@apple.com>

            Attempted Windows build fix.

            * platform/network/cf/AuthenticationCF.cpp:
            (WebCore::AuthenticationChallenge::AuthenticationChallenge):
            * platform/network/cf/CredentialStorageCFNet.cpp:
            (WebCore::CredentialStorage::getFromPersistentStorage):
            * platform/network/cf/ProtectionSpaceCFNet.cpp:
            (WebCore::ProtectionSpace::receivesCredentialSecurely):
            (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Deleted.

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171540

    2014-07-24  Dan Bernstein  <mitz@apple.com>

            <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
            https://bugs.webkit.org/show_bug.cgi?id=135229

            Reviewed by Alexey Proskuryakov.

            * CMakeLists.txt: Updated for rename of a source file.

            * WebCore.exp.in: Updated.

            * WebCore.vcxproj/WebCore.vcxproj: Updated for rename of source files, added
            ProtectionSpaceCFNet.{cpp,h}.
            * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

            * WebCore.xcodeproj/project.pbxproj: Updated for rename of source files, added
            ProtectionSpaceCococa.{h.mm}.

            * platform/network/ProtectionSpace.cpp: Renamed to ProtectionSpaceBase.cpp.
            * platform/network/ProtectionSpace.h: This file was renamed to ProtectionSpaceBase.h, and
            in its place added a generic ProtectionSpace class that just derives from
            ProtectionSpaceBase. For Cocoa and CFNetwork, ProtectionSpace{Cocoa,CFNet}.h is included
            instead of the generic class.

            * platform/network/ProtectionSpaceBase.cpp: Renamed ProtectionSpace.cpp to this.
            (WebCore::ProtectionSpaceBase::ProtectionSpaceBase): Updated for rename.
            (WebCore::ProtectionSpaceBase::host): Ditto.
            (WebCore::ProtectionSpaceBase::port): Ditto.
            (WebCore::ProtectionSpaceBase::serverType): Ditto.
            (WebCore::ProtectionSpaceBase::isProxy): Ditto.
            (WebCore::ProtectionSpaceBase::realm): Ditto.
            (WebCore::ProtectionSpaceBase::authenticationScheme): Ditto.
            (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Removed CFNetwork-specific part,
            which is now implemented in ProtectionSpaceCFNet.cpp.
            (WebCore::ProtectionSpaceBase::compare): Replaced operator== with this, and made it call
            ProtectionSpace::platformCompare at the end if needed.

            * platform/network/ProtectionSpaceBase.h: Renamed ProtectionSpace.h to this.
            (WebCore::ProtectionSpaceBase::encodingRequiresPlatformData): Added with a default
            implementation that returns false, for ProtectionSpace implementations to override.
            (WebCore::ProtectionSpaceBase::platformCompare): Added with a default implementation that
            returns true, for ProtectionSpace implementations to override.
            (WebCore::operator==): Changed to call compare.

            * platform/network/cf/AuthenticationCF.cpp:
            (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
            ProtectionSpace constructor that takes a CFURLProtectionSpaceRef.
            (WebCore::createCF): Changed to use ProtectionSpace::cfSpace.

            * platform/network/cf/AuthenticationCF.h: Guarded a couple of functiosn that aren’t used in
            Cocoa with #if PLATFORM(WIN).

            * platform/network/cf/CredentialStorageCFNet.cpp:
            (WebCore::CredentialStorage::getFromPersistentStorage): Changed to use
            ProtectionSpace::cfSpace.
            (WebCore::CredentialStorage::saveToPersistentStorage): Ditto.

            * platform/network/cf/ProtectionSpaceCFNet.cpp: Added.
            (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Override with the
            CFNetwork-specific test that was previously in ProtectionSpace.cpp.

            * platform/network/cf/ProtectionSpaceCFNet.h: Copied from Source/WebCore/platform/network/ProtectionSpace.h.
            Declare ProtectionSpace and override receivesCredentialSecurely.

            * platform/network/mac/AuthenticationMac.h: Deleted the ProtectionSpace core() and mac().
            * platform/network/mac/AuthenticationMac.mm:
            (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
            ProtectionSpace constructor that takes an NSURLProtectionSpace.
            (WebCore::mac): Changed to use ProtectionSpace::nsSpace.

            * platform/network/mac/CredentialStorageMac.mm:
            (WebCore::CredentialStorage::getFromPersistentStorage): Ditto.

            * platform/network/mac/ResourceHandleMac.mm:
            (WebCore::ResourceHandle::receivedCredential): Changed to use the ProtectionSpace
            constructor that takes an NSURLProtectionSpace.

            * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
            (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
            Ditto.

            * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
            (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
            Ditto.

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171532

    2014-07-24  Benjamin Poulain  <benjamin@webkit.org>

            [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
            https://bugs.webkit.org/show_bug.cgi?id=135227
            <rdar://problem/17279500>

            Reviewed by Simon Fraser.

            Keep track of the creation/destruction of Fixed and Sticky nodes in the ScrollingTree.

            * page/scrolling/ScrollingTree.cpp:
            (WebCore::ScrollingTree::ScrollingTree):
            * page/scrolling/ScrollingTree.h:
            (WebCore::ScrollingTree::hasFixedOrSticky):
            (WebCore::ScrollingTree::fixedOrStickyNodeAdded):
            (WebCore::ScrollingTree::fixedOrStickyNodeRemoved):
            * page/scrolling/mac/ScrollingTreeFixedNode.mm:
            (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
            (WebCore::ScrollingTreeFixedNode::~ScrollingTreeFixedNode):
            * page/scrolling/mac/ScrollingTreeStickyNode.mm:
            (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
            (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171526

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

            Sharing SharedBuffer between WebCore and ImageIO is racy and crash prone
            https://bugs.webkit.org/show_bug.cgi?id=135069
            <rdar://problem/17470655>

            Reviewed by Simon Fraser.

            When passing image data to ImageIO for decoding, we pass an NSData subclass that is a wraper
            around SharedBuffer. This can be a problem when ImageIO tries to access the data on the CA
            thread. End result is data corruption on large image loads and potential crashes. The fix is
            to have SharedBuffer create a copy of its data if the data has been passed to ImageIO and
            might be accessed concurrently.

            Since Vector is not refcounted, we do this by having a new refcounted object in SharedBuffer
            that contains the buffer and we pass that in our NSData subclass WebCoreSharedBufferData.
            Code that would result in the Vector memory moving e.g. append(), resize(), now checks to
            see if the buffer was shared and if so, will create a new copy of the vector. This ensures
            that the main thread does not end up invalidating the vector memory that we have passed it
            to ImageIO.

            No new tests because no functional changes.

            * loader/cache/CachedResource.cpp:
            (WebCore::CachedResource::makePurgeable):
                Remove early return - createPurgeableMemory() has the correct check now.
            * platform/SharedBuffer.cpp:
            (WebCore::SharedBuffer::SharedBuffer):
            (WebCore::SharedBuffer::adoptVector):
            (WebCore::SharedBuffer::createPurgeableBuffer):
                Don't create purgeable buffer if we are sharing the buffer.
            (WebCore::SharedBuffer::append):
            (WebCore::SharedBuffer::clear):
            (WebCore::SharedBuffer::copy):
            (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Added.
                Create a new copy of the data if we have shared the buffer and if appending to it would
                exceed the capacity of the vector resulting in memmove.
            (WebCore::SharedBuffer::appendToInternalBuffer): Added.
            (WebCore::SharedBuffer::clearInternalBuffer): Added.
            (WebCore::SharedBuffer::buffer):
                Create a new copy of the buffer if we have shared it.
            (WebCore::SharedBuffer::getSomeData):
            * platform/SharedBuffer.h:
            * platform/cf/SharedBufferCF.cpp:
            (WebCore::SharedBuffer::SharedBuffer):
            (WebCore::SharedBuffer::singleDataArrayBuffer):
            (WebCore::SharedBuffer::maybeAppendDataArray):
            * platform/mac/SharedBufferMac.mm:
                Pass the InternalBuffer object to WebCoreSharedBufferData
            (-[WebCoreSharedBufferData dealloc]):
            (-[WebCoreSharedBufferData initWithSharedBufferInternalBuffer:]):
            (-[WebCoreSharedBufferData length]):
            (-[WebCoreSharedBufferData bytes]):
            (WebCore::SharedBuffer::createNSData):
                Call createCFData() instead of duplicating code.
            (WebCore::SharedBuffer::createCFData):
                If the data is in purgeable memory, make a copy of it since m_buffer was cleared when
                creating the purgeable buffer.
            (-[WebCoreSharedBufferData initWithSharedBuffer:]): Deleted.

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171497

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

            Get rid of SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator
            https://bugs.webkit.org/show_bug.cgi?id=135219

            Reviewed by Anders Carlsson.

            No new tests because no functional changes.

            * loader/ResourceBuffer.h:
            * loader/mac/ResourceBuffer.mm:
            (WebCore::ResourceBuffer::createNSData):
            * platform/SharedBuffer.h:
            (WebCore::SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator::NSDataRetainPtrWithoutImplicitConversionOperator): Deleted.
            * platform/mac/SharedBufferMac.mm:
            (WebCore::SharedBuffer::createNSData):

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171506

    2014-07-23  Jeremy Jones  <jeremyj@apple.com>

            Transparent fullscreen background when video is not present.
            https://bugs.webkit.org/show_bug.cgi?id=135226

            Reviewed by Simon Fraser.

            Set background to black just before beginning the animation to fullscreen.

            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (WebVideoFullscreenInterfaceAVKit::enterFullscreen): set background color black.

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171481

    2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>

            JSDOMWindowShell leaks on pages with media elements
            https://bugs.webkit.org/show_bug.cgi?id=135178

            Reviewed by Oliver Hunt.

            The DOMWindowWorld for HTMLMediaElements with MEDIA_CONTROLS_SCRIPT
            was not getting cleared and removed.

            * bindings/js/ScriptController.cpp:
            (WebCore::ScriptController::clearWindowShell):
            Iterate over a copy of the values. A sweep / garbage collection caused by
            any JSC allocation during iteration could trigger a mutation of the m_windowShells
            table that was being iterating. So instead iterate a list that won't mutate.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::~HTMLMediaElement):
            If we had an isolated world, release as much memory as possible.

2014-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r171478

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

            [MSE][Mac] Support abort() in SourceBufferPrivateAVFObjC.
            https://bugs.webkit.org/show_bug.cgi?id=135163

            Reviewed by Brent Fulgham.

            Recreate the parser when asked to abort().

            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (WebCore::SourceBufferPrivateAVFObjC::abort):

2014-07-23  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171499. <rdar://problem/17783423>

    2014-07-23  Tim Horton  <timothy_horton@apple.com>

            REGRESSION (r171376): Sometimes we detect less than the whole phone number
            https://bugs.webkit.org/show_bug.cgi?id=135220
            <rdar://problem/17783423>

            Reviewed by Brady Eidson.

            * editing/Editor.cpp:
            (WebCore::Editor::scanSelectionForTelephoneNumbers):
            Use the visible selection's start and end instead of base and extent, because they'll
            always be in the right order in the case of a directional selection (base can be *after* extent
            if you select from right to left). This fixes the code that expands the selection.

            Pass the *entire* expanded selection to DataDetectors, instead of using TextIterator.
            This way, we will find each number only once, and will never get part of a phone number once
            and then the whole phone number later.

2014-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r171370

    2014-07-22  Enrica Casucci  <enrica@apple.com>

            REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
            https://bugs.webkit.org/show_bug.cgi?id=135180
            <rdar://problem/16721055>

            Reviewed by Simon Fraser.

            AsyncScrollingCoordinator will force a selection update on iOS
            when scrolling terminates in an overflow scroll.

            * loader/EmptyClients.h:
            * page/EditorClient.h:
            * page/scrolling/AsyncScrollingCoordinator.cpp:
            (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
            * page/scrolling/ScrollingTree.h:
            (WebCore::ScrollingTree::scrollingTreeNodeWillStartScroll):
            (WebCore::ScrollingTree::scrollingTreeNodeDidEndScroll):

2014-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r171355

    2014-07-21  Sam Weinig  <sam@webkit.org>

            [Cocoa] WKScriptMessageHandlers don't seem to function properly after navigating
            https://bugs.webkit.org/show_bug.cgi?id=135148

            Reviewed by Geoffrey Garen.

            The "webkit" property on the window was not getting installed for subsequent
            loads due to intricate dance playing setting the JSDOMWindow where the DOMWindow
            object is not yet in a Frame when the JSDOMWindow is created. Since we were
            adding the "webkit" property on construction, the property was returning null
            thinking it had no Frame and was in a bad state. We can fix this by making the
            "webkit" property behave like all the other window properties moving its getting
            to JSDOMWindow::getOwnPropertySlot.

            Added API test (WebKit2Cocoa/UserContentController).

            * bindings/js/JSDOMWindowBase.cpp:
            (WebCore::JSDOMWindowBase::finishCreation):
            * bindings/js/JSDOMWindowCustom.cpp:
            (WebCore::jsDOMWindowWebKit):
            (WebCore::JSDOMWindow::getOwnPropertySlot):

2014-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r171353

    2014-07-22  Brent Fulgham  <bfulgham@apple.com>

            [Win] Fix Leak in WebCore::createGlobalImageFileDescriptor 
            https://bugs.webkit.org/show_bug.cgi?id=134423
            <rdar://problem/17492758>

            Reviewed by Geoffrey Garen.

            * platform/win/PasteboardWin.cpp:
            (WebCore::createGlobalImageFileDescriptor): Unlock and release the
            HGLOBAL when exiting early.

2014-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r171347

    2014-07-21  Myles C. Maxfield  <mmaxfield@apple.com>

            Clicking on links while accessibility is enabled sometimes crashes
            https://bugs.webkit.org/show_bug.cgi?id=135074

            Reviewed by Chris Fleizach.

            When an accessibility request comes in from the system, we call updateBackingStore() on the
            relevant AccessibilityObject, which triggers a relayout of the entire document. This relayout
            might delete that accessibility node and its parent, which would cause the node to be deleted.
            After the stack unwinds, we then call a member function on the node without checking for this
            condition.

            Test: accessibility/parent-delete.html

            * accessibility/AccessibilityObject.cpp:
            (WebCore::AccessibilityObject::updateBackingStore): Retain the node for the duration of the
            function.

2014-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r171345

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

            Don't create new UIWindow for video fullscreen.
            https://bugs.webkit.org/show_bug.cgi?id=135038

            Reviewed by Darin Adler.

            * WebCore.exp.in:
            * platform/ios/WebVideoFullscreenControllerAVKit.h: use UIView instead of UIScreen.
            * platform/ios/WebVideoFullscreenControllerAVKit.mm:
            (-[WebVideoFullscreenController enterFullscreen:]): provide parent UIView.
            * platform/ios/WebVideoFullscreenInterfaceAVKit.h: remove UIWindow.
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
            (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto 
            (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
            (WebVideoFullscreenInterfaceAVKit::invalidate): ditto
            (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171336.

    2014-07-21  Benjamin Poulain  <bpoulain@apple.com>

            [iOS][WK2] Improve event throttling for Scroll Events
            https://bugs.webkit.org/show_bug.cgi?id=135082
            <rdar://problem/17445266>

            Reviewed by Simon Fraser.

            This patch is composed of two parts. The first part in the WebKit layer
            track an approximate measurement of the main thread responsiveness.
            The second part in WebCore use that information to avoid sending events
            if a page is unresponsive.

            In WebCore, this patch only consider scroll events so far. Hopefully the concept
            should be easy to generalize.

            * loader/EmptyClients.h:
            * page/ChromeClient.h:
            Chrome client provides us with one information: how long an incoming event should be delayed.
            Every port is free to implement whatever logic is suitable for them.

            * page/FrameView.cpp:
            (WebCore::FrameView::FrameView):
            (WebCore::FrameView::reset):
            (WebCore::FrameView::delayedScrollEventTimerFired):
            (WebCore::FrameView::scrollPositionChanged):
            (WebCore::FrameView::sendScrollEvent):
            * page/FrameView.h:
            Scroll events do not have any associated information so they can be coalesced by just skipping
            all input hapenning during the throttling delay.

            The implementation is done by using a timer to delay the events.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171332.

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

            Avoid putting empty-sized surfaces into IOSurfacePool
            https://bugs.webkit.org/show_bug.cgi?id=135136

            Reviewed by Simon Fraser.

            * platform/graphics/cg/IOSurfacePool.cpp:
            (WebCore::IOSurfacePool::addSurface):
            Avoid adding 0x0 surfaces to the pool, because they will wreak havoc
            when their size is used as the key in the CachedSurfaceMap.
            Additionally, avoid any empty sizes, because they're just pointless.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171321.

    2014-07-21  Beth Dakin  <bdakin@apple.com>

            WK1 should always setAcceleratedCompositingForFixedPositionEnabled(true) on 
            Yosemite
            https://bugs.webkit.org/show_bug.cgi?id=135135

            Reviewed by Darin Adler.

            This patch gets rid of the ChromeClient function that was introduced with 
            http://trac.webkit.org/changeset/171308 We’ll just enable the Setting instead.
            * css/StyleResolver.cpp:
            (WebCore::StyleResolver::adjustRenderStyle):
            (WebCore::fixedPositionCreatesStackingContext): Deleted.
            * page/ChromeClient.h:
            (WebCore::ChromeClient::requiresAcceleratedCompositingForViewportConstrainedPosition): Deleted.
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::requiresCompositingForPosition):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171320.

    2014-07-21  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK2] Turn off position:fixed behavior when the keyboard is up
            https://bugs.webkit.org/show_bug.cgi?id=132537

            Reviewed by Benjamin Poulain.

            Export RenderObject::localToContainerPoint().

            * WebCore.exp.in:

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171316.

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

            [MSE] YouTube video decode error when variant-switching
            https://bugs.webkit.org/show_bug.cgi?id=135128

            Reviewed by Brent Fulgham.

            Test: media/media-source/media-source-overlapping-decodetime.html

            When variant-switching, the situation can arise where an existing sample with a presentation
            timestamp of N and a decode timestamp of M, and a new sample with a presentation timestamp > N
            and the same decode timestamp of M, will keep the new sample from being added to the SampleMap.
            This can result in a decode error when samples depending on that new, missing sample are enqueued.

            The MSE spec is silent on the issue of overlapping decode timestamps. However, it guarantees that
            presentation timestamps are non-overlapping. So instead of using just the decode timestamp as a key
            for storing the samples in decode order, use both the decode timestamp and the presentation timestamp.
            That ensures that samples with different presentation times but equal decode times are both inserted
            into the decode queue, and in the correct order.

            * Modules/mediasource/SampleMap.cpp:
            (WebCore::SampleIsRandomAccess::operator()): Update the parameter type to match the new KeyType.
            (WebCore::SampleMap::addSample): Pass both decodeTime and presentationTime as the key to decodeOrder.
            (WebCore::SampleMap::removeSample): Ditto.
            (WebCore::DecodeOrderSampleMap::findSampleWithDecodeKey): Renamed from findSampleWithDecodeTime.
            (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeKey): renamed from reverseFindSampleWithDecodeTime.
            (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Use renamed version of above.
            (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
            (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
            (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Deleted.
            (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Deleted.
            * Modules/mediasource/SampleMap.h:
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::removeCodedFrames): Ditto.
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
            (WebCore::SourceBuffer::reenqueueMediaForTime): Ditto.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171314.

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

            [iOS] Handle QuickLook ResourceLoaders in the web process
            https://bugs.webkit.org/show_bug.cgi?id=135113

            Reviewed by David Kilzer.

            No new tests. QuickLook is not testable from WebKit.

            * WebCore.exp.in:
            * loader/ResourceLoadScheduler.cpp:
            (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Start loading the ResourceLoader if it is for a QuickLook resource.
            * loader/ResourceLoadScheduler.h:

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171308.

    2014-07-21  Beth Dakin  <bdakin@apple.com>

            Put position:fixed elements into layers when a WK1 view is layer-backed
            https://bugs.webkit.org/show_bug.cgi?id=135075

            Reviewed by Darin Adler.

            This patch adds a new ChromeClient function called 
            requiresAcceleratedCompositingForViewportConstrainedPosition(). Since a view can 
            go in and out of layer backing, we need a ChromeClient method that can be 
            dynamically re-evaluated rather than using the existing settings for enabling 
            accelerated fixed and fixed that creates a stacking context.

            Ensure that fixed elements create a stacking context when 
            requiresAcceleratedCompositingForViewportConstrainedPosition is true.
            * css/StyleResolver.cpp:
            (WebCore::StyleResolver::adjustRenderStyle):

            New ChromeClient function.
            * page/ChromeClient.h:

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171306.

    2014-07-20  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK1] Single touch div scrolling doesn't work in framesets (breaks Word previews)
            https://bugs.webkit.org/show_bug.cgi?id=135103
            <rdar://problem/11830219>

            Reviewed by Darin Adler.

            After r166117 all layer flushing starts on the root frame; we no longer flush layers
            for each frame during painting. However, flushing GraphicsLayers can set some state
            on a subframe RenderLayerCompositor that is now never processed, which breaks scroll
            layer registration.
            
            Fix by doing a walk of the Frame tree, and calling didFlushLayers() on subframe RenderLayerCompositors
            before calling didFlushLayers() on self.

            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
            (WebCore::RenderLayerCompositor::didFlushLayers):
            (WebCore::RenderLayerCompositor::notifySubframesAfterLayerFlush):
            (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers): Drive-by nullptr.
            * rendering/RenderLayerCompositor.h:

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171299.

    2014-07-21  Eric Carlson  <eric.carlson@apple.com>

            [iOS] a Paused media session is not active
            https://bugs.webkit.org/show_bug.cgi?id=135108

            Reviewed by Darin Adler.

            Activating the shared AudioSession will pause audio playing in another application,
            so only report a Playing media sessions as active.

            * platform/audio/MediaSessionManager.cpp:
            * platform/audio/MediaSessionManager.h:
            (WebCore::MediaSessionManager::activeAudioSessionRequired): Renamed from hasActive to make
            clear what it does. Only return true for a session that is Playing.

            * platform/audio/mac/MediaSessionManagerMac.cpp:
            (MediaSessionManager::updateSessionState): hasActive renamed to activeAudioSessionRequired.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171289.

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

            Reduce the chances of a race condition when sharing SharedBuffer
            https://bugs.webkit.org/show_bug.cgi?id=135060
            <rdar://problem/17729444>

            Reviewed by Darin Adler.

            We currently pass a SharedBuffer wrapped in WebCoreSharedBufferData to ImageIO for image
            decoding. This is not thread safe since ImageIO will access this buffer on a separate
            thread. We access SharedBuffer::buffer() on the other thread which resizes the Vector
            m_buffer if m_size is greater than the vector size. Since the code in SharedBuffer::append()
            sets m_size before appending the data to the buffer, m_size is out of sync with the m_buffer
            size for the entire duration of the Vector append which could be doing a lot of copying if
            the resource is large. While this change does not fix the race condition, we can at least
            reduce the chances of SharedBuffer::buffer() calling resize() by setting m_size after the
            cector has finished appending.

            No new tests because no functional changes.

            * platform/SharedBuffer.cpp:
            (WebCore::SharedBuffer::append):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171288.

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

            Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
            https://bugs.webkit.org/show_bug.cgi?id=134894

            Reviewed by Darin Adler.

            * WebCore.exp.in: add symbol for canPlayFastReverse
            * html/HTMLMediaElement.cpp: Add two new accessors
            (WebCore::HTMLMediaElement::nextScanRate): possibly limit scanRate
            (WebCore::HTMLMediaElement::canPlayFastForward): added
            (WebCore::HTMLMediaElement::canPlayFastReverse): added
            * html/HTMLMediaElement.h: declare two new methods
            * platform/graphics/MediaPlayer.cpp: Plumb through two new accessors
            (WebCore::MediaPlayer::maxFastForwardRate): added
            (WebCore::MediaPlayer::minFastReverseRate): added
            * platform/graphics/MediaPlayer.h: Declare new methods
            * platform/graphics/MediaPlayerPrivate.h: Added two new methods.
            (WebCore::MediaPlayerPrivateInterface::maxFastForwardRate): added
            (WebCore::MediaPlayerPrivateInterface::minFastReverseRate): added
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: member to cache ff/rw enabled state
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): observe on item canPlayFastForward canPlayFastReverse
            (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastForwardDidChange): added
            (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastReverseDidChange): added
            (WebCore::itemKVOProperties): observe canPlayFastForward canPlayFastRewind
            (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): ditto
            * platform/ios/WebVideoFullscreenInterface.h: add new method
            * platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: ditto
            (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): Set value on WebAVPlayerController.
            (-[WebAVPlayerController canScanBackward]): Deleted.
            (+[WebAVPlayerController keyPathsForValuesAffectingCanScanBackward]): Deleted.
            * platform/ios/WebVideoFullscreenModelMediaElement.mm:
            (WebVideoFullscreenModelMediaElement::updateForEventName): update canPlayFastReverse.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171287.

    2014-07-18  Gavin Barraclough  <baraclough@apple.com>

            HTMLMediaElement should registerWithDocument on iOS
            https://bugs.webkit.org/show_bug.cgi?id=135084
            <rdar://problem/17702531>

            Reviewed by Andreas Kling.

            Otherwise it won't know when the visibility changes!

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::registerWithDocument):
            (WebCore::HTMLMediaElement::unregisterWithDocument):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171286.

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

            Decrease flicker when enter and exit fullscreen.
            https://bugs.webkit.org/show_bug.cgi?id=134919

            Reviewed by Simon Fraser.

            Put AVPlayerLayer in a container layer so moving it between inline and fullscreen
            is as easy as adding and removing it from a containter layer; no need to do a layout.

            Make sure fullscreen layers are transparent before moving moving the AVPlayerLayer
            between inline and fullscreen so you don't briefly see the empty fullscreen layers.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::platformLayer): remove fullscreen special case.
            (WebCore::HTMLMediaElement::setVideoFullscreenLayer): no need to recalc style
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add inline container layer
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
            add WebVideoContainerLayer to contain AVPlayerLayer and keep layout correct.
            (-[WebVideoContainerLayer setBounds:]): forward setbounds to set child frame.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): create the video container layer
            (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): destroy the video container layer
            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): use container layer instead of video layer
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): use transactions to prevent unwanted animation.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): ditto
            * platform/graphics/ca/mac/PlatformCALayerMac.mm:
            (PlatformCALayerMac::layerTypeForPlatformLayer): WebVideoContainerLayer is a kind of AVPlayerLayer
            * platform/ios/WebVideoFullscreenControllerAVKit.mm:
            (-[WebVideoFullscreenController didCleanupFullscreen]): remove video fullscreen layer first
            * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
            (WebVideoFullscreenInterfaceAVKit::setupFullscreen): make background transparent during transition.
               dispatch_async to allow CATransaction to complete before calling didSetupFullscreen()

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171284.

    2014-07-20  Dan Bernstein  <mitz@apple.com>

            <rdar://problems/17742611> -[_WKActivatedElementInfo image] is often empty
            https://bugs.webkit.org/show_bug.cgi?id=135107

            Reviewed by Sam Weinig.

            Test: TestWebKitAPI/Tests/mac/RenderedImageFromDOMNode.mm

            * page/FrameView.cpp:
            (WebCore::FrameView::paintContents): To work around http://webkit.org/b/135106, replace the
            paint root with its nearest ancestor that isn’t an inline with culled line boxes, if needed.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171283.

    2014-07-20  Darin Adler  <darin@apple.com>

            Crashes seen in wheel event handling
            https://bugs.webkit.org/show_bug.cgi?id=135102

            Reviewed by Beth Dakin.

            Speculative fix based on guesses about what could be crashing.
            The crash seems to be calling ref on an event target, and my guess is that this
            has something to do with latching.

            * page/EventHandler.cpp:
            (WebCore::EventHandler::platformPrepareForWheelEvents): Updated argument types.
            (WebCore::EventHandler::handleWheelEvent): Refactored a little and made some local
            variables use RefPtr instead of raw pointers. Also added some comments.

            * page/EventHandler.h: Changed argument types to RefPtr.

            * page/mac/EventHandlerMac.mm:
            (WebCore::EventHandler::platformPrepareForWheelEvents): Updated argument types.
            Also added a FIXME.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171252.

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

            [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
            https://bugs.webkit.org/show_bug.cgi?id=135072
            <rdar://problem/17528188>

            Reviewed by David Kilzer.

            No new tests. Content filtering is not testable from WebKit.

            * WebCore.exp.in: Exported necessary ContentFilter symbols.
            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::finishedLoading): Called FrameLoaderClient::contentFilterDidBlockLoad().
            (WebCore::DocumentLoader::responseReceived): Created a new ContentFilter.
            (WebCore::DocumentLoader::dataReceived): Called FrameLoaderClient::contentFilterDidBlockLoad().
            (WebCore::DocumentLoader::setContentFilterForBlockedLoad): Deleted.
            (WebCore::DocumentLoader::handleContentFilterRequest): Deleted.
            * loader/DocumentLoader.h:
            * loader/FrameLoaderClient.h:
            (WebCore::FrameLoaderClient::contentFilterDidBlockLoad):
            * loader/PolicyChecker.cpp:
            (WebCore::PolicyChecker::checkNavigationPolicy): Removed the check for unblock navigations, as this is now
            handled at the WebKit layer.
            * platform/ContentFilter.h: ContentFilter no longer needs to be RefCounted, so made various changes in order to
            make it compatible with unique_ptr.
            * platform/ios/ContentFilterIOS.mm:
            (WebCore::scheme): Changed from a public member function to a static inline free function.
            (WebCore::ContentFilter::handleUnblockRequestAndDispatchIfSuccessful): Renamed from requestUnblockAndDispatchIfSuccessful.
            * platform/mac/ContentFilterMac.mm:
            (WebCore::ContentFilter::ContentFilter): Added a default constructor for use during message decoding.
            (WebCore::ContentFilter::addData): Removed calls to ref() and deref(). These were never actually needed since
            we were dispatching the block synchronously.
            (WebCore::ContentFilter::finishedAddingData): Ditto.
            (WebCore::ContentFilter::encode): Encoded m_platformContentFilter to the NSKeyedArchiver if it conforms to NSSecureCoding.
            (WebCore::ContentFilter::decode): Decoded m_platformContentFilter from the NSKeyedUnarchiver if it conforms to NSSecureCoding.
            (WebCore::ContentFilter::create): Deleted.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171250.

    2014-07-18  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
            https://bugs.webkit.org/show_bug.cgi?id=135078
            <rdar://problem/17401823>

            Reviewed by Tim Horton.
            
            When the UI-side scrolling tree receives a requested scroll position update, it scrolls
            the node (e.g. a frame) then traverses child nodes to update them, e.g. for fixed position.
            However, we would always use a viewport rect for the main document (from the scrolling tree),
            which is not appropriate for subframes. Subframes should just use their own visible
            rect to position fixed children.

            Test: platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame.html

            * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
            (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171246.

    2014-07-18  Beth Dakin  <bdakin@apple.com>

            Fixed position elements are misplaced when a WK1 view has contentInsets set
            https://bugs.webkit.org/show_bug.cgi?id=135031
            -and corresponding-
            <rdar://problem/17682335>

            Reviewed by Tim Horton.

            [NSScrollView documentVisibleRect] includes content that is within the inset-area 
            of a view, but WebCore is interested in the content that is fully visible, so we 
            need to factor the inset sizes out of this rect.

            Implement contract() to avoid the awkwardness of calling expand() with negative 
            values.
            * platform/graphics/IntSize.h:
            (WebCore::IntSize::contract):

            Factor out insets
            * platform/mac/ScrollViewMac.mm:
            (WebCore::ScrollView::platformVisibleContentRect):
            (WebCore::ScrollView::platformVisibleContentSize):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171239.

    2014-07-18  Tim Horton  <timothy_horton@apple.com>

            Take navigation snapshots whenever the current back-forward item is going to change
            https://bugs.webkit.org/show_bug.cgi?id=135058
            <rdar://problem/17464515>

            Reviewed by Dan Bernstein.

            * loader/HistoryController.cpp:
            (WebCore::HistoryController::updateForCommit):
            (WebCore::HistoryController::recursiveUpdateForCommit):
            (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
            (WebCore::HistoryController::createItem):
            Use setCurrentItem instead of duplicating the contents of it inside each of these functions.

            (WebCore::HistoryController::setCurrentItem):
            (WebCore::HistoryController::replaceCurrentItem):
            When setting or replacing the current item, let the FrameLoaderClient know that we're going
            to change which history item is "current".

            * loader/FrameLoaderClient.h:
            (WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Added.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171215.

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

            [MSE] Re-enqueue after a removeCodedFrames() only if the removed frames overlap what may have possibly been enqueued but undisplayed.
            https://bugs.webkit.org/show_bug.cgi?id=135039

            Reviewed by Eric Carlson.

            When a client calls removeCodedFrames(), we must re-enqueue those ranges if the removed samples overlap with
            enqueued but possibly un-displayed samples. Otherwise, replacement samples may lead to decode errors as those
            new samples dependencies are not met. But if we re-enqueue too frequently, this may cause subtle but noticible
            display timing glitches, so only re-enqueue when removeCodedFrames have a possiblity of removing enqueued, but
            not yet displayed samples.

            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::removeCodedFrames):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171210.

    2014-07-17  Zalan Bujtas  <zalan@apple.com>

            Subpixel rendering: Embedded non-compositing rotate transform paints to wrong position.
            https://bugs.webkit.org/show_bug.cgi?id=135028

            Reviewed by Simon Fraser.

            CTM always translates to where the layer's renderer() is going to paint.
            It ensures that the pixel snapped renderer() always end up painting to (0, 0) which is
            required to be able to position properly on transformed context.

            Test: fast/layers/hidpi-transform-on-child-content-is-mispositioned.html

            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::beginTransparencyLayers):
            (WebCore::RenderLayer::clipToRect):
            (WebCore::RenderLayer::paintLayerByApplyingTransform):
            (WebCore::RenderLayer::paintBackgroundForFragments):
            (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
            (WebCore::RenderLayer::paintOutlineForFragments):
            (WebCore::RenderLayer::paintMaskForFragments):
            (WebCore::RenderLayer::paintOverflowControlsForFragments):
            (WebCore::RenderLayer::calculateClipRects):
            * rendering/RenderLayer.h:

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171195.

    2014-07-17  Timothy Hatcher  <timothy@apple.com>

            Make console.profile record to the Timeline.

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

            Reviewed by Joseph Pecoraro.

            Passes existing profiler tests in fast/profiler.

            * bindings/js/ScriptState.cpp:
            (WebCore::domWindowFromExecState):
            (WebCore::frameFromExecState):
            (WebCore::scriptExecutionContextFromExecState):
            (WebCore::mainWorldExecState):
            (WebCore::execStateFromNode):
            * bindings/js/ScriptState.h:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::InspectorController):
            (WebCore::InspectorController::profilerEnabled):
            (WebCore::InspectorController::setProfilerEnabled):
            * inspector/InspectorController.h:
            * inspector/InspectorInstrumentation.cpp:
            (WebCore::InspectorInstrumentation::startProfilingImpl):
            (WebCore::InspectorInstrumentation::stopProfilingImpl):
            * inspector/InspectorTimelineAgent.cpp:
            (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
            (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
            (WebCore::InspectorTimelineAgent::start):
            (WebCore::InspectorTimelineAgent::stop):
            (WebCore::startProfiling):
            (WebCore::stopProfiling):
            (WebCore::InspectorTimelineAgent::startFromConsole):
            (WebCore::InspectorTimelineAgent::stopFromConsole):
            (WebCore::InspectorTimelineAgent::didWriteHTML):
            (WebCore::InspectorTimelineAgent::breakpointActionProbe):
            (WebCore::toProtocol):
            (WebCore::InspectorTimelineAgent::addRecordToTimeline):
            (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
            (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
            (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
            (WebCore::InspectorTimelineAgent::sendEvent):
            (WebCore::InspectorTimelineAgent::createRecordEntry):
            (WebCore::InspectorTimelineAgent::pushCurrentRecord):
            * inspector/InspectorTimelineAgent.h:
            (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
            (WebCore::InspectorTimelineAgent::pushCurrentRecord):
            * inspector/InstrumentingAgents.cpp:
            (WebCore::InstrumentingAgents::InstrumentingAgents):
            (WebCore::InstrumentingAgents::reset):
            * inspector/InstrumentingAgents.h:
            (WebCore::InstrumentingAgents::persistentInspectorTimelineAgent):
            (WebCore::InstrumentingAgents::setPersistentInspectorTimelineAgent):
            * inspector/TimelineRecordFactory.cpp:
            (WebCore::TimelineRecordFactory::createConsoleProfileData):
            * inspector/TimelineRecordFactory.h:
            * inspector/protocol/Timeline.json:
            * page/PageConsole.cpp:
            (WebCore::PageConsole::profileEnd):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171188.

    2014-07-16  Sam Weinig  <sam@webkit.org>

            Don't send geolocation permission requests when the page is not visible
            <rdar://problem/17208715>
            https://bugs.webkit.org/show_bug.cgi?id=134989

            Reviewed by Darin Adler.

            Instead of eagerly requesting geolocation permission for pages that aren't visible,
            store a set of pending requests, and send them only once the page has become visible.

            * Modules/geolocation/GeolocationController.cpp:
            (WebCore::GeolocationController::GeolocationController):
            (WebCore::GeolocationController::~GeolocationController):
            (WebCore::GeolocationController::requestPermission):
            (WebCore::GeolocationController::cancelPermissionRequest):
            (WebCore::GeolocationController::viewStateDidChange):
            (WebCore::provideGeolocationTo):
            * Modules/geolocation/GeolocationController.h:
            Store pending requests to be fired once the page is visible.

            * WebCore.xcodeproj/project.pbxproj:
            Add ViewStateChangeObserver.h

            * page/Page.cpp:
            (WebCore::Page::addViewStateChangeObserver):
            (WebCore::Page::removeViewStateChangeObserver):
            (WebCore::Page::setViewState):
            * page/Page.h:
            Add a set of registered view state observers, and notify them when the
            view state changes.

            * page/ViewStateChangeObserver.h: Added.
            (WebCore::ViewStateChangeObserver::~ViewStateChangeObserver):
            Add an observer that can register with the page for view state changes.

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171184.

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

            Enable legacy fullscreen API in media controls
            https://bugs.webkit.org/show_bug.cgi?id=134985

            Reviewed by Eric Carlson.

            Allow clients who have not enabled HTML5 Fullscreen APIs to still use fullscreen mode
            with <video> elements by using the legacy, video-element-specific fullscreen APIs in
            the <video> media controls.

            * Modules/mediacontrols/mediaControlsApple.js:
            (Controller):
            (Controller.prototype.handleReadyStateChange):
            (Controller.prototype.isFullScreen):
            (Controller.prototype.handlePlayButtonClicked):
            (Controller.prototype.updateFullscreenButton):
            (Controller.prototype.handleFullscreenButtonClicked):

2014-07-22 Dana Burkart <dburkart@apple.com>
    
        Merge r171376.

    2014-07-22  Tim Horton  <timothy_horton@apple.com>

            REGRESSION (r171016): Reproducible infinite spin selecting phone number
            https://bugs.webkit.org/show_bug.cgi?id=135183
            <rdar://problem/17727342>

            Reviewed by Ryosuke Niwa.

            * editing/Editor.cpp:
            (WebCore::Editor::scanRangeForTelephoneNumbers):
            Make use of TextIterator::subrange, which knows how to make a subrange from character positions,
            instead of assuming that our character positions translate directly to positions in the incoming range.
            Make use of DocumentMarkerController::addMarker, which takes a range and applies the marker to
            all text nodes inside the range as appropriate.
            Fix naming of the shadowed 'length' local.
            Fix a typo in the comment.

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

        <rdar://problem/17675068> Disable some features on this branch.

        Reviewed originally by Simon Fraser.

        Disable:
        - CSS_EXCLUSIONS
        - CSS_GRID_LAYOUT
        - INPUT_TYPE_COLOR
        - INPUT_TYPE_COLOR_POPUP
        - CANVAS_PATH
        - CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED
        - INDIE_UI
        - SHARED_WORKERS
        - NAVIGATOR_HWCONCURRENCY
        - GAMEPAD
        - PICTURE_SIZES
        - CSS3_CONDITIONAL_RULES
        - WILL_REVEAL_EDGE_EVENTS

        * Configurations/FeatureDefines.xcconfig:

2014-07-16  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before painting.
        https://bugs.webkit.org/show_bug.cgi?id=134950
        <rdar://problem/17617994>

        Reviewed by Simon Fraser.

        The cliprect coming from the graphics layer needs to be adjusted with the subpixel gap
        from renderer. This is symmetric with the offsetting we do, when the dirty rect is sent off to the GraphicsLayer.
        It puts us back to the correct coordinating system for intersecting with renderers.

        Test: compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::beginTransparencyLayers):
        (WebCore::RenderLayer::clipToRect):

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

        Fix a typo noticed by Darin.
        
        * rendering/RenderBox.cpp:
        (WebCore::shouldApplyContainersClipAndOffset):
        (WebCore::RenderBox::computeRectForRepaint):
        (WebCore::shouldAppyContainersClipAndOffset): Deleted.

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

        Improve showTree() logging
        https://bugs.webkit.org/show_bug.cgi?id=134997

        Reviewed by Tim Horton.

        Have the debug showTree(), which dumps the Node/Element tree, show which nodes need
        style recalc, and print element renderers.

        * dom/Node.cpp:
        (WebCore::Node::showNode):

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

        [iOS] Expose the points on WebEventRegion
        https://bugs.webkit.org/show_bug.cgi?id=134978

        Reviewed by Tim Horton.

        Expose WebEventRegion's points so that UIKit can get at them.

        * page/ios/WebEventRegion.h:
        * page/ios/WebEventRegion.mm:
        (-[WebEventRegion p1]):
        (-[WebEventRegion p2]):
        (-[WebEventRegion p3]):
        (-[WebEventRegion p4]):

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

        Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
        <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984

        Reviewed by Dan Bernstein.

        Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
        (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

        Add a big shiny comment in a few key places:
        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::initializeDatabaseProcess):
        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
        (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
        (WebKit::WebContext::ensureDatabaseProcess):

2014-07-16  Roger Fong  <roger_fong@apple.com>

        Captions container should not clip content.
        https://bugs.webkit.org/show_bug.cgi?id=134840.
        <rdar://problem/14553608>.

        Reviewed by Simon Fraser.

        Tests: media/track/track-in-band-subtitles-too-large.html
               media/track/track-long-word-container-sizing.html

        * Modules/mediacontrols/mediaControlsApple.css:
        (video::-webkit-media-text-track-container):
        Set word break property of WebCTT cues to normal to make it consistent with in-band cues.
        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
        Set -webkit-min-content on min-width/min-height property of the text track display.
        * html/track/VTTCue.cpp:
        (WebCore::VTTCueBox::applyCSSProperties):
        Do the same for WebVTT cues.

2014-07-16  Eric Carlson  <eric.carlson@apple.com>

        [Mac] replace AVPlayerItem on the main thread
        https://bugs.webkit.org/show_bug.cgi?id=134983

        Reviewed by Jer Noble.

        No new tests, this fixes a problem with a thread configuration not present in the
        test environment.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem): New, when called off of 
            the main thread, dispatch to the main thread before setting AVPlayerItem.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setAVPlayerItem.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Ditto.

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

        [MSE] http/tests/media/media-source/mediasource-buffered.html is flakey
        https://bugs.webkit.org/show_bug.cgi?id=134949

        Reviewed by Eric Carlson.

        Depending on which SourceBuffer is successfully parsed first, the order of activeSourceBuffers
        may change from run to run, breaking the http/tests/media/media-source/mediasource-buffered.html
        test. Make the order of activeSourceBuffers the same as (a subset of) sourceBuffers, by replacing
        calls to activeSourceBuffers->add() and with a new call to regenerateActiveSourceBuffers(), which
        swaps the contents of the SourceBufferList with a new, ordered Vector.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::addSourceBuffer):
        (WebCore::MediaSource::sourceBufferDidChangeAcitveState):
        (WebCore::MediaSource::regenerateActiveSourceBuffers):
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBufferList.cpp:
        (WebCore::SourceBufferList::swap):
        * Modules/mediasource/SourceBufferList.h:

2014-07-16  Mike West  <mkwst@chromium.org>

        CSP: Drop 'script-nonce' directive.
        https://bugs.webkit.org/show_bug.cgi?id=134926

        Reviewed by Darin Adler.

        This patch drops the outdated 'script-nonce' Content Security
        Policy directive. It was removed from the spec, and replaced in
        CSP2 with a new 'script-src' syntax. We should implement that
        instead.

        Until then, removing the outdated syntax will ensure that no one
        ends up relying on it in WebKit's implementation.

        This should have limited web-visible impact, as the feature is
        behind the CSP_NEXT flag, which is not enabled by default.

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::requestScript):
        (WebCore::ScriptElement::executeScript):
        * page/ContentSecurityPolicy.cpp:
        (WebCore::CSPDirectiveList::allowJavaScriptURLs):
        (WebCore::CSPDirectiveList::allowInlineEventHandlers):
        (WebCore::CSPDirectiveList::addDirective):
        (WebCore::NonceDirective::NonceDirective): Deleted.
        (WebCore::NonceDirective::allows): Deleted.
        (WebCore::NonceDirective::parse): Deleted.
        (WebCore::CSPDirectiveList::checkNonce): Deleted.
        (WebCore::CSPDirectiveList::checkNonceAndReportViolation): Deleted.
        (WebCore::CSPDirectiveList::allowScriptNonce): Deleted.
        (WebCore::isAllowedByAllWithNonce): Deleted.
        (WebCore::ContentSecurityPolicy::allowScriptNonce): Deleted.
        (WebCore::ContentSecurityPolicy::reportInvalidNonce): Deleted.
        * page/ContentSecurityPolicy.h:

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

        REGRESSION(r171069) 75% repro crash in WebCore::AudioHardwareListenerMac::processIsRunningChanged()
        https://bugs.webkit.org/show_bug.cgi?id=134986

        Reviewed by Eric Carlson.

        Add a WeakPtrFactory to AudioHardwareListenerMac, so that if CoreAudio calls our block after
        being unregistered, we can bail early instead of calling into a deleted object.

        * platform/audio/mac/AudioHardwareListenerMac.cpp:
        (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
        * platform/audio/mac/AudioHardwareListenerMac.h:

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

        [MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
        https://bugs.webkit.org/show_bug.cgi?id=134941

        Reviewed by Eric Carlson.

        Only do our modified-order change of the readyState if the error parameter is empty,
        as that's the only case where a duration change will cause an inadvertant readyState
        change.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::streamEndedWithError):

2014-07-16  Alexey Proskuryakov  <ap@apple.com>

        Remove svn:executable property erroneously added in <http://trac.webkit.org/changeset/171144> somehow.

        * ChangeLog: Removed property svn:executable.
        * svg/SVGSVGElement.h: Removed property svn:executable.
        * svg/animation/SVGSMILElement.h: Removed property svn:executable.

2014-07-16  Daniel Bates  <dabates@apple.com>

        Substitute CGRectZero for NSZeroRect in -[DOMNode hrefFrame].

        Rubber-stamped by Zalan Bujtas.

        The method -[DOMNode hrefFrame] returns a CGRect. So, when we don't have a renderer
        we should return CGRectZero instead of a NSZeroRect.

        * bindings/objc/DOM.mm:
        (-[DOMNode hrefFrame]): Also, fix up some code style issues.

2014-07-16  Jeongeun Kim  <je_julie.kim@samsung.com>

        mutable pointers from const methods, timeContainer().
        https://bugs.webkit.org/show_bug.cgi?id=134757

        Reviewed by Alexey Proskuryakov.

        Avoid return mutable pointers from const methods.
        No new tests, no behavior change.

        * svg/SVGSVGElement.h:
        * svg/animation/SVGSMILElement.h:
        (WebCore::SVGSMILElement::timeContainer):

2014-07-15  Yusuke Suzuki  <utatane.tea@gmail.com>

        CSS: Generalize CSS First Letter treatment
        https://bugs.webkit.org/show_bug.cgi?id=134936

        Reviewed by Benjamin Poulain.

        first-letter pseudo element rule is handled differently from the other rules
        such as first-line. This patch removes this special handling in SelectorChecker
        and handles it in RulesFeatureSet.

        * css/RuleFeature.cpp:
        (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
        (WebCore::RuleFeatureSet::add):
        (WebCore::RuleFeatureSet::clear):
        * css/RuleFeature.h:
        (WebCore::RuleFeatureSet::RuleFeatureSet):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::matchRecursively):
        * css/StyleResolver.h:
        (WebCore::StyleResolver::usesFirstLetterRules):
        * dom/DocumentStyleSheetCollection.cpp:
        (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
        (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
        * dom/DocumentStyleSheetCollection.h:
        (WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules): Deleted.

2014-07-15  Simon Fraser  <simon.fraser@apple.com>

        Fix non-iOS builds.

        * rendering/RenderBox.cpp:
        (WebCore::shouldAppyContainersClipAndOffset):

2014-07-15  Simon Fraser  <simon.fraser@apple.com>

        [iOS] Fix touches inside accelerated overflow:scroll
        https://bugs.webkit.org/show_bug.cgi?id=134961
        <rdar://problem/16088789>

        Reviewed by Benjamin Poulain.

        When individual elements inside an overflow:scroll with -webkit-overflow-scrolling: touch
        had touch event listeners, we would fail to take the scroll offset into account when
        building the touch event region, causing touches on those elements to fail after scrolling.
        
        Touch event region building uses RenderObject::absoluteClippedOverflowRect(), and that
        code path tries to fix up repaint rects to work correctly in composited overflow:scroll.
        However, that broke the touch region computation.
        
        Fix by only ignoring the scroll offset for calls to computeRectForRepaint() which
        have a non-null repaintContainer (which indicates that we're doing a repaint in the
        compositing layer), and for which the repaintContainer is the containing block
        which is using composited scrolling. This restores correct behavior to the event region
        code which always calls this with a null repaintContainer.

        * rendering/RenderBox.cpp:
        (WebCore::shouldAppyContainersClipAndOffset):
        (WebCore::RenderBox::computeRectForRepaint):

2014-07-15  Simon Fraser  <simon.fraser@apple.com>

        [iOS] Fix issues drawing subsampled image elements and CSS images
        https://bugs.webkit.org/show_bug.cgi?id=134944
        <rdar://problem/17634095>

        Reviewed by Dean Jackson.

        After r170675 it is important for BitmapImage::draw() to be given a srcRect computed
        using the original size of the image, not the subsampled size.
        
        So fix various code paths that end up in image drawing to use the originalSize(),
        which requires giving Image a virtual function that just returns size(), and hence has
        a FloatSize return value.
        
        Tested by setting a very low subsampling threshold and browsing various sites.
        
        A better longterm fix will happen via bug 134916.

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::originalSize):
        * platform/graphics/BitmapImage.h:
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawImage):
        * platform/graphics/Image.cpp:
        (WebCore::Image::drawTiled):
        (WebCore::Image::computeIntrinsicDimensions):
        * platform/graphics/Image.h:
        (WebCore::Image::originalSize):
        * platform/graphics/cg/BitmapImageCG.cpp:
        (WebCore::BitmapImage::BitmapImage): Just use m_size for initializing the other members.
        (WebCore::BitmapImage::draw):
        * platform/graphics/cg/GraphicsContext3DCG.cpp:
        (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::Image::drawPattern):

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

        [Win] Unreviewed build fix after r171069.

        Add missing AudioHardwareListener implementation on Windows.

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

2014-07-15  Antti Koivisto  <antti@apple.com>

        REGRESSION (r155957): Invalid cast in WebCore::RenderNamedFlowThread::getRanges
        https://bugs.webkit.org/show_bug.cgi?id=134888

        Reviewed by Mihnea Ovidenie.

        Test: fast/regions/flowthread-getranges-box-cast.html

        * rendering/RenderNamedFlowThread.cpp:
        (WebCore::RenderNamedFlowThread::getRanges): Test the type before casting.

2014-07-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] Update GObject DOM bindings symbols file after r171014.
        https://bugs.webkit.org/show_bug.cgi?id=134907

        Reviewed by Philippe Normand.

        * bindings/gobject/webkitdom.symbols: Update to the current API.

2014-07-15  Manuel Rego Casasnovas  <rego@igalia.com>

        Unreviwed fix wrong indentation from r171082.

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):

2014-07-14  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: Zero sized compositing container's content positioned off by one device pixel.
        https://bugs.webkit.org/show_bug.cgi?id=134903

        Reviewed by Simon Fraser.

        The compositing layer boundaries are calculated using its renderer()'s and the renderer()'s
        descendants' bounds. However when the renderer() is zero sized, its bounds are omitted.
        In such cases, when the child content has offset from the renderer(), the subpixel adjustment
        of the compositing layer becomes negative (-meaning that the compositing layer is to the right/bottom
        direction from its renderer()). Remove fabs() to be able to express such direction.

        Test: compositing/hidpi-compositing-layer-with-zero-sized-container.html

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

2014-07-14  Jeremy Jones  <jeremyj@apple.com>

        Fix crash on WebVideoFullscreenManagerProxy construction.
        https://bugs.webkit.org/show_bug.cgi?id=134909

        Unreviewed fix crash from r171089

        Remove unnecessary dispatch to main queue since it can happen during construction.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): remove dispatch_async

2014-07-14  Jeremy Jones  <jeremyj@apple.com>

        WebVideoFullscreenInterfaceAVKit should only call the UI from main thread.
        https://bugs.webkit.org/show_bug.cgi?id=134890

        Reviewed by Eric Carlson.

        dispatch_async to the main thread before setting properties that would affect the UI.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): wrap in call to dispatch_async
        (WebVideoFullscreenInterfaceAVKit::setDuration): ditto
        (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
        (WebVideoFullscreenInterfaceAVKit::setRate): ditto
        (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
        (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
        (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
        (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
        (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto

2014-07-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>

        Fix the !ENABLE(FILTERS) && !ENABLE(CSS_FILTERS) build after r167497
        https://bugs.webkit.org/show_bug.cgi?id=134679

        Reviewed by Darin Adler.

        * html/ImageData.cpp:
        * platform/graphics/cairo/ImageBufferCairo.cpp:

2014-07-14  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Support sparse in auto-placement algorithm
        https://bugs.webkit.org/show_bug.cgi?id=134544

        Reviewed by Sergio Villar Senin.

        This patch implements sparse mode for auto-placement algorithm, which is
        the default mode in the new grid-auto-flow syntax. It keeps track of the
        auto-placement cursor in
        RenderGrid::placeAutoMajorAxisItemsOnGrid() and updates it accordingly
        when auto-positioned items are placed.
        If we're in dense mode it resets the cursor after each item (which keeps
        the old behavior that was using dense mode by default).

        GridIterator has been adapted to look for empty areas from a given
        position in both directions.

        Test: fast/css-grid-layout/grid-auto-flow-sparse.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::GridIterator::GridIterator): Modify constructor to
        add an optional argument for the varying index. This allows to look for
        empty areas in both axis.
        (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Defined the
        auto-placement cursor and rested after each item if we're in dense mode.
        (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Use auto-placement
        cursor to look for empty areas from the last auto-positioned item
        placed.
        * rendering/RenderGrid.h: Modify placeAutoMajorAxisItemOnGrid() header
        to receive the auto-placement cursor.

2014-07-14  Brent Fulgham  <bfulgham@apple.com>

        [iOS] Some videos play as inline audio-only content
        https://bugs.webkit.org/show_bug.cgi?id=134898.
        <rdar://problem/17629379>

        Reviewed by Eric Carlson.

        Add a new 'presentationType' accessor that indicates if the media
        element is playing in 'audio' mode. This can happen if a video
        element plays an HLS stream that starts off in audio-only mode.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::presentationType): Added.
        * html/HTMLMediaElement.h:
        * platform/audio/MediaSession.cpp:
        (WebCore::MediaSession::presentationType): Added.
        * platform/audio/MediaSession.h:
        * platform/audio/MediaSessionManager.cpp: 
        (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
        Use the presentationType, rather than the mediaType to control
        inline playback behavior.
        * platform/audio/ios/AudioDestinationIOS.h:
        (WebCore::AudioDestinationMac::presentationType): Add presentationType.
        * platform/audio/mac/AudioDestinationMac.h:
        (WebCore::AudioDestinationMac::presentationType): Ditto.

2014-07-14  Bear Travis  <betravis@adobe.com>

        [Feature Queries] Enable Feature Queries on Mac
        https://bugs.webkit.org/show_bug.cgi?id=134404

        Reviewed by Antti Koivisto.

        Enable Feature Queries on Mac and resume running the
        feature tests.

        * Configurations/FeatureDefines.xcconfig: Turn on
        ENABLE_CSS3_CONDITIONAL_RULES.

2014-07-11  David Hyatt  <hyatt@apple.com>

        <rdar://problem/17305458> Cannot interact with video controls in ePubs
        Bug 134836 - [New Multicolumn] Crawl to check for compositing between us and the enclosingPaginationLayer
        https://bugs.webkit.org/show_bug.cgi?id=134836

        Reviewed by Dean Jackson.

        The paginatedAndComposited bit being set in updateLayerPositions just didn't work, since compositing states
        can change without triggering that function. This patch just gets rid of the bit and does a crawl every time
        to check. This ensures that changes in compositing states don't necessitate any changes in pagination,
        since the lookup will always check the current compositing state.
        
        The new function that does this check is hasCompositedLayerInEnclosingPaginationChain.
        
        I have been unable to reproduce this issue, and this is therefore a purely speculative fix. I have no test
        case to provide because of this.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::hasCompositedLayerInEnclosingPaginationChain):
        (WebCore::RenderLayer::updatePagination):
        * rendering/RenderLayer.h:

2014-07-14  Zalan Bujtas  <zalan@apple.com>

        Move composite bounds calculation to RenderLayerBacking.
        https://bugs.webkit.org/show_bug.cgi?id=134864

        Reviewed by Darin Adler.

        No change in functionality.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateCompositedBounds):
        * rendering/RenderLayerCompositor.cpp: it was just proxying the calculateLayerBounds()
        to the RenderLayer.
        (WebCore::RenderLayerCompositor::calculateCompositedBounds): Deleted.
        * rendering/RenderLayerCompositor.h:

2014-07-14  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * platform/audio/MediaSessionManager.h:

2014-07-14  Eric Carlson  <eric.carlson@apple.com>

        [Mac] don't enable low power audio mode on external output devices
        https://bugs.webkit.org/show_bug.cgi?id=134877

        Reviewed by Sam Weinig.

        No new tests, this deals with changes to the audio hardware at runtime.

        * WebCore.xcodeproj/project.pbxproj: Remove AudioSessionListener.h.
        * WebCore.vcxproj/WebCore.vcxproj: Ditto.

        * platform/audio/AudioHardwareListener.cpp:
        (WebCore::AudioHardwareListener::AudioHardwareListener): Initialize m_outputDeviceSupportsLowPowerMode
            to true on iOS.
        * platform/audio/AudioHardwareListener.h:
        (WebCore::AudioHardwareListener::outputDeviceSupportsLowPowerMode): New accessor.
        (WebCore::AudioHardwareListener::setHardwareActivity): New setter for derived classes.
        (WebCore::AudioHardwareListener::setOutputDeviceSupportsLowPowerMode): Ditto.

        Remove AudioSessionListener interface, it wasn't being used.
        * platform/audio/AudioSession.cpp:
        (WebCore::AudioSession::addListener): Deleted.
        (WebCore::AudioSession::removeListener): Deleted.
        (WebCore::AudioSession::beganAudioInterruption): Deleted.
        (WebCore::AudioSession::endedAudioInterruption): Deleted.
        * platform/audio/AudioSession.h:
        * platform/audio/AudioSessionListener.h: Removed.

        * platform/audio/MediaSessionManager.cpp:
        (WebCore::MediaSessionManager::addSession): Allocate the AudioHardwareListener if necessary.
        (WebCore::MediaSessionManager::removeSession): Free the AudioHardwareListener if necessary.
        (WebCore::MediaSessionManager::audioOutputDeviceChanged): AudioHardwareListener client interface
            called when the output device changes, call updateSessionState to make sure we are using
            the correct buffer size.
        * platform/audio/MediaSessionManager.h:

        * platform/audio/ios/AudioDestinationIOS.h:
        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSessionPrivate::AudioSessionPrivate): Drive-by cleanup, remove ObjC helper object
            that was used to listen for OS notifications, it is no longer used.
        (SOFT_LINK_POINTER): Deleted.
        (-[WebAudioSessionHelper initWithCallback:]): Deleted.
        (-[WebAudioSessionHelper dealloc]): Deleted.
        (-[WebAudioSessionHelper interruption:]): Deleted.

        * platform/audio/mac/AudioHardwareListenerMac.cpp:
        (WebCore::currentDeviceSupportsLowPowerBufferSize): New, return true only if using build-in 
            transport device.
        (WebCore::processIsRunningPropertyDescriptor): Return reference to static AudioObjectPropertyAddress
            for kAudioHardwarePropertyProcessIsRunning instead of declaring one in every method
            that needs one.
        (WebCore::outputDevicePropertyDescriptor): Return reference to static AudioObjectPropertyAddress
            for kAudioHardwarePropertyDefaultOutputDevice.
        (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac): Restructure and add audio object
            listener for default output device.
        (WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac): *Remove* listener audio object
            property listener instead of *Adding* a new one. Remove new listener.
        (WebCore::AudioHardwareListenerMac::propertyChanged): Enumerate the properties that changed,
            call appropriate method.
        (WebCore::AudioHardwareListenerMac::processIsRunningChanged): Renamed from setHardwareActive, 
            cleanup.
        (WebCore::AudioHardwareListenerMac::outputDeviceChanged): New, call client.audioHardwareOutputDeviceChanged.
        (WebCore::AudioHardwareListenerMac::setHardwareActive): Deleted, renamed processIsRunningChanged.
        * platform/audio/mac/AudioHardwareListenerMac.h:

        * platform/audio/mac/MediaSessionManagerMac.cpp:
        (MediaSessionManager::updateSessionState): Only set the output buffer size to 4K when hardware
            supports it.

2014-07-13  Benjamin Poulain  <benjamin@webkit.org>

        Remove SelectorCheckerFastPath from the style resolution algorithm
        https://bugs.webkit.org/show_bug.cgi?id=134866

        Reviewed by Antti Koivisto.

        SelectorCheckerFastPath is now pure overhead because it can almost never match
        if the CSS JIT was unable to compile.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ruleMatches):
        The "pre-filter" behind fastCheckableSelector had two parts:
        1) Filtering the pseudoID.
        2) Filtering on the rule hash.

        The first part has been generalized (RuleDatacanMatchPseudoElement())
        and moved to collectMatchingRulesForList(). 

        (WebCore::ElementRuleCollector::collectMatchingRulesForList):
        * css/RuleSet.cpp:
        (WebCore::selectorCanMatchPseudoElement):
        (WebCore::RuleData::RuleData):
        (WebCore::RuleSet::addRegionRule):
        (WebCore::RuleSet::addRulesFromSheet):
        * css/RuleSet.h:
        (WebCore::RuleData::canMatchPseudoElement):
        (WebCore::RuleData::hasFastCheckableSelector): Deleted.
        * css/StyleResolver.cpp:

2014-07-13  Benjamin Poulain  <benjamin@webkit.org>

        Remove an useless check from SelectorChecker
        https://bugs.webkit.org/show_bug.cgi?id=134868

        Reviewed by Darin Adler.

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::matchRecursively):
        The condition of this if() branch can never be met for the mode "QueryingRules".

        The next condition in that if() is "dynamicPseudo != NOPSEUDO", which implies
        a pseudo element was matched prior to the current context/simple selector.
        This cannot happen with QueryingRules, since we never match pseudo elements for
        SelectorQuery.

2014-07-12  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>

        Elements with rendering disabled due to dimensions should not contribute to parent bounding box
        https://bugs.webkit.org/show_bug.cgi?id=134184

        Reviewed by Dirk Schulze.

        SVG elements that have rendering disabled should not contribute to any ancestor elements bounding box.
        Examples of elements with rendering disabled:
        - basic shape with width <= 0 or height <= 0
        - path with no path data (d attribute missing or empty)
        - polyline or polygon element with no point data (points attribute missing or empty)

        To achieve this a method (isRenderingDisabled) was added to RenderSVGShape and it's derived classes.
        This is used to determine if an element is included when creating the union of child bounding boxes
        in a container element.

        Tests: svg/custom/GetBBox-path-nodata.html
               svg/custom/GetBBox-polygon-nodata.html
               svg/custom/GetBBox-polyline-nodata.html
               svg/custom/getBBox-container-hiddenchild.html

        * rendering/svg/RenderSVGEllipse.cpp:
        (WebCore::RenderSVGEllipse::isRenderingDisabled):
        New method added. Checks bounding box to determine if rendering is disabled.
        * rendering/svg/RenderSVGEllipse.h:
        * rendering/svg/RenderSVGPath.cpp:
        (WebCore::RenderSVGPath::isRenderingDisabled):
        New method added. Checks bounding box to determine if rendering is disabled.
        * rendering/svg/RenderSVGPath.h:
        * rendering/svg/RenderSVGRect.cpp:
        (WebCore::RenderSVGRect::isRenderingDisabled):
        New method added. Checks bounding box to determine if rendering is disabled.
        * rendering/svg/RenderSVGRect.h:
        * rendering/svg/RenderSVGShape.h:
        (WebCore::RenderSVGShape::isRenderingDisabled):
        New method added. Always returns false so that derived classes that do not
        implement this method retain the existing behaviour.
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
        For each element potentially being included in the unioned bounding box of
        a container, check isRenderingDisabled and skip that element if true.

        * rendering/svg/RenderSVGEllipse.cpp:
        (WebCore::RenderSVGEllipse::isRenderingDisabled):
        * rendering/svg/RenderSVGEllipse.h:
        * rendering/svg/RenderSVGPath.cpp:
        (WebCore::RenderSVGPath::isRenderingDisabled):
        * rendering/svg/RenderSVGPath.h:
        * rendering/svg/RenderSVGRect.cpp:
        (WebCore::RenderSVGRect::isRenderingDisabled):
        * rendering/svg/RenderSVGRect.h:
        * rendering/svg/RenderSVGShape.h:
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):

2014-07-12  Benjamin Poulain  <benjamin@webkit.org>

        Rename selectorListContainsUncommonAttributeSelector() to selectorListContainsAttributeSelector()
        https://bugs.webkit.org/show_bug.cgi?id=134862

        Reviewed by Sam Weinig.

        Unlike containsUncommonAttributeSelector(), selectorListContainsUncommonAttributeSelector() does not
        evaluate the attribute for "uncommon" types.

        It would be possible to change the function instead to evaluate common attributes based
        on the match type and the pseudo class type. Such change would be more risky
        and we would get very little benefit from it, I leave that for later if that ever becomes useful.

        * css/RuleSet.cpp:
        (WebCore::selectorListContainsAttributeSelector):
        (WebCore::containsUncommonAttributeSelector):
        (WebCore::selectorListContainsUncommonAttributeSelector): Deleted.

2014-07-12  Zan Dobersek  <zdobersek@igalia.com>

        Use braced-init-list to create one-item Vector object in insertPerformanceEntry
        https://bugs.webkit.org/show_bug.cgi?id=133675

        Reviewed by Darin Adler.

        * page/PerformanceUserTiming.cpp:
        (WebCore::insertPerformanceEntry): Avoid wasting three lines for creating a
        Vector object with just one item that in the end gets copied. Use the
        braced-init-list syntax instead, leveraging Vector's std::initializer_list
        constructor.

2014-07-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>

        Memory leaks with autoLoadImages off
        https://bugs.webkit.org/show_bug.cgi?id=124411

        Reviewed by Darin Adler.

        Do not emit notifyFinished for images with deferred load,
        and allow deferred loads to be cancelled.

        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::checkNotify):
        (WebCore::CachedResource::cancelLoad):

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

        [MSE] http/tests/media/media-source/mediasource-duration.html is failing.
        https://bugs.webkit.org/show_bug.cgi?id=134852

        Reviewed by Eric Carlson.

        Fixes the following tests:
        http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
        http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
        http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
        http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
        http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
        http/tests/media/media-source/mediasource-duration.html
        http/tests/media/media-source/mediasource-play.html

        The primary change necessary to fix the mediasource-duration.html test was to add support
        for delaying the completion of a seek operation until the HTMLMediaElement's readyState
        rises to > HAVE_CURRENT_DATA. This is accomplished by modifying MediaSourcePrivate to have
        waitForSeekCompleted() and seekCompleted() virtual methods. These are called by MediaSource
        when a seek operation results in the current time moving outside the currently buffered time
        ranges, and when an append operation results in the readyState changing, respectively.

        A number of other drive-by fixes were necessary to get this test fully passing, as noted
        below.

        Make the MediaSource the primary owner of the media's duration, rather than the MediaSourcePrivate.
        Move the MediaSourcePrivateClient pointer to the MediaSourcePrivate from the MediaPlayerPrivate, so
        the MediaSource's duration can be retrieved.  While we're at it, do the same thing for buffered.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::MediaSource): Initialize m_duration.
        (WebCore::MediaSource::duration): Simple accessor.
        (WebCore::MediaSource::setDurationInternal): Bring 'duration change algorithm' up to spec.
        (WebCore::MediaSource::setReadyState): Reset m_duration on close.
        * Modules/mediasource/MediaSource.h:
        * platform/graphics/MediaSourcePrivate.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Do not call setPrivateAndOpen().
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Pass through to MediaSourcePrivateAVFObjC.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Ditto.
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
        (WebCore::MediaSourcePrivateAVFObjC::create): Call setPrivateAndOpen().
        (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Set m_client.
        (WebCore::MediaSourcePrivateAVFObjC::duration): Pass through to MediaSourcePrivateClient.
        (WebCore::MediaSourcePrivateAVFObjC::buffered): Ditto.
        (WebCore::MediaSourcePrivateAVFObjC::durationChanged): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
        (WebCore::MediaSourcePrivateAVFObjC::setDuration): Deleted.
        * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
        (WebCore::MediaSourceGStreamer::open): Pass in MediaSourcePrivateClient.
        (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Initialize m_mediaSource.
        (WebCore::MediaSourceGStreamer::durationChanged): Retrieve the duration from MediaSourcePrivateClient.
        (WebCore::MediaSourceGStreamer::markEndOfStream): Remove unnecssary ASSERT.
        (WebCore::MediaSourceGStreamer::unmarkEndOfStream): Ditto.
        (WebCore::MediaSourceGStreamer::setDuration): Deleted.
        * platform/graphics/gstreamer/MediaSourceGStreamer.h:
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
        (WebCore::MockMediaPlayerMediaSource::load): Do not call setPrivateAndOpen().
        (WebCore::MockMediaPlayerMediaSource::buffered): Pass through to MockMediaSourcePrivate.
        (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
        (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
        * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
        (WebCore::MockMediaSourcePrivate::create): Call setPrivateAndOpen().
        (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set m_client.
        (WebCore::MockMediaSourcePrivate::duration): Pass through to MediaSourcePrivateClient.
        (WebCore::MockMediaSourcePrivate::buffered): Ditto.
        (WebCore::MockMediaSourcePrivate::durationChanged): Pass thorugh to MockMediaPlayerMediaSource.
        (WebCore::MockMediaSourcePrivate::setDuration): Deleted.

        Route seekToTime through MediaSource, rather than through MediaSourcePrivate, so that
        the time can be compared against the buffered ranges, and trigger the delay of the seek
        operation if necessary. Add a seekTimer to MediaPlayerPrivateMediaSourceAVFObjC, as this
        guarantees the order of asynchronous operations, rather than callOnMainThread, which can
        cause async operations to occur out of order.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::seekToTime): Bring up to spec.
        (WebCore::MediaSource::completeSeek): Ditto.
        (WebCore::MediaSource::monitorSourceBuffers): Call completeSeek() when appropriate.
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Deleted.
        (WebCore::SourceBuffer::seekToTime): Renamed from sourceBufferPrivateSeekToTime().
        * platform/graphics/MediaSourcePrivate.h:
        * platform/graphics/MediaSourcePrivateClient.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Add seekTimer. Only
            call timeChanged() if no longer seeking, thereby triggering a 'seeked' event.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Clear m_seekTimer.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Use m_seekTimer.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Call seekInternal.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Add logging.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted): Added.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted): Added; trigger 'seeked'.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): No longer attempt to finish seek when
            readyState changes here; this has been moved up to MediaSource.cpp.
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
        (WebCore::MediaSourcePrivateAVFObjC::waitForSeekCompleted): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
        (WebCore::MediaSourcePrivateAVFObjC::seekCompleted): Ditto.
        (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Pass through to MediaSourcePrivateClient.
        (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Ditto.
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
        (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Initialize m_seekCompleted.
        (WebCore::MockMediaPlayerMediaSource::seeking): Check for an uncompleted seek operation. 
        (WebCore::MockMediaPlayerMediaSource::seekWithTolerance): Ditto.
        (WebCore::MockMediaPlayerMediaSource::waitForSeekCompleted): Added.
        (WebCore::MockMediaPlayerMediaSource::seekCompleted): Added; trigger 'seeked'.
        * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
        * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
        (WebCore::MockMediaSourcePrivate::waitForSeekCompleted): Pass through to MockMediaPlayerMediaSource.
        (WebCore::MockMediaSourcePrivate::seekCompleted): Ditto.
        * platform/mock/mediasource/MockMediaSourcePrivate.h:

        Drive-by fixes.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::streamEndedWithError): Re-order the steps in streamEndedWithError()
            to avoid the MediaSource being closed and re-opened by the resulting duration change
            operation.
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::remove): Added logging.
        (WebCore::SourceBuffer::removeCodedFrames): Ditto.
        (WebCore::SourceBuffer::hasFutureTime): Swap an ASSERT for an early-return; it's possible
            for currentTime() to be outside of a buffered area.
        * Modules/mediasource/SourceBuffer.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute): Do not issue an additional 'timeupdate' event
            after finishSeek() issues one of its own.
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::globalDataParserQueue): Allow parsing operations to happen concurrently on
            background queues.

2014-07-12  Eric Carlson  <eric.carlson@apple.com>

        [iOS] update control type when playback state changes
        https://bugs.webkit.org/show_bug.cgi?id=134856

        Reviewed by Dean Jackson.

        Check to make sure the correct type of media controls are showing when playback state
        changes so we don't end up with the wrong type of controls during playback.

        * Modules/mediacontrols/mediaControlsApple.js: 
        (Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
            of 'play' so controls don't hide too early.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
            controls are shown when appropriate.

2014-07-12  Dean Jackson  <dino@apple.com>

        [iOS Media] Start playback button should indicate when it can't play
        https://bugs.webkit.org/show_bug.cgi?id=134851

        Post-commit review with Eric Carlson on IRC.

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.updateStatusDisplay): Remove the line that sets the
        class on the inline play button.

2014-07-11  Dean Jackson  <dino@apple.com>

        [iOS Media] Start playback button should indicate when it can't play
        https://bugs.webkit.org/show_bug.cgi?id=134851

        Reviewed by Sam Weinig.

        If a video element has errors and cannot play, then the start
        playback button should use the "broken" icon.

        * Modules/mediacontrols/mediaControlsApple.js: Add a new "failed" class.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.shouldHaveStartPlaybackButton): We need a playback button
        even when there is an error.
        (ControllerIOS.prototype.handleWirelessPickerButtonTouchStart): Don't offer Airplay
        if we're in an error state.
        (ControllerIOS.prototype.updateStatusDisplay): Set the "failed" class on
        the playback buttons if we are in an error state.

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

        Partition the CSS rules based on the most specific filter of the rightmost fragment
        https://bugs.webkit.org/show_bug.cgi?id=134828

        Reviewed by Andreas Kling.

        Previously, RuleSet was partitioning each rule based on the rightmost filter.
        While fast, this had the side effect of putting many selectors with ID match in the class
        bucket (because the selectors are generally written starting with the ID).

        This patch replace the code of findBestRuleSetAndAdd() by a simple loop going over all
        the simple selectors in the rightmost fragment to find the best bucket.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ruleMatches):
        * css/RuleSet.cpp:
        (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
        I unified ruleData.hasRightmostSelectorMatchingHTMLBasedOnRuleHash() and hasMultipartSelector().

        (WebCore::RuleData::RuleData):
        (WebCore::rulesCountForName):
        (WebCore::RuleSet::addRule):
        I removed the recursive part of findBestRuleSetAndAdd() (which was wrong anyway). The function
        was useless so I just moved the algorithm to addRule() directly.

        We first loop over all the CSSSelectors related by SubSelector, this correspond to the rightmost fragment.
        If a filter with high specificity is found, we add the rule immediately and end there.
        If a filter that is not very specific is found, we keep a pointer to the selector to use it later.

        (WebCore::RuleSet::findBestRuleSetAndAdd): Deleted.
        * css/RuleSet.h:
        (WebCore::RuleData::hasMultipartSelector): Deleted.

2014-07-11  Alex Christensen  <achristensen@webkit.org>

        [WinCairo] Unreviewed build fix after r170937.

        * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
        Update and apply changes applied to WebCoreGenerated.make in r170937.

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

        Web Inspector: Crash when using a stale InspectableNode Node
        https://bugs.webkit.org/show_bug.cgi?id=134849

        Reviewed by Timothy Hatcher.

        * inspector/PageConsoleAgent.cpp:

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

        [MSE] Separate MediaSource logging into its own log channel
        https://bugs.webkit.org/show_bug.cgi?id=134809

        Reviewed by Eric Carlson.

        Separate out MediaSource logging (which can be quite verbose) into its own log channel,
        distinct from the Media log channel. Add some per-sample logging and further sequester that
        logging into its own MediaSourceSamples log channel.

        Add the MediaSource and MediaSourceSamples channels:
        * platform/Logging.h:

        Move LOG(Media) -> LOG(MediaSource):
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::MediaSource):
        (WebCore::MediaSource::~MediaSource):
        (WebCore::MediaSource::setReadyState):
        (WebCore::MediaSource::addSourceBuffer):
        (WebCore::MediaSource::removeSourceBuffer):
        (WebCore::MediaSource::isTypeSupported):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
        (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
        (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
        (WebCore::SourceBuffer::provideMediaData):
        (WebCore::SourceBuffer::monitorBufferingRate):
        (WebCore::SourceBuffer::textTrackAddCues):
        (WebCore::SourceBuffer::hasFutureTime):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
        (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
        (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
        (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
        (WebCore::SourceBufferPrivateAVFObjC::append):
        (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
        (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
        (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):

2014-07-11  Brady Eidson  <beidson@apple.com>

        Phone numbers that span two lines are not detected.
        <rdar://problem/17601146> and https://bugs.webkit.org/show_bug.cgi?id=134808

        Reviewed by Tim Horton.

        * editing/Editor.cpp:
        (WebCore::Editor::scanSelectionForTelephoneNumbers): After scanning a range from the TextIterator,
            create an "edge range" window around the end of the TextIterator range, and scan it.
            Also make sure to not accumulate duplicate ranges that might have showed up in both the
            TextIterator range and the edge window range.

2014-07-11  Enrica Casucci  <enrica@apple.com>

        Implement textStylingAtPosition in WK2.
        https://bugs.webkit.org/show_bug.cgi?id=134843
        <rdar://problem/17614981>
        
        Reviewed by Benjamin Poulain.

        Adding some exports and making styleForSelectionStart public.

        * WebCore.exp.in:
        * editing/Editor.h:

2014-07-11  Zalan Bujtas  <zalan@apple.com>

        REGRESSION (r168868): eBay 'see all' links fail due to different JS bindings conversion behavior.
        https://bugs.webkit.org/show_bug.cgi?id=134841
        <rdar://problem/17577563>

        Reviewed by Simon Fraser.

        Revert back to type int for Element.scroll* APIs in order to preserve exception handling
        behavior.

        Test: cssom/non-subpixel-scroll-top-left-values.html

        * dom/Element.cpp:
        (WebCore::Element::scrollLeft):
        (WebCore::Element::scrollTop):
        (WebCore::Element::setScrollLeft):
        (WebCore::Element::setScrollTop):
        (WebCore::Element::scrollWidth):
        (WebCore::Element::scrollHeight):
        * dom/Element.h:
        * dom/Element.idl:
        * html/HTMLBodyElement.cpp:
        (WebCore::adjustForZoom):
        (WebCore::HTMLBodyElement::scrollLeft):
        (WebCore::HTMLBodyElement::setScrollLeft):
        (WebCore::HTMLBodyElement::scrollTop):
        (WebCore::HTMLBodyElement::setScrollTop):
        (WebCore::HTMLBodyElement::scrollHeight):
        (WebCore::HTMLBodyElement::scrollWidth):
        * html/HTMLBodyElement.h:

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

        Web Inspector: Debugger Pause button does not work
        https://bugs.webkit.org/show_bug.cgi?id=134785

        Reviewed by Timothy Hatcher.

        * CMakeLists.txt:
        * DerivedSources.make:
        * inspector/CommandLineAPIModuleSource.js:
        Minification strips the sourceURL command. Add it back with minification.

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

        Use the bare minimum tile coverage rect when under memory pressure.
        <https://webkit.org/b/134837>

        When the browser is under critical memory pressure, don't generate any
        more tiles than are needed to cover the exposed viewport rect.

        Reviewed by Pratik Solanki.

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

2014-07-11  Javier Fernandez  <jfernandez@igalia.com>

        [CSS Grid Layout] Implement justify-self css property
        https://bugs.webkit.org/show_bug.cgi?id=134419

        Reviewed by Dean Jackson.

        This change adds the justify-self property from CSS 3 Box Alignment
        and implements the parsing.

        From Blink r164685 by <jchaffraix@chromium.org>

        Test: fast/css/parse-justify-self.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue):
        * css/CSSParser.cpp:
        (WebCore::isValidKeywordPropertyAndValue):
        (WebCore::CSSParser::parseValue):
        (WebCore::isItemPositionKeyword):
        (WebCore::CSSParser::parseJustifySelf):
        * css/CSSParser.h:
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator EJustifySelf):
        (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment):
        * css/CSSPropertyNames.in:
        * css/CSSValueKeywords.in:
        * css/DeprecatedStyleBuilder.cpp:
        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyProperty):
        * rendering/style/RenderStyle.h:
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        * rendering/style/StyleRareNonInheritedData.h:

2014-07-11  Bear Travis  <betravis@adobe.com>

        [Feature Queries] Feature Query CSS Grammar Productions Should Return a Value
        https://bugs.webkit.org/show_bug.cgi?id=134810

        Reviewed by Antti Koivisto.

        The parsing return values are used to determine if a feature query is valid. Two
        grammar productions have been updated to correctly return a value.

        Tests exist for this feature but will not be run until the feature is turned on.
        See https://bugs.webkit.org/show_bug.cgi?id=134404.

        * css/CSSGrammar.y.in: Adding return values for two valid feature query productions.

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

        Use a separate backdrop element to allow cues to have highlight and background color
        https://bugs.webkit.org/show_bug.cgi?id=134821
        <rdar://problem/15999721>

        Reviewed by Eric Carlson.

        Add a new <div> element wrapping the existing cue <span>. This allows
        us to have a highlight on the cue (in the <span> background), as well
        as an overall background color.

        * Modules/mediacontrols/mediaControlsApple.css:
        (video::-webkit-media-text-track-display-backdrop): New markup for
        the backdrop element of the caption.
        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
        allow user customization of the cue backdrop.
        (WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
        "m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
        (WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
        (WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
        of the new m_cueBackdropBox element, and add m_cueBackdropBox to
        the display tree.
        * html/track/VTTCue.h:
        (WebCore::VTTCue::element):
        * page/CaptionUserPreferencesMediaAF.cpp:
        (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
        Fix for missing caption style updates. Even if we are already
        listening for caption changes, we still want to update the new
        instance's style sheet to match.
        (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
        * rendering/RenderVTTCue.cpp:
        (WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
        <div> into consideration when looking for the Cue text element.

2014-07-11  Zalan Bujtas  <zalan@apple.com>

        Subpixel layout: return integral results for offset*, client*, scroll* by default.
        https://bugs.webkit.org/show_bug.cgi?id=134651

        Reviewed by Simon Fraser.

        Revert to returning integral values for Element.offset* client* scroll* by default.
        Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).

        Since snapped dimension depends on both the original point and the width/height of the box,
        we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().

        Covered by existing tests
 
        * dom/Element.cpp:
        (WebCore::subpixelMetricsEnabled):
        (WebCore::convertToNonSubpixelValueIfNeeded):
        (WebCore::Element::offsetLeft):
        (WebCore::Element::offsetTop):
        (WebCore::Element::offsetWidth):
        (WebCore::Element::offsetHeight):
        (WebCore::Element::clientLeft):
        (WebCore::Element::clientTop):
        (WebCore::Element::clientWidth):
        (WebCore::Element::clientHeight):
        * page/Settings.in:

2014-07-11  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
        https://bugs.webkit.org/show_bug.cgi?id=134824
        <rdar://problem/17612729>

        Reviewed by Simon Fraser.

        Transparent layer clipping needs device pixel offset adjusting.

        Test: fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::beginTransparencyLayers):
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::paintLayerContents):
        (WebCore::RenderLayer::paintBackgroundForFragments):
        (WebCore::RenderLayer::paintForegroundForFragments):
        * rendering/RenderLayer.h:

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

        Unreviewed. Remove unused file.

        * html/shadow/MediaControlsGtk.h: Removed.

2014-07-11  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Update grid-auto-flow to the new syntax
        https://bugs.webkit.org/show_bug.cgi?id=134057

        Reviewed by Sergio Villar Senin.

        In last versions of the spec grid-auto-flow syntax has changed. New
        syntax is:
        [ row | column ] && dense? | stack && [ row | column ]?

        Implemented parsing for new syntax and added/modified test cases in
        current layout tests.

        For the moment, the implementation keeps working in the same way, but
        using "stack" value for grid-auto-flow property instead of "none". This
        should be fixed in a follow-up patch once "stack" is properly
        implemented.

        Also "dense" needs to be reviewed. Right now auto-placement algorithm is
        always "dense" and never "sparse".

        No new tests, update current tests to add new cases.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::propertyValue): Adapt to new syntax.
        * css/CSSParser.cpp:
        (WebCore::isValidKeywordPropertyAndValue): Removed grid-auto-flow as it
        is not a keyword anymore.
        (WebCore::isKeywordPropertyID): Ditto.
        (WebCore::CSSParser::parseValue): Add specific method for parsing
        grid-auto-flow.
        (WebCore::CSSParser::parseGridShorthand): Adapt parsing for
        grid-auto-flow property inside the shorthand.
        (WebCore::isValidGridAutoFlowId): Helper method to check if the CSSValue
        id is a valid keyword for grid-auto-flow property.
        (WebCore::CSSParser::parseGridAutoFlow): Implement new parsing for
        grid-auto-flow.
        * css/CSSParser.h: Method header for grid-auto-flow parsing.
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::operator GridAutoFlow): Deleted.
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
        * css/CSSValueKeywords.in: Add new keywords required by grid-auto-flow:
        "dense" and "stack".
        * css/DeprecatedStyleBuilder.cpp:
        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Remove
        default handler as grid-auto-flow is not a keyword now.
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyProperty): Implement particular handler
        for new grid-auto-flow syntax.
        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::placeItemsOnGrid): Keep old "none" behavior as
        "stack" behavior for the moment.
        (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Use the new
        helper methods in RenderStyle.
        (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Ditto.
        * rendering/style/GridResolvedPosition.cpp:
        (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle): Again
        keep old "none" behavior for "stack".
        * rendering/style/RenderStyle.h: Add new helper methods to know the
        direction and algorithm of grid-auto-flow property.
        * rendering/style/RenderStyleConstants.h: Redefine GridAutoFlow enum
        using flags for algorithm and direction.
        * rendering/style/StyleGridData.h: Change m_gridAutoFlow type to
        unsigned.

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

        [iOS] Pasting rich content does not perform a two-step paste
        https://bugs.webkit.org/show_bug.cgi?id=134795

        Reviewed by Benjamin Poulain.

        UIKit requires writing something (anything!) to a particular pasteboard
        during copy in order to flag the content as rich. When a paste occurs,
        UIKit will read this flag and perform a two-step paste.

        Test: platform/ios-sim/editing/pasteboard/two-step-paste.html

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::write):

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

        [iOS] Some QuickLook documents are not displayed as previews
        https://bugs.webkit.org/show_bug.cgi?id=134788
        <rdar://problem/17278194>

        Reviewed by Pratik Solanki.

        ResourceRequest::isMainResourceRequest() is not reliable (e.g. ResourceRequests reconstituted from an
        NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
        isMainResourceRequest() to check if a QuickLookHandle should be created when the Network Process is in use,
        just check if the current ResourceLoader is the same as the DocumentLoader's ResourceLoader.

        No new tests. QuickLook is not testable from WebKit.

        * platform/network/ios/QuickLook.mm:
        (WebCore::QuickLookHandle::create):

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

        [iOS WebKit2] Don't uninstall the memory pressure listener after first signal.
        <https://webkit.org/b/134814>

        The call to uninstall() should not be made on iOS since iOS doesn't use the
        hold-off mechanism in MemoryPressureHandler.

        Reviewed by Benjamin Poulain.

        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        (WebCore::MemoryPressureHandler::respondToMemoryPressure):

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

        [MSE] Overlapping appended ranges must cause the decoder to flush and re-enqueue.
        https://bugs.webkit.org/show_bug.cgi?id=134805

        Reviewed by Eric Carlson.

        When appending a range of media data which overlaps with an existing range, SourceBuffer
        must cause the decoder to flush and re-enqueue samples. Those samples removed by appending
        the overlapping range may have already been enqueued for display, and unless the decode
        queue is flushed, corruption or decode errors may occur as the new samples are enqueued for
        display.

        Add a boolean flag onto TrackBuffer to indicate whether the decoder needs to be flushed and
        re-enqueued the next time an append operation completes. Set this flag whenever samples are
        removed due to overlapping or an explicit call to removeCodedFrames(). Move the contents of
        sourceBufferPrivateSeekToTime() (which previously did flushing and re-enqueueing) into a new
        function, reenqueueMediaForTime(), which can be called from sourceBufferPrivateAppendComplete().

        Drive-by fix: findSyncSampleAfterDecodeIterator() would return the passed in iterator if that
        sample is a sync-sample. Fix this to correctly return the next sync sample.

        Drive-by fix: Use a SampleMap, rather than a DecodeOrderSampleMap, to track erased samples
        so that the erasedSamples are correctly accounted for in both presentation and decode orders.

        * Modules/mediasource/SampleMap.cpp:
        (WebCore::SampleMap::empty): Add convenience method.
        (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Drive-by fix.
        * Modules/mediasource/SampleMap.h:
        (WebCore::SampleMap::decodeOrder): Added const accessor.
        (WebCore::SampleMap::presentationOrder): Ditto.
        (WebCore::SampleMap::addRange): Added.
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Add needsReenqueeing flag.
        (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Move contents into reenqueueMediaForTime().
        (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueMediaForTime() if necessary.
        (WebCore::SourceBuffer::removeCodedFrames): Set needsReenqueing.
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
        (WebCore::SourceBuffer::provideMediaData): Drive-by fix.
        (WebCore::SourceBuffer::reenqueueMediaForTime): Moved from sourceBufferPrivateSeekToTime().
        * Modules/mediasource/SourceBuffer.h:

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

        ASSERT in SharedBuffer::maybeAppendDataArray() on MobileSafari launch
        https://bugs.webkit.org/show_bug.cgi?id=134812
        <rdar://problem/17628434>

        Reviewed by Joseph Pecoraro.

        Fix bug in my fix in r170930. Initialize the badly named m_shouldUsePurgeableMemory field to
        false. This field indicates when it is okay to use purgeable memory and is set to true once
        the resource is finished loading. By setting it to true in the constructor we were creating
        purgeable memory while the resource was still being loaded and this triggered the assert.

        No new tests. Should be covered by existing tests.

        * platform/cf/SharedBufferCF.cpp:
        (WebCore::SharedBuffer::SharedBuffer):

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

        [iOS WebKit2] Some memory pressure relief tweaks.
        <https://webkit.org/b/134811>

        Split memory pressure relief into critical and non-critical sections.
        Non-critical relief is for clearing out things that are really not
        essential, e.g unused font data, text measurement caches, etc.

        On iOS, only flip the "WebKit is under memory pressure" flag when we
        are under *critical* memroy pressure, rather than doing it early on
        and gimping ourselves because other processes are too big.

        Also added logging for when we transition in/out of system pressure.

        Reviewed by Geoffrey Garen.

        * platform/MemoryPressureHandler.cpp:
        (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
        (WebCore::MemoryPressureHandler::releaseCriticalMemory):
        (WebCore::MemoryPressureHandler::releaseMemory):
        * platform/MemoryPressureHandler.h:
        (WebCore::MemoryPressureHandler::ReliefLogger::loggingEnabled):
        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        (WebCore::MemoryPressureHandler::install):

2014-07-10  Beth Dakin  <bdakin@apple.com>

        Need Setting/WKPreference that allows clients to prevent scrollbars from drawing 
        on a secondary thread
        https://bugs.webkit.org/show_bug.cgi?id=134778
        -and corresponding-
        <rdar://problem/17595333>

        Reviewed by Tim Horton.

        This is a requirement for some types of performance tests. The patch adds a new 
        virtual function to ScrollableArea that forces subclasses to indicate the value of 
        the Setting. This is required because Scrollbar and ScrollableArea can’t get to 
        Settings on their own.

        * page/FrameView.cpp:
        (WebCore::FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
        * page/FrameView.h:
        * page/Settings.in:
        * platform/ScrollableArea.h:
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
        * platform/win/PopupMenuWin.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
        * rendering/RenderLayer.h:
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
        * rendering/RenderListBox.h:

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

        Phone number highlights should always be visible if the mouse hovers over.
        <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784

        Reviewed by Tim Horton.

        * WebCore.exp.in:

2014-07-10  Timothy Horton  <timothy_horton@apple.com>

        Assertions or crashes under _takeViewSnapshot when restoring windows
        https://bugs.webkit.org/show_bug.cgi?id=134792

        Reviewed by Simon Fraser.

        * platform/graphics/cocoa/IOSurface.mm:
        (IOSurface::createFromImage):

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

        [XHR] overrideMimeType() should be able to change encoding in HEADERS RECEIVED state
        https://bugs.webkit.org/show_bug.cgi?id=128968

        Reviewed by Alexey Proskuryakov.

        Moved response encoding computation from didReceiveResponse to didReceiveData, just before the decoder is instantiated.
        This allows overrideMimeType to be changed within readystatechange event callback and have an impact on selected encoding.

        Test: http/tests/xmlhttprequest/overridemimetype-headers-received-state-force-shiftjis.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::didReceiveResponse): Removed m_responseEncoding computation from response and mimeTypeOverride.
        (WebCore::XMLHttpRequest::didReceiveData): Added m_responseEncoding computation from response and mimeTypeOverride.

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

        Fire connected/disconnected events for Gamepads.
        https://bugs.webkit.org/show_bug.cgi?id=134386

        Reviewed by Dean Jackson.

        No new tests (No effect in a currently tested config)

        * Modules/gamepad/GamepadManager.cpp:
        (WebCore::navigatorGamepadFromDOMWindow): Handling converting a possibly-null Navigator into
            a possibly null NavigatorGamepad.
        (WebCore::GamepadManager::platformGamepadConnected): Notify blind Navigator/DOMWindows of all
            previously attached Gamepads, then notify everybody of this new gamepad.
        (WebCore::GamepadManager::platformGamepadDisconnected): Handle dispatching the disconnected
            event to all registered DOMWindows.
        (WebCore::GamepadManager::platformGamepadInputActivity): Notify blind Navigator/DOMWindows of all
            attached Gamepads.
        (WebCore::GamepadManager::makeGamepadVisible): Handles notifying setting up a new gamepads
            with all NavigatorGamepads as well as dispatching the connected even to DOMWindows.
        (WebCore::GamepadManager::registerDOMWindow):
        (WebCore::GamepadManager::unregisterDOMWindow):
        (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Deleted.
        * Modules/gamepad/GamepadManager.h:

        * Modules/gamepad/NavigatorGamepad.cpp:
        (WebCore::NavigatorGamepad::gamepadAtIndex):
        * Modules/gamepad/NavigatorGamepad.h:

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

        [iOS][WK2] Disable text quantization while actively changing the page's scale factor
        https://bugs.webkit.org/show_bug.cgi?id=134781

        Reviewed by Tim Horton and Myles C. Maxfield.

        Query the chrome client to setup quantization on each layers.

        * page/ChromeClient.h:
        (WebCore::ChromeClient::hasStablePageScaleFactor):
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::drawGlyphs):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setupFontSubpixelQuantization):

2014-07-09  peavo@outlook.com  <peavo@outlook.com>

        [Curl] Cache entry invalidated too early.
        https://bugs.webkit.org/show_bug.cgi?id=134681

        Reviewed by Alex Christensen.

        When a cache entry has expired, it is invalidated when a request for the corresponding url is started.
        This is too early, since the resource is possibly not modified (even though it has expired),
        and the server might respond with a 304 (not modified) response.
        When we then receive a 304 response, the cache entry is deleted, and we have no cached response/data to provide.
        This can be solved by not invalidating the entry when a request for that url is started,
        but instead invalidate when a 200 OK response is received (which means the resource has been modified).

        * platform/network/curl/CurlCacheManager.cpp:
        (WebCore::CurlCacheManager::isCached): Avoid invalidating cache entry when it has expired, wait until we know the server response.
        * platform/network/curl/CurlCacheManager.h: Added const modifier.

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

        Revert r170413 and r170390
        https://bugs.webkit.org/show_bug.cgi?id=134741

        Reviewed by Benjamin Poulain.

        These patches caused a variety of failures. I'm going to break them up into
        smaller chunks and commit them separately at some point in the future.

        Requesting a review from Ben Poulain because there were some conflicts with
        r170561 in InlineTextBox.cpp and InlineTextBox.h.

        * WebCore.exp.in:
        * platform/graphics/Font.cpp:
        (WebCore::Font::drawText):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForText):
        (WebCore::computeUnderlineType):
        * platform/graphics/Font.h:
        * platform/graphics/FontFastPath.cpp:
        (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
        (WebCore::Font::drawSimpleText):
        (WebCore::Font::drawEmphasisMarksForSimpleText):
        (WebCore::Font::drawGlyphBuffer):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForSimpleText):
        * platform/graphics/GlyphBuffer.h:
        (WebCore::GlyphBuffer::size):
        (WebCore::GlyphBuffer::glyphs):
        (WebCore::GlyphBuffer::advances):
        (WebCore::GlyphBuffer::fontDataAt):
        (WebCore::GlyphBuffer::advanceAt):
        (WebCore::GlyphBuffer::offsetAt):
        (WebCore::GlyphBuffer::reverse):
        (WebCore::GlyphBuffer::offsetInString):
        (WebCore::GlyphBuffer::swap):
        * platform/graphics/GraphicsContext.cpp:
        * platform/graphics/Latin1TextIterator.h:
        (WebCore::Latin1TextIterator::Latin1TextIterator):
        (WebCore::Latin1TextIterator::currentCharacter):
        * platform/graphics/SimpleFontData.h:
        * platform/graphics/SurrogatePairAwareTextIterator.cpp:
        (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
        * platform/graphics/SurrogatePairAwareTextIterator.h:
        (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
        * platform/graphics/TextRun.h:
        (WebCore::TextRun::length):
        (WebCore::TextRun::charactersLength):
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::glyphDataForCharacter):
        (WebCore::applyFontTransforms):
        (WebCore::WidthIterator::advanceInternal):
        (WebCore::WidthIterator::advance):
        (WebCore::WidthIterator::advanceOneCharacter):
        * platform/graphics/WidthIterator.h:
        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::adjustSelectionRectForComplexText):
        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
        (WebCore::HarfBuzzShaper::setNormalizedBuffer):
        * platform/graphics/mac/FontComplexTextMac.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontCGWin.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontWin.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/wince/FontWinCE.cpp:
        (WebCore::Font::drawGlyphs):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::selectionRectForComplexText):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::isSelected):
        (WebCore::InlineTextBox::selectionState):
        (WebCore::InlineTextBox::localSelectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::selectionStartEnd):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintCompositionBackground):
        (WebCore::InlineTextBox::paintDocumentMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::computeRectForReplacementMarker):
        (WebCore::InlineTextBox::paintCompositionUnderline):
        (WebCore::InlineTextBox::positionForOffset):
        (WebCore::InlineTextBox::constructTextRun):
        * rendering/InlineTextBox.h:
        (WebCore::InlineTextBox::truncation):
        * rendering/RenderCombineText.cpp:
        (WebCore::RenderCombineText::getStringToRender):
        * rendering/RenderCombineText.h:
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::ellipsisRectForBox):
        * rendering/svg/SVGInlineFlowBox.cpp:
        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::positionForOffset):
        (WebCore::SVGInlineTextBox::localSelectionRect):
        (WebCore::SVGInlineTextBox::paintSelectionBackground):
        (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGInlineTextBox::paintText):
        * rendering/svg/SVGInlineTextBox.h:
        * rendering/svg/SVGTextMetricsBuilder.cpp:
        (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
        (WebCore::SVGTextMetricsBuilder::advance):
        * rendering/svg/SVGTextQuery.cpp:
        (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
        (WebCore::SVGTextQuery::subStringLengthCallback):
        (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::rotationOfCharacterCallback):
        (WebCore::SVGTextQuery::extentOfCharacterCallback):
        (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
        * rendering/svg/SVGTextQuery.h:
        * rendering/svg/SVGTextRunRenderingContext.cpp:
        (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
        (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
        * rendering/svg/SVGTextRunRenderingContext.h:
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontData.h:

2014-07-08  Jeffrey Pfau  <jpfau@apple.com>

        Fix flaky loading tests
        https://bugs.webkit.org/show_bug.cgi?id=133696

        Reviewed by Ryosuke Niwa.

        In some cases, the Frame may be destroyed while the loader is
        initializing. Make sure we don't delete it too early.

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

2014-07-09  Simon Fraser  <simon.fraser@apple.com>

        Make IndirectCompositingReason an enum class
        https://bugs.webkit.org/show_bug.cgi?id=134789

        Reviewed by Tim Horton.

        Make RenderLayer::IndirectCompositingReason an enum class, and change some code
        in RenderLayerCompositor::reasonsForCompositing() to use a switch.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
        (WebCore::RenderLayerCompositor::reasonsForCompositing):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):

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

        Make SharedBuffer::append(SharedBuffer*) be smarter about CFData and data arrays
        https://bugs.webkit.org/show_bug.cgi?id=134731

        Reviewed by Antti Koivisto.

        If the target SharedBuffer has a CFDataRef or a data array then we can simply retain that
        CFDataRef or data array elements in the SharedBuffer being appended to. This avoids
        unnecessary copying.

        No new tests because no functional changes.

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::append):
        (WebCore::SharedBuffer::maybeAppendPlatformData):
        * platform/SharedBuffer.h:
        * platform/cf/SharedBufferCF.cpp:
        (WebCore::SharedBuffer::maybeAppendPlatformData):
        (WebCore::SharedBuffer::maybeAppendDataArray):
        * platform/soup/SharedBufferSoup.cpp:
        (WebCore::SharedBuffer::maybeAppendPlatformData):

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

        [Win] Remove uses of 'bash' in build system
        https://bugs.webkit.org/show_bug.cgi?id=134782
        <rdar://problem/17615533>

        Reviewed by Dean Jackson.

        Remove uses of 'bash' by replacing Windows-specific bash scripts
        with Perl equivalents.

        * WebCore.vcxproj/WebCoreGenerated.make:
        * WebCore.vcxproj/WebCoreGenerated.vcxproj:
        * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters:
        * WebCore.vcxproj/WebCorePreBuild.cmd:
        * WebCore.vcxproj/build-generated-files.pl: Copied from Source/WebCore/WebCore.vcxproj/build-generated-files.sh.
        * WebCore.vcxproj/build-generated-files.sh: Removed.
        * WebCore.vcxproj/migrate-scripts.pl: Copied from Source/WebCore/WebCore.vcxproj/migrate-scripts.sh.
        * WebCore.vcxproj/migrate-scripts.sh: Removed.

2014-07-09  Anders Carlsson  <andersca@apple.com>

        Support transparent WKWebViews
        https://bugs.webkit.org/show_bug.cgi?id=134779
        <rdar://problem/17351058>

        Reviewed by Tim Horton.

        Schedule rebuilding the compositing layers if a FrameView's transparency changes.

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

2014-07-09  Javier Fernandez  <jfernandez@igalia.com>
        CSS canvas color parsing accepts invalid color identifiers
        https://bugs.webkit.org/show_bug.cgi?id=134661

        Reviewed by Benjamin Poulain.

        Current implementation of the CSSParser::parseSystemColor assumes
        that if a valid cssValueKeywordID is got then it has to be a valid
        color. Such assumption is wrong and lead to many bugs and layout
        test failures.

        The parseSystemFunction determines now whether the parsed color is
        valid or not.

        Addtionally, a new method has been added to share the logic of
        determining whether a CSSValueID is a valid primitive values for
        colors or not. Generally, we should avoid passing invalid color
        identifiers to the theming API.

        No new tests, but added additional cases to the
        canvas-color-serialization.html, test-setting-canvas-color and
        rgb-color-parse test.

        * css/CSSParser.cpp:
        (WebCore::validPrimitiveValueColor): Added.
        (WebCore::parseColorValue):
        (WebCore::CSSParser::parseSystemColor):

2014-06-28  Jer Noble  <jer.noble@apple.com>

        [MSE] http/tests/media/media-source/mediasource-remove.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=134768

        Reviewed by Eric Carlson.

        Fix multiple bugs causing mediasource-remove.html to fail:

        Separate out setDuration() into setDurationInternal() so that steps which require
        us to run the "duration change algorithm" don't bail out if the SoureBuffer is
        inside updating().

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::setDuration):
        (WebCore::MediaSource::setDurationInternal):
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

        When removing coded frames, do so starting from the first sample in the range in
        decode order, so that frames dependant on removed frames are themselves removed. Add
        a convenience method in SampleMap findSampleWithPresentationTime(), and rename
        findSampleAfterPresentationTime() to findSampleOnOrAfterPresentationTime() to correctly
        reflect what the method does, and simplify its implementation by searching the map's keys
        directly.

        * Modules/mediasource/SampleMap.cpp:
        (WebCore::PresentationOrderSampleMap::findSampleWithPresentationTime):
        (WebCore::PresentationOrderSampleMap::findSampleOnOrAfterPresentationTime):
        (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime):
        (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Deleted.
        * Modules/mediasource/SampleMap.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::decodeTimeComparator):
        (WebCore::SourceBuffer::removeCodedFrames):

        Throw the correct exception (INVALID_STATE_ERR) from SourceBuffer::remove().

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::remove):

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

        Add SharedBuffer::wrapCFDataArray() and use it
        https://bugs.webkit.org/show_bug.cgi?id=134733

        Reviewed by Antti Koivisto.

        No new tests. Should be covered by existing tests.

        * platform/SharedBuffer.h:
        * platform/cf/SharedBufferCF.cpp:
        (WebCore::SharedBuffer::wrapCFDataArray):
        (WebCore::SharedBuffer::SharedBuffer):
        * platform/network/ResourceHandle.h:
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::handleDataArray): Deleted.
        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
        * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
        (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
        * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]):

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

        Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
        https://bugs.webkit.org/show_bug.cgi?id=134732

        Reviewed by Darin Adler.

        No new tests because no functional changes.

        * WebCore.exp.in:

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

        Fix the !USE(IOSURFACE) build.

        * WebCore.exp.in:

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

        Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
        https://bugs.webkit.org/show_bug.cgi?id=134773

        Reviewed by Anders Carlsson.

        * WebCore.exp.in:
        * platform/graphics/cocoa/IOSurface.h:
        * platform/graphics/cocoa/IOSurface.mm:
        (IOSurface::createFromImage):
        Move make-an-IOSurface-from-a-CGImageRef into WebCore::IOSurface.

2014-07-09  Enrica Casucci  <enrica@apple.com>

        Implement Editor::fontAttributesForSelectionStart() or iOS.
        https://bugs.webkit.org/show_bug.cgi?id=134771
        <rdar://problem/16167838>

        Reviewed by Ryosuke Niwa.

        Implement for iOS the equivalent function we have for OS X.

        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::fontAttributesForSelectionStart):

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

        [Win] Remove use of 'grep' in build steps
        https://bugs.webkit.org/show_bug.cgi?id=134770
        <rdar://problem/17608783>

        Reviewed by Tim Horton.

        Replace uses of the grep command in Windows builds with the equivalent
        Perl program.

        * WebCore.vcxproj/WebCoreGenerated.make:
        * WebCore.vcxproj/WebCorePreBuild.cmd:
        * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
        (WebCore::WebCoreAVCFResourceLoader::notifyFinished):

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

        Added css jit profiler, disabled by default.
        https://bugs.webkit.org/show_bug.cgi?id=134695

        Reviewed by Benjamin Poulain.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ruleMatches):
        Tell the RuleData when its compiled selector is used.
        * css/RuleSet.cpp:
        (WebCore::RuleData::RuleData):
        Initialize the compiled selector use count to 0.
        * css/RuleSet.h:
        (WebCore::RuleData::~RuleData):
        (WebCore::RuleData::compiledSelectorUsed):
        Count and log the number of times a compiled selector is used.
        * cssjit/SelectorCompiler.h:
        Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
        (WebCore::SelectorDataList::execute):
        Tell the SelectorData when its compiled selector is used.
        * dom/SelectorQuery.h:
        (WebCore::SelectorDataList::SelectorData::SelectorData):
        (WebCore::SelectorDataList::SelectorData::~SelectorData):
        (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
        Count and log the number of times a compiled selector is used.

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

        [iOS] caption size is sometimes incorrect in fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=134740

        Reviewed by Jer Noble.

        Captions on iOS are displayed in fullscreen with a TextTrackRepresentation object. Because
        the fullscreen video presentation is controlled by code in the UI process running on the
        UI thread, WebCore is notified of changes to fullscreen state asynchronously. This resulted
        in the TextTrackRepresentation object being created and/or destroyed too late some of the 
        time, which caused us to sometimes display captions incorrectly. Fix this by setting up and
        tearing down the TextTrackRepresentation object when WebCore's 'webkitfullscreenchange'
        event fires.

        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::enteredFullscreen): Notify text track container.
        (WebCore::MediaControlsHost::exitedFullscreen): Ditto.
        * Modules/mediacontrols/MediaControlsHost.h:
        * Modules/mediacontrols/MediaControlsHost.idl:

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.handleFullscreenChange): Notify host of fullscreen change.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): Only return true when in
            fullscreen.
        (WebCore::HTMLMediaElement::setVideoFullscreenLayer): Call updateTextTrackDisplay.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
            m_updateTextTrackRepresentationStyle to false.
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Move logic for creating
            TextTrackRepresentation to updateTextTrackRepresentation.
        (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize): New, split out of updateTimerFired.
        (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Move code to force immediate
            font size change to updateActiveCuesFontSize.
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): New, update
            text track representation, creating first if necessary.
        (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Add an early
            return if we don't have a text track representation.
        (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation): Early
            return if there is nothing to be done.
        (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): Force a caption update
            if there are visible captions.
        (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set m_updateTextTrackRepresentationStyle
            to true.
        (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):  Force a 
            caption update if there are visible captions.
        * html/shadow/MediaControlElements.h:

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

        [MSE] http/tests/media/media-source/mediasource-endofstream-invaliderror.html is failing.
        https://bugs.webkit.org/show_bug.cgi?id=134413

        Reviewed by Eric Carlson.

        Update MediaSource.endOfStream() to take an optional enum instead of an optional String.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::endOfStream):
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/MediaSource.idl:

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

        DOMWindows should register themselves with the GamepadManager when they have event listeners
        https://bugs.webkit.org/show_bug.cgi?id=134669

        Reviewed by Dean Jackson.

        No new tests (No effect in a currently tested config)

        By having DOMWindows register with the GamepadManager when they have/don’t have gamepad event
        listeners, we accomplish two things:
        1 - It’s simple for GamepadManager to dispatch gamepad events directly to the DOMWindows interested.
        2 - We know when to start monitoring for gamepad connections.

        * Modules/gamepad/GamepadManager.cpp:
        (WebCore::GamepadManager::GamepadManager):
        (WebCore::GamepadManager::registerNavigator):
        (WebCore::GamepadManager::unregisterNavigator):
        (WebCore::GamepadManager::registerDOMWindow):
        (WebCore::GamepadManager::unregisterDOMWindow):
        (WebCore::GamepadManager::maybeStartMonitoringGamepads): Start monitoring gamepads if there are any
          registered DOMWindows or NavigatorGamepads, and we aren’t already monitoring them.
        (WebCore::GamepadManager::maybeStopMonitoringGamepads): Stop monitoring gamepads if there aren’t any
          registered DOMWindows or NavigatorGameads, and we have been monitoring them before now.
        * Modules/gamepad/GamepadManager.h:

        * dom/EventNames.h:
        (WebCore::EventNames::isGamepadEventType):

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::DOMWindow):
        (WebCore::DOMWindow::~DOMWindow): If registered for gamepad events, unregister now.
        (WebCore::DOMWindow::incrementGamepadEventListenerCount): If this is the first gamepad event
          listener, register with the GamepadManager now.
        (WebCore::DOMWindow::decrementGamepadEventListenerCount): If this was the last gamepad event
          listener, unregister from the GamepadManager now.
        (WebCore::DOMWindow::addEventListener):
        (WebCore::DOMWindow::removeEventListener):
        * page/DOMWindow.h:

2014-07-08  Sun-woo Nam  <sunny.nam@samsung.com>

        [EFL] Fix the build break when ENABLE_ENCRYPTED_MEDIA_V2 is turned on.
        https://bugs.webkit.org/show_bug.cgi?id=134750

        Reviewed by Gyuyoung Kim.

        When turning ENABLE_ENCRYPTED_MEDIA_V2 on, build break occurs.
        Some source files need to be included in CMakeLists.txt file for build.
        And wrap the included header file which is built only on mac and wince.

        * CMakeLists.txt:
        * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:

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

        [iOS] user caption preferences not applied
        https://bugs.webkit.org/show_bug.cgi?id=134599

        Reviewed by Sam Weinig.

        * page/CaptionUserPreferences.cpp:
        (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): All Pages in a PageGroup
        do not necessarily use the same PageUserContentController, so apply and remove caption user
        the style sheet directly to each page rather than to the page group.

2014-07-08  Commit Queue  <commit-queue@webkit.org>

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

        "It broke the build on mountainlion release 32bit" (Requested
        by mmirman on #webkit).

        Reverted changeset:

        "Added css jit profiler, disabled by default."
        https://bugs.webkit.org/show_bug.cgi?id=134695
        http://trac.webkit.org/changeset/170894

2014-07-08  Jeremy Jones  <jeremyj@apple.com>

        WebVideoFullscreenInterfaceAVKit should lazily create m_playerController.
        https://bugs.webkit.org/show_bug.cgi?id=134706

        Reviewed by Simon Fraser.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
        Don't set the delegate if m_playerController isn't created.

2014-07-08  Bem Jones-Bey  <bjonesbe@adobe.com>

        Ensure we compute the height of replaced elements to 'auto' when appropriate.
        https://bugs.webkit.org/show_bug.cgi?id=134700

        Reviewed by David Hyatt.

        This fixes two issues:

        1) If a replaced element has a percentage height specified then its
        height should compute to 'auto' when its containing block does not
        have a height 'specified explicitly'. We were taking this to mean when
        its containing block's specified height value is 'auto' - in fact it
        means when the containing block's computed height is auto.

        2) Top and bottom on the containing block should only affect the
        height of the block if that block has absolute or fixed position.

        This brings us into line with IE, Firefox, and Chrome.

        This is a port of Blink patches by Rob Hogan and David Vest.

        Tests: css2.1/20110323/height-percentage-005.htm
               fast/css/replaced-element-ignore-top-bottom.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):

2014-07-08  Alex Christensen  <achristensen@webkit.org>

        Added css jit profiler, disabled by default.
        https://bugs.webkit.org/show_bug.cgi?id=134695

        Reviewed by Benjamin Poulain.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ruleMatches):
        Tell the RuleData when its compiled selector is used.
        * css/RuleSet.cpp:
        (WebCore::RuleData::RuleData):
        Initialize the compiled selector use count to 0.
        * css/RuleSet.h:
        (WebCore::RuleData::~RuleData):
        (WebCore::RuleData::compiledSelectorUsed):
        Count and log the number of times a compiled selector is used.
        * cssjit/SelectorCompiler.h:
        Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
        (WebCore::SelectorDataList::execute):
        Tell the SelectorData when its compiled selector is used.
        * dom/SelectorQuery.h:
        (WebCore::SelectorDataList::SelectorData::SelectorData):
        (WebCore::SelectorDataList::SelectorData::~SelectorData):
        (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
        Count and log the number of times a compiled selector is used.

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

        Unreviewed. Fix GObject DOM bindings API breaks test after r170700.

        Add missing WebKitDOMXPathNSResolver.symbols that I forgot to add
        in r170700.

        * bindings/gobject/WebKitDOMXPathNSResolver.symbols: Added.

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

        Unreviewed. iOS build fix after r170871.

        * rendering/RenderThemeIOS.mm:
        (WebCore::adjustInputElementButtonStyle):

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

        Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
        https://bugs.webkit.org/show_bug.cgi?id=134710
        <rdar://problem/17545291>

        Reviewed by Simon Fraser.

        Transparent layer clipping needs device pixel snapping.

        Test: fast/layers/wrong-clipping-semi-transparent-layer-on-subpixel-position.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::beginTransparencyLayers):

2014-07-07  Benjamin Poulain  <benjamin@webkit.org>

        LinkBuffer should not keep a reference to the MacroAssembler
        https://bugs.webkit.org/show_bug.cgi?id=134668

        Reviewed by Geoffrey Garen.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):

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

        Subpixel rendering: Inline box decoration rounds to integral.
        https://bugs.webkit.org/show_bug.cgi?id=134523
        <rdar://problem/17530298>

        Reviewed by Darin Adler.

        This patch removes 2 integral roundings from InlineFlowBox:
        1. Border and padding sizes are implicitly integral truncated by the 'int' return type
           of borderLogicalLeft/Right()/paddingLogicalLeft/Right(). It results in losing
           fractional border/padding values.
        2. Painting rectangle is explicitly rounded which pushes border and
           other decoration elements to odd device pixel positions on retina displays.
        These values get pixel snapped right before calling in to GraphicsContext::*.

        Test: fast/inline/hidpi-inline-text-decoration-with-subpixel-value.html

        * rendering/InlineBox.h:
        (WebCore::InlineBox::frameRect):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::nodeAtPoint):
        (WebCore::InlineFlowBox::paintBoxDecorations):
        (WebCore::InlineFlowBox::paintMask):
        (WebCore::InlineFlowBox::roundedFrameRect): Deleted.
        * rendering/InlineFlowBox.h:
        (WebCore::InlineFlowBox::borderLogicalLeft):
        (WebCore::InlineFlowBox::borderLogicalRight):
        (WebCore::InlineFlowBox::paddingLogicalLeft):
        (WebCore::InlineFlowBox::paddingLogicalRight):

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

        Pass RenderLayer reference instead of pointer to RenderLayer::paintingExtent().
        https://bugs.webkit.org/show_bug.cgi?id=134714

        Reviewed by Simon Fraser.

        No change in functionality. 

        * rendering/RenderLayer.cpp: * -> &
        (WebCore::expandClipRectForRegionAndReflection):
        (WebCore::expandClipRectForDescendantsAndReflection):
        (WebCore::transparencyClipBox):
        (WebCore::paintingExtent):
        (WebCore::RenderLayer::beginTransparencyLayers):
        (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
        (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
        (WebCore::RenderLayer::paintingExtent): Deleted.
        * rendering/RenderLayer.h:

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

        Remove misleadingly-named Font::isSVGFont()
        https://bugs.webkit.org/show_bug.cgi?id=134697

        Reviewed by Dean Jackson.

        Being a SVG font is a property of the FontData object, not
        the Font object. Providing an isSVGFont() function on the
        Font class will likely lead to incorrect code and non-obvious
        bugs.

        No new tests because there is no behavior change.

        * platform/graphics/Font.h:
        (WebCore::Font::isSVGFont): Deleted.
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::primaryFontDataIsSystemFont):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::constructTextRun):
        * rendering/RenderBlock.cpp:
        (WebCore::constructTextRunInternal):
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseFor):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::constructTextRun):
        * rendering/svg/SVGTextMetrics.cpp:
        (WebCore::SVGTextMetrics::constructTextRun):
        (WebCore::SVGTextMetrics::SVGTextMetrics):

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

        Move Gamepad index down into PlatformGamepad.
        https://bugs.webkit.org/show_bug.cgi?id=134670

        Reviewed by Darin Adler.

        PlatformGamepads always have an inherent index anyways.
        This will make things easier in all upcoming work.

        * Modules/gamepad/Gamepad.cpp:
        (WebCore::Gamepad::Gamepad):
        * Modules/gamepad/Gamepad.h:

        * Modules/gamepad/GamepadManager.cpp:
        (WebCore::GamepadManager::platformGamepadConnected):
        (WebCore::GamepadManager::platformGamepadDisconnected):
        (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators):
        * Modules/gamepad/GamepadManager.h:

        * Modules/gamepad/NavigatorGamepad.cpp:
        (WebCore::NavigatorGamepad::gamepadsBecameVisible):
        (WebCore::NavigatorGamepad::gamepadConnected):
        (WebCore::NavigatorGamepad::gamepadDisconnected):
        * Modules/gamepad/NavigatorGamepad.h:

        * platform/GamepadProviderClient.h:

        * platform/PlatformGamepad.h:
        (WebCore::PlatformGamepad::index):
        (WebCore::PlatformGamepad::PlatformGamepad):

        * platform/mac/HIDGamepad.cpp:
        (WebCore::HIDGamepad::HIDGamepad):
        * platform/mac/HIDGamepad.h:

        * platform/mac/HIDGamepadProvider.cpp:
        (WebCore::HIDGamepadProvider::deviceAdded):
        (WebCore::HIDGamepadProvider::deviceRemoved):
        (WebCore::HIDGamepadProvider::removeGamepadForDevice):
        * platform/mac/HIDGamepadProvider.h:

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

        [UI-side compositing] Support reflections on custom layers like video
        https://bugs.webkit.org/show_bug.cgi?id=134701

        Reviewed by Tim Horton.

        Add a LayerTypeWebGLLayer layer type, and support casting to PlatformCALayerRemoteCustom.

        * WebCore.exp.in: Export PlatformCALayerMac::layerTypeForPlatformLayer(CALayer*), and sort.
        * platform/graphics/ca/PlatformCALayer.h:
        (WebCore::PlatformCALayer::isPlatformCALayerRemoteCustom):
        * platform/graphics/ca/mac/PlatformCALayerMac.h:
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        (PlatformCALayerMac::layerTypeForPlatformLayer):
        (PlatformCALayerMac::PlatformCALayerMac):
        (PlatformCALayerMac::commonInit):

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

        [UI-side compositing] Crash when starting a filter transition on a reflected layer
        https://bugs.webkit.org/show_bug.cgi?id=134694

        Reviewed by Tim Horton.

        Don't call the owner if we failed to find the animation key (which actually
        isn't used by PlatformCALayerMac anyway).

        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        (-[WebAnimationDelegate animationDidStart:]):

2014-07-07  Alex Christensen  <achristensen@webkit.org>

        [iOS WebGL] Fix crash with too many nested glsl functions.
        https://bugs.webkit.org/show_bug.cgi?id=134683
        <rdar://problem/17541529>

        Reviewed by Geoffrey Garen.

        This fixes the Khronos WebGL 1.0.3 test nested-functions-should-not-crash.html.

        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
        (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
        Add SH_LIMIT_CALL_STACK_DEPTH to extraCompileOptions.

2014-07-07  Ion Rosca  <rosca@adobe.com>

        [CSS Blending]The background images set on the root element will blend on an initial white backdrop.
        https://bugs.webkit.org/show_bug.cgi?id=134342

        Reviewed by Dean Jackson.

        Tests: css3/blending/background-blend-mode-body-image.html
               css3/blending/background-blend-mode-body-transparent-color-and-image.html
               css3/blending/background-blend-mode-body-transparent-image.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintFillLayers):
        If the background layers have blend modes, we paint the base background color first,
        before starting a new transparency layer. After creating the transparency layer,
        the base background will be skipped, and the background layers will blend on top of
        a transparent backdrop.
        (WebCore::RenderBox::paintFillLayer):
        * rendering/RenderBox.h:
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        This method is able to paint only the base background color (BaseBackgroundColorOnly), 
        skipping the background-color and background-images. This option is available only
        on bottom layer of the root renderer and only if the background color is not opaque,
        otherwise the method will return early.
        Another option is to paint the root background without using the base background color
        (BaseBackgroundColorSkip).
        * rendering/RenderBoxModelObject.h:
        Adding the BaseBackgroundColorUsage enum.

2014-07-06  Yoav Weiss  <yoav@yoav.ws>

        Turn on img@sizes compile flag
        https://bugs.webkit.org/show_bug.cgi?id=134634

        Reviewed by Benjamin Poulain.

        * Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.

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

        Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
        https://bugs.webkit.org/show_bug.cgi?id=134647

        Reviewed by Andreas Kling.

        Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.

        No new tests, no behavior change.

        * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
        file so that functions from that file can use the Element|Node classes and other things defined in this file.
        * mathml/MathMLMencloseElement.h:
        (WebCore::toMathMLMencloseElement): Deleted.
        * mathml/mathtags.in:

2014-07-06  Yusuke Suzuki  <utatane.tea@gmail.com>

        CSS JIT: Ensure resolvingMode size is 1 byte
        https://bugs.webkit.org/show_bug.cgi?id=134662

        Reviewed by Benjamin Poulain.

        Since selector compiler uses MacroAssembler::branch8 for SelectorChecker::Mode,
        we should ensure sizeof(SelectorChecker::Mode) == 1.
        Old implementation works only in little endianness environments.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchedResult):
        (WebCore::ElementRuleCollector::matchedRuleList):
        (WebCore::ElementRuleCollector::collectMatchingRules):
        (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
        (WebCore::ElementRuleCollector::hasAnyMatchingRules):
        * css/ElementRuleCollector.h:
        (WebCore::ElementRuleCollector::ElementRuleCollector):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::match):
        (WebCore::SelectorChecker::matchRecursively):
        (WebCore::SelectorChecker::checkOne):
        * css/SelectorChecker.h:
        * css/StyleInvalidationAnalysis.cpp:
        (WebCore::invalidateStyleRecursively):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::pseudoStyleRulesForElement):
        * css/StyleResolver.h:
        (WebCore::checkRegionSelector):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
        (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
        (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::selectorMatches):

2014-07-06  Antti Koivisto  <antti@apple.com>

        Don't throttle layer flushes when the main resource is a GIF
        https://bugs.webkit.org/show_bug.cgi?id=134650
        <rdar://problem/17490712>

        Reviewed by Simon Fraser.
        
        Avoid throttling big image animations.

        * page/FrameView.cpp:
        (WebCore::determineLayerFlushThrottleState):
        
            Disable for image documents.

        (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
        (WebCore::FrameView::updateLayerFlushThrottling):
        
            Refactor a bit.

        * page/LayerFlushThrottleState.h:
        
            Rename the flag.

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

        Inline NodeListsNodeData helpers more aggressively.
        <https://webkit.org/b/134654>

        Get rid of call overhead costs when retrieving NodeLists and
        HTMLCollections from Document. These functions have very few clients,
        so there's no real reason to keep them out of line.

        Reviewed by Antti Koivisto.

        * dom/NodeRareData.h:
        (WebCore::NodeListsNodeData::addCacheWithAtomicName):
        (WebCore::NodeListsNodeData::addCacheWithName):

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

        Inline Node's rare data getters.
        <https://webkit.org/b/134652>

        There was a fair bit of overhead when calling Node::ensureRareData()
        from Document's collection getters. This patch inlines the case where
        we've already materialized the rare data.

        Reviewed by Antti Koivisto.

        * dom/Node.cpp:
        (WebCore::Node::materializeRareData):
        (WebCore::Node::rareData): Deleted.
        (WebCore::Node::ensureRareData): Deleted.
        * dom/Node.h:
        * dom/NodeRareData.h:
        (WebCore::Node::rareData):
        (WebCore::Node::ensureRareData):

2014-07-05  Dean Jackson  <dino@apple.com>

        [iOS] MediaDocument should set a viewport
        https://bugs.webkit.org/show_bug.cgi?id=134658
        <rdar://problem/17552339>

        Reviewed by Zalan Bujtas.

        A MediaDocument should fill the viewport, so set its
        initial-scale to 1 and make it non-zoomable.

        * html/MediaDocument.cpp:
        (WebCore::MediaDocumentParser::createDocumentStructure): Create
        a <head> element and a <meta> element with a 1:1 viewport.

2014-07-05  Commit Queue  <commit-queue@webkit.org>

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

        broke debug builds (Requested by kling on #webkit).

        Reverted changeset:

        "Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS
        macro and generateTypeHelpers"
        https://bugs.webkit.org/show_bug.cgi?id=134647
        http://trac.webkit.org/changeset/170825

2014-07-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
        https://bugs.webkit.org/show_bug.cgi?id=134647

        Reviewed by Andreas Kling.

        Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.

        No new tests, no behavior change.

        * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
        file so that functions from that file can use the Element|Node classes and other things defined in this file.
        (WebCore::isMathMLElement): Deleted.
        * mathml/MathMLMencloseElement.h:
        (WebCore::toMathMLMencloseElement): Deleted.
        * mathml/mathtags.in:

2014-07-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL] Support Geolocation
        https://bugs.webkit.org/show_bug.cgi?id=134439

        Reviewed by Antonio Gomes.

        Add geoclue files in order to enable geolocation for EFL port.

        * PlatformEfl.cmake:

2014-07-04  Benjamin Poulain  <benjamin@webkit.org>

        CSS JIT: compile :in-range and :out-of-range
        https://bugs.webkit.org/show_bug.cgi?id=134639

        Reviewed by Andreas Kling.

        The pseudo class :in-range and :out-of-range are trivial non-inlined selectors.

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isInRange):
        (WebCore::isOutOfRange):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):

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

        Fast path for jsStringWithCache() when asked for the same string repeatedly.
        <https://webkit.org/b/134635>

        Reviewed by Darin Adler.

        * WebCore.exp.in:
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::jsStringWithCache): Deleted.
        * bindings/js/JSDOMBinding.h:
        (WebCore::JSValueTraits<String>::arrayJSValue):
        (WebCore::jsStringWithCache): Deleted.
        * bridge/c/c_utility.cpp:
        (JSC::Bindings::convertNPVariantToValue):
        * loader/cache/CachedResourceHandle.h:

2014-07-04  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: ebay.com rotating billboard on the main page has cut off buttons.
        https://bugs.webkit.org/show_bug.cgi?id=134636
        <rdar://problem/17529112>

        Reviewed by Darin Adler.

        Missing pixel snapping when clipping the transparency layer for BackgroundBleedUseTransparencyLayer.
        Clipping needs to take the same snapping strategy as the rest of the painting code.

        Test: fast/borders/border-radius-on-subpixel-position-non-hidpi.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintBoxDecorations):

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

        QualifiedName should use RefPtr<QualifiedNameImpl> internally.
        <https://webkit.org/b/132796>

        We were not inlining ~QualifiedName() and it was showing up in some
        profiles (over 1% on dom-attr.html.)

        This patch modernizes QualifiedName a bit by using RefPtr to store
        the QualifiedNameImpl instead of doing manual ref() and deref()
        in out-of-line functions.

        Reviewed by Darin Adler.

        * WebCore.exp.in:
        * dom/QualifiedName.cpp:
        (WebCore::QNameComponentsTranslator::translate):
        (WebCore::QualifiedName::QualifiedName):
        (WebCore::QualifiedName::~QualifiedName): Deleted.
        (WebCore::QualifiedName::deref): Deleted.
        * dom/QualifiedName.h:
        (WebCore::QualifiedName::QualifiedNameImpl::create):
        (WebCore::QualifiedName::QualifiedName):
        (WebCore::QualifiedName::isHashTableDeletedValue):
        (WebCore::QualifiedName::~QualifiedName):
        (WebCore::QualifiedName::operator=):
        (WebCore::QualifiedName::impl):
        (WebCore::QualifiedName::ref): Deleted.

2014-07-04  Dean Jackson  <dino@apple.com>

        [iOS] [Media] Prevent page zoom if it started in the video element
        https://bugs.webkit.org/show_bug.cgi?id=134640
        <rdar://problem/16630794>

        Reviewed by Sam Weinig.

        In r170572 I attempted to prevent the page zoom from happening
        when the user was attempting to fullscreen the video. That fix was
        not complete, because it relied on the touchstart event being
        sent before a gesture event. It turns out this doesn't always happen,
        so we need to apply the same check in the gesture event - if the
        gesture began with two fingers on the media, don't do a page zoom.
        The exception is zooming out, if you've managed to make the video
        cover the entire screen (also, the pinch-out-of-fullscreen gesture
        does not get handled by WebKit).

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handleBaseGestureChange): Add a check to
        make sure our pinch didn't start in the video element.

2014-07-04  Hunseop Jeong  <hs85.jeong@samsung.com>

        [CoordinatedGraphics] Use the C++11 syntax to clean-up for loops 
        https://bugs.webkit.org/show_bug.cgi?id=134594

        Reviewed by Darin Adler.

        Convert a couple of loops to range-based for 

        No change in functionality, no new tests.

        * platform/graphics/TiledBackingStore.cpp:
        (WebCore::TiledBackingStore::updateTileBuffers):
        (WebCore::TiledBackingStore::resizeEdgeTiles):
        (WebCore::TiledBackingStore::setKeepRect):
        * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
        (WebCore::CompositingCoordinator::~CompositingCoordinator):
        (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
        (WebCore::CompositingCoordinator::setVisibleContentsRect):
        (WebCore::CompositingCoordinator::purgeBackingStores):
        * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
        (WebCore::CoordinatedBackingStore::removeAllTiles):
        (WebCore::CoordinatedBackingStore::paintToTextureMapper):
        (WebCore::CoordinatedBackingStore::drawBorder):
        (WebCore::CoordinatedBackingStore::drawRepaintCounter):
        (WebCore::CoordinatedBackingStore::commitTileOperations):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
        (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
        (WebCore::CoordinatedGraphicsScene::commitPendingBackingStoreOperations):

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

        CTTE: ScriptElement always has a HTTPScriptElement or SVGScriptElement.
        <https://webkit.org/b/134637>

        Have ScriptElement store the pointer to the more specific subclass
        element as a reference. Also made the constructor protected since
        nobody should instantiate ScriptElement directly.

        Reviewed by Antti Koivisto.

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::ScriptElement):
        (WebCore::ScriptElement::childrenChanged):
        (WebCore::ScriptElement::dispatchErrorEvent):
        (WebCore::ScriptElement::prepareScript):
        (WebCore::ScriptElement::requestScript):
        (WebCore::ScriptElement::executeScript):
        (WebCore::ScriptElement::notifyFinished):
        (WebCore::ScriptElement::ignoresLoadRequest):
        (WebCore::ScriptElement::scriptContent):
        * dom/ScriptElement.h:
        (WebCore::ScriptElement::element):
        * dom/ScriptRunner.cpp:
        (WebCore::ScriptRunner::queueScriptForExecution):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::HTMLScriptElement):
        * svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::SVGScriptElement):

2014-07-04  Julien Quint  <pom@graougraou.com>

        input type=range element should only fire change events after committing a  value
        https://bugs.webkit.org/show_bug.cgi?id=134545

        Reviewed by Dean Jackson.

        A "change" event was fired every time the slider thumb element was dragged
        by the user. The "change" event is now fired only after the thumb
        element has stopped moving; previously, both "input" and "change" events
        where dispatched while changes were being made. This new behavior is
        consistent with the specification (cf.
        http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#event-input-change),
        as well as other implementations such as Firefox and Chrome.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.createControls): Listen to the "input" event
        rather than the "change" event for the timeline control in order to
        keep track of value changes when the user is dragging the thumb.
        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySlider::setValue): Dispatch "change" event while
        setting the new value rather than dispatching later, since setting the
        value now clears the change flag.
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::setValue): Update the text value of the
        control in the case when no event is to be dispatched, so that this
        value can be checked the next time a "change" event dispatch is
        requested.
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::setPositionFromPoint): Removed the
        dispatch of the "change" event, and no longer track the text value of
        the element as a result of dispatching a "change" event.
        (WebCore::SliderThumbElement::stopDragging): Dispatch the "change" event
        on completing the drag.

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

        CTTE: ApplicationCacheHost always has a DocumentLoader.
        <https://webkit.org/b/b/128435>

        Have ApplicationCacheHost store the backpointer to its owning
        DocumentLoader as a reference.

        Reviewed by Sam Weinig.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        (WebCore::DocumentLoader::startLoadingMainResource):
        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::ApplicationCacheHost):
        (WebCore::ApplicationCacheHost::~ApplicationCacheHost):
        (WebCore::ApplicationCacheHost::selectCacheWithoutManifest):
        (WebCore::ApplicationCacheHost::selectCacheWithManifest):
        (WebCore::ApplicationCacheHost::maybeLoadMainResource):
        (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
        (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
        (WebCore::ApplicationCacheHost::failedLoadingMainResource):
        (WebCore::ApplicationCacheHost::finishedLoadingMainResource):
        (WebCore::ApplicationCacheHost::maybeLoadResource):
        (WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
        (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
        (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
        (WebCore::ApplicationCacheHost::stopDeferringEvents):
        (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
        (WebCore::ApplicationCacheHost::update):
        (WebCore::ApplicationCacheHost::swapCache):
        (WebCore::ApplicationCacheHost::abort):
        (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
        * loader/appcache/ApplicationCacheHost.h:
        (WebCore::ApplicationCacheHost::documentLoader): Deleted.

2014-07-04  Antti Koivisto  <antti@apple.com>

        REGRESSION(r159345): Lines are clipped between pages when printing web content from Safari
        https://bugs.webkit.org/show_bug.cgi?id=134633
        <rdar://problem/17088936>

        Reviewed by Zalan Bujtas.

        Test: printing/simple-lines-break.html

        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseFor):
        
            Disable simple lines if global pagination is enabled.
            Printing does not currently use flow threads which we already test for.

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

        Unreviewed. Fixing the build after r170795.

        Mac didn't like that change as it seems to properly typedef long long to int64_t.
        That's not the case on 64-bit Linux (for some reason), so I'm changing the type of
        the two long long variables in FormDataElement to int64_t to avoid any further trouble.

        * platform/network/FormData.h:

2014-07-03  Brady Eidson  <beidson@apple.com>

        When showing the selection menu, include menu options for all selected phone numbers.
        <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613

        Reviewed by Tim Horton.

        * English.lproj/Localizable.strings:

        * dom/Range.cpp:
        (WebCore::rangesOverlap): Fix reversed arguments that caused some types of overlaps to not be detected.

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

        Add WTF::move()
        https://bugs.webkit.org/show_bug.cgi?id=134500

        Rubber-stamped by Anders Carlsson.

        Substitute WTF::move() for std::move().

        * Modules/battery/NavigatorBattery.cpp:
        * Modules/encryptedmedia/MediaKeys.cpp:
        * Modules/gamepad/NavigatorGamepad.cpp:
        * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
        * Modules/geolocation/NavigatorGeolocation.cpp:
        * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
        * Modules/indexeddb/IDBDatabaseBackend.cpp:
        * Modules/indexeddb/IDBDatabaseBackend.h:
        [...]

2014-07-03  Benjamin Poulain  <bpoulain@apple.com>

        [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
        https://bugs.webkit.org/show_bug.cgi?id=134582

        Reviewed by Tim Horton.

        * WebCore.exp.in:
        * platform/ScrollView.h:
        (WebCore::ScrollView::unobscuredContentSize):
        * platform/ios/ScrollViewIOS.mm:
        (WebCore::ScrollView::unobscuredContentRect):
        (WebCore::ScrollView::setUnobscuredContentSize):

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

        [Mac] WebKit1 WebView iframe not responding to scroll gestures
        https://bugs.webkit.org/show_bug.cgi?id=134569
        <rdar://problem/17309008>

        Reviewed by Simon Fraser.

        New test: platform/mac/fast/scrolling/scroll-iframe-fragment.html

        WK1 scrollable areas are implemented on top of PlatformWidget (i.e., NSView) objects. They only
        perform a scroll operation if the EventHandler::handleWheelEvent method returns 'false', indicating
        that the Cocoa layer should do scrolling work. This is in contrast to WK2, where the scrolling is
        handled separately and we return 'true' from EventHandler::handleWheelEvent to indicate that the
        scroll event has been handled and that no other work is needed. This mismatch in the meaning of
        EventHandler::handleWheelEvent means that WK1 views do not properly handle scroll wheel events.

        To correct this, we need to see if we are acting on an Element backed by a PlatformWidget. When we
        are (the WK1 case) we want to return 'false' to instruct the Cocoa object to do the scroll operation.
        To implement proper latching behavior in WK1, we must return 'true' in the case where we are latched
        to a PlatformWidget, and that PlatformWidget did not start the scroll gesture at the edge of
        the region in the dominant scroll direction.

        Finally, additional logic was needed to determine whether the PlatformWidget is scrolled to the
        edge in the dominant scroll direction.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::platformCompleteWheelEvent): Added stub.
        (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added stub.
        (WebCore::EventHandler::handleWheelEvent): Call new platformCompletePlatformWidgetWheelEvent if the
        event was handled for a PlatformWidget.
        * page/EventHandler.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::widgetForEventTarget): Added helper function.
        (WebCore::scrollViewForEventTarget): Added helper function.
        (WebCore::eventTargetIsPlatformWidget): Added helper function.
        (WebCore::EventHandler::platformPrepareForWheelEvents): Check whether we are at a scrolled edge
        for the NSView (PlatformWidget) case.
        (WebCore::EventHandler::platformCompleteWheelEvent): Return 'false' when handling WK1-style scrolls.
        (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added. We generally want to
        return false so the PlatformWidget handles scrolling, except in the case where we are latched to
        a PlatformWidget, which has already performed its scroll, and we want to avoid propegating a
        scroll event to an enclosing region.

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

        Preserve old behavior of creating an NSURLRequest of the exact same type as passed to us
        https://bugs.webkit.org/show_bug.cgi?id=134605
        <rdar://problem/17544641>

        Reviewed by Andreas Kling.

        We have client code that passes us a subclass of NSURLRequest to load resource. Later when
        we call willSendRequest, they test to make sure they get an object of the same type. My
        optimization in r170642 broke this path when I cleared out the NSURLRequest object. We
        already had code in updateNSURLRequest() that was taking this quirk into account but I broke
        that. Fix it by reverting to old behavior for such clients.

        No new tests though we need one. I will add it later.

        * platform/network/cf/ResourceRequest.h:
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
        (WebCore::ResourceRequest::setStorageSession):
        * platform/network/ios/ResourceRequestIOS.mm:
        (WebCore::ResourceRequest::updateNSURLRequest):
        (WebCore::ResourceRequest::clearOrUpdateNSURLRequest):

2014-07-02  Anders Carlsson  <andersca@apple.com>

        Stop using EncoderAdapter/DecoderAdapter for FormData
        https://bugs.webkit.org/show_bug.cgi?id=134571

        Reviewed by Andreas Kling.

        * WebCore.exp.in:
        * platform/network/FormData.cpp:
        (WebCore::encodeElement): Deleted.
        (WebCore::decodeElement): Deleted.
        (WebCore::FormData::encode): Deleted.
        (WebCore::FormData::decode): Deleted.
        * platform/network/FormData.h:
        (WebCore::FormDataElement::encode):
        (WebCore::FormDataElement::decode):
        (WebCore::FormData::encode):
        (WebCore::FormData::decode):

2014-07-03  Brady Eidson  <beidson@apple.com>

        Selection rects sent to ServicesOverlayController are wrong.
        <rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568

        Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).

        * WebCore.exp.in:

        Update the gatherer to keep GapRects separate from LayoutRects:
        * editing/SelectionRectGatherer.cpp:
        (WebCore::SelectionRectGatherer::addRects):
        (WebCore::SelectionRectGatherer::Notifier::~Notifier):
        (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
        * editing/SelectionRectGatherer.h:

        * page/EditorClient.h:
        (WebCore::EditorClient::selectionRectsDidChange): Updated to take LayoutRects and GapRects separately.

        Change RenderSelectionInfo to also hang on to the individual rects that formed the final bounding rect:
        * rendering/RenderSelectionInfo.h:
        (WebCore::RenderSelectionInfo::RenderSelectionInfo): If the RenderObject is a RenderText, then call
          collectSelectionRectsForLineBoxes instead of selectionRectForRepaint.
        (WebCore::RenderSelectionInfo::rects):

        * rendering/RenderText.cpp:
        (WebCore::RenderText::collectSelectionRectsForLineBoxes): Added
        (WebCore::RenderText::selectionRectForRepaint):
        * rendering/RenderText.h:

        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::collectSelectionRectsForRange): Added
        * rendering/RenderTextLineBoxes.h:

        * rendering/RenderView.cpp:
        (WebCore::RenderView::setSubtreeSelection): Add the list of rects to the gatherer instead of just 
          the bounding rect.

2014-07-03  Brady Eidson  <beidson@apple.com>

        Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
        <rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517

        Reviewed by Eric Carlson.

        Since WebCore::IconDatabase is not RefCounted there’s no obvious way to keep it alive until it is
        truly no longer needed.

        This isn’t generally a problem because they are usually a singleton that lasts the lifetime of the process.

        In the WebKit2 case, WebCore::IconDatabases can come and go as their owning WebIconDatabases come and go.

        So we can rely on WebIconDatabase to handle the lifetime appropriately. 

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::close): If the database is actually closed, notify the client.
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::isOpen): Take into account whether there’s any main thread callbacks, plus what
          is covered by isOpenBesidesMainThreadCallbacks.
        (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks): Take into account whether the sync thread
          is still running and whether or not the database file is still open.
        (WebCore::IconDatabase::checkClosedAfterMainThreadCallback): Checks to see if the database has just
          become 100% closed and - if so - notify the client.
        (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread): Updated to increment the main thread
          callback count and to call checkClosedAfterMainThreadCallback when done.
        (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread): Ditto.
        (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread): Ditto.
        (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread): Ditto.
        * loader/icon/IconDatabase.h:

        * loader/icon/IconDatabaseClient.h:
        (WebCore::IconDatabaseClient::didClose): Added. For the IconDatabase to tell its client it is 100% closed.

2014-07-03  Chris Fleizach  <cfleizach@apple.com>

        AX: VoiceOver does not read aria-expanded attribute on controls in Safari
        https://bugs.webkit.org/show_bug.cgi?id=134527

        Reviewed by Mario Sanchez Prada.

        Expose whether the ARIA expanded property is present or not.

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

2014-07-02  Jon Honeycutt  <jhoneycutt@apple.com>

        Removing an element with CSS -webkit-overflow-scrolling: touch breaks
        subsequent touch events

        <https://bugs.webkit.org/show_bug.cgi?id=134584>
        <rdar://problem/17202021>

        This issue is caused by the order of teardown for RenderLayers.

        RenderLayer clears its m_backing in its destructor, calling the
        RenderLayerBacking destructor. The RenderLayerBacking destructor calls
        RenderLayerCompositor::willRemoveScrollingLayer(), which tries to
        access the RenderLayer's backing that has already been cleared. This
        causes us to skip the call to ChromeClient::removeScrollingLayer(),
        resulting in a stale view that can block touch events.

        Reviewed by Simon Fraser.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateScrollingLayers):
        When calling willRemoveScrollingLayerWithBacking(), pass both the layer
        and the RenderLayerBacking.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
        Renamed. Use the passed RenderLayerBacking, as the RenderLayer's
        backing might have already been cleared.
        (WebCore::RenderLayerCompositor::willRemoveScrollingLayer): Deleted.

        * rendering/RenderLayerCompositor.h:
        Renamed willRemoveScrollingLayer() to
        willRemoveScrollingLayerWithBacking() and added a parameter.

2014-07-01  Mark Rowe  <mrowe@apple.com>

        Ensure that the WebKit bundle version in the user agent string continues to match the current format.
        <https://webkit.org/b/134524> / <rdar://problem/17447771>

        Reviewed by Simon Fraser.

        * page/cocoa/UserAgent.h:
        * page/cocoa/UserAgent.mm:
        (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Updated to take an NSString now that it's internal
        to the file.
        (WebCore::userAgentBundleVersionFromFullVersionString): Limit the bundle version included in the user agent
        string to three components.
        * page/ios/UserAgentIOS.mm:
        (WebCore::standardUserAgentWithApplicationName): Update to call userAgentBundleVersionFromFullVersionString.
        * page/mac/UserAgentMac.mm:
        (WebCore::standardUserAgentWithApplicationName): Ditto.

2014-07-01  Mark Rowe  <mrowe@apple.com>

        <https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS

        Reviewed by Simon Fraser.

        * page/cocoa/UserAgent.h:
        * page/cocoa/UserAgent.mm:
        (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Moved from WebKit2.
        * page/ios/UserAgentIOS.mm:
        (WebCore::standardUserAgentWithApplicationName): Pass the WebKit bundle version through userVisibleWebKitBundleVersionFromFullVersion
        before including it in the user agent string.
        * page/mac/UserAgentMac.mm:
        (WebCore::standardUserAgentWithApplicationName): Ditto.

2014-07-02  Mark Rowe  <mrowe@apple.com>

        <https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version

        Reviewed by Simon Fraser.

        * WebCore.xcodeproj/project.pbxproj: Add the new files, and sort the groups they're in.
        * page/cocoa/UserAgent.h: Copied from Source/WebCore/page/mac/UserAgent.h.
        * page/cocoa/UserAgent.mm: Renamed from Source/WebCore/page/mac/UserAgent.h.
        Move systemMarketingVersionForUserAgentString to a location where it can be shared between
        Mac and iOS.
        * page/ios/UserAgentIOS.mm:
        (WebCore::standardUserAgentWithApplicationName): Switch to systemMarketingVersionForUserAgentString.
        * page/mac/UserAgentMac.mm:
        * platform/cocoa/SystemVersion.h: Renamed from Source/WebCore/platform/mac/SystemVersionMac.h.
        * platform/cocoa/SystemVersion.mm: Renamed from Source/WebCore/platform/mac/SystemVersionMac.mm.
        Move to a location that makes it clear this is shared between Mac and iOS. Enable the modern Mac
        codepath for iOS as well.

2014-07-02  Anders Carlsson  <andersca@apple.com>

        Remove keyed coding from FormData
        https://bugs.webkit.org/show_bug.cgi?id=134565

        Reviewed by Tim Horton.

        * platform/network/FormData.cpp:
        (WebCore::encodeElement): Deleted.
        (WebCore::decodeElement): Deleted.
        (WebCore::FormData::encode): Deleted.
        (WebCore::FormData::decode): Deleted.
        * platform/network/FormData.h:

2014-07-02  Anders Carlsson  <andersca@apple.com>

        Get rid of the HistoryItem encoding/decoding in WebCore
        https://bugs.webkit.org/show_bug.cgi?id=134564

        Reviewed by Beth Dakin.

        * WebCore.exp.in:
        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::encodeBackForwardTree): Deleted.
        (WebCore::encodeRect): Deleted.
        (WebCore::encodeSize): Deleted.
        (WebCore::HistoryItem::encodeBackForwardTreeNode): Deleted.
        (WebCore::DecodeRecursionStackElement::DecodeRecursionStackElement): Deleted.
        (WebCore::decodeRect): Deleted.
        (WebCore::decodeSize): Deleted.
        (WebCore::HistoryItem::decodeBackForwardTree): Deleted.
        * history/HistoryItem.h:

2014-07-02  Alex Christensen  <achristensen@webkit.org>

        [WebGL] Fix crash when glsl expressions are too complex.
        https://bugs.webkit.org/show_bug.cgi?id=134554
        <rdar://problem/17540462>

        Reviewed by Dean Jackson.
        
        This fixes the Khronos test conformance/glsl/bugs/long-expressions-should-not-crash.html.

        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
        (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
        Add SH_LIMIT_EXPRESSION_COMPLEXITY to the ANGLE compile options.

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

        WebCore JIT: rename registerCount to something less generic and add new types for lists of registers and lists of stack references
        https://bugs.webkit.org/show_bug.cgi?id=134552

        Reviewed by Alex Christensen.

        Little cleanup:
        -The name registerCount was a little too generic. Rename that to "maximumRegisterCount" to avoid confusion.
        -Add a new type RegisterVector for any vector holding registers. This is just to avoid repeating the inline
         size everywhere, no functional change.
        -Same idea for the stack: welcome StackReferenceVector!

        * cssjit/FunctionCall.h:
        (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
        Remove the appendVector here. It was unnecessarily cautious, StackAllocator already protect us
        from mistakes.

        * cssjit/RegisterAllocator.h:
        (WebCore::RegisterAllocator::allocatedRegisters):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
        Changing from the count of "calleeSavedRegisterCount" to "maximumRegisterCount" will cause
        calleeSavedRegisterStackReferences to always overallocate.
        The code generator is never on the heap, so that should not change anything.

        * cssjit/StackAllocator.h:
        (WebCore::StackAllocator::push):
        (WebCore::StackAllocator::pop):

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

        Remove some code only needed for versions of Safari that are no longer supported
        https://bugs.webkit.org/show_bug.cgi?id=134537

        Reviewed by Anders Carlsson.

        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLInputElement _rectOnScreen]): Deleted.
        (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Deleted.
        (-[DOMHTMLInputElement _selectedRange]): Deleted.
        * bindings/objc/DOMPrivate.h:
        * editing/EditorCommand.cpp:
        (WebCore::createCommandMap):

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

        [GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enabled and using GSTREAMER_MPEGTS
        https://bugs.webkit.org/show_bug.cgi?id=134548

        Reviewed by Philippe Normand.

        Include AtomicStringHash.h when ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
        since it's used by HashMap<AtomicString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>>

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

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

        [GTK] Unstable headers should include webkitdomdefines-unstable.h
        https://bugs.webkit.org/show_bug.cgi?id=134540

        Reviewed by Martin Robinson.

        Instead of the class header that can only be included from webkitdom.h.

        * bindings/scripts/CodeGeneratorGObject.pm:
        (WriteData):

2014-07-02  Mario Sanchez Prada  <mario.prada@samsung.com>

        REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
        https://bugs.webkit.org/show_bug.cgi?id=134399

        Reviewed by Chris Fleizach.

        Check that the value of optionIndex passed as a parameter is valid
        before calling didUpdateActiveOption() over the item of the menu
        list, to prevent crashes in platforms where renderers (and therefore
        accessibility objects) might not be created for items at the time
        of calling AccessibilityMenuList::didUpdateActiveOption().

        * accessibility/AccessibilityMenuList.cpp:
        (WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.

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

        [GTK] Do not add forward declaration of class struct for interfaces
        https://bugs.webkit.org/show_bug.cgi?id=134297

        Reviewed by Martin Robinson.

        * PlatformGTK.cmake: Make files generated by
        gobject-generate-headers.pl script depend on it.
        * bindings/gobject/WebKitDOMEventTarget.h: Remove forward declaration.
        * bindings/gobject/WebKitDOMNodeFilter.h: Ditto
        * bindings/gobject/WebKitDOMXPathNSResolver.h: Ditto.
        * bindings/scripts/gobject-generate-headers.pl: Use Iface instead
        of Class suffix for interfaces.

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

        [GTK] XPathNSResolver should be exposed as an interface instead of as a class
        https://bugs.webkit.org/show_bug.cgi?id=134028

        Reviewed by Gustavo Noronha Silva.

        Add custom implementation of WebKitDOMXPathNSResolver to expose it
        as an interface instead of a class. It also includes an internal
        default implementation of the interface to support methods that
        create a XPathNSResolver using the native implementation.

        * PlatformGTK.cmake: Add new files to compilation.
        * bindings/gobject/GObjectXPathNSResolver.cpp: Added.
        (WebCore::GObjectXPathNSResolver::~GObjectXPathNSResolver):
        (WebCore::GObjectXPathNSResolver::lookupNamespaceURI): Call
        webkit_dom_xpath_ns_resolver_lookup_namespace_uri().
        * bindings/gobject/GObjectXPathNSResolver.h: Added.
        (WebCore::GObjectXPathNSResolver::create):
        (WebCore::GObjectXPathNSResolver::GObjectXPathNSResolver): Create
        a new GObjectXPathNSResolver for the given WebKitDOMXPathNSResolver.
        * bindings/gobject/WebKitDOMXPathNSResolver.cpp: Added.
        (webkit_dom_xpath_ns_resolver_default_init):
        (webkit_dom_xpath_ns_resolver_lookup_namespace_uri):
        (webkitDOMNativeXPathNSResolverFinalize):
        (webkitDOMNativeXPathNSResolverConstructor):
        (webkit_dom_native_xpath_ns_resolver_init):
        (webkit_dom_native_xpath_ns_resolver_class_init):
        (webkitDOMNativeXPathNSResolverLookupNamespaceURI):
        (webkitDOMXPathNSResolverIfaceInit):
        (WebKit::core): Return the native XPathNSResolver when using the
        internal implementation or create a custom XPathNSResolver when
        using a user provided WebKitDOMXPathNSResolver.
        (WebKit::kit):
        * bindings/gobject/WebKitDOMXPathNSResolver.h: Added.
        * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h: Added.
        * bindings/scripts/CodeGeneratorGObject.pm:
        (GenerateFunction): Add exceptions for XPathNSResolver since
        the core method returns a PassRefPtr.

2014-07-01  Frédéric Wang  <fred.wang@free.fr>

        The OpenType MATH table is not read on Mac
        https://bugs.webkit.org/show_bug.cgi?id=133569

        Reviewed by Chris Fleizach.

        An incorrect tag format is used to load the OpenType MATH table on Mac.
        This commit makes the format consistent with what is used for other tables on Mac.
        This will allow to load the MATH table and to use it for the MathML rendering.

        No new tests. platform/graphics/opentype already contains tests for the OpenType MATH support.

        * platform/graphics/opentype/OpenTypeMathData.cpp:

2014-07-01  Alex Christensen  <achristensen@webkit.org>

        [Win64] Unreviewed build fix.

        * WebCore.vcxproj/WebCore.vcxproj:
        Exclude CA files from 32 and 64 bit WinCairo builds.
        * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
        Don't use a precompiled header in 32 or 63 bit builds of MockCDM.cpp.

2014-07-01  Alex Christensen  <achristensen@webkit.org>

        Reduce dynamic memory allocation in css jit.
        https://bugs.webkit.org/show_bug.cgi?id=134416

        Reviewed by Benjamin Poulain.

        * cssjit/FunctionCall.h:
        (WebCore::FunctionCall::saveAllocatedRegisters):
        * cssjit/RegisterAllocator.h:
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
        * cssjit/StackAllocator.h:
        (WebCore::StackAllocator::push):
        (WebCore::StackAllocator::pop):
        Use inlineCapacity template parameter to reduce malloc calls.
        I use 32 as the inline capacity for non-register related vectors because that
        is probably big enough for the selector compiler, and if it is not then a malloc
        call will not be significant because the selector is very complex.

2014-07-01  Eric Carlson  <eric.carlson@apple.com>

        WebVTT percentage value can be a float
        https://bugs.webkit.org/show_bug.cgi?id=134511

        Reviewed by Brent Fulgham.

        No new tests, existing tests modified.

        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGeneric::setLine): int -> double.
        (WebCore::TextTrackCueGeneric::setPosition): Ditto.
        * html/track/TextTrackCueGeneric.h:

        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::setLine): Ditto.
        (WebCore::VTTCue::setPosition):  Ditto.
        (WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size.
        (WebCore::scanPercentage): Deleted.
        * html/track/VTTCue.h:

        * html/track/VTTScanner.cpp:
        (WebCore::VTTScanner::scanFloat): Support negative values.
        * html/track/VTTScanner.h:

        * html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds.
        * html/track/WebVTTParser.h:

        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue
            reference rather than a pointer.
        (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto.
        (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that
            we are asking the client to delete the cue because the client will have already deleted
            it when status when to GenericCueData::Complete.
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:

2014-07-01  Simon Fraser  <simon.fraser@apple.com>

        Improve behavior of position:sticky on zoomed pages
        https://bugs.webkit.org/show_bug.cgi?id=134535
        <rdar://problem/12898829>

        Reviewed by Dean Jackson.

        Despite r138036, position:sticky still had incorrect behavior in zoomed pages.
        
        Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
        since all the other math happens in unscaled coordinates.

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):

2014-07-01  Alex Christensen  <achristensen@webkit.org>

        [WebGL] Fix PVRTC extension.
        https://bugs.webkit.org/show_bug.cgi?id=134525

        Reviewed by Dean Jackson.

        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
        Remove the return false which I mistakenly committed in r170128
        and make the gl error match the S3TC error and the khronos test.

2014-07-01  Chris Fleizach  <cfleizach@apple.com>

        AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
        https://bugs.webkit.org/show_bug.cgi?id=133875

        Reviewed by Enrica Casucci.

        Support the toggle button type in iOS.

        Test: platform/ios-sim/accessibility/toggle-button.html

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
        (-[WebAccessibilityObjectWrapper accessibilityTraits]):
        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

2014-07-01  Dean Jackson  <dino@apple.com>

        [iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
        https://bugs.webkit.org/show_bug.cgi?id=134513
        <rdar://problem/12078860>
        <rdar://problem/16745393>

        Reviewed by Tim Horton.

        Subsampled images (e.g. JPEG) were not consistently using
        their original dimensions and subsampled dimensions. This caused
        things like texImage2D to pack the pixels incorrectly, or drawImage
        to squish the rendering.

        Renamed m_scale to m_subsamplingScale on FrameData.

        Tests: fast/canvas/image-potential-subsample.html
               fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::cacheFrame): Rename to m_subsamplingScale.
        (WebCore::BitmapImage::frameAtIndex): Ditto.
        * platform/graphics/BitmapImage.h:
        (WebCore::FrameData::FrameData): Ditto.
        * platform/graphics/cg/BitmapImageCG.cpp:
        (WebCore::FrameData::clear): Ditto.
        (WebCore::BitmapImage::BitmapImage): Ditto.
        (WebCore::BitmapImage::draw): Use a scaledSrcRect that reflects the subsampled size,
        rather than assuming the srcRect accurately reflects how many pixels we have
        in the Bitmap.
        (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
        * platform/graphics/cg/GraphicsContext3DCG.cpp:
        (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Similar fix, although this
        time we just ask the image decoder to take into account the subsampled size
        when it is "generating" a frame, causing it to use the bitmap data it has already
        decoded.

2014-07-01  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Selected DOM element highlights invisible near bottom of the viewport (topContentInset?)
        https://bugs.webkit.org/show_bug.cgi?id=133818

        Reviewed by Beth Dakin.

        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::update):
        Take the topContentInset into account when sizing the InspectorOverlay's FrameView.

2014-07-01  Chris Fleizach  <cfleizach@apple.com>

        AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
        https://bugs.webkit.org/show_bug.cgi?id=134492

        Reviewed by Andreas Kling.

        Support the indeterminate attribute in AX code.

        Test: Update existing test: accessibility/aria-checked-mixed-value

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::checkboxOrRadioValue):

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

        Typing an automatic text replacement phrase after a br in contenteditable is not rendered as expected
        https://bugs.webkit.org/show_bug.cgi?id=133883

        Reviewed by Enrica Casucci.

        enclosingDeletableElement() makes sure that the element's container is editable, but not
        that it is capable of having content inside it (like how a <br> can't).

        No new tests. I don't think this is testable because it requires setting some state in System Preferences.

        * editing/DeleteButtonController.cpp:
        (WebCore::enclosingDeletableElement):

2014-07-01  Alex Christensen  <achristensen@webkit.org>

        [iOS] Unreviewed build fix after r170640.

        * page/EditorClient.h:
        (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
        Add ifdefs to make everything compile and link.

2014-07-01  Daniel Bates  <dabates@apple.com>

        Remove unnecessary calls to std::move()
        https://bugs.webkit.org/show_bug.cgi?id=134493

        Reviewed by Anders Carlsson.

        * Modules/encryptedmedia/CDM.cpp:
        (WebCore::CDM::CDM):
        * css/CSSGrammar.y.in:
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::formatNumberValue):
        * css/MediaQuery.cpp:
        (WebCore::MediaQuery::MediaQuery):
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::dashesForIntersectionsWithRect):

2014-07-01  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
        https://bugs.webkit.org/show_bug.cgi?id=134491

        Reviewed by Simon Fraser.

        Do not early round geometry values, while computing background image position. It changes the final
        subpixel values and that could lead to wrong snap positions.
        pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.

        Test: fast/backgrounds/background-image-size-double-rounding.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

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

        Create NSURLRequest lazily when USE(CFNETWORK) is enabled
        https://bugs.webkit.org/show_bug.cgi?id=134441

        Reviewed by Andreas Kling.

        No new tests. Should be covered by existing tests.

        * platform/network/cf/ResourceRequest.h:
        (WebCore::ResourceRequest::ResourceRequest):
        (WebCore::ResourceRequest::encodingRequiresPlatformData):
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
        (WebCore::ResourceRequest::setStorageSession):
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::nsURLRequest):

2014-07-01  Brady Eidson  <beidson@apple.com>

        Combine the Telephone and Selection overlay controllers, updating UI behavior.
        https://bugs.webkit.org/show_bug.cgi?id=134461

        Reviewed by Tim Horton.

        * WebCore.exp.in:

        * dom/Range.cpp:
        (WebCore::Range::contains): Returns true if the Range completely contains the passed-in Range.
        * dom/Range.h:

2014-07-01  Antti Koivisto  <antti@apple.com>

        REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=134489

        Reviewed by Zalan Bujtas.

        Test: fullscreen/full-screen-plugin.html

        It is difficult to restore the render tree correctly in all cases after removing a full screen
        renderer from the tree. r160908 avoided dealing with this by simply always reconstructing the subtree.
        Unfortunately plugin lifetime is currently tied to its renderer so this would cause the plugin to restart.
        
        With this patch we avoid reconstruction in normal cases and only force it if the render tree is complicated.

        * dom/Document.cpp:
        (WebCore::unwrapFullScreenRenderer):
        
            Force reconstruction conditionally.

        (WebCore::Document::webkitWillEnterFullScreenForElement):
        (WebCore::Document::webkitDidExitFullScreenForElement):
        * rendering/RenderFullScreen.cpp:
        (WebCore::RenderFullScreen::wrapRenderer):
        (WebCore::RenderFullScreen::unwrapRenderer):
        
            Deal with the simple case of single child, possibly in anonymous wrapper.
            In other cases request reconstruction.
            This is covered by the existing fullscreen tests.

        * rendering/RenderFullScreen.h:

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

        Remove remaining Vector<> copies in WebCore accessibility code
        https://bugs.webkit.org/show_bug.cgi?id=133263

        Reviewed by Darin Adler.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::notificationPostTimerFired): Don't copy the Vector member and
        then clear it -- move it into the local variable instead.
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::ariaLabeledByText): Move the axElements Vector into
        the AccessibilityText constructor.
        (WebCore::AccessibilityNodeObject::stringValue): Create a const reference to the Vector of
        HTMLSelectElement's list items instead of copying it.
        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityText::AccessibilityText): Take the Vector parameter by non-const
        value and move it into the member variable.
        * accessibility/AccessibilityRenderObject.cpp: 
        (WebCore::AccessibilityRenderObject::stringValue): Create a const reference to the Vector
        of HTMLSelectElement's list items instead of copying it.
        (WebCore::AccessibilityRenderObject::ariaSelectedRows): Wrap the AccessibilityChildrenVector
        iteration in a lambda. Use it to iterate over either the newly-constructed Vector (in case
        the object has the tree role) or the reference to the vector returned by
        AccessibilityTable::rows() (in case the object is an AccessibilityTable instance).

2014-06-30  Commit Queue  <commit-queue@webkit.org>

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

        The changes cause crashes on ARM64 (Requested by benjaminp on
        #webkit).

        Reverted changeset:

        "Reduce dynamic memory allocation in css jit."
        https://bugs.webkit.org/show_bug.cgi?id=134416
        http://trac.webkit.org/changeset/170605

2014-06-30  Anders Carlsson  <andersca@apple.com>

        Change the AddBackForwardItem message to take a page state object
        https://bugs.webkit.org/show_bug.cgi?id=134475

        Reviewed by Andreas Kling.

        * WebCore.exp.in:

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

        [iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
        https://bugs.webkit.org/show_bug.cgi?id=134471
        <rdar://problem/17513542>

        Reviewed by Enrica Casucci.

        UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
        since the page has no way of overriding that behavior.

        This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
        by default for those object, and enabled for images that are in a link.

        * css/html.css:
        (applet, embed, object, img):
        (:-webkit-any-link img):

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

        All Indic text is rendered as boxes on iOS
        https://bugs.webkit.org/show_bug.cgi?id=134464

        Reviewed by Simon Fraser.

        I made a typo in r170207.

        Test: fast/text/indic.html

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::languageSpecificFallbackFont):

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

        [iOS] languageSpecificFallbackFont() is not consistent
        https://bugs.webkit.org/show_bug.cgi?id=134473

        Reviewed by Darin Adler.

        It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.

        No tests because there is no behavior change.

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::languageSpecificFallbackFont):

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

        [Win] Unreviewed gardening.

        * WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
        and JSFileReaderSync multiple times.

2014-06-30  Daniel Bates  <dabates@apple.com>

        Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
        https://bugs.webkit.org/show_bug.cgi?id=134470

        Reviewed by Anders Carlsson.

        Currently we always copy construct the captured std::function object when calling callOnMainThread()
        in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
        const in a lambda expression's body by default. That is, the std::function object is captured as const.
        Instead, we should mark this lambda expression as mutable so the captured std::function object is
        non-const and hence we can use move semantics when passing it to callOnMainThread().

        * page/scrolling/ScrollingThread.cpp:
        (WebCore::ScrollingThread::dispatchBarrier):

2014-06-30  Anders Carlsson  <andersca@apple.com>

        Adopt the legacy session decoding inside WebPage::restoreSession for now
        https://bugs.webkit.org/show_bug.cgi?id=134465

        Reviewed by Sam Weinig.

        * WebCore.exp.in:

2014-06-30  Commit Queue  <commit-queue@webkit.org>

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

        causes assertions loading nytimes.com on iOS (Requested by
        smfr on #webkit).

        Reverted changeset:

        "Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
        https://bugs.webkit.org/show_bug.cgi?id=134441
        http://trac.webkit.org/changeset/170578

2014-06-30  Alex Christensen  <achristensen@webkit.org>

        Reduce dynamic memory allocation in css jit.
        https://bugs.webkit.org/show_bug.cgi?id=134416

        Reviewed by Benjamin Poulain.

        * cssjit/FunctionCall.h:
        (WebCore::FunctionCall::FunctionCall):
        (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
        * cssjit/RegisterAllocator.h:
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
        Use inlineCapacity template parameter to reduce malloc calls.
        I use 16 and 32 as the inline capacity for non-register related vectors because that
        is probably big enough for the selector compiler, and if it is not then a malloc
        call will not be significant because the selector is very complex.
        * cssjit/StackAllocator.h:
        (WebCore::StackAllocator::push):
        Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.

2014-06-30  Alex Christensen  <achristensen@webkit.org>

        Use non-thumb registers in armv7 css jit.
        https://bugs.webkit.org/show_bug.cgi?id=134450

        Reviewed by Geoff Garen.

        * cssjit/RegisterAllocator.h:
        (WebCore::RegisterAllocator::isValidRegister):
        (WebCore::RegisterAllocator::isCallerSavedRegister):
        Use additional general purpose registers.
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
        Always succeed when compiling css selectors.

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

        Tiles on bottom of screen are not always allocated when necessary
        https://bugs.webkit.org/show_bug.cgi?id=134272

        Reviewed by Simon Fraser.

        The initial visibleRect is in the coordinate of the root layer, so its origin
        is at the top left of the view. The initial rect we were using doesn't
        include the contents inset, so it was too short, which was causing tiles near
        the bottom of the screen to not always be allocated if the tile threshold was
        close to the bottom of the view. Instead, we want to include the contents
        inset size so the visible rect includes the entire view.
        GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
        the visible rect into the tiled layer's coordinate system, at which point it
        is used for visible tile logic.

        Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html

        * platform/graphics/ca/TileCoverageMap.cpp:
        (WebCore::TileCoverageMap::update):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):

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

        [Win] Unreviewed project gardening.

        * WebCore.vcxproj/WebCore.vcxproj: Clean up path information so
        files appear in appropriate places in project view.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

2014-06-30  Zalan Bujtas  <zalan@apple.com>

        Remove redundant repaintCompositedLayers() parameter and its dependencies.
        https://bugs.webkit.org/show_bug.cgi?id=134431

        Reviewed by Darin Adler.

        No change in functionality.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::convertToPixelSnappedLayerCoords): Deleted.
        (WebCore::RenderLayer::convertToLayerCoords): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::repaintCompositedLayers):
        (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
        * rendering/RenderLayerCompositor.h:

2014-06-30  Alex Christensen  <achristensen@webkit.org>

        Remove webkit prefix from pointer lock.
        https://bugs.webkit.org/show_bug.cgi?id=134312

        Reviewed by Dean Jackson.

        * dom/Document.cpp:
        (WebCore::Document::exitPointerLock):
        (WebCore::Document::pointerLockElement):
        (WebCore::Document::webkitExitPointerLock): Deleted.
        (WebCore::Document::webkitPointerLockElement): Deleted.
        * dom/Document.h:
        * dom/Document.idl:
        * dom/Element.cpp:
        (WebCore::Element::requestPointerLock):
        (WebCore::Element::webkitRequestPointerLock): Deleted.
        * dom/Element.h:
        * dom/Element.idl:
        * dom/EventNames.h:
        * dom/MouseEvent.idl:
        * dom/MouseRelatedEvent.h:
        (WebCore::MouseRelatedEvent::movementX):
        (WebCore::MouseRelatedEvent::movementY):
        (WebCore::MouseRelatedEvent::webkitMovementX): Deleted.
        (WebCore::MouseRelatedEvent::webkitMovementY): Deleted.
        * page/PointerLockController.cpp:
        (WebCore::PointerLockController::PointerLockController):
        Initialize all data members.
        (WebCore::PointerLockController::requestPointerLock):
        (WebCore::PointerLockController::didAcquirePointerLock):
        (WebCore::PointerLockController::didNotAcquirePointerLock):
        (WebCore::PointerLockController::didLosePointerLock):

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

        U16_IS_SURROGATE should not be called with a UChar32
        https://bugs.webkit.org/show_bug.cgi?id=134440

        Reviewed by Darin Adler.

        No new tests because there is no behavior change.

        * platform/graphics/mac/ComplexTextController.cpp:
        (WebCore::advanceByCombiningCharacterSequence):

2014-06-30  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL] Remove m_evasObject from Widget
        https://bugs.webkit.org/show_bug.cgi?id=134442

        Reviewed by Gyuyoung Kim.

        Since WebKit1/EFL was dropped, we don't need to keep the m_evasObject
        in the Widget.cpp because it's not used for WebKit2/Efl.

        * platform/Widget.h:
        (WebCore::Widget::evasObject): Deleted.
        * platform/efl/ScrollbarEfl.cpp:
        Removed WebKit1/Efl specific code which uses m_evasObject.
        It will be a dummy until WebKit2/Efl support proper scrollbar implementation.
        (WebCore::ScrollbarEfl::ScrollbarEfl):
        (WebCore::ScrollbarEfl::~ScrollbarEfl):
        (WebCore::ScrollbarEfl::setParent):
        (WebCore::ScrollbarEfl::frameRectsChanged):
        (WebCore::ScrollbarEfl::invalidate):
        (ScrollbarEfl::ScrollbarEfl): Deleted.
        (ScrollbarEfl::~ScrollbarEfl): Deleted.
        (scrollbarEflEdjeMessage): Deleted.
        (ScrollbarEfl::setParent): Deleted.
        (ScrollbarEfl::updateThumbPosition): Deleted.
        (ScrollbarEfl::updateThumbProportion): Deleted.
        (ScrollbarEfl::updateThumbPositionAndProportion): Deleted.
        (ScrollbarEfl::frameRectsChanged): Deleted.
        (ScrollbarEfl::invalidate): Deleted.
        * platform/efl/ScrollbarEfl.h:
        Removed unnecessary methods. In addition, applied final, override keyword.
        (WebCore::ScrollbarEfl::handleMouseMoveEvent): Deleted.
        (WebCore::ScrollbarEfl::handleMouseOutEvent): Deleted.
        (WebCore::ScrollbarEfl::handleMousePressEvent): Deleted.
        (WebCore::ScrollbarEfl::handleMouseReleaseEvent): Deleted.
        * platform/efl/WidgetEfl.cpp:
        (WebCore::Widget::Widget):
        (WebCore::Widget::setEvasObject): Deleted.

2014-06-30  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        Fix deprecated warning with bison 3
        https://bugs.webkit.org/show_bug.cgi?id=133791

        Reviewed by Csaba Osztrogonác.

        No new tests because no functional changes.

        * css/CSSGrammar.y.in:
        * xml/XPathGrammar.y:

2014-06-30  Jaehun Lim  <ljaehun.lim@samsung.com>

        Remove HarfBuzzShaper::setDrawRange()
        https://bugs.webkit.org/show_bug.cgi?id=134243

        Reviewed by Gyuyoung Kim.

        setDrawRange() is not used anywhere. Remove it.
        And m_fromIndex and m_toIndex are changed by only setDrawRange().
        So remove them too and use the default values instead of them.

        No new tests, no behavior changes.

        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
        (WebCore::HarfBuzzShaper::HarfBuzzShaper):
        (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
            currentCharacterIndex is unsigned, always greater than 0. Clean up if statements.
        (WebCore::HarfBuzzShaper::setDrawRange): Deleted.
        * platform/graphics/harfbuzz/HarfBuzzShaper.h:

2014-06-29  Pratik Solanki  <psolanki@apple.com>

        Create NSURLRequest lazily when USE(CFNETWORK) is enabled
        https://bugs.webkit.org/show_bug.cgi?id=134441

        Reviewed by Sam Weinig.

        No new tests. Should be covered by exsting tests.

        * platform/network/cf/ResourceRequest.h:
        (WebCore::ResourceRequest::ResourceRequest):
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
        (WebCore::ResourceRequest::setStorageSession):
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::nsURLRequest):

2014-06-29  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL] Remove netscape plugin implementation from WebCore
        https://bugs.webkit.org/show_bug.cgi?id=134438

        Reviewed by Gyuyoung Kim.

        Because WebKit1/Efl was dropped, PluginPackageEfl.cpp and PluginViewEfl.cpp are not necessary.

        * PlatformEfl.cmake:
        * plugins/efl/PluginPackageEfl.cpp: Removed.
        * plugins/efl/PluginViewEfl.cpp: Removed.
        * plugins/x11/PluginViewX11.cpp: Removed.
        This file is to share common code between WebKit1/Efl and WebKit1/GTk.
        Now, both ports are dropped WebKit1 support and the GTK port already removed the related files at r167016.

2014-06-29  Yoav Weiss  <yoav@yoav.ws>

        Add support for HTMLImageElement's sizes attribute
        https://bugs.webkit.org/show_bug.cgi?id=133620

        Reviewed by Dean Jackson.

        Tests: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
               fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
               fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html
               fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html
               http/tests/loading/sizes/preload-image-sizes-2x.html
               http/tests/loading/sizes/preload-image-sizes.html

        This patch adds support for HTMLImageElement's sizes attribute and the
        related srcset extended syntax as defined in
        http://picture.responsiveimages.org/.
        This sizes attribute syntax is added to the CSSGrammar and parsed by
        the CSSParser.
        The SourceSizeList class is generated by the parser, and used to get
        the final source size.
        HTMLImageElement and HTMLPreloadScanner send this value to
        HTMLSrcsetParser.
        HTMLSrcsetParser uses this value in order to pick the right resource.

        * CMakeLists.txt: Added css/SourceSizeList.cpp.
        * Configurations/FeatureDefines.xcconfig: Added the PICTURE_SIZES flag.
        * WebCore.vcxproj/WebCore.vcxproj: Added css/SourceSizeList.*.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Added css/SourceSizeList.*.
        * WebCore.xcodeproj/project.pbxproj: Added css/SourceSizeList.*.
        * css/CSSGrammar.y.in: Added 4 grammar rules that define a Media condition,
        Source size list, Source size length and source size.
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseSizesAttribute): Parse the sizes attribute.
        (WebCore::CSSParser::detectAtToken): Set the token to SIZESATTR.
        * css/CSSParser.h:
        * css/SourceSizeList.cpp: Added. Defined the SourceSize and SourceSizeList classes.
        (WebCore::SourceSize::match):
        (WebCore::computeLength):
        (WebCore::defaultValue):
        (WebCore::SourceSize::length):
        (WebCore::SourceSizeList::parseSizesAttribute):
        (WebCore::SourceSizeList::getEffectiveSize):
        * css/SourceSizeList.h: Added.
        (WebCore::SourceSize::SourceSize):
        (WebCore::SourceSizeList::append):
        * html/HTMLImageElement.cpp: Integrated sizes attribute parsing and added currentSrc.
        (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
        (WebCore::HTMLImageElement::parseAttribute):
        (WebCore::HTMLImageElement::currentSrc):
        * html/HTMLImageElement.h:
        * html/HTMLImageElement.idl:
        * html/parser/HTMLDocumentParser.cpp: Added information required for sizes parsing to
        HTMLPreloadScanner calls.
        (WebCore::HTMLDocumentParser::pumpTokenizer):
        (WebCore::HTMLDocumentParser::insert):
        (WebCore::HTMLDocumentParser::append):
        (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
        * html/parser/HTMLPreloadScanner.cpp: Integrated sizes attribute parsing.
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
        (WebCore::TokenPreloadScanner::scan):
        (WebCore::HTMLPreloadScanner::scan):
        * html/parser/HTMLPreloadScanner.h:
        * html/parser/HTMLSrcsetParser.cpp: Added 'w' descriptor parsing sizes based normalization.
        (WebCore::parseDescriptors):
        (WebCore::pickBestImageCandidate):
        (WebCore::bestFitSourceForImageAttributes):
        * html/parser/HTMLSrcsetParser.h:

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

        No need to lazily initialize ResourceResponse internals when accessing timing data.
        <https://webkit.org/b/134437>
        <rdar://problem/17499876>

        When building with ENABLE(WEB_TIMING), the last thing that would happen when
        serializing a ResourceResponse in the network process is that we'd retrieve
        the ResourceLoadTiming to encode it as part of the response. Doing so would
        trigger the lazy instantiation of ResourceResponse's internal data structures.

        Since timing data is not actually lazily instantiated, we can just not do that.

        This shaves off ~550ms of network process main thread time on PLT, reducing
        response latency by not doing unnecessary stuff before letting the web process
        look at the downloaded data.

        Reviewed by Gavin Barraclough.

        * WebCore.exp.in:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::adopt):
        (WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
        (WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::resourceLoadTiming):

2014-06-29  Pratik Solanki  <pratik.solanki@gmail.com>

        Refactor ResourceRequest into Cocoa and iOS specific files
        https://bugs.webkit.org/show_bug.cgi?id=134430

        Reviewed by Andreas Kling.

        No new tests because no functional changes.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
        * platform/network/cocoa/ResourceRequestCocoa.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
        (WebCore::ResourceRequest::nsURLRequest):
        (WebCore::ResourceRequest::cfURLRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::ResourceRequest::doUpdateResourceHTTPBody):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
        (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
        (WebCore::ResourceRequest::applyWebArchiveHackForMail):
        (WebCore::ResourceRequest::setStorageSession):
        * platform/network/ios/ResourceRequestIOS.mm: Added.
        (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
        (WebCore::ResourceRequest::ResourceRequest):
        (WebCore::ResourceRequest::updateNSURLRequest):
        * platform/network/mac/ResourceRequestMac.mm:
        (WebCore::initQuickLookResourceCachingQuirks):
        (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
        (WebCore::ResourceRequest::ResourceRequest):
        (WebCore::ResourceRequest::updateNSURLRequest):
        (WebCore::ResourceRequest::applyWebArchiveHackForMail):
        (WebCore::ResourceRequest::nsURLRequest): Deleted.
        (WebCore::ResourceRequest::cfURLRequest): Deleted.
        (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
        (WebCore::ResourceRequest::doUpdateResourceHTTPBody): Deleted.
        (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
        (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): Deleted.
        (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
        (WebCore::ResourceRequest::setStorageSession): Deleted.

2014-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        TextCodecICU::encode turns the whole string as yen signs if there is any backslash in it
        https://bugs.webkit.org/show_bug.cgi?id=133678

        Reviewed by Alexey Proskuryakov.

        Test: fast/encoding/backslash-encoding-jp.html

        * platform/text/TextCodecICU.cpp:
        (WebCore::TextCodecICU::encode): fixed the copy of characters other than backslash.

2014-06-28  Dean Jackson  <dino@apple.com>

        [iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
        https://bugs.webkit.org/show_bug.cgi?id=134433
        <rdar://problem/16630794>

        Reviewed by Eric Carlson.

        Detect the number of target touches (those directly on the
        video element) and disable the page zoom if it looks
        like the user is trying to trigger fullscreen.

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.handleBaseGestureStart): If we are seeing
        two touches in this video element, don't trigger fullscreen. The
        exception is if we haven't yet started playback.
        (ControllerIOS.prototype.handleBaseGestureChange): Don't allow fullscreen
        if we haven't started playback (iOS 7 behaviour).
        (ControllerIOS.prototype.handleWrapperTouchStart): Keep track of the
        number of targetted touches.

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

        [iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
        https://bugs.webkit.org/show_bug.cgi?id=134426
        <rdar://problem/17474523>

        Reviewed by Tim Horton.

        After committing a new layer tree (with possibly stale position:fixed layer
        positions), we need the scrolling tree to update those positions based on
        the current scroll offset.
        
        Give ScrollingTreeScrollingNode an implementation of updateLayersAfterAncestorChange()
        which is required to update fixed/sticky child nodes.

        * WebCore.exp.in:
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
        * page/scrolling/ScrollingTreeScrollingNode.h:

2014-06-28  Juan A. Suarez Romero  <jasuarez@igalia.com>  and  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Use public getter/setter in GObject DOM bindings properties implementation.
        https://bugs.webkit.org/show_bug.cgi?id=134390.

        Reviewed by Carlos Garcia Campos.

        The current GObject DOM bindings generator is duplicating code when
        implementing the get/set_property methods and the public
        getters/setters, instead of making one invoking the other.
        
        This commit changes this behaviour so the code is not duplicated,
        making it easier to maintain.

        No new tests needed.

        * bindings/scripts/CodeGeneratorGObject.pm:
        (GenerateProperty):
        (GenerateProperties):
        (WriteData):
        (GetCoreObject): Deleted.
        * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
        (webkit_dom_test_active_dom_object_get_property):
        * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
        (webkit_dom_test_event_constructor_get_property):
        * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
        (webkit_dom_test_exception_get_property):
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
        (webkit_dom_test_interface_set_property):
        (webkit_dom_test_interface_get_property):
        * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
        (webkit_dom_test_nondeterministic_set_property):
        (webkit_dom_test_nondeterministic_get_property):
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
        (webkit_dom_test_obj_set_property):
        (webkit_dom_test_obj_get_property):
        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
        (webkit_dom_test_serialized_script_value_interface_get_property):
        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
        (webkit_dom_test_typedefs_set_property):
        (webkit_dom_test_typedefs_get_property):
        * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
        (webkit_dom_test_exception_get_property):
        (webkit_dom_attribute_get_property):

2014-06-28  Radu Stavila  <stavila@adobe.com>

        [New Multicolumn] Elements with rounded corners and overflow:hidden do not properly clip their content
        https://bugs.webkit.org/show_bug.cgi?id=133941

        Reviewed by Darin Adler.

        When having a multicol element inside an element with overflow:hidden and border-radius,
        the fragments representing the columns need to have the border radius set also, to ensure
        proper clipping.

        Test: fast/multicol/newmulticol/multicol-clip-rounded-corners.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::collectFragments):

2014-06-27  Zalan Bujtas  <zalan@apple.com>

        Subpixel rendering: Background clipping with subpixel behaves differently when composited.
        https://bugs.webkit.org/show_bug.cgi?id=134422

        Reviewed by Simon Fraser.

        Adjust cliprect with the subpixel offset from the graphics layer the same way we do it for painting.
        It ensures that cliprect starts from the right position when graphics layer is not on the same
        coordinates as the associated render layer.

        Test: compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::clipToRect):
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::applyFilters):
        (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
        (WebCore::RenderLayer::paintBackgroundForFragments):
        (WebCore::RenderLayer::paintForegroundForFragments):
        (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
        (WebCore::RenderLayer::paintOutlineForFragments):
        (WebCore::RenderLayer::paintMaskForFragments):
        (WebCore::RenderLayer::paintOverflowControlsForFragments):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayer.h:

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

        [Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
        https://bugs.webkit.org/show_bug.cgi?id=134418

        Reviewed by Eric Carlson.

        Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
        Windows.

        * DerivedSources.cpp: Add new IDL files
        * DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
        * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
        Objective C.)
        * WebCore.vcxproj/WebCore.vcxproj: Update for new files.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
        * WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
        * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
        * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
        Moved from MediaPlayerPrivateAVFoundationObjC.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
        Update for new API calls.
        * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
        * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
        * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
        * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        Remove method that was moved to base class.

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

        Remove BufferForAppendingHyphen
        https://bugs.webkit.org/show_bug.cgi?id=134376

        Reviewed by Darin Adler.

        It is legacy, from a time when that code was using a Vector.

        The problem is that StringBuilder's memory was also implicitly used to keep
        the string alive for the lifespan of the TextRun. That seems quite dangerous
        as changes in StringBuilder could have changed that.

        To fix the lifetime issue, my first idea was to make it explicit by passing
        a String reference to hold the memory alive, and a boolean to say if the text
        need an hyphen. The problem with that is this code is very hot and I made things
        worse.

        The solution with this patch is to just pass a pointer to a String to do both
        the buffer reference, and the decision to add the hyphen. Having a single
        argument with 2 meanings is not pretty but that's not worse than the old buffer.

        * editing/TextIterator.cpp:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::localSelectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::constructTextRun):
        (WebCore::adjustCharactersAndLengthForHyphen): Deleted.
        * rendering/InlineTextBox.h:
        (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): Deleted.
        * rendering/RenderText.cpp:

2014-06-27  Jeremy Jones  <jeremyj@apple.com>

        Lazily link frameworks in WebVideoFullscreenInterfaceAVKit.
        https://bugs.webkit.org/show_bug.cgi?id=134407

        Reviewed by Eric Carlson.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerController init]):
        Load AVPlayerController on use.
        (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
        Remove loading on construction.
        (WebVideoFullscreenInterfaceAVKit::setCurrentTime): Load AVValueTiming on use.
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Load several classes on use.
        (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Load UIColor on use.

2014-06-27  Alex Christensen  <achristensen@webkit.org>

        Remove extra operations from 64-bit or on armv7.
        https://bugs.webkit.org/show_bug.cgi?id=134408

        Reviewed by Geoffrey Garen.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
        Only do or operations if it would change values.
        Often we're only setting one flag, so half the operations are not necessary.

2014-06-27  Beth Dakin  <bdakin@apple.com>

        ScrollView::rootViewToTotalContents() needs to take topContentInset into account
        https://bugs.webkit.org/show_bug.cgi?id=134415
        -and corresponding-
        <rdar://problem/17473633>

        Reviewed by Simon Fraser.

        This affects hit testing in headers aka PageBanners.

        The root view will be anchored above the start of the total contents if there is a 
        topContentInset, so the inset value should be subtracted to get into the right 
        coordinate space here.
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::rootViewToTotalContents):

2014-06-27  Antti Koivisto  <antti@apple.com>

        Flush throttling with remote layers
        https://bugs.webkit.org/show_bug.cgi?id=134398

        Reviewed by Darin Adler.

        With remote layer trees the flush scheduling lives in the WebKit2 layer. The throttling code
        needs to live there as well.
        
        Add the required callbacks and disable the existing throttling code in RenderLayerCompositor
        when remote layers are in use. Later we can get rid of the RenderLayerCompositor throttling code.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadProgressingStatusChanged):
        * page/ChromeClient.h:
        (WebCore::ChromeClient::adjustLayerFlushThrottling):
        * page/FrameView.cpp:
        (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
        (WebCore::FrameView::loadProgressingStatusChanged):
        
            Factor the progress status change activities to a function.

        (WebCore::FrameView::updateLayerFlushThrottling):
        (WebCore::FrameView::setExposedRect):
        
            Move the call to adjustTiledBackingCoverage from WebKit to here.

        (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames): Deleted.
        * page/FrameView.h:
        * page/LayerFlushThrottleState.h: Added.
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::RenderLayerCompositor):

2014-06-27  Brady Eidson  <beidson@apple.com>

        The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads.
        https://bugs.webkit.org/show_bug.cgi?id=134375

        Reviewed by Darin Adler.

        No new tests (Not yet a tested config)

        * Modules/gamepad/GamepadManager.cpp:
        (WebCore::GamepadManager::platformGamepadConnected): Also call to makeGamepadsVisibileToBlindNavigators.
        (WebCore::GamepadManager::platformGamepadDisconnected):
        (WebCore::GamepadManager::platformGamepadInputActivity): Call makeGamepadsVisibileToBlindNavigators.
        (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Walk through each blind navigator
          notifying it of each connected Gamepad.
        (WebCore::GamepadManager::registerNavigator): Also add to the blind navigator set.
        (WebCore::GamepadManager::unregisterNavigator): Also remove from the blind navigator set.
        * Modules/gamepad/GamepadManager.h:

        * platform/GamepadProviderClient.h: Added platformGamepadInputActivity.

        * platform/mac/HIDGamepadProvider.cpp:
        (WebCore::HIDGamepadProvider::HIDGamepadProvider):
        (WebCore::HIDGamepadProvider::valuesChanged): Set the input notification timer which will notify the clients
          that a button was pressed.
        (WebCore::HIDGamepadProvider::inputNotificationTimerFired): Perform that notification.
        * platform/mac/HIDGamepadProvider.h:

2014-06-27  Brady Eidson  <beidson@apple.com>

        HIDGamepads should populate themselves with initial input values
        https://bugs.webkit.org/show_bug.cgi?id=134381

        Reviewed by Darin Adler.

        No new tests (Not yet a tested config)

        * platform/mac/HIDGamepad.cpp:
        (WebCore::HIDGamepad::getCurrentValueForElement):
        (WebCore::HIDGamepad::initElements):  Loop through all the saved elements to get current values.
        (WebCore::HIDGamepad::maybeAddButton):
        (WebCore::HIDGamepad::maybeAddAxis):
        * platform/mac/HIDGamepad.h:
        (WebCore::HIDGamepadElement::HIDGamepadElement):
        (WebCore::HIDGamepadButton::HIDGamepadButton):
        (WebCore::HIDGamepadAxis::HIDGamepadAxis):

2014-06-27  Peyton Randolph  <prandolph@apple.com>

        Add feature flag for link long-press gesture.
        https://bugs.webkit.org/show_bug.cgi?id=134262

        Reviewed by Enrica Casucci.

        * Configurations/FeatureDefines.xcconfig:
        Add ENABLE_LINK_LONG_PRESS.

2014-06-26  Brady Eidson  <beidson@apple.com>

        HIDGamepadProvider should only be active when someone is interested in Gamepads.
        https://bugs.webkit.org/show_bug.cgi?id=134374

        Reviewed by Darin Adler.

        No new tests (Not yet a tested config)

        * Modules/gamepad/GamepadManager.cpp:
        (WebCore::GamepadManager::registerNavigator): Add some logging.
        (WebCore::GamepadManager::unregisterNavigator): Ditto.

        * platform/mac/HIDGamepadProvider.cpp:
        (WebCore::HIDGamepadProvider::HIDGamepadProvider):
        (WebCore::HIDGamepadProvider::connectionDelayTimerFired): Stop suppressing connection callbacks
        (WebCore::HIDGamepadProvider::openAndScheduleManager):
        (WebCore::HIDGamepadProvider::closeAndUnscheduleManager): Stop listening for gamepad events, and clear
          all current gamepads.
        (WebCore::HIDGamepadProvider::startMonitoringGamepads): If the first client, call openAndScheduleManager
        (WebCore::HIDGamepadProvider::stopMonitoringGamepads): If the last client, call closeAndUnscheduleManager
        (WebCore::HIDGamepadProvider::deviceAdded): If this callback came while we were suppressing connection
          callbacks, it is a startup event for already-connected gamepads. Stop suppressing callbacks in a later
          spin of the runloop.
        (WebCore::HIDGamepadProvider::deviceRemoved):
        * platform/mac/HIDGamepadProvider.h:
        (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks): Deleted.

2014-06-27  Alex Christensen  <achristensen@webkit.org>

        Prevent unnecessary register saving in css jit.
        https://bugs.webkit.org/show_bug.cgi?id=133955

        Reviewed by Geoff Garen.

        * cssjit/FunctionCall.h:
        (WebCore::FunctionCall::prepareAndCall):
        (WebCore::FunctionCall::cleanupPostCall):
        (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
        (WebCore::FunctionCall::restoreAllocatedCallerSavedRegisters):
        (WebCore::FunctionCall::saveAllocatedRegisters): Renamed to saveAllocatedCallerSavedRegisters.
        (WebCore::FunctionCall::restoreAllocatedRegisters): Renamed to restoreAllocatedCallerSavedRegisters.
        Only push caller saved registers before function calls.
        * cssjit/RegisterAllocator.h:
        (WebCore::RegisterAllocator::isValidRegister):
        Corrected register ranges.
        (WebCore::RegisterAllocator::isCallerSavedRegister): Added.

2014-06-27  Beth Dakin  <bdakin@apple.com>

        Custom scrollbars should not create ScrollbarPainters on Mac
        https://bugs.webkit.org/show_bug.cgi?id=134406
        -and corresponding-
        <rdar://problem/16178301>

        Reviewed by Tim Horton.

        The solution here is to return early in ScrollbarThemeMac::registerScrollbar() if 
        the scrollbar is custom. However, since this function is called during the 
        RenderScrollbar and Scrollbar constructor, we need to re-implement 
        Scrollbar::isCustomScrollbar() to return a member variable that is passed into the 
        constructor. Otherwise, we will get Scrollbar’s implementation is 
        isCustomScrollbar() wrongfully returning false since instead of the derived
        class’s implementation. 

        Scrollbar constructor now has an option parameter isCustomScrollbar that defaults 
        to false. That value is returned by isCustomScrollbar()
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::Scrollbar):
        * platform/Scrollbar.h:

        Return early if this is a custom scrollbar since the rest of the function deals 
        with creating a native scrollbar and getting it in the right state.
        * platform/mac/ScrollbarThemeMac.mm:
        (WebCore::ScrollbarThemeMac::registerScrollbar):

        Send true to the Scrollbar constructor to indicate that this is a custom 
        scrollbar.
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::RenderScrollbar):
        * rendering/RenderScrollbar.h:

2014-06-27  Eric Carlson  <eric.carlson@apple.com>

        [Mac] AVMetadataKeySpaceISOUserData not defined on 10.8
        https://bugs.webkit.org/show_bug.cgi?id=134401

        Reviewed by Jer Noble.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::metadataType): Use SOFT_LINK_POINTER_OPTIONAL for AVMetadataKeySpaceISOUserData
            so we don't have problems on OS versions where it isn't defined.

2014-06-27  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>

        REGRESSION (r168685): css calc() expression fails 
        https://bugs.webkit.org/show_bug.cgi?id=134059

        The expression 'calc((100% - 20px) / 3' did not work properly after r168685,
        because primitiveType() function in CSSCalculationValue.cpp has handled
        CalcPercentLength and CalcPercentNumber categories as if they were angles.
        The patch fixes this incorrect behavior.

        Reviewed by Simon Fraser.

        Test: fast/css/calc-percentage-pixel.html

        * css/CSSCalculationValue.cpp:

2014-06-27  Jer Noble  <jer.noble@apple.com>

        [MSE] http/tests/media/media-source/mediasource-append-buffer.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=134389

        Reviewed by Eric Carlson.

        Two subtests in mediasource-append-buffer.html are failing. Bring setDuration() up to spec
        by throwing an exception if the duration is called while any SourceBuffer is updating. Do
        not cancel pending events when a SourceBuffer is removed from its MediaSource. And mark the
        SourceBuffer as having pending activity if there are pending events to be fired.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::setDuration):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::removedFromMediaSource):
        (WebCore::SourceBuffer::hasPendingActivity):

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

        [iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and RTL scrolling
        https://bugs.webkit.org/show_bug.cgi?id=134377
        <rdar://problem/16762224>

        Reviewed by Tim Horton.
        
        Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
        has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
        contexts.
        
        An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
        and needs to truncate the scrolled content on the left side. To pass the
        correct geometry to the UI process, we need to introduce the concept of
        "reachable" size as well as total content size; normally these are the same,
        but will differ when scrolling is only allowed on one axis but there is overflow
        on both axes.
        
        To get the reachable size, add RenderLayer::scrollableContentsSize().
        
        RenderLayer::visibleSize() was wrong; the function should return the size of the 
        scrollable portion, but used layer size which includes borders. Fix to use pixelSnappedClientWidth()/Height(),
        which is what we use for scrollbar computations.

        * WebCore.exp.in:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
        (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
        (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
        * page/scrolling/ScrollingCoordinator.h:
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
        (WebCore::ScrollingStateScrollingNode::setReachableContentsSize):
        * page/scrolling/ScrollingStateScrollingNode.h:
        (WebCore::ScrollingStateScrollingNode::reachableContentsSize):
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        (WebCore::ScrollingTreeScrollingNode::reachableContentsSize):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::visibleSize):
        (WebCore::RenderLayer::scrollableContentsSize):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::updateScrollingLayerWithClient):
        (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

2014-06-27  Bear Travis  <betravis@adobe.com>

        [Feature Queries] Fix feature queries build on Mac
        https://bugs.webkit.org/show_bug.cgi?id=134359

        Reviewed by Antti Koivisto.

        Update the XCode project and Feature Queries code to build on Mac.

        There are existing tests for supports in the LayoutTests/css3 directory.

        * WebCore.xcodeproj/project.pbxproj: Add the Feature Queries files
        to the XCode project.
        * css/CSSGrammar.y.in: Update CSSParserExpression to CSSParserValueList.
        * css/DOMWindowCSS.idl: Add ImplementationLacksVTable metadata.

2014-06-27  Jer Noble  <jer.noble@apple.com>

        [MSE] media/media-source/media-source-tracks.html is crashy
        https://bugs.webkit.org/show_bug.cgi?id=134385

        Reviewed by Eric Carlson.

        Fix the refactoring error (self assignment) introduced by r170488.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):

2014-06-27  Mark Hahnenberg  <mhahnenberg@apple.com>

        XHR should keep attributes on instance
        https://bugs.webkit.org/show_bug.cgi?id=134363

        Reviewed by Sam Weinig.

        Test: js/dom/xhr-prototype-define-property.html

        Having them on the prototype broke some sites due to the fact that these DOM attributes are currently 
        not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.

        * bindings/scripts/CodeGeneratorJS.pm:
        (InterfaceRequiresAttributesOnInstanceForCompatibility):

2014-06-27  Jeremy Jones  <jeremyj@apple.com>

        removeCodedFrames should modify ref to TrackBuffer no a copy.
        https://bugs.webkit.org/show_bug.cgi?id=134380

        Reviewed by Daniel Bates.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::removeCodedFrames):
        Iterate with a reference.

2014-06-27  Zalan Bujtas  <zalan@apple.com>

        Set cliprect radius unconditionally in RenderLayer.
        https://bugs.webkit.org/show_bug.cgi?id=134396

        Reviewed by Simon Fraser.

        No change in functionality.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):

2014-06-27  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Interaction between auto-placement and column / row spanning
        https://bugs.webkit.org/show_bug.cgi?id=110633

        Reviewed by Sergio Villar Senin.

        Modify auto-placement algorithm in order to support span in both
        definite and automatic positions.

        This patch fixes examples like:
        grid-row: auto;
        grid-column: 2 / span 3;

        And also:
        grid-row: auto;
        grid-column: span 3;

        Tests: fast/css-grid-layout/grid-item-auto-placement-automatic-span.html
               fast/css-grid-layout/grid-item-auto-placement-definite-span.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): New method that
        checks if a grid area is or not empty.
        (WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Updated method
        that now receives two arguments with the span value in both directions.
        (WebCore::RenderGrid::ensureGridSize): Renamed from gridRow(). Adapted
        method to grow in both directions at the same time if needed. It ensures
        that the grid is big enough to insert a new item.
        (WebCore::RenderGrid::insertItemIntoGrid): Only leave the method that
        receives a GridCoordinate. It uses ensureGridSize() before inserting the
        item in the grid.
        (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ensure that
        the grid is big enough to place the largest span for auto-positioned
        items.
        (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
        New method that returns a GridCoordinate outside current grid with the
        requested dimensions.
        (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Adapted
        method to calculate the item's span and use the new version of
        nextEmptyGridArea(). If an empty area is not found it uses
        createEmptyGridAreaAtSpecifiedPositionsOutsideGrid() to place the item.
        (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
        (WebCore::RenderGrid::growGrid): Renamed to ensureGridSize().
        * rendering/RenderGrid.h: Modify methods headers and add new method
        signature.
        * rendering/style/GridCoordinate.h:
        (WebCore::GridSpan::integerSpan): Add new simple method to return the
        span value of a position.
        * rendering/style/GridResolvedPosition.cpp:
        (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
        Implement method to take into account span in auto-placement algorithm.
        (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Add new
        checks related with named grid line spans in auto-positioned items,
        which is not allowed according to the spec.
        * rendering/style/GridResolvedPosition.h: Update method header.

2014-06-27  Mahesh Kulkarni  <mahesh.kk@samsung.com>

        [XHR] open method must uppercase only standard method types
        https://bugs.webkit.org/show_bug.cgi?id=134264

        Reviewed by Darin Adler.

        As per step-5 of http://xhr.spec.whatwg.org/#the-open()-method only
        DELETE, PUT, GET, POST, OPTIONS, HEAD are standard. Use other methods as is without case change.
        All tests from w3c-test suite pass http://w3c-test.org/XMLHttpRequest/open-method-case-sensitive.htm.
        This merges blink changes from r176592.

        Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
               http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):

2014-06-27  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>

        Increase priority on SharedTimer source.
        http://bugs.webkit.org/show_bug.cgi?id=134109

        While running webkit on a Debian virtual machine I stumbled upon an issue where JS
        setTimeout callbacks were not being properly invoked due to machine limitations and the
        usage of a low priority on setTimeout timers.

        This patch increases the SharedTimer source priority to use the default glib priority which
        fixes the issue, making setTimeout JS calls work properly on the test environment.

        Reviewed by Gustavo Noronha Silva.

        * platform/gtk/SharedTimerGtk.cpp:
        (WebCore::setSharedTimerFireInterval):

2014-06-27  Zalan Bujtas  <zalan@apple.com>

        Remove redundant offsetFromAncestor() call from RenderLayer::localClipRect().
        https://bugs.webkit.org/show_bug.cgi?id=134378

        Reviewed by Simon Fraser.

        No change in functionality.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):

2014-06-27  Philippe Normand  <pnormand@igalia.com>

        [GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol source plugin" (GStreamer?)
        https://bugs.webkit.org/show_bug.cgi?id=133605

        Reviewed by Carlos Garcia Campos.

        Don't attempt to load blank URLs with the GStreamer media
        player. Those URLs trigger the codec installer which is useless in
        this scenario. This patch also renames some of the variables of
        the ::load method, as suggested by Carlos.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
        Check video-sink validity before disconnecting its signal handlers.
        (WebCore::MediaPlayerPrivateGStreamer::load): Don't load blank
        URLs (about:blank).
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
        Disconnect repaint handler only if it's valid.

2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Expose getter and setter functions for attributes named type
        https://bugs.webkit.org/show_bug.cgi?id=134300

        Reviewed by Martin Robinson.

        We skip those because the getter conflicts with the get_type()
        function of all GObjects. We should use a different name for them. As
        a general rule we use the last word of the class name, something like:

          webkit_dom_blob_get_type() -> webkit_dom_blob_get_blob_type()
          webkit_dom_event_get_type() -> webkit_dom_event_get_event_type()

        It's consistent with other existing DOM methods like
        webkit_dom_xpath_result_get_result_type() or webkit_dom_css_value_get_css_value_type().
        This patch also adds some exceptions for particular cases.

        * bindings/gobject/webkitdom.symbols: Add new public symbols.
        * bindings/scripts/CodeGeneratorGObject.pm:
        (GetFunctionSigName): Helper function to return the function name
        that takes into account all exceptions when generating getters and
        setters of attributes named type. Otherwise the name is returned unmodified.
        (GenerateFunction): Use GetFunctionSigName().
        (GenerateFunctions): Do not skip functions for type attributes.

2014-06-27  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove unnecessary #include in HistoryController
        https://bugs.webkit.org/show_bug.cgi?id=134369

        Reviewed by Daniel Bates.

        After the landing of https://webkit.org/b/130099, HistoryController doesn't need
        WebCore::Settings class. So we can remove the related header.

        * loader/HistoryController.cpp:

2014-06-26  Jeongeun Kim  <je_julie.kim@samsung.com>

        REGRESSION (r170287): SVGDocumentExtensions::rebuildElements() called on removed element
        https://bugs.webkit.org/show_bug.cgi?id=134304

        Reviewed by Daniel Bates.

        Roll out <http://trac.webkit.org/170287> (https://bugs.webkit.org/show_bug.cgi?id=134186)
        as it led to SVGDocumentExtensions::rebuildElements() being called on an element(s) that
        may no longer be in the document.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::removeChild):
        (WebCore::ContainerNode::removeChildren):
        * dom/Document.cpp:
        (WebCore::Document::commonTeardown):
        (WebCore::Document::implicitClose):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::restore):
        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::startAnimations):
        (WebCore::SVGDocumentExtensions::pauseAnimations):
        (WebCore::SVGDocumentExtensions::unpauseAnimations):
        (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
        (WebCore::SVGDocumentExtensions::rebuildElements):
        * svg/SVGDocumentExtensions.h:

2014-06-26  Tim Horton  <timothy_horton@apple.com>

        [WK2] Pinch-zoom shadows can overlap headers and footers
        https://bugs.webkit.org/show_bug.cgi?id=134372
        <rdar://problem/16004095>

        Reviewed by Simon Fraser.

        * WebCore.exp.in:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateLayerForHeader):
        (WebCore::RenderLayerCompositor::updateLayerForFooter):
        Put header/footer layers in front of the root content layer instead of behind.
        Ideally nothing would ever overlap them, but this will give them precedence regardless.

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

        [Win] Always NULL-terminate the string in createUTF8String()
        <http://webkit.org/b/134353>
        <rdar://problem/17471783>

        Reviewed by Brent Fulgham.

        * plugins/PluginView.cpp:
        (WebCore::createUTF8String): Pull out CString length into local
        variable.  Switch to use memcpy.  Always NULL-terminate the
        string.

2014-06-26  Jer Noble  <jer.noble@apple.com>

        [MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
        https://bugs.webkit.org/show_bug.cgi?id=134367

        Reviewed by Darin Adler.

        Add a couple of null-checks to protect against methods being called in the brief time
        between when the object is created and when it's asked to load.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):

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

        Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme()
        https://bugs.webkit.org/show_bug.cgi?id=134289

        Reviewed by Darin Adler.

        If we do early return when there is invalid protocol, we're able to avoid unnecessary call flow.

        No new tests, covered by existing tests.

        * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
        (WebCore::verifyProtocolHandlerScheme):

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

        [WK1] Use native touch event's timestamp for DOM touch event
        https://bugs.webkit.org/show_bug.cgi?id=134326

        Reviewed by Enrica Casucci.

        * platform/ios/PlatformEventFactoryIOS.mm:
        (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
        Use device event timestamp to get more accurate timing information. This also removes
        the variance introduced by WebKit when computing velocity/acceleration/etc.

2014-06-26  Balazs Kelemen  <b.kelemen@samsung.com>

        Memcache migth not be pruned when it should for https pages
        https://bugs.webkit.org/show_bug.cgi?id=134361

        Reviewed by Geoffrey Garen.

        There is no reason we should not try to prune in case of a https resource.

        No observable change in behavior, no tests.

        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::removeClient):
        Call prune unconditionally and remove an unnecessary branch.

2014-06-26  Alexey Proskuryakov  <ap@apple.com>

        REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
        https://bugs.webkit.org/show_bug.cgi?id=133882
        <rdar://problem/17271965>

        Reviewed by Brady Eidson.

        This goes to pre-r161796 behavior on 10.8 and 10.9. We schedule the requests internally,
        and only give 6 of them to CFNetwork at a time. Except for synchronous requests,
        which still use the improved approach, and don't count against 6 connections.

        * loader/ResourceLoadScheduler.cpp:
        (WebCore::ResourceLoadScheduler::scheduleLoad):
        * platform/network/cf/ResourceRequest.h:
        (WebCore::ResourceRequest::resourcePrioritiesEnabled):
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::initializeMaximumHTTPConnectionCountPerHost): Deleted.
        * platform/network/mac/ResourceRequestMac.mm:
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):

2014-06-26  Brady Eidson  <beidson@apple.com>

        Remove use of PlatformStrategies for Gamepad API.
        https://bugs.webkit.org/show_bug.cgi?id=134348

        Reviewed by Dean Jackson.

        No new tests (Not yet a tested config)

        Introduce a virtual GamepadProvider with a process-global shared provider.
        The base implementation of the GamepadProvider does nothing.
        * platform/GamepadProvider.cpp: Renamed from Source/WebKit/mac/WebCoreSupport/WebHIDGamepadController.h.
        (WebCore::GamepadProvider::shared):
        (WebCore::GamepadProvider::setSharedProvider):
        (WebCore::GamepadProvider::startMonitoringGamepads):
        (WebCore::GamepadProvider::stopMonitoringGamepads):
        (WebCore::GamepadProvider::platformGamepads):
        * platform/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadStrategy.h.
        (WebCore::GamepadProvider::~GamepadProvider):

        * platform/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadStrategyClient.h.
        (WebCore::GamepadProviderClient::~GamepadProviderClient):

        GamepadManager is now a GamepadProviderClient:
        * Modules/gamepad/GamepadManager.cpp:
        (WebCore::GamepadManager::GamepadManager):
        (WebCore::GamepadManager::registerNavigator):
        (WebCore::GamepadManager::unregisterNavigator):
        * Modules/gamepad/GamepadManager.h:

        Remove the GamepadStrategy altogether:
        * platform/PlatformStrategies.h:
        (WebCore::PlatformStrategies::PlatformStrategies):
        (WebCore::PlatformStrategies::gamepadStrategy): Deleted.

        Call to the shared GamepadProvider instead of the strategy:
        * Modules/gamepad/NavigatorGamepad.cpp:
        (WebCore::NavigatorGamepad::gamepads):
        (WebCore::NavigatorGamepad::gamepadsBecameVisible):
        (WebCore::NavigatorGamepad::gamepadConnected):

        HIDGamepadListener is now a subclass of GamepadProvider that implements the HID based management.
        LegacyWebKit on Mac will install the shared HIDGamepadProvider instead of the default GamepadProvider:
        * platform/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.cpp.
        (WebCore::deviceMatchingDictionary):
        (WebCore::deviceAddedCallback):
        (WebCore::deviceRemovedCallback):
        (WebCore::deviceValuesChangedCallback):
        (WebCore::HIDGamepadProvider::shared):
        (WebCore::HIDGamepadProvider::HIDGamepadProvider):
        (WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
        (WebCore::HIDGamepadProvider::startMonitoringGamepads):
        (WebCore::HIDGamepadProvider::stopMonitoringGamepads):
        (WebCore::HIDGamepadProvider::deviceAdded):
        (WebCore::HIDGamepadProvider::deviceRemoved):
        (WebCore::HIDGamepadProvider::valuesChanged):
        (WebCore::HIDGamepadProvider::removeGamepadForDevice):
        * platform/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.h.
        (WebCore::HIDGamepadProvider::platformGamepads):
        (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks):

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:

        * platform/mac/HIDGamepad.h: Fix incorrect comment

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

        Skip memcmp()ing fully downloaded resources after they become mmap()able.
        <https://webkit.org/b/134362>

        When we receive word that a downloaded resource is now available for mmap()ing
        from the file system, we don't need to compare against the buffered data,
        since even if there were a mismatch, the cached version should be the canonical one.

        This was added as belt-and-suspenders while the supporting mechanism was being
        developed in CFNetwork, and there's no evidence of a race today. This change
        turns the runtime checks into debug-only assertions.

        Saves ~300ms of main thread time on PLT.

        Reviewed by Geoff Garen.

        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::tryReplaceEncodedData):

2014-06-26  Jer Noble  <jer.noble@apple.com>

        [MSE] Refactoring: Use C++11 for-loops in SourceBuffer.
        https://bugs.webkit.org/show_bug.cgi?id=134352

        Reviewed by Darin Adler.

        Use C++11 style for-loops where appropriate in SourceBuffer now that the
        SampleMap ordered objects support them.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
        (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
        (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
        (WebCore::SourceBuffer::validateInitializationSegment):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
 
        [iOS]: Tapping <button> outside of a form is no longer working
        https://bugs.webkit.org/show_bug.cgi?id=134319
        <rdar://problem/17213346>

        Reviewed by Daniel Bates.

        Restore behavior of allowing <button> clicks outside of <form>.
        This used to be iOS behavior before it was removed in favor of the
        OpenSource (Android?) behavior. Now, willRespondToMouseClickEvents
        is only used by iOS, so lets restore the iOS behavior.

        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):

2014-06-26  Jer Noble  <jer.noble@apple.com>

        Unreviewed build-fix. Remove unintentionial rename of MediaTime.h -> MediaTimeHash.h.

        * Modules/mediasource/SampleMap.h:

2014-06-26  Eric Carlson  <eric.carlson@apple.com>

        [iOS] no need to deactivate audio session
        https://bugs.webkit.org/show_bug.cgi?id=134350

        Reviewed by Jer Noble.

        * platform/audio/mac/MediaSessionManagerMac.cpp:
        (MediaSessionManager::updateSessionState): Don't bother calling 
            AudioSession::setActive(false), WebCore's audio session will be deactivated 
            automatically if another application begins playing audio.

2014-06-26  Jer Noble  <jer.noble@apple.com>

        [MSE] Refactoring: Differentiate between SampleMap decode and presentation order methods
        https://bugs.webkit.org/show_bug.cgi?id=134349

        Reviewed by Geoffrey Garen.

        Refactor SampleMap to clarify the distinction between methods which return decode-order
        iterators and ones which retun presentation-order iterators.

        Add two classes, PresentationOrderSampleMap and DecodeOrderSampleMap, to contain the actual
        MediaTime-to-Sample maps, and move the methods returning presentation-order and decode-order
        iterators to each, respectively.  Rename the {presentation,decode}{Begin,End}() methods to
        begin() and end() so the objects can be used in C++11 for-loops.

        Update all the call sites in SourceBuffer to use the new ordered objects.

        * Modules/mediasource/SampleMap.cpp:
        (WebCore::SampleIsLessThanMediaTimeComparator::operator()): Use new ordered objects.
        (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()): Ditto.
        (WebCore::SampleMap::clear): Ditto.
        (WebCore::SampleMap::addSample): Ditto.
        (WebCore::SampleMap::removeSample): Ditto.
        (WebCore::PresentationOrderSampleMap::findSampleContainingPresentationTime): Renamed from SampleMap version.
        (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Ditto.
        (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Ditto.
        (WebCore::PresentationOrderSampleMap::reverseFindSampleContainingPresentationTime): Ditto.
        (WebCore::PresentationOrderSampleMap::reverseFindSampleBeforePresentationTime): Ditto.
        (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Ditto.
        (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Ditto.
        (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToDecodeIterator): Ditto.
        (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
        (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Ditto.
        (WebCore::PresentationOrderSampleMap::findSamplesBetweenPresentationTimes): Ditto.
        (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRange): Ditto.
        (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
        * Modules/mediasource/SampleMap.h:
        (WebCore::PresentationOrderSampleMap::begin): Renamed from presentationBegin().
        (WebCore::PresentationOrderSampleMap::end): Renamed from presentationEnd().
        (WebCore::PresentationOrderSampleMap::rbegin): Renamed from reversePresentationBegin().
        (WebCore::PresentationOrderSampleMap::rend): Renamed from reversePresentationEnd().
        (WebCore::DecodeOrderSampleMap::begin): Renamed from decodeBegin().
        (WebCore::DecodeOrderSampleMap::end): Renamed from decodeEnd().
        (WebCore::DecodeOrderSampleMap::rbegin): Renamed from reverseDecodeBegin().
        (WebCore::DecodeOrderSampleMap::rend): Renamed from reverseDecodeEnd().
        (WebCore::SampleMap::SampleMap): Create new ordered objects.
        (WebCore::SampleMap::sizeInBytes): Use new ordered objects.
        (WebCore::SampleMap::decodeOrder): Simple accessor.
        (WebCore::SampleMap::presentationOrder): Simple accessor.
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Use new ordered objects.
        (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Ditto.
        (WebCore::SourceBuffer::removeCodedFrames): Ditto.
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
        (WebCore::SourceBuffer::bufferedSamplesForTrackID): Ditto.

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

        Add an undo group for each dictated utterance in WebKit
        https://bugs.webkit.org/show_bug.cgi?id=134086

        Applied review comments from Sam Weinig.

        Move the associated USE #define into Platform.h.
 
        * WebCore.xcodeproj/project.pbxproj:
        * editing/mac/TextUndoInsertionMarkup.h: Removed.
        * editing/mac/TextUndoInsertionMarkupMac.h:

2014-06-26  Shivakumar JM  <shiva.jm@samsung.com>

        [EFL][WK2] Fix Debug Build Error in Webcore module.
        https://bugs.webkit.org/show_bug.cgi?id=134345

        Reviewed by Zalan Bujtas.

        Use static cast to change the type of variable to fix error

        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
        (WebCore::HarfBuzzShaper::setDrawRange):

2014-06-26  Eric Carlson  <eric.carlson@apple.com>

        [Mac] allow host application to canonicalize media urls
        https://bugs.webkit.org/show_bug.cgi?id=134329

        Reviewed by Dean Jackson.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::canonicalURL): New, use NSURLProtocol to canonicalize a URL.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Call canonicalURL.

2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add padding for future expansion to WebKitDOMEventTargetIface
        https://bugs.webkit.org/show_bug.cgi?id=134298

        Reviewed by Martin Robinson.

        * bindings/gobject/WebKitDOMEventTarget.h:

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

        [GTK] Add support for constants in GObject DOM bindings
        https://bugs.webkit.org/show_bug.cgi?id=133983

        Reviewed by Martin Robinson.

        * bindings/gobject/webkitdom.symbols: Add stable constants.
        * bindings/scripts/CodeGeneratorGObject.pm:
        (GenerateHeader): Add constants to the header.
        (Generate): Pass the interface object to GenerateHeader to get the constants
        (IsInterfaceSymbol): Helper function that returns whether the given
        symbol belongs to the interface. Check also constants now.
        (ReadStableSymbols): Use IsInterfaceSymbol().
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:

2014-06-26  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Properly support for z-index on grid items
        https://bugs.webkit.org/show_bug.cgi?id=103329

        Reviewed by Benjamin Poulain.

        From Blink r157620 by <jchaffraix@chromium.org> and r172402 by
        <wangxianzhu@chromium.org>.

        The specification says that grid should match flexbox and force
        grid items to be stacking context if z-index is set, regardless
        of 'position'. After this change, this is what happens.

        Previously z-index changes of static positioned objects were ignored.
        However, z-index is applicable for some static positioned objects,
        such as grid items. Ignoring them makes the object not to be properly
        painted on z-index change.

        As StyleResolver has ensured that z-index is non-auto only if
        applicable, RenderStyle::changeRequiresLayerRepaint() should not check
        again (with inconsistent conditions).

        Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.html
               fast/css-grid-layout/grid-item-z-index-stacking-context.html
               fast/css-grid-layout/grid-item-z-index-support.html

        * css/StyleResolver.cpp:
        (WebCore::isDisplayFlexibleOrGridBox): Add new method to check if parent
        display is flexbox or grid.
        (WebCore::StyleResolver::adjustRenderStyle): Use new method in z-index
        condition.
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index checks
        out of non-static positioned objects if.

2014-06-25  Dean Jackson  <dino@apple.com>

        HIDGamepad should use CFIndex when looping
        https://bugs.webkit.org/show_bug.cgi?id=134337

        Reviewed by Dan Bernstein.

        * platform/mac/HIDGamepad.cpp:
        (WebCore::HIDGamepad::initElementsFromArray): Replace int with CFIndex, and use
        a local variable for CFArrayCount.

2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>

        Build fix attempt after r170465.

        * platform/mac/HIDGamepad.cpp:
        (WebCore::HIDGamepad::initElementsFromArray):

2014-06-25  Dean Jackson  <dino@apple.com>

        [Mac] Radio buttons and checkboxes vanish when redrawn
        https://bugs.webkit.org/show_bug.cgi?id=134335

        Reviewed by Dan Bernstein.

        I screwed up when landing r170343 by moving some code around
        which broke the logic. We need to query the animation
        state for controls after we draw (both statically and animated).

        * platform/mac/ThemeMac.mm:
        (WebCore::paintToggleButton): We need to check the state of animation again, after
        we draw.

2014-06-25  Brady Eidson  <beidson@apple.com>

        Add HID-based gamepad implementation for Mac
        https://bugs.webkit.org/show_bug.cgi?id=134324

        Reviewed by Dean Jackson.

        No new tests (Not yet a tested config)

        * Modules/gamepad/Gamepad.cpp:
        (WebCore::Gamepad::Gamepad):
        (WebCore::Gamepad::updateFromPlatformGamepad): Update the Gamepad’s data from the passed-in PlatformGamepad.
        * Modules/gamepad/Gamepad.h:

        * Modules/gamepad/GamepadButton.h:
        (WebCore::GamepadButton::create): Change to use Ref instead of RefPtr.

        GamepadManager is a GamepadStrategyClient that receives notifications from the platform gamepad implementation
        and forwards them to NavigatorGamepad objects. In the future it will also handle event dispatch and exposing
        gamepads to the API layer when a button is pressed:
        * Modules/gamepad/GamepadManager.cpp: Added.
        (WebCore::GamepadManager::shared):
        (WebCore::GamepadManager::GamepadManager):
        (WebCore::GamepadManager::platformGamepadConnected):
        (WebCore::GamepadManager::platformGamepadDisconnected):
        (WebCore::GamepadManager::registerNavigator):
        (WebCore::GamepadManager::unregisterNavigator):
        * Modules/gamepad/GamepadManager.h:

        The NavigatorGamepad supplement actually manages visibility of Gamepads on a per-DOMWindow basis:
        * Modules/gamepad/NavigatorGamepad.cpp:
        (WebCore::NavigatorGamepad::NavigatorGamepad):
        (WebCore::NavigatorGamepad::~NavigatorGamepad):
        (WebCore::NavigatorGamepad::from):
        (WebCore::NavigatorGamepad::gamepads):
        (WebCore::NavigatorGamepad::gamepadsBecameVisible):
        (WebCore::NavigatorGamepad::gamepadConnected):
        (WebCore::NavigatorGamepad::gamepadDisconnected):
        * Modules/gamepad/NavigatorGamepad.h:
        (WebCore::NavigatorGamepad::navigationStart):

        HIDGamepad is a PlatformGamepad that wraps an IOHIDDeviceRef and keeps input values updated:
        * platform/mac/HIDGamepad.cpp: Added.
        (WebCore::HIDGamepad::HIDGamepad):
        (WebCore::HIDGamepad::initElements):
        (WebCore::HIDGamepad::initElementsFromArray):
        (WebCore::HIDGamepad::maybeAddButton):
        (WebCore::HIDGamepad::maybeAddAxis):
        (WebCore::HIDGamepad::valueChanged):
        * platform/mac/HIDGamepad.h: Added.
        (WebCore::HIDGamepadElement::HIDGamepadElement):
        (WebCore::HIDGamepadElement::~HIDGamepadElement):
        (WebCore::HIDGamepadElement::isButton):
        (WebCore::HIDGamepadElement::isAxis):
        (WebCore::HIDGamepadButton::HIDGamepadButton):
        (WebCore::HIDGamepadAxis::HIDGamepadAxis):
        (WebCore::HIDGamepad::hidDevice):

        HIDGamepadListener wraps an IOHIDManagerRef and continuously listens for changes to Gamepad-type
        devices plugged in to the system:
        * platform/mac/HIDGamepadListener.cpp: Added.
        (WebCore::deviceMatchingDictionary):
        (WebCore::deviceAddedCallback):
        (WebCore::deviceRemovedCallback):
        (WebCore::deviceValuesChangedCallback):
        (WebCore::HIDGamepadListener::shared):
        (WebCore::HIDGamepadListener::HIDGamepadListener):
        (WebCore::HIDGamepadListener::indexForNewlyConnectedDevice):
        (WebCore::HIDGamepadListener::deviceAdded):
        (WebCore::HIDGamepadListener::deviceRemoved):
        (WebCore::HIDGamepadListener::valuesChanged):
        (WebCore::HIDGamepadListener::removeGamepadForDevice):
        * platform/mac/HIDGamepadListener.h: Copied from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
        (WebCore::HIDGamepadListenerClient::~HIDGamepadListenerClient):
        (WebCore::HIDGamepadListener::setClient):
        (WebCore::HIDGamepadListener::platformGamepads):
        (WebCore::HIDGamepadListener::setShouldDispatchCallbacks):

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:

2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>

        WebProgressTracker updates progress too frequently
        https://bugs.webkit.org/show_bug.cgi?id=134185

        Reviewed by Tim Horton.

        The old code throttled the progress update to when either 100ms has passed or the delta is at least 2%
        but this was still not enough in pages that loaded in sub-seconds. The new code always throttles it at 200ms.

        * loader/ProgressTracker.cpp:
        (WebCore::ProgressTracker::ProgressTracker):
        (WebCore::ProgressTracker::incrementProgress):
        * loader/ProgressTracker.h:

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

        [iOS WK2] Fixed position elements jump around when zooming
        https://bugs.webkit.org/show_bug.cgi?id=134328
        <rdar://problem/17447048>

        Reviewed by Zalan Bujtas.

        If a given remote layer tree commit contains changes of layers for viewport-constrained
        objects, then the associated scrolling tree also needs to show that the layers changed,
        since we need to re-run the "viewport changed" logic in the UI process to get the
        layers correctly positioned for the current zoom level.
        
        The bug was that page scale changes resulted in small "pixel alignment" position
        changes which touched layers, but we didn't commit any scrolling tree changes. So
        the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
        update to adjust them for the current transient zoom.

        Fix by making use of the existing "alignment offset" field in the ViewportConstraints
        data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
        fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
        nodes were updated.

        * page/scrolling/ScrollingConstraints.h:
        (WebCore::StickyPositionViewportConstraints::operator==):
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::pixelAlignmentOffset):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::updateGeometry):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
        (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):

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

        [iOS WK2] Tweak the logic used to choose the scale at which position:fixed gets pushed out of view
        https://bugs.webkit.org/show_bug.cgi?id=134323

        Reviewed by Benjamin Poulain.

        Previously we used a fixed scale (1.2x) at which we'd start pushing position:fixed elements
        out of the viewport. This worked well on iPad, but terribly on iPhone. Instead, choose a scale
        relative to how much of the page is visible width-wise, the threshold being 2/3 of the page width.
        The width is clamped to get reasonable behavior on wide pages.

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

2014-06-25  Brady Eidson  <beidson@apple.com>

        Add new platform gamepad abstractions
        https://bugs.webkit.org/show_bug.cgi?id=134325

        Reviewed by Dean Jackson.

        No new tests (Not yet a tested config)

        - GamepadStrategy lets ports customize the 3 basic behaviors needed for a gamepad
          implementation to feed the API in WebCore.
        - GamepadStrategyClient gives arbitrary objects in WebCore the ability to register
          for callbacks with the GamepadStrategy.
        - PlatformGamepad is a platform-agnostic object that represents the data that
          feeds into the Gamepad object that is exposed to web content.

        The code in this patch is dead as-is, but https://bugs.webkit.org/show_bug.cgi?id=134324
        will contain an immediate follow-up patch that uses it.

        Makes sense to review them separately.

        * WebCore.xcodeproj/project.pbxproj:

        * platform/GamepadStrategy.h: Added.
        (WebCore::GamepadStrategy::~GamepadStrategy):

        * platform/GamepadStrategyClient.h: Added.
        (WebCore::GamepadStrategyClient::~GamepadStrategyClient):

        * platform/PlatformGamepad.h: Added.
        (WebCore::PlatformGamepad::~PlatformGamepad):
        (WebCore::PlatformGamepad::id):
        (WebCore::PlatformGamepad::lastUpdateTime):
        (WebCore::PlatformGamepad::connectTime):
        (WebCore::PlatformGamepad::PlatformGamepad):

        * platform/PlatformStrategies.h:
        (WebCore::PlatformStrategies::gamepadStrategy):
        (WebCore::PlatformStrategies::PlatformStrategies):

2014-06-25  Zalan Bujtas  <zalan@apple.com>

        Assertion failed: CGPathAddRoundedRect asserts on non-renderable rounded rectangle.
        https://bugs.webkit.org/show_bug.cgi?id=134288

        Reviewed by Simon Fraser.

        Speculative fix. This changeset attempts to address a possible mantissa overflow of radius
        when checking whether the rounded rectangle is renderable.
        We convert both the radius and the rectangle values to CGFloat(float/double) to perform
        this renderable check, instead of always using float.

        * platform/graphics/FloatRoundedRect.cpp:
        (WebCore::FloatRoundedRect::Radii::scale): Move scale(float, float) from RoundedRect to FloatRoundedRect.
        (WebCore::FloatRoundedRect::isRenderable): Add check if radius is >= 0.
        * platform/graphics/FloatRoundedRect.h:
        * platform/graphics/RoundedRect.cpp:
        (WebCore::RoundedRect::Radii::scale):
        (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): use FloatRoundeRect::Radii.
        * platform/graphics/RoundedRect.h:
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::platformAddPathForRoundedRect): use epsilon() to ensure width/height is always >= even with mantissa overflow. 

2014-06-25  Jer Noble  <jer.noble@apple.com>

        [MSE] removeCodedFrames() can remove more than it should
        https://bugs.webkit.org/show_bug.cgi?id=134320

        Reviewed by Geoff Garen.

        removeCodedFrames() can remove more samples than it should because it compares an iterator
        in presentation timespace to one in decode timespace. Clean up this code by removing frames
        in decode order. Rename variables and add comments to make explicit which timespace defines
        the iterators being used.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::removeCodedFrames):

2014-06-25  Beth Dakin  <bdakin@apple.com>

        Crash in ScrollingTree::isRubberBandInProgress()
        https://bugs.webkit.org/show_bug.cgi?id=134316
        -and corresponding-
        <rdar://problem/16247911>

        Reviewed by Geoffrey Garen.

        This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
        which moved the ScrollingNode creation code from ScrollingTree over to 
        ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
        believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
        even though the ScrollingTree was kept alive by the bind call to propagate 
        commitNewTreeState() over to the scrolling thread. The fix is to move node 
        creation back to the ScrollingTree and to use the this pointer to create new
        nodes rather than the ScrollingCoordinator's ScrollingTree pointer.

        Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
        * page/scrolling/AsyncScrollingCoordinator.h:

        Re-name createNode to createScrollingTreeNode(). 
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::updateTreeFromStateNode):
        * page/scrolling/ScrollingTree.h:

        Remove this implementation of createNode that called into the 
        ScrollingCoordinator.
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::createNode): Deleted.
        * page/scrolling/ThreadedScrollingTree.h:

        Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
        * page/scrolling/ios/ScrollingCoordinatorIOS.h:
        * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
        (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.

        Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
        * page/scrolling/ios/ScrollingTreeIOS.cpp:
        (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
        (WebCore::ScrollingTreeIOS::createNode): Deleted.
        * page/scrolling/ios/ScrollingTreeIOS.h:

        Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
        * page/scrolling/mac/ScrollingCoordinatorMac.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
        (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.

        Add the implementation of createScrollingTreeNode() for the Mac to 
        ScrollingTreeMac since it can create Mac-specific nodes.
        * page/scrolling/mac/ScrollingTreeMac.cpp:
        (ScrollingTreeMac::createScrollingTreeNode):
        * page/scrolling/mac/ScrollingTreeMac.h:

2014-06-25  Enrica Casucci  <enrica@apple.com>

        iOS build fix after http://trac.webkit.org/changeset/170447.
        Unreviewed.

        * editing/mac/TextUndoInsertionMarkup.h:

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

        Add an undo group for each dictated utterance in WebKit
        https://bugs.webkit.org/show_bug.cgi?id=134086

        Reviewed by Enrica Casucci.

        Provide a mechanism for ending the current undo group on a text insertion.
        This allows a stream of text, that is normally part of one undo group, to be
        broken up so that subsequent undo commands will only undo portions of the text stream.

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:
        * editing/mac/TextUndoInsertionMarkup.h: Added.
        * editing/mac/TextUndoInsertionMarkup.mm: Added.
        (WebCore::shouldRegisterInsertionUndoGroup):
        (WebCore::registerInsertionUndoGrouping):

2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>

        [iOS]: WK2 Inspector Node Search
        https://bugs.webkit.org/show_bug.cgi?id=134279

        Reviewed by Benjamin Poulain.

        * WebCore.exp.in:
        Export Node::inspect for WebKit2.

2014-06-25  Dana Burkart  <dburkart@apple.com>

        Add support for 5-tuple versioning.

        Reviewed by David Farler.

        * Configurations/Version.xcconfig:

2014-06-25  Jer Noble  <jer.noble@apple.com>

        [MSE][Mac] REGRESSION(r170336) - zero tolerance seeks are ignored.
        https://bugs.webkit.org/show_bug.cgi?id=134310

        Reviewed by Brent Fulgham.

        Tests for zero tolerance seeks were inadvertantly reversed in r170336.

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

2014-06-25  Jer Noble  <jer.noble@apple.com>

        [MSE][Mac] Pause playback when readyState drops below HAVE_FUTURE_DATA, and do not complete seek until it rises above HAVE_METADATA.
        https://bugs.webkit.org/show_bug.cgi?id=134306

        Reviewed by Eric Carlson.

        Pause the synchronizer before seeking, and do not resume the synchronizer until it both reports that the seek completed,
        and that the readyState rises above HAVE_METADATA. In every other location where we change the rate of the synchronizer,
        gate that rate change on the above.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Check shouldBePlaying().
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Ditto.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Unset m_seekCompleted.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Pause the synchronizer.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Check shouldBePlaying().
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying): Test m_seeking, !m_seekCompleted, and the readyState.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): Set m_seekCompleted; check shouldBePlaying() and play if appropriate.

2014-06-25  Jer Noble  <jer.noble@apple.com>

        [MSE] Update monitorSourceBuffers to match recent spec changes
        https://bugs.webkit.org/show_bug.cgi?id=134305

        Reviewed by Eric Carlson.

        In W3C bug #24347, the text for the third clause of Source Buffer Monitoring was updated. Update our
        implementation to match the new text.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::monitorSourceBuffers):

2014-06-25  Alex Christensen  <achristensen@webkit.org>
            And peavo@outlook.com  <peavo@outlook.com>

        Use references instead of pointers in RenderTheme.
        https://bugs.webkit.org/show_bug.cgi?id=134261

        Reviewed by Zalan Bujtas.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyle):
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::shouldHaveSpinButton):
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::RenderSliderThumb::updateAppearance):
        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::RenderThemeEfl::adjustSizeConstraints):
        (WebCore::RenderThemeEfl::applyEdjeRTLState):
        (WebCore::RenderThemeEfl::isControlStyled):
        (WebCore::RenderThemeEfl::paintThemePart):
        (WebCore::RenderThemeEfl::supportsFocusRing):
        (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
        (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
        (WebCore::RenderThemeEfl::adjustSliderThumbSize):
        (WebCore::RenderThemeEfl::adjustCheckboxStyle):
        (WebCore::RenderThemeEfl::adjustRadioStyle):
        (WebCore::RenderThemeEfl::adjustButtonStyle):
        (WebCore::RenderThemeEfl::adjustMenuListStyle):
        (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
        (WebCore::RenderThemeEfl::adjustTextFieldStyle):
        (WebCore::RenderThemeEfl::adjustTextAreaStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
        (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
        (WebCore::RenderThemeEfl::adjustProgressBarStyle):
        (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
        (WebCore::RenderThemeEfl::animationDurationForProgressBar):
        * platform/efl/RenderThemeEfl.h:
        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::supportsFocusRing):
        (WebCore::RenderThemeGtk::adjustButtonStyle):
        (WebCore::RenderThemeGtk::adjustMenuListStyle):
        (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
        (WebCore::adjustSearchFieldIconStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
        (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
        (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
        (WebCore::borderRadiiFromStyle):
        (WebCore::RenderThemeGtk::paintMediaSliderTrack):
        (WebCore::RenderThemeGtk::paintMediaSliderThumb):
        (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
        (WebCore::RenderThemeGtk::adjustProgressBarStyle):
        (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
        (WebCore::RenderThemeGtk::animationDurationForProgressBar):
        (WebCore::RenderThemeGtk::calculateProgressRect):
        * platform/gtk/RenderThemeGtk.h:
        * platform/gtk/RenderThemeGtk2.cpp:
        (WebCore::setToggleSize):
        (WebCore::RenderThemeGtk::setCheckboxSize):
        (WebCore::RenderThemeGtk::setRadioSize):
        (WebCore::RenderThemeGtk::comboBoxArrowSize):
        (WebCore::RenderThemeGtk::getComboBoxPadding):
        (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
        (WebCore::RenderThemeGtk::popupInternalPaddingRight):
        (WebCore::RenderThemeGtk::popupInternalPaddingTop):
        (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
        (WebCore::RenderThemeGtk::paintMenuList):
        (WebCore::RenderThemeGtk::adjustSliderThumbSize):
        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
        * platform/gtk/RenderThemeGtk3.cpp:
        (WebCore::setToggleSize):
        (WebCore::RenderThemeGtk::setCheckboxSize):
        (WebCore::RenderThemeGtk::setRadioSize):
        (WebCore::getComboBoxMetrics):
        (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
        (WebCore::RenderThemeGtk::popupInternalPaddingRight):
        (WebCore::RenderThemeGtk::popupInternalPaddingTop):
        (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
        (WebCore::RenderThemeGtk::adjustSliderThumbSize):
        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
        * rendering/RenderButton.cpp:
        (WebCore::RenderButton::layout):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::paintOutline):
        * rendering/RenderMediaControls.cpp:
        (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
        * rendering/RenderMediaControls.h:
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::adjustInnerStyle):
        (RenderMenuList::computeIntrinsicLogicalWidths):
        (RenderMenuList::menuStyle):
        * rendering/RenderMeter.cpp:
        (WebCore::RenderMeter::updateLogicalWidth):
        (WebCore::RenderMeter::computeLogicalHeight):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::paintOutline):
        * rendering/RenderProgress.cpp:
        (WebCore::RenderProgress::updateAnimationState):
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::layout):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle):
        (WebCore::RenderTheme::isControlStyled):
        (WebCore::RenderTheme::supportsFocusRing):
        (WebCore::RenderTheme::stateChanged):
        (WebCore::RenderTheme::adjustCheckboxStyle):
        (WebCore::RenderTheme::adjustRadioStyle):
        (WebCore::RenderTheme::adjustButtonStyle):
        (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
        (WebCore::RenderTheme::adjustTextFieldStyle):
        (WebCore::RenderTheme::adjustTextAreaStyle):
        (WebCore::RenderTheme::adjustMenuListStyle):
        (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
        (WebCore::RenderTheme::adjustMeterStyle):
        (WebCore::RenderTheme::meterSizeForBounds):
        (WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
        (WebCore::RenderTheme::animationDurationForProgressBar):
        (WebCore::RenderTheme::adjustProgressBarStyle):
        (WebCore::RenderTheme::shouldHaveSpinButton):
        (WebCore::RenderTheme::adjustMediaControlStyle):
        (WebCore::RenderTheme::adjustSliderTrackStyle):
        (WebCore::RenderTheme::adjustSliderThumbStyle):
        (WebCore::RenderTheme::adjustSliderThumbSize):
        (WebCore::RenderTheme::adjustSearchFieldStyle):
        (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
        * rendering/RenderTheme.h:
        (WebCore::RenderTheme::supportsHover):
        (WebCore::RenderTheme::minimumMenuListSize):
        (WebCore::RenderTheme::popupInternalPaddingLeft):
        (WebCore::RenderTheme::popupInternalPaddingRight):
        (WebCore::RenderTheme::popupInternalPaddingTop):
        (WebCore::RenderTheme::popupInternalPaddingBottom):
        (WebCore::RenderTheme::popupMenuSize):
        (WebCore::RenderTheme::setCheckboxSize):
        (WebCore::RenderTheme::setRadioSize):
        (WebCore::RenderTheme::setButtonSize):
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::adjustCheckboxStyle):
        (WebCore::RenderThemeIOS::isControlStyled):
        (WebCore::RenderThemeIOS::adjustRadioStyle):
        (WebCore::RenderThemeIOS::popupInternalPaddingRight):
        (WebCore::RenderThemeIOS::adjustRoundBorderRadius):
        (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
        (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
        (WebCore::RenderThemeIOS::adjustSliderThumbSize):
        (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
        (WebCore::RenderThemeIOS::animationDurationForProgressBar):
        (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
        (WebCore::RenderThemeIOS::adjustButtonStyle):
        (WebCore::RenderThemeIOS::setButtonSize):
        (WebCore::RenderThemeIOS::shouldHaveSpinButton):
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::isControlStyled):
        (WebCore::RenderThemeMac::controlSizeForFont):
        (WebCore::RenderThemeMac::sizeForFont):
        (WebCore::RenderThemeMac::sizeForSystemFont):
        (WebCore::RenderThemeMac::setSizeFromFont):
        (WebCore::RenderThemeMac::setFontFromControlSize):
        (WebCore::RenderThemeMac::controlSizeForSystemFont):
        (WebCore::RenderThemeMac::adjustTextFieldStyle):
        (WebCore::RenderThemeMac::adjustTextAreaStyle):
        (WebCore::RenderThemeMac::paintMenuList):
        (WebCore::RenderThemeMac::meterSizeForBounds):
        (WebCore::RenderThemeMac::paintMeter):
        (WebCore::RenderThemeMac::levelIndicatorFor):
        (WebCore::RenderThemeMac::progressBarRectForBounds):
        (WebCore::RenderThemeMac::minimumProgressBarHeight):
        (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
        (WebCore::RenderThemeMac::animationDurationForProgressBar):
        (WebCore::RenderThemeMac::adjustProgressBarStyle):
        (WebCore::RenderThemeMac::paintProgressBar):
        (WebCore::RenderThemeMac::adjustMenuListStyle):
        (WebCore::RenderThemeMac::popupInternalPaddingLeft):
        (WebCore::RenderThemeMac::popupInternalPaddingRight):
        (WebCore::RenderThemeMac::popupInternalPaddingTop):
        (WebCore::RenderThemeMac::popupInternalPaddingBottom):
        (WebCore::RenderThemeMac::popupMenuSize):
        (WebCore::RenderThemeMac::minimumMenuListSize):
        (WebCore::RenderThemeMac::adjustSliderTrackStyle):
        (WebCore::RenderThemeMac::adjustSliderThumbStyle):
        (WebCore::RenderThemeMac::setSearchCellState):
        (WebCore::RenderThemeMac::setSearchFieldSize):
        (WebCore::RenderThemeMac::adjustSearchFieldStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeMac::adjustSliderThumbSize):
        * rendering/RenderThemeSafari.cpp:
        (WebCore::RenderThemeSafari::isControlStyled):
        (WebCore::RenderThemeSafari::adjustRepaintRect):
        (WebCore::RenderThemeSafari::baselinePosition):
        (WebCore::RenderThemeSafari::controlSizeForFont):
        (WebCore::RenderThemeSafari::sizeForFont):
        (WebCore::RenderThemeSafari::sizeForSystemFont):
        (WebCore::RenderThemeSafari::setSizeFromFont):
        (WebCore::RenderThemeSafari::setFontFromControlSize):
        (WebCore::RenderThemeSafari::controlSizeForSystemFont):
        (WebCore::RenderThemeSafari::paintCheckbox):
        (WebCore::RenderThemeSafari::setCheckboxSize):
        (WebCore::RenderThemeSafari::paintRadio):
        (WebCore::RenderThemeSafari::setRadioSize):
        (WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
        (WebCore::RenderThemeSafari::adjustButtonStyle):
        (WebCore::RenderThemeSafari::setButtonSize):
        (WebCore::RenderThemeSafari::adjustTextFieldStyle):
        (WebCore::RenderThemeSafari::adjustTextAreaStyle):
        (WebCore::RenderThemeSafari::paintMenuList):
        (WebCore::RenderThemeSafari::adjustMenuListStyle):
        (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
        (WebCore::RenderThemeSafari::popupInternalPaddingRight):
        (WebCore::RenderThemeSafari::popupInternalPaddingTop):
        (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
        (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
        (WebCore::RenderThemeSafari::minimumMenuListSize):
        (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
        (WebCore::RenderThemeSafari::adjustSliderThumbSize):
        (WebCore::RenderThemeSafari::setSearchFieldSize):
        (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeSafari::adjustMeterStyle):
        (WebCore::RenderThemeSafari::meterSizeForBounds):
        (WebCore::RenderThemeSafari::paintMeter):
        * rendering/RenderThemeSafari.h:
        * rendering/RenderThemeWin.cpp:
        (WebCore::RenderThemeWin::supportsHover):
        (WebCore::RenderThemeWin::supportsFocusRing):
        (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
        (WebCore::RenderThemeWin::setCheckboxSize):
        (WebCore::RenderThemeWin::paintTextField):
        (WebCore::RenderThemeWin::paintMenuList):
        (WebCore::RenderThemeWin::adjustMenuListStyle):
        (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
        (WebCore::RenderThemeWin::adjustSliderThumbSize):
        (WebCore::RenderThemeWin::adjustSearchFieldStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
        (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
        (WebCore::RenderThemeWin::adjustMeterStyle):
        (WebCore::RenderThemeWin::meterSizeForBounds):
        (WebCore::RenderThemeWin::paintMeter):
        * rendering/RenderThemeWin.h:
        (WebCore::RenderThemeWin::paintCheckbox):
        (WebCore::RenderThemeWin::paintRadio):
        (WebCore::RenderThemeWin::setRadioSize):
        (WebCore::RenderThemeWin::paintTextArea):
        (WebCore::RenderThemeWin::popupOptionSupportsTextIndent):
        (WebCore::RenderThemeWin::paintSearchFieldDecorationPart):
        (WebCore::RenderThemeWin::adjustButtonStyle):
        (WebCore::RenderThemeWin::adjustTextFieldStyle):
        (WebCore::RenderThemeWin::adjustTextAreaStyle):
        (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):

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

        [Mac] Update the time base of event's timestamp when the system time changes
        https://bugs.webkit.org/show_bug.cgi?id=134293

        Reviewed by Anders Carlsson.

        * platform/mac/PlatformEventFactoryMac.mm:
        (WebCore::cachedStartupTimeIntervalSince1970): Since events timestamps are absolute time, they also
        need to be updated if the system clock changes.

2014-06-25  Dirk Schulze  <krit@webkit.org>

        Add all blend modes to feBlend

        feBlend should support all blend modes from CSS and Canvas
        https://bugs.webkit.org/show_bug.cgi?id=134296

        Reviewed by Dean Jackson.

        Add all blend modes to <feBlend> (the SVG filter primitive) that are also
        supported by HTML Canvas and CSS.

        In addition, add "normal" blend mode to HTML Canvas as requested by the
        CSS Compositing and Blending specification. (Referenced from HTML Canvas.)
        With this change, SVG, CSS and Canvas truly share the same blend modes and
        even the same keywords. This is much easier to for web authors.

        http://www.w3.org/TR/2014/CR-compositing-1-20140220/#ltblendmodegt

        Test: svg/filters/feBlend-all-blendmodes.svg

        * platform/graphics/GraphicsTypes.cpp: Reorder blend mode text streams to match
            enumeration order. Add a new function to parse blend modes independent of
            compositing modes. Add a string "normal" that is supported by CSS, feBlend and
            HTML Canvas now.
        (WebCore::parseBlendMode):
        (WebCore::parseCompositeAndBlendOperator):
        * platform/graphics/GraphicsTypes.h: Reorder BlendMode enumeration values to match
         the SVG JS enumeration for blend modes.
        * platform/graphics/cpu/arm/filters/FEBlendNEON.h: Move all software code that is no
            longer required by the software path but still used by NEON here.
        (WebCore::FEBlend::platformApplySoftware):
        (WebCore::FEBlend::platformApplyNEON):
        * platform/graphics/filters/FEBlend.cpp:
            Use drawImageBuffer() to blend the results of previous filter primitives. This
            allows removing more than 60% of the code.
        (WebCore::FEBlend::FEBlend):
        (WebCore::FEBlend::create):
        (WebCore::FEBlend::blendMode):
        (WebCore::FEBlend::setBlendMode):
        (WebCore::FEBlend::platformApplySoftware):
        (WebCore::FEBlend::dump):
        (WebCore::FEBlend::externalRepresentation):
        (WebCore::feBlendNormal): Deleted.
        (WebCore::feBlendMultiply): Deleted.
        (WebCore::feBlendScreen): Deleted.
        (WebCore::feBlendDarken): Deleted.
        (WebCore::feBlendLighten): Deleted.
        (WebCore::feBlendUnknown): Deleted.
        (WebCore::platformApply): Deleted.
        (WebCore::FEBlend::platformApplyGeneric): Deleted.
        (WebCore::operator<<): Deleted.
        * platform/graphics/filters/FEBlend.h:
        * svg/SVGAnimatedEnumeration.cpp: Use the global BlendMode enumeration.
        (WebCore::enumerationValueForTargetAttribute):
        * svg/SVGFEBlendElement.cpp:
        (WebCore::SVGFEBlendElement::SVGFEBlendElement): Use the global BlendMode enumeration.
            No new enumeration values added or exposed to SVG DOM as requested by SVG WG.
        (WebCore::SVGFEBlendElement::parseAttribute):
        * svg/SVGFEBlendElement.h: Replace BlendModeType with global BlendMode enumeration. Remove
            blend mode parsing code and use the code in GraphicsTypes instead.
        (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
        (WebCore::SVGPropertyTraits<BlendMode>::toString):
        (WebCore::SVGPropertyTraits<BlendModeType>::highestEnumValue): Deleted.
        (WebCore::SVGPropertyTraits<BlendModeType>::toString): Deleted.
        (WebCore::SVGPropertyTraits<BlendModeType>::fromString): Deleted.

2014-06-25  Zalan Bujtas  <zalan@apple.com>

        Unreviewed iOS build fix after r170425.

        * accessibility/AccessibilityProgressIndicator.cpp:
        * accessibility/AccessibilityProgressIndicator.h:

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

        AX: Crash at com.apple.WebCore: WebCore::AlternativeTextController::removeDictationAlternativesForMarker + 43
        https://bugs.webkit.org/show_bug.cgi?id=134226

        Reviewed by Enrica Casucci.

        Unchecked access of details pointer in the Document marker led to the crash.
        It seems erroneous to allow creation of a DocumentMarker without details when one is expected, because it
        carries the dictation context (not just the description).
        Also, add in ASSERTs to catch scenarios where a nullptr might be passed in.

        Test: platform/mac/editing/input/crash-for-empty-text-alternative.html

        * dom/DocumentMarker.cpp:
        (WebCore::DocumentMarker::DocumentMarker):
        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::removeDictationAlternativesForMarker):

2014-06-25  Laszlo Gombos  <l.gombos@samsung.com>

        Remove build guard for progress element
        https://bugs.webkit.org/show_bug.cgi?id=134292

        Reviewed by Benjamin Poulain.

        The build flag is no longer needed as it is always on.

        No new tests as there is no new behaviour.

        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.make:
        * accessibility/AXObjectCache.cpp:
        (WebCore::createFromRenderer):
        * accessibility/AccessibilityProgressIndicator.cpp:
        (WebCore::AccessibilityProgressIndicator::create):
        (WebCore::AccessibilityProgressIndicator::valueForRange):
        (WebCore::AccessibilityProgressIndicator::maxValueForRange):
        (WebCore::AccessibilityProgressIndicator::minValueForRange):
        (WebCore::AccessibilityProgressIndicator::progressElement):
        * accessibility/AccessibilityProgressIndicator.h:
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
        * css/html.css:
        (progress::-webkit-progress-value):
        * html/HTMLProgressElement.cpp:
        * html/HTMLProgressElement.h:
        * html/HTMLProgressElement.idl:
        * html/HTMLTagNames.in:
        * html/shadow/ProgressShadowElement.cpp:
        * html/shadow/ProgressShadowElement.h:
        * platform/efl/DefaultTheme/CMakeLists.txt:
        * platform/efl/DefaultTheme/default.edc:
        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::toEdjeGroup):
        (WebCore::RenderThemeEfl::applyEdjeRTLState):
        (WebCore::RenderThemeEfl::paintProgressBar):
        * platform/efl/RenderThemeEfl.h:
        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::calculateProgressRect):
        * platform/gtk/RenderThemeGtk.h:
        * platform/gtk/RenderThemeGtk2.cpp:
        (WebCore::RenderThemeGtk::paintProgressBar):
        * platform/gtk/RenderThemeGtk3.cpp:
        (WebCore::RenderThemeGtk::paintProgressBar):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::isSnapshottedPlugIn):
        (WebCore::RenderObject::isProgress):
        * rendering/RenderProgress.cpp:
        * rendering/RenderProgress.h:
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle):
        (WebCore::RenderTheme::paint):
        (WebCore::RenderTheme::paintBorderOnly):
        (WebCore::RenderTheme::paintDecorations):
        (WebCore::RenderTheme::progressBarRectForBounds):
        * rendering/RenderTheme.h:
        (WebCore::RenderTheme::paintProgressBar):
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::paintProgressBar):
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintProgressBar):

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

        Unreviewed. Update GObject DOM bindings test results after r170422.

        * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
        (WebKit::wrapTestActiveDOMObject):
        * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
        (WebKit::wrapTestCallback):
        * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
        (WebKit::wrapTestCustomNamedGetter):
        * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
        (WebKit::wrapTestEventConstructor):
        * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
        (WebKit::wrapTestEventTarget):
        * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
        (WebKit::wrapTestException):
        * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
        (WebKit::wrapTestGenerateIsReachable):
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
        (WebKit::wrapTestInterface):
        * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
        (WebKit::wrapTestMediaQueryListListener):
        * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
        (WebKit::wrapTestNamedConstructor):
        * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
        (WebKit::wrapTestNode):
        * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
        (WebKit::wrapTestNondeterministic):
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
        (WebKit::wrapTestObj):
        * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
        (WebKit::wrapTestOverloadedConstructors):
        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
        (WebKit::wrapTestSerializedScriptValueInterface):
        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
        (WebKit::wrapTestTypedefs):
        * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
        (WebKit::wrapattribute):
        * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
        (WebKit::wrapreadonly):

2014-06-24  Tomas Popela  <tpopela@redhat.com>

        [GTK] Some of DOM bindings macros are misnamed
        https://bugs.webkit.org/show_bug.cgi?id=121543

        Reviewed by Carlos Garcia Campos.

        As we are using WebKitDOM as a namespace we should unify all type macros
        to have WEBKIT_DOM_TYPE prefix instead of WEBKIT_TYPE_DOM. Also add
        more exceptions to decamelize function in GObject bindings generator
        to fix the names of bindings for BR, HR, UL, OL, DL and LI elements.

        * bindings/gobject/GObjectEventListener.cpp:
        (WebCore::GObjectEventListener::handleEvent):
        * bindings/gobject/WebKitDOMEventTarget.h:
        * bindings/gobject/WebKitDOMNodeFilter.h:
        * bindings/gobject/WebKitDOMObject.h:
        * bindings/gobject/webkitdom.symbols:
        * bindings/scripts/CodeGeneratorGObject.pm:
        (decamelize):
        (GetParentGObjType):
        (GenerateProperty):
        (GenerateHeader):
        (GenerateCFile):
        (GenerateEventTargetIface):
        * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
        (WebKit::wrapFloat64Array):
        * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
        * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
        (WebKit::wrapTestActiveDOMObject):
        * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
        * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
        (WebKit::wrapTestCallback):
        * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
        * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
        (WebKit::wrapTestCustomNamedGetter):
        * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
        * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
        (WebKit::wrapTestEventConstructor):
        * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
        * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
        (WebKit::wrapTestEventTarget):
        * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
        * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
        (WebKit::wrapTestException):
        * bindings/scripts/test/GObject/WebKitDOMTestException.h:
        * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
        (WebKit::wrapTestGenerateIsReachable):
        * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
        (WebKit::wrapTestInterface):
        (webkit_dom_test_interface_class_init):
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
        * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
        (WebKit::wrapTestMediaQueryListListener):
        * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
        * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
        (WebKit::wrapTestNamedConstructor):
        * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
        * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
        (WebKit::wrapTestNode):
        * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
        * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
        (WebKit::wrapTestNondeterministic):
        * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
        (WebKit::wrapTestObj):
        (webkit_dom_test_obj_class_init):
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
        * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
        (WebKit::wrapTestOverloadedConstructors):
        * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
        (WebKit::wrapTestSerializedScriptValueInterface):
        (webkit_dom_test_serialized_script_value_interface_class_init):
        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
        (WebKit::wrapTestTypedefs):
        (webkit_dom_test_typedefs_class_init):
        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
        * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
        (WebKit::wrapattribute):
        * bindings/scripts/test/GObject/WebKitDOMattribute.h:
        * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
        (WebKit::wrapreadonly):
        * bindings/scripts/test/GObject/WebKitDOMreadonly.h:

2014-06-24  Commit Queue  <commit-queue@webkit.org>

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

        the patch added a test that fails on almost every Mac tester
        (Requested by rniwa on #webkit).

        Reverted changeset:

        "Tiles on bottom of screen are not always allocated when
        necessary"
        https://bugs.webkit.org/show_bug.cgi?id=134272
        http://trac.webkit.org/changeset/170414

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

        Tiles on bottom of screen are not always allocated when necessary
        https://bugs.webkit.org/show_bug.cgi?id=134272

        Reviewed by Simon Fraser.

        The initial visibleRect is in the coordinate of the root layer, so its origin
        is at the top left of the view. The initial rect we were using doesn't
        include the contents inset, so it was too short, which was causing tiles near
        the bottom of the screen to not always be allocated if the tile threshold was
        close to the bottom of the view. Instead, we want to include the contents
        inset size so the visible rect includes the entire view.
        GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
        the visible rect into the tiled layer's coordinate system, at which point it
        is used for visible tile logic.

        Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html

        * platform/graphics/ca/TileCoverageMap.cpp:
        (WebCore::TileCoverageMap::update):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):

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

        InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
        https://bugs.webkit.org/show_bug.cgi?id=134173

        Reviewed by Daniel Bates.

        After Zalan's talks with Kling, it seems that the simple line layout code
        might alleviate the need for the space savings in InlineTextBox. Given this,
        it would be beneficial to be a little more safe by using unsigneds throughout.

        For example, we have code like "void setLen(unsigned len) { m_len = len; }"
        which might silently break if given particular inputs.

        No new tests because there is no behavior change.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::isSelected):
        (WebCore::InlineTextBox::localSelectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::selectionStartEnd):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintCompositionBackground):
        (WebCore::InlineTextBox::paintDocumentMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::computeRectForReplacementMarker):
        * rendering/InlineTextBox.h:
        (WebCore::InlineTextBox::truncation):
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::ellipsisRectForBox):

2014-06-24  Ryosuke Niwa  <rniwa@webkit.org>

        Speculative 32-bit Mac build fix after r170402.

        * platform/graphics/mac/ComplexTextController.cpp:
        (WebCore::advanceByCombiningCharacterSequence):

2014-06-24  Joseph Pecoraro  <pecoraro@apple.com>

        [iOS]: WK2 Inspector Node Highlighting
        https://bugs.webkit.org/show_bug.cgi?id=134257

        Reviewed by Timothy Hatcher.

        Some clients want to get highlights with the scroll applied,
        others do not. Provide a CoordinateSpace param to be used for
        getting a highlight (only used on iOS).

        * WebCore.exp.in:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::getHighlight):
        * inspector/InspectorController.h:
        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::getHighlight):
        (WebCore::buildObjectForRendererFragments):
        * inspector/InspectorOverlay.h:
        (WebCore::Highlight::Highlight):
        * testing/Internals.cpp:
        (WebCore::Internals::inspectorHighlightRects):

2014-06-24  Jer Noble  <jer.noble@apple.com>

        [MSE][Mac] Uncaught exception when deallocating AVSampleBufferDisplayLayer
        https://bugs.webkit.org/show_bug.cgi?id=134281

        Reviewed by Brent Fulgham.

        AVSampleBufferDisplayLayer is throwing an exception from its -dealloc method because KVO observers exist
        at the time of dealloc. Remove the observer for outputObscuredDueToInsufficientExternalProtection inside
        -stopObservingLayer.

        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (-[WebAVSampleBufferErrorListener stopObservingLayer:]):

2014-06-24  Mark Rowe  <mrowe@apple.com>

        WKContextHistoryClient::didNavigateWithNavigationData is passed incorrect URL when history.pushState is used
        <https://webkit.org/b/134271> / <rdar://problem/16270167>

        Reviewed by Brady Eidson.

        Tests: http/tests/globalhistory/history-delegate-pushstate.html
               http/tests/globalhistory/history-delegate-replacestate.html

        * page/History.cpp:
        (WebCore::History::stateObjectAdded): Call HistoryController after updating the document's URL so that the
        URL will reflect the destination of the navigation when FrameLoaderClient::updateGlobalHistory is called.

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

        advanceByCombiningCharacterSequence() can be simplified
        https://bugs.webkit.org/show_bug.cgi?id=133591

        Reviewed by Dean Jackson.

        Use U16_NEXT() because it already does what we're trying to do.

        No new tests because there is no behavior change.

        * platform/graphics/mac/ComplexTextController.cpp:
        (WebCore::advanceByCombiningCharacterSequence):

2014-06-24  Brady Eidson  <beidson@apple.com>

        Enable GAMEPAD in the Mac build, but disabled at runtime.
        https://bugs.webkit.org/show_bug.cgi?id=134255

        Reviewed by Dean Jackson.

        No new tests (No changes to a tested config).

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation): Add the ability to have a function be EnabledAtRuntime by
          removing such functions from the prototype if they are disabled.

        Change the three new objects and the one new function to be EnabledAtRuntime
        * Modules/gamepad/Gamepad.idl:
        * Modules/gamepad/GamepadButton.idl:
        * Modules/gamepad/GamepadEvent.idl:
        * Modules/gamepad/NavigatorGamepad.idl:

        Add a RuntimeEnabledFeature for Gamepads:
        * bindings/generic/RuntimeEnabledFeatures.cpp:
        (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
        * bindings/generic/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
        (WebCore::RuntimeEnabledFeatures::gamepadsEnabled):

        * Configurations/FeatureDefines.xcconfig:

2014-06-24  Yusuke Suzuki  <utatane.tea@gmail.com>

        CSS JIT: Add positionInRootFragments to SelectorFragment
        https://bugs.webkit.org/show_bug.cgi?id=133609

        Reviewed by Benjamin Poulain.

        Some non-backtrack-related predicates use relationToRightFragment information
        to decide whether checkingContext->elementStyle should be refered.
        To make it works correctly, add the positionInRootFragments field to SelectorFragment.
        When positionInRootFragments == Rightmost and relationToRightFragment == Rightmost,
        we should see checkingContext->elementStyle.

        Test: fast/selectors/first-child-update-with-renderer.html

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext):
        (WebCore::SelectorCompiler::addPseudoClassType):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
        (WebCore::SelectorCompiler::constructFragments):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):

2014-06-24  Jer Noble  <jer.noble@apple.com>

        [Fullscreen][Mac] WKView is not firstResponder after entering fullscreen mode
        https://bugs.webkit.org/show_bug.cgi?id=134270

        Reviewed by Jon Honeycutt.

        The WebCoreFullScreenWindow's firstResponder is reset when the full screen animation completes and
        the window's style is changed to a fullscreen style. Save the firstResponder, and if it's still in
        the window's view hierarchy after the style changes, reset it to the firstResponder.

        * platform/mac/WebCoreFullScreenWindow.mm:
        (-[WebCoreFullScreenWindow setStyleMask:]):

2014-06-24  Jer Noble  <jer.noble@apple.com>

        [MSE][Mac] Pass AVSampleBufferDisplayLayer HDCP status through to EME
        https://bugs.webkit.org/show_bug.cgi?id=134221

        Reviewed by Eric Carlson.

        Pass the outputObscuredDueToInsufficientExternalProtection property of AVSampleBufferDisplayLayer
        as an error to the associated MediaKeySession object.

        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (-[WebAVSampleBufferErrorListener invalidate]):
        (-[WebAVSampleBufferErrorListener beginObservingLayer:]):
        (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):

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

        Use unsigneds instead of ints for indexes into a string in text layout code
        https://bugs.webkit.org/show_bug.cgi?id=133592

        Reviewed by Zalan Bujtas.

        Migrate much of the text-handling code to use unsigneds for indexes into a string.

        No new tests because there is no behavior change.

        * WebCore.exp.in:
        * platform/graphics/Font.cpp:
        (WebCore::Font::drawText):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForText):
        (WebCore::computeUnderlineType):
        * platform/graphics/Font.h:
        * platform/graphics/FontFastPath.cpp:
        (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
        (WebCore::Font::drawSimpleText):
        (WebCore::Font::drawEmphasisMarksForSimpleText):
        (WebCore::Font::drawGlyphBuffer):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForSimpleText):
        * platform/graphics/GlyphBuffer.h:
        (WebCore::GlyphBuffer::size):
        (WebCore::GlyphBuffer::glyphs):
        (WebCore::GlyphBuffer::advances):
        (WebCore::GlyphBuffer::fontDataAt):
        (WebCore::GlyphBuffer::advanceAt):
        (WebCore::GlyphBuffer::offsetAt):
        (WebCore::GlyphBuffer::reverse):
        (WebCore::GlyphBuffer::offsetInString):
        (WebCore::GlyphBuffer::swap):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::TextRunIterator::atEnd):
        * platform/graphics/Latin1TextIterator.h:
        (WebCore::Latin1TextIterator::Latin1TextIterator):
        (WebCore::Latin1TextIterator::currentCharacter):
        * platform/graphics/SimpleFontData.h:
        * platform/graphics/SurrogatePairAwareTextIterator.cpp:
        (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
        * platform/graphics/SurrogatePairAwareTextIterator.h:
        (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
        * platform/graphics/TextRun.h:
        (WebCore::TextRun::length):
        (WebCore::TextRun::charactersLength):
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::glyphDataForCharacter):
        (WebCore::applyFontTransforms):
        (WebCore::WidthIterator::advanceInternal):
        (WebCore::WidthIterator::advance):
        (WebCore::WidthIterator::advanceOneCharacter):
        * platform/graphics/WidthIterator.h:
        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::adjustSelectionRectForComplexText):
        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
        (WebCore::HarfBuzzShaper::setNormalizedBuffer):
        * platform/graphics/mac/FontComplexTextMac.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontCGWin.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontWin.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/wince/FontWinCE.cpp:
        (WebCore::Font::drawGlyphs):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::selectionRectForComplexText):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::isSelected):
        (WebCore::InlineTextBox::selectionState):
        (WebCore::adjustCharactersAndLengthForHyphen):
        (WebCore::InlineTextBox::localSelectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::selectionStartEnd):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintCompositionBackground):
        (WebCore::InlineTextBox::paintDocumentMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::computeRectForReplacementMarker):
        (WebCore::InlineTextBox::paintCompositionUnderline):
        (WebCore::InlineTextBox::positionForOffset):
        (WebCore::InlineTextBox::constructTextRun):
        * rendering/InlineTextBox.h:
        * rendering/RenderCombineText.cpp:
        (WebCore::RenderCombineText::getStringToRender):
        * rendering/RenderCombineText.h:
        * rendering/svg/SVGInlineFlowBox.cpp:
        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::positionForOffset):
        (WebCore::SVGInlineTextBox::localSelectionRect):
        (WebCore::SVGInlineTextBox::paintSelectionBackground):
        (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGInlineTextBox::paintText):
        * rendering/svg/SVGInlineTextBox.h:
        * rendering/svg/SVGTextMetricsBuilder.cpp:
        (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
        (WebCore::SVGTextMetricsBuilder::advance):
        * rendering/svg/SVGTextQuery.cpp:
        (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
        (WebCore::SVGTextQuery::subStringLengthCallback):
        (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::rotationOfCharacterCallback):
        (WebCore::SVGTextQuery::extentOfCharacterCallback):
        (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
        * rendering/svg/SVGTextQuery.h:
        * rendering/svg/SVGTextRunRenderingContext.cpp:
        (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
        (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
        * rendering/svg/SVGTextRunRenderingContext.h:
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontData.h:

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

        Unreviewed build fix.

        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Cast variadic argument to int.

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

        [Win] MSVC mishandles enums in bitfields
        https://bugs.webkit.org/show_bug.cgi?id=134237

        Reviewed by Michael Saboff.

        Replace uses of enum types in bit fields with unsigned to
        avoid losing a bit to hold the sign value. This can result
        in Windows interpreting the value of the field improperly.

        * loader/ResourceLoaderOptions.h:
        * platform/network/ResourceRequestBase.h:
        * platform/network/cf/ResourceResponse.h:
        * rendering/RenderLayer.h:
        * rendering/RenderMarquee.h:

2014-06-24  Antti Koivisto  <antti@apple.com>

        Try to fix build.

        * WebCore.exp.in: Remove duplicate export, this should be in the iOS section only.

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

        [Mac] process raw VTT in-band captions
        https://bugs.webkit.org/show_bug.cgi?id=134178

        Reviewed by Jer Noble.

        * CMakeLists.txt: Add ISOVTTCue.cpp|h.
        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * html/track/BufferedLineReader.h:
        (WebCore::BufferedLineReader::reset): New, empty the input buffer.

        Make it possible to process WebVTT captions. 
        * html/track/InbandGenericTextTrack.cpp:
        (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
        (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
        (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
        (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
        (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
        (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
        * html/track/InbandGenericTextTrack.h:

        * html/track/InbandTextTrack.h:

        * html/track/InbandWebVTTTextTrack.cpp:
        (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
        (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
            object.
        (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
        (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
        (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
        * html/track/InbandWebVTTTextTrack.h:

        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
            from a pointer to a reference.
        (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.

        * html/track/VTTCue.cpp:
        (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
        (WebCore::VTTCueBox::VTTCueBox): Ditto.
        (WebCore::VTTCueBox::getCue): Return a reference.
        (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
        (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
        (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
        (WebCore::VTTCue::initialize): New, shared constructor initialization.
        (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
        (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
        (WebCore::VTTCue::setCueSettings): Ditto.
        * html/track/VTTCue.h:
        (WebCore::VTTCueBox::create): Deleted.
        (WebCore::VTTCue::create): Deleted.

        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
            call the parser.
        (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
        (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
        (WebCore::WebVTTParser::collectTimeStamp): Ditto.
        * html/track/WebVTTParser.h:
        (WebCore::WebVTTCueData::originalStartTime): New.
        (WebCore::WebVTTCueData::setOriginalStartTime): New.
        (WebCore::WebVTTCueData::WebVTTCueData):

        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.

        Parse ISO WebVTT cue boxes.
        * platform/graphics/ISOVTTCue.cpp: Added.
        (WebCore::ISOBox::ISOBox):
        (WebCore::ISOBox::peekType):
        (WebCore::ISOBox::peekLength):
        (WebCore::ISOBox::peekString):
        (WebCore::vttCueBoxType):
        (WebCore::vttIdBoxType):
        (WebCore::vttSettingsBoxType):
        (WebCore::vttPayloadBoxType):
        (WebCore::vttCurrentTimeBoxType):
        (WebCore::vttCueSourceIDBoxType):
        (WebCore::ISOWebVTTCue::boxType):
        (WebCore::ISOWebVTTCue::ISOWebVTTCue):
        * platform/graphics/ISOVTTCue.h: Added.
        (WebCore::ISOBox::boxHeaderSize):
        (WebCore::ISOBox::length):
        (WebCore::ISOBox::type):
        (WebCore::ISOWebVTTCue::presentationTime):
        (WebCore::ISOWebVTTCue::duration):
        (WebCore::ISOWebVTTCue::sourceID):
        (WebCore::ISOWebVTTCue::id):
        (WebCore::ISOWebVTTCue::originalStartTime):
        (WebCore::ISOWebVTTCue::settings):
        (WebCore::ISOWebVTTCue::cueText):

        * platform/graphics/InbandTextTrackPrivateClient.h:
        (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.

        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
        (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
        (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
        (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
            CMSampleBuffers, create ISOWebVTTCue from the sample data.
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:

        * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
        (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
        * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
        (WebCore::InbandTextTrackPrivateAVCF::create):
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
        (WebCore::LegibleOutputData::LegibleOutputData):
        (WebCore::AVFWrapper::processCue):
        (WebCore::AVFWrapper::legibleOutputCallback):

        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
        (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.

        * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
        (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
            format to base class.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
            options until we have tracks.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
            attributed strings to track.
        (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
        * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
        (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):

        * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
        (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):

2014-06-24  Antti Koivisto  <antti@apple.com>

        Only flush layers when the exposed rect actually changes
        https://bugs.webkit.org/show_bug.cgi?id=134248

        Reviewed by Anders Carlsson.

        * WebCore.exp.in:

2014-06-24  Brady Eidson  <beidson@apple.com>

        Remove references to "Shader.h" which doesn't currently exist in the project.

        Rubberstamped by Andreas Kling.

        * WebCore.xcodeproj/project.pbxproj:

2014-06-24  Martin Hock  <mhock@apple.com>

        [iOS] DOMWindow::outerWidth and outerHeight don't return useful values, so return 0.
        Also, revert r169281.
        https://bugs.webkit.org/show_bug.cgi?id=134233
        <rdar://problem/17060183>

        Reviewed by Benjamin Poulain.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::outerHeight):
        (WebCore::DOMWindow::outerWidth):

2014-06-24  Jeremy Jones  <jeremyj@apple.com>

        Don't set AudioSession active while interrupted.
        https://bugs.webkit.org/show_bug.cgi?id=134239

        Reviewed by Eric Carlson.

        To activate the AudioSession there must be a session with audio or video
        and being playing or paused.

        * platform/audio/MediaSessionManager.cpp:
        (WebCore::MediaSessionManager::hasActive): added
        (WebCore::MediaSessionManager::beginInterruption): updateSessionState
        (WebCore::MediaSessionManager::sessionWillBeginPlayback): updateSessionState
        * platform/audio/MediaSessionManager.h: declare hasActive()
        * platform/audio/mac/MediaSessionManagerMac.cpp:
        (MediaSessionManager::updateSessionState): use hasActive()

2014-06-24  Jer Noble  <jer.noble@apple.com>

        REGRESSION(r170336): Crash in HTMLMediaElement::seekTimerFired()
        https://bugs.webkit.org/show_bug.cgi?id=134253

        Rubber-stamped by Eric Carlson.

        Now that seekWithTolerance() has been split up into an asyncronous section, the null-checks in seekWithTolerance()
        need to be re-performed in seekTimerFired(), in case the m_player has been cleared between when the seek was initiated
        and when the asynchronous section is performed.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::seekTimerFired):

2014-06-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        Fix unused parameter warnings if inspector is disabled
        https://bugs.webkit.org/show_bug.cgi?id=134244

        Reviewed by Zalan Bujtas.

        No new tests, no behavior change.

        * inspector/InspectorConsoleInstrumentation.h:
        (WebCore::InspectorInstrumentation::startProfiling):
        (WebCore::InspectorInstrumentation::stopProfiling):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didFinishXHRLoading):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):

2014-06-24  Jer Noble  <jer.noble@apple.com>

        [MSE] Add null-check in sourceBufferPrivateAppendComplete().
        https://bugs.webkit.org/show_bug.cgi?id=133230

        Reviewed by Eric Carlson.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Bail early if the 
            SourceBuffer has been removed from the MediaSource.

2014-06-24  Commit Queue  <commit-queue@webkit.org>

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

        caused 3 layout tests to crash on debug. (Requested by zalan
        on #webkit).

        Reverted changeset:

        "Use unsigneds instead of ints for indexes into a string in
        text layout code"
        https://bugs.webkit.org/show_bug.cgi?id=133592
        http://trac.webkit.org/changeset/170337

2014-06-24  Jarek Czekalski  <jarekczek@poczta.onet.pl>

        [ATK] Don't ignore links rendered as blocks.
        https://bugs.webkit.org/show_bug.cgi?id=130941

        Reviewed by Mario Sanchez Prada.

        * /m/usr/src/webkit-trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (WebCore::AccessibilityObject::objectFocusedAndCaretOffsetUnignored): Don't ignore links
        when they are renderered with display:block.

2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Update GObject DOM bindings test results after r170351.

        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:

2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r170309.

        Skip functions returning arrays in GObject DOM bindings.

        * bindings/scripts/CodeGeneratorGObject.pm:
        (SkipFunction):

2014-06-23  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
        https://bugs.webkit.org/show_bug.cgi?id=134236

        Reviewed by Gyuyoung Kim.

        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
        (WebCore::RenderThemeEfl::loadTheme):
        (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
        * platform/efl/RenderThemeEfl.h:
        * platform/graphics/efl/CairoUtilitiesEfl.cpp:
        (WebCore::evasObjectFromCairoImageSurface):
        * platform/graphics/efl/CairoUtilitiesEfl.h:
        * platform/graphics/efl/ImageEfl.cpp:
        (WebCore::BitmapImage::getEvasObject):

2014-06-23  Jeremy Jones  <jeremyj@apple.com>

        Chapter forward/backward should seek to beginning/end.
        https://bugs.webkit.org/show_bug.cgi?id=134225

        Reviewed by Eric Carlson.

        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerController seekChapterBackward:]): forwards to -seekToBeginning
        (-[WebAVPlayerController seekChapterForward:]): forwards to -seekToEnd

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

        [Mac] Don't draw focus rings if we are animating controls
        https://bugs.webkit.org/show_bug.cgi?id=134232
        <rdar://problem/17381121>

        Reviewed by Tim Horton.

        Controls in native apps do not draw their focus rings as they
        animate (in Yosemite). Turn this off for WebKit too. It turns
        out that when we were drawing them, they were in the wrong
        place anyway.

        Since we don't animate controls when testing, we can't really test this.

        * platform/mac/ThemeMac.mm:
        (WebCore::paintToggleButton): Only draw the focus ring if the
        NSButtonCell is not animating.

2014-06-23  Krzysztof Czech  <k.czech@samsung.com>

        [ATK] Remove some unnecessary code from WebKitAccessibleWrapperAtk
        https://bugs.webkit.org/show_bug.cgi?id=134193

        Reviewed by Gyuyoung Kim.

        It was used along with DRT. Since we have stopped support WK1/DRT, it won't be needed.

        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
        (webkitAccessibleGetFocusedElement): Deleted.
        * accessibility/atk/WebKitAccessibleWrapperAtk.h:

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

        Use unsigneds instead of ints for indexes into a string in text layout code
        https://bugs.webkit.org/show_bug.cgi?id=133592

        Reviewed by Zalan Bujtas.

        Migrate much of the text-handling code to use unsigneds for indexes into a string.

        No new tests because there is no behavior change.

        * WebCore.exp.in:
        * platform/graphics/Font.cpp:
        (WebCore::Font::drawText):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForText):
        (WebCore::computeUnderlineType):
        * platform/graphics/Font.h:
        * platform/graphics/FontFastPath.cpp:
        (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
        (WebCore::Font::drawSimpleText):
        (WebCore::Font::drawEmphasisMarksForSimpleText):
        (WebCore::Font::drawGlyphBuffer):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForSimpleText):
        * platform/graphics/GlyphBuffer.h:
        (WebCore::GlyphBuffer::size):
        (WebCore::GlyphBuffer::glyphs):
        (WebCore::GlyphBuffer::advances):
        (WebCore::GlyphBuffer::fontDataAt):
        (WebCore::GlyphBuffer::advanceAt):
        (WebCore::GlyphBuffer::offsetAt):
        (WebCore::GlyphBuffer::reverse):
        (WebCore::GlyphBuffer::offsetInString):
        (WebCore::GlyphBuffer::swap):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::TextRunIterator::atEnd):
        * platform/graphics/Latin1TextIterator.h:
        (WebCore::Latin1TextIterator::Latin1TextIterator):
        (WebCore::Latin1TextIterator::currentCharacter):
        * platform/graphics/SimpleFontData.h:
        * platform/graphics/SurrogatePairAwareTextIterator.cpp:
        (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
        * platform/graphics/SurrogatePairAwareTextIterator.h:
        (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
        * platform/graphics/TextRun.h:
        (WebCore::TextRun::length):
        (WebCore::TextRun::charactersLength):
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::glyphDataForCharacter):
        (WebCore::applyFontTransforms):
        (WebCore::WidthIterator::advanceInternal):
        (WebCore::WidthIterator::advance):
        (WebCore::WidthIterator::advanceOneCharacter):
        * platform/graphics/WidthIterator.h:
        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::adjustSelectionRectForComplexText):
        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
        (WebCore::HarfBuzzShaper::setNormalizedBuffer):
        * platform/graphics/mac/FontComplexTextMac.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontCGWin.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontWin.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/wince/FontWinCE.cpp:
        (WebCore::Font::drawGlyphs):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::selectionRectForComplexText):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::isSelected):
        (WebCore::InlineTextBox::selectionState):
        (WebCore::adjustCharactersAndLengthForHyphen):
        (WebCore::InlineTextBox::localSelectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::selectionStartEnd):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintCompositionBackground):
        (WebCore::InlineTextBox::paintDocumentMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::computeRectForReplacementMarker):
        (WebCore::InlineTextBox::paintCompositionUnderline):
        (WebCore::InlineTextBox::positionForOffset):
        (WebCore::InlineTextBox::constructTextRun):
        * rendering/InlineTextBox.h:
        * rendering/RenderCombineText.cpp:
        (WebCore::RenderCombineText::getStringToRender):
        * rendering/RenderCombineText.h:
        * rendering/svg/SVGInlineFlowBox.cpp:
        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::positionForOffset):
        (WebCore::SVGInlineTextBox::localSelectionRect):
        (WebCore::SVGInlineTextBox::paintSelectionBackground):
        (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGInlineTextBox::paintText):
        * rendering/svg/SVGInlineTextBox.h:
        * rendering/svg/SVGTextMetricsBuilder.cpp:
        (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
        (WebCore::SVGTextMetricsBuilder::advance):
        * rendering/svg/SVGTextQuery.cpp:
        (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
        (WebCore::SVGTextQuery::subStringLengthCallback):
        (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::rotationOfCharacterCallback):
        (WebCore::SVGTextQuery::extentOfCharacterCallback):
        (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
        * rendering/svg/SVGTextQuery.h:
        * rendering/svg/SVGTextRunRenderingContext.cpp:
        (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
        (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
        * rendering/svg/SVGTextRunRenderingContext.h:
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontData.h:

2014-06-20  Jer Noble  <jer.noble@apple.com>

        HTMLMediaElement seek algorithm should allow cancelling previous seeks.
        https://bugs.webkit.org/show_bug.cgi?id=134116

        Reviewed by Eric Carlson.

        Test: media/video-seek-double.html

        Fulfill the requirement of the §4.7.14.9 seeking algorithm to do steps 5+ asynchronously and cancel
        previous instances of the algorithm.

        For the html/ parts of the algorithm, implement this by adding a seek timer, which when fired will
        issue steps 5-12. MediaPlayerPrivateAVFoundation will already coalesce multiple seek operations, so nothing
        additional needs be done there.  However, MediaPlayerPrivateMediaSourceAVFObjC needs to implement the same
        pending seek logic in case additional seeks were issued after the html/ algorithm reached step 12.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the new m_seekTimer.
        (WebCore::HTMLMediaElement::parseAttribute): Clear the seek timer.
        (WebCore::HTMLMediaElement::seekInternal): Differentiate between DOM seeks and internal seeks.
        (WebCore::HTMLMediaElement::seekWithTolerance:) Split into the seekTimerFired() method.
        (WebCore::HTMLMediaElement::seekTimerFired:) Added, split from seekWithTolerance().
        * html/HTMLMediaElement.h:
        * html/MediaController.cpp:
        (MediaController::bringElementUpToSpeed): Call seekInternal().
        (WebCore::HTMLMediaElement::PendingSeek::PendingSeek): Added convenience struct for storing seek requests.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::PendingSeek::PendingSeek): Ditto.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Modify the time jumped
            handler to not clear the m_seeking flag if another seek request is pending.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

2014-06-23  Timothy Horton  <timothy_horton@apple.com>

        [WK2] Use the page background color instead of white when swipe snapshots were purged (134218)
        https://bugs.webkit.org/show_bug.cgi?id=134218
        <rdar://problem/17426454>

        Reviewed by Benjamin Poulain.

        * WebCore.exp.in:

2014-06-23  Eric Carlson  <eric.carlson@apple.com>

        [iOS] remove InbandTextTrackPrivateAVFIOS
        https://bugs.webkit.org/show_bug.cgi?id=134220

        Reviewed by Benjamin Poulain.

        * WebCore.xcodeproj/project.pbxproj: Remove references to InbandTextTrackPrivateAVFIOS.

        * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Removed.
        * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.mm: Removed.

2014-06-23  Commit Queue  <commit-queue@webkit.org>

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

        lots of build breakage (Requested by bradeeoh on #webkit).

        Reverted changeset:

        "[Mac] process raw VTT in-band captions"
        https://bugs.webkit.org/show_bug.cgi?id=134178
        http://trac.webkit.org/changeset/170323

2014-06-23  Jeffrey Pfau  <jpfau@apple.com>

        Fix release build

        * Modules/indexeddb/IDBTransactionCoordinator.cpp:
        (WebCore::IDBTransactionCoordinator::canRunTransaction):

2014-06-19  Jeffrey Pfau  <jpfau@apple.com>

        Database process crashes when multiple transactions attempt to run at once
        https://bugs.webkit.org/show_bug.cgi?id=134139

        Reviewed by David Kilzer.

        Ensure that only one transaction can be running at a time.

        Test: storage/indexeddb/transaction-overlapping.html

        * Modules/indexeddb/IDBTransactionCoordinator.cpp:
        (WebCore::IDBTransactionCoordinator::canRunTransaction):

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

        [iOS][WK2] Make the state restore from HistoryItem more precise and reliable
        https://bugs.webkit.org/show_bug.cgi?id=134150

        Reviewed by Tim Horton.

        The two biggest changes for WebCore are:
        -Store everything we need to handle changes of ViewportConfiguration on HistoryItem.
        -Store the exposedRect with floating point coordinates.

        * WebCore.exp.in:
        * history/CachedPage.cpp:
        (WebCore::CachedPage::restore):
        We cannot determine a good scroll position from the WebProcess because the obscured insets can change
        arbitrarily in the UIProcess. When we scroll here from the WebProcess, we would force an invalid position
        to the UIProcess with the next layer tree update.

        To avoid any problem, we prohibit scrolling when restoring the focus appearance.

        * history/HistoryItem.cpp:
        (WebCore::encodeRect):
        (WebCore::encodeSize):
        (WebCore::HistoryItem::encodeBackForwardTreeNode):
        (WebCore::decodeRect):
        (WebCore::decodeSize):
        (WebCore::HistoryItem::decodeBackForwardTree):
        * history/HistoryItem.h:
        (WebCore::HistoryItem::exposedContentRect):
        (WebCore::HistoryItem::setExposedContentRect):
        (WebCore::HistoryItem::unobscuredContentRect):
        (WebCore::HistoryItem::setUnobscuredContentRect):
        (WebCore::HistoryItem::minimumLayoutSizeInScrollViewCoordinates):
        (WebCore::HistoryItem::setMinimumLayoutSizeInScrollViewCoordinates):
        (WebCore::HistoryItem::contentSize):
        (WebCore::HistoryItem::setContentSize):
        (WebCore::HistoryItem::exposedContentPosition): Deleted.
        (WebCore::HistoryItem::setExposedContentPosition): Deleted.
        * loader/HistoryController.cpp:
        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
        * page/FrameView.h:
        * platform/ScrollView.h:
        * platform/ios/ScrollViewIOS.mm:
        (WebCore::ScrollView::exposedContentRect):
        (WebCore::ScrollView::setExposedContentRect):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::didChangeVisibleRect):

2014-06-23  Eric Carlson  <eric.carlson@apple.com>

        [Mac] process raw VTT in-band captions
        https://bugs.webkit.org/show_bug.cgi?id=134178

        Reviewed by Jer Noble.

        * CMakeLists.txt: Add ISOVTTCue.cpp|h.
        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * html/track/BufferedLineReader.h:
        (WebCore::BufferedLineReader::reset): New, empty the input buffer.

        Make it possible to process WebVTT captions. 
        * html/track/InbandGenericTextTrack.cpp:
        (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
        (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
        (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
        (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
        (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
        (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
        * html/track/InbandGenericTextTrack.h:

        * html/track/InbandTextTrack.h:

        * html/track/InbandWebVTTTextTrack.cpp:
        (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
        (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
            object.
        (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
        (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
        (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
        * html/track/InbandWebVTTTextTrack.h:

        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
            from a pointer to a reference.
        (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.

        * html/track/VTTCue.cpp:
        (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
        (WebCore::VTTCueBox::VTTCueBox): Ditto.
        (WebCore::VTTCueBox::getCue): Return a reference.
        (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
        (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
        (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
        (WebCore::VTTCue::initialize): New, shared constructor initialization.
        (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
        (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
        (WebCore::VTTCue::setCueSettings): Ditto.
        * html/track/VTTCue.h:
        (WebCore::VTTCueBox::create): Deleted.
        (WebCore::VTTCue::create): Deleted.

        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
            call the parser.
        (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
        (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
        (WebCore::WebVTTParser::collectTimeStamp): Ditto.
        * html/track/WebVTTParser.h:
        (WebCore::WebVTTCueData::originalStartTime): New.
        (WebCore::WebVTTCueData::setOriginalStartTime): New.
        (WebCore::WebVTTCueData::WebVTTCueData):

        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.

        * platform/graphics/InbandTextTrackPrivateClient.h:
        (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.

        Parse ISO WebVTT cue boxes.
        * platform/graphics/ISOVTTCue.cpp: Added.
        (WebCore::ISOBox::ISOBox):
        (WebCore::ISOBox::peekType):
        (WebCore::ISOBox::peekLength):
        (WebCore::ISOBox::peekString):
        (WebCore::vttCueBoxType):
        (WebCore::vttIdBoxType):
        (WebCore::vttSettingsBoxType):
        (WebCore::vttPayloadBoxType):
        (WebCore::vttCurrentTimeBoxType):
        (WebCore::vttCueSourceIDBoxType):
        (WebCore::ISOWebVTTCue::boxType):
        (WebCore::ISOWebVTTCue::ISOWebVTTCue):
        * platform/graphics/ISOVTTCue.h: Added.
        (WebCore::ISOBox::boxHeaderSize):
        (WebCore::ISOBox::length):
        (WebCore::ISOBox::type):
        (WebCore::ISOWebVTTCue::presentationTime):
        (WebCore::ISOWebVTTCue::duration):
        (WebCore::ISOWebVTTCue::sourceID):
        (WebCore::ISOWebVTTCue::id):
        (WebCore::ISOWebVTTCue::originalStartTime):
        (WebCore::ISOWebVTTCue::settings):
        (WebCore::ISOWebVTTCue::cueText):

        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
        (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
        (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
        (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
            CMSampleBuffers, create ISOWebVTTCue from the sample data.
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:

        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
        (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
            options until we have tracks.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
            attributed strings to track.
        (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
        * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
        (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):

        * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
        (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
            format to base class.

        * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
        (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF): Ditto.
        * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:

2014-06-23  Jer Noble  <jer.noble@apple.com>

        [MSE][Mac] Crash in SourceBuffer::sourceBufferPrivateDidReceiveRenderingError()
        https://bugs.webkit.org/show_bug.cgi?id=134211

        Reviewed by Eric Carlson.

        Null-check m_source before dereferencing, as the SourceBuffer may have been removed
        from its MediaSource before this error was received.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):

2014-06-23  Joseph Pecoraro  <pecoraro@apple.com>

        Reduce synchronous layout triggered by JavaScript-based media controls
        https://bugs.webkit.org/show_bug.cgi?id=134208

        Reviewed by Eric Carlson.

        Avoid always querying the offsetWidth and offsetHeight of the timeline
        by only calculating these values when the timeline may change size.
        Also avoid doing work in a few cases where properties did not
        actually change.

        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller):

        (Controller.prototype.setNeedsTimelineMetricsUpdate):
        (Controller.prototype.updateTimelineMetricsIfNeeded):
        Only update the timeline metrics when they may have changed.

        (Controller.prototype.updateControls):
        (Controller.prototype.handleTimelineMouseMove):
        (Controller.prototype.progressFillStyle):
        (Controller.prototype.showControls):
        (Controller.prototype.addControls):
        Mark timeline metrics need update based on various UI changes.

        (Controller.prototype.setStatusHidden):
        Only do work if the hidden status changed.
        Mark timeline metrics need update if the timeline is changed.

        (Controller.prototype.updateProgress):
        Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.

        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS):
        (ControllerIOS.prototype.updateControls):

        (ControllerIOS.prototype.updateProgress):
        Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.

        (ControllerIOS.prototype.handleWirelessPlaybackChange):
        Mark timeline metrics need update as button may have changed.

        (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
        Only do work if the availability changed.
        Mark timeline metrics need update as a new button may have appeared.

        (ControllerIOS.prototype.set pageScaleFactor):
        Only do work if the page scale factor changed.

2014-06-23  Brady Eidson  <beidson@apple.com>

        Add skeleton code for updated Gamepad API
        https://bugs.webkit.org/show_bug.cgi?id=134165

        Unreviewed - Forgotten review feedback from http://trac.webkit.org/changeset/170309

        * Modules/gamepad/GamepadButton.idl: Forgot to commit the removal of NoInterfaceObject here.

2014-06-23  Brady Eidson  <beidson@apple.com>

        Add skeleton code for updated Gamepad API
        https://bugs.webkit.org/show_bug.cgi?id=134165

        Reviewed by Dean Jackson.

        No new tests (No change in behavior for any tested configuration)

        Interface and dummy implementation for the Gamepad object:
        * Modules/gamepad/Gamepad.cpp: Added.
        (WebCore::Gamepad::Gamepad):
        (WebCore::Gamepad::~Gamepad):
        (WebCore::Gamepad::axes):
        (WebCore::Gamepad::buttons):
        * Modules/gamepad/Gamepad.h: Added.
        * Modules/gamepad/Gamepad.idl: Added.

        Interface and dummy implementation for the GamepadButton object:
        * Modules/gamepad/GamepadButton.cpp: Added.
        (WebCore::GamepadButton::GamepadButton):
        (WebCore::GamepadButton::pressed):
        * Modules/gamepad/GamepadButton.h: Added.
        (WebCore::GamepadButton::create):
        (WebCore::GamepadButton::value):
        (WebCore::GamepadButton::setValue):
        * Modules/gamepad/GamepadButton.idl: Added.

        Interface and dummy implementation for the GamepadEvent object:
        * Modules/gamepad/GamepadEvent.cpp: Added.
        (WebCore::GamepadEvent::GamepadEvent):
        * Modules/gamepad/GamepadEvent.h: Added.
        (WebCore::GamepadEventInit::GamepadEventInit):
        (WebCore::GamepadEvent::~GamepadEvent):
        (WebCore::GamepadEvent::create):
        (WebCore::GamepadEvent::gamepad):
        * Modules/gamepad/GamepadEvent.idl: Added.
        * dom/EventNames.in:

        Interface and dummy implementation for additions to the Navigator object:
        * Modules/gamepad/NavigatorGamepad.cpp: Added.
        (WebCore::NavigatorGamepad::NavigatorGamepad):
        (WebCore::NavigatorGamepad::supplementName):
        (WebCore::NavigatorGamepad::from):
        (WebCore::NavigatorGamepad::getGamepads):
        (WebCore::NavigatorGamepad::gamepads):
        * Modules/gamepad/NavigatorGamepad.h: Added.
        * Modules/gamepad/NavigatorGamepad.idl: Added.

        Bindings additions necessary for these new interfaces:
        * bindings/js/JSDOMBinding.h:
        (WebCore::JSValueTraits<double>::arrayJSValue):
        * bindings/js/JSDictionary.cpp:
        (WebCore::JSDictionary::convertValue):
        * bindings/js/JSDictionary.h:

        Project file stuff:
        * CMakeLists.txt:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCoreCommon.props:
        * WebCore.vcxproj/copyForwardingHeaders.cmd:
        * WebCore.xcodeproj/project.pbxproj:
        * DerivedSources.make:

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

        Catch Obj-C exceptions thrown by _linenPatternImage
        https://bugs.webkit.org/show_bug.cgi?id=134202

        Reviewed by Geoffrey Garen.

        Catch Objective-C exceptions thrown by _linenPatternImage and
        -[NSImage CGImageForProposedRect:context:hints:].

        * platform/mac/ScrollbarThemeMac.mm:
        (WebCore::linenBackgroundColor):

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

        CSS clip property should make layers non-opaque
        https://bugs.webkit.org/show_bug.cgi?id=134147
        <rdar://problem/17324579>

        Reviewed by Tim Horton.
        
        https://www.fairphone.com has position:fixed elements with clip: rect(...)
        but we were making those layers opaque, resulting in garbage pixels
        in areas outside the clip rect.
        
        Fix by checking for the clip property in RenderBox::backgroundIsKnownToBeOpaqueInRect().

        Test: compositing/contents-opaque/opaque-with-clip.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):

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

        Adding a mask on a simple color compositing layer removes the content
        https://bugs.webkit.org/show_bug.cgi?id=134127

        Reviewed by Dean Jackson.
        
        In r169053 I moved some updateDrawsContent() into updateAfterDescendents(),
        but this isn't called when a composited layer gains or loses a mask (which
        doesn't cause a layout). This caused us to fail to allocate backing store
        when gaining a mask, resulting in missing content.
        
        Fix by calling updateAfterDescendents() from RenderLayer::styleChange()
        when the layer config isn't changing.
        
        Also remove a condition in isSimpleContainerCompositingLayer() that caused us
        to fall off the simple layer path for masked layers, since this works just
        fine.

        Test: compositing/masks/solid-color-masked.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):

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

        [New Multicolumn] Writing mode changes on the <html> and RenderView need to
        be propagated to column sets and flow thread children of those renderers.
        https://bugs.webkit.org/show_bug.cgi?id=134121
        <rdar://problem/16884527>

        Reviewed by Dean Jackson.

        Added fast/multicol/pagination/RightToLeft-rl-dynamic.html

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::styleDidChange):
        Refactor the propagation code for column sets and flow thread styles into a helper
        function that is called here.

        (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
        * rendering/RenderBlockFlow.h:
        Add a new helper function for recalculating the styles of the column sets and
        flow thread in response to changes.

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::styleDidChange):
        When the style is changed for a root element or the RenderView in response to
        writing mode and direction changes, make sure that style gets propagated to
        the column children by calling the new helper function.

2014-06-23  Jer Noble  <jer.noble@apple.com>

        [Mac] Uncaught exception crash when destroying MediaPlayerPrivateAVFoundationObjC
        https://bugs.webkit.org/show_bug.cgi?id=134198

        Reviewed by Eric Carlson.

        Now that we always create an AVPlayerLayer when creating an AVPlayer, but we don't
        return that layer from platformLayer() unless we've been asked to, we no longer are
        asked to destroy our video layer from MediaPlayerPrivateAVFoundation::tearDownVideoRendering().

        Instead, explicitly destroy our video layer (and remove the KVO-observer which is
        causing this exception) in the MediaPlayerPrivateAVFoundationObjC destructor.

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

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

        Remove unused FrameView::setUseCustomFixedPositionLayoutRect().
        <https://webkit.org/b/134194>

        Reviewed by Anders Carlsson.

        * WebCore.exp.in:
        * page/FrameView.cpp:
        (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Deleted.
        * page/FrameView.h:

2014-06-23  Antti Koivisto  <antti@apple.com>

        REGRESSION (r160908): Unable to unset bold while entering text
        https://bugs.webkit.org/show_bug.cgi?id=134196
        <rdar://problem/17051653>

        Reviewed by Andreas Kling.
        
        No test, this code path is used by some WK1 API clients only.

        * editing/Editor.cpp:
        (WebCore::Editor::styleForSelectionStart):
        
            This needs to update the style before requesting the renderer.

        * editing/Editor.h:
        * editing/ios/EditorIOS.mm:
        (WebCore::styleForSelectionStart): Deleted.
        * editing/mac/EditorMac.mm:
        (WebCore::styleForSelectionStart): Deleted.
        
            Removed the duplicated functions, moved to Editor.cpp.

2014-06-23  Alex Christensen  <achristensen@webkit.org>

        [iOS] Fix video in WebGL.
        https://bugs.webkit.org/show_bug.cgi?id=133511

        Reviewed by Jer Noble.

        * WebCore.exp.in:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
        (WebCore::wkAVAssetResolvedURL): Deleted.
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        Declare and use resolvedURL on AVURLAsset instead of using wkAVAssetResolvedURL through WebKitSystemInterface.

2014-06-23  Radu Stavila  <stavila@adobe.com>

        REGRESSION (r168046): Incorrect handling of object information in WebCore::RenderFlowThread::removeLineRegionInfo
        https://bugs.webkit.org/show_bug.cgi?id=133587

        Reviewed by Antti Koivisto.

        When an object flowed in multicol is moved from in-flow positioning to out-of-flow positioning,
        its information must be removed from the flowthread prior to the change being made. 
        Otherwise, the flow thread will no longer be its containing block and a reference to it
        will not be possible to obtain.

        No new tests can be added because the code still hits in an unrelated assertion followed by a null dereference.
        The issue was discussed with Antti Koivisto and we decided its better to fix this problem first and
        handle the following issue in a separate bug.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::styleWillChange):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::flowThreadContainingBlock):

2014-06-23  Krzysztof Czech  <k.czech@samsung.com>

        [EFL] Platform support for WebSpeech feature.
        https://bugs.webkit.org/show_bug.cgi?id=116438

        Reviewed by Csaba Osztrogonác.

        It's a first step of adding support for Speech Synthesis in EFL port.
        Just stub out required API and support for compilation.

        * CMakeLists.txt:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake: Added some idls to not break GTK build.
        * platform/PlatformSpeechSynthesizer.h:
        * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
        (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
        (WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
        (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
        (WebCore::PlatformSpeechSynthesisProviderEfl::pause):
        (WebCore::PlatformSpeechSynthesisProviderEfl::resume):
        (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
        (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
        * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
        * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
        (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
        (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
        (WebCore::PlatformSpeechSynthesizer::pause):
        (WebCore::PlatformSpeechSynthesizer::resume):
        (WebCore::PlatformSpeechSynthesizer::speak):
        (WebCore::PlatformSpeechSynthesizer::cancel):

2014-06-23  Jeongeun Kim  <je_julie.kim@samsung.com>

        Make it clear to get m_svgExtensions using svgExtensions().
        https://bugs.webkit.org/show_bug.cgi?id=134186.

        Reviewed by Dirk Schulze.

        This patch makes sure that the purpose of code is to get m_svgExtensions 
        as changing accessSVGExtensions() to svgExtensions(). 
        svgExtensions() is a getter API and accessSVGExtensions() checks 
        the presence of m_svgExtensions and create m_svgExtensions if it does not exist. 

        No new tests, no behavior change.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::removeChild):
        (WebCore::ContainerNode::removeChildren):
        * dom/Document.cpp:
        (WebCore::Document::commonTeardown):
        (WebCore::Document::implicitClose):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::restore):
        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::startAnimations):
        (WebCore::SVGDocumentExtensions::pauseAnimations):
        (WebCore::SVGDocumentExtensions::unpauseAnimations):
        (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
        (WebCore::SVGDocumentExtensions::rebuildElements):
        * svg/SVGDocumentExtensions.h:

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

        [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
        https://bugs.webkit.org/show_bug.cgi?id=134183

        Follow-up review from Sam Weinig.

        * platform/graphics/GraphicsContext3D.h: Merge another bit of MAC and IOS
        code.
        * ChangeLog: Actually read his review comments this time.

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

        [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
        https://bugs.webkit.org/show_bug.cgi?id=134183

        Reviewed by Sam Weinig.

        GraphicsContext3D has a reference to a WebGLLayer that was
        hidden behind a PlatformLayer. This meant we had to cast it
        to use a WebGLLayer method.

        * platform/graphics/GraphicsContext3D.h: Replace RetainPtr<PlatformLayer>
        with RetainPtr<WebGLLayer>.
        * platform/graphics/mac/GraphicsContext3DMac.mm:
        (WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.

2014-06-22  Zalan Bujtas  <zalan@apple.com>

        Make offset from ancestor computation explicit by moving it to the callers.
        https://bugs.webkit.org/show_bug.cgi?id=134168.

        Reviewed by Simon Fraser.
        
        Explicit offset computation helps code reading and less error-prone than passing
        the offset pointer and compute it locally when it is null.

        No change in functionality.

        * rendering/RenderLayer.cpp:
        (WebCore::transparencyClipBox):
        (WebCore::performOverlapTests):
        (WebCore::RenderLayer::setupClipPath):
        (WebCore::RenderLayer::setupFilters):
        (WebCore::RenderLayer::paintLayerContents):
        (WebCore::RenderLayer::collectFragments):
        (WebCore::RenderLayer::updatePaintingInfoForFragments):
        (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
        (WebCore::RenderLayer::hitTestLayer):
        (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::calculateCompositedBounds):
        (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::writeLayers):

2014-06-22  Zalan Bujtas  <zalan@apple.com>

        Transition layer offsets from LayoutPoint to LayoutSize.
        https://bugs.webkit.org/show_bug.cgi?id=134156

        Reviewed by Simon Fraser.

        Use better representation for offset values.

        No change in functionality.

        * platform/graphics/LayoutSize.h:
        (WebCore::roundedForPainting):
        * rendering/RenderFlowThread.cpp:
        (WebCore::RenderFlowThread::fragmentsBoundingBox):
        * rendering/RenderLayer.cpp:
        (WebCore::expandClipRectForDescendantsAndReflection):
        (WebCore::RenderLayer::convertToLayerCoords):
        (WebCore::computeReferenceBox):
        (WebCore::RenderLayer::setupClipPath):
        (WebCore::RenderLayer::setupFilters):
        (WebCore::RenderLayer::paintLayerContents):
        (WebCore::RenderLayer::paintLayerByApplyingTransform):
        (WebCore::RenderLayer::collectFragments):
        (WebCore::RenderLayer::updatePaintingInfoForFragments):
        (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
        (WebCore::RenderLayer::createLocalTransformState):
        (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
        (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayer.h:
        * rendering/RenderMultiColumnSet.cpp:
        (WebCore::RenderMultiColumnSet::collectLayerFragments):

2014-06-22  Dean Jackson  <dino@apple.com>

        Attempted iOS build fix.

        * platform/graphics/mac/GraphicsContext3DMac.mm:
        (WebCore::GraphicsContext3D::~GraphicsContext3D): Cast to WebGLLayer.

2014-06-22  Dean Jackson  <dino@apple.com>

        [Apple] WebGL layer may use GC3D after free with remote layer hosting
        https://bugs.webkit.org/show_bug.cgi?id=134179
        <rdar://problem/17412931>

        Reviewed by Tim Horton.

        With remote layer hosting, a WebGLLayer may attempt to draw after
        the GraphicsContext3D has been destroyed. We need to make sure
        the GC3D tells the WebGLLayer that it is no longer valid.

        While here, I changed some return 0 to return nullptr, the
        name of the ObjC property member from m_context to _context,
        and removed some unnecessary .get() calls.

        This is tested by run-webkit-tests with the --remote-layer-tree
        option.

        * platform/graphics/mac/GraphicsContext3DMac.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D): No need for .get().
        (WebCore::GraphicsContext3D::~GraphicsContext3D): Set the context reference on WebGLLayer
        to be null.
        (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): No need for .get().
        * platform/graphics/mac/WebGLLayer.h: Set the context reference on WebGLLayer
        to be null.
        * platform/graphics/mac/WebGLLayer.mm:
        (-[WebGLLayer initWithGraphicsContext3D:]): Rename m_context to _context.
        (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Check for null.
        (-[WebGLLayer copyCGLContextForPixelFormat:]): Rename to _context.
        (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Check for null.
        (-[WebGLLayer copyImageSnapshotWithColorSpace:]): Ditto.
        (-[WebGLLayer display]): Ditto.

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

        [WK2] Frameset frames are not scrollable after loading (and should be)
        https://bugs.webkit.org/show_bug.cgi?id=134151
        <rdar://problem/17403365>

        Reviewed by Dan Bates.
        
        When loading a <frameset>, we could end up with an empty non-fast-scrollable
        region for the main frame, because after the initial frameset document layout,
        nothing updated the non-fast scrollable region as the subframes added their
        scrollable areas to the the main frame's scrollable area set.
        
        Fix by having addScrollableArea() and removeScrollableArea() trigger an update
        of the non-fast scrollable region.

        Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html

        * page/FrameView.cpp:
        (WebCore::FrameView::addScrollableArea):
        (WebCore::FrameView::removeScrollableArea):
        (WebCore::FrameView::scrollableAreaSetChanged):
        * page/FrameView.h:

2014-06-22  Commit Queue  <commit-queue@webkit.org>

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

        Broke editing tests (Requested by litherum on #webkit).

        Reverted changeset:

        "Use unsigneds instead of ints for indexes into a string in
        text layout code"
        https://bugs.webkit.org/show_bug.cgi?id=133592
        http://trac.webkit.org/changeset/170265

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

        Have scrollingTreeAsText() dump the non-fast-scrollable region
        https://bugs.webkit.org/show_bug.cgi?id=134149

        Reviewed by Sam Weinig.

        Dump the non-fast-scrollable region (as an array of rects).

        * WebCore.exp.in:
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):

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

        Use unsigneds instead of ints for indexes into a string in text layout code
        https://bugs.webkit.org/show_bug.cgi?id=133592

        Reviewed by Zalan Bujtas.

        Migrate much of the text-handling code to use unsigneds for indexes into a string.

        No new tests because there is no behavior change.

        * WebCore.exp.in:
        * platform/graphics/Font.cpp:
        (WebCore::Font::drawText):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForText):
        (WebCore::computeUnderlineType):
        * platform/graphics/Font.h:
        * platform/graphics/FontFastPath.cpp:
        (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
        (WebCore::Font::drawSimpleText):
        (WebCore::Font::drawEmphasisMarksForSimpleText):
        (WebCore::Font::drawGlyphBuffer):
        (WebCore::Font::drawEmphasisMarks):
        (WebCore::Font::adjustSelectionRectForSimpleText):
        * platform/graphics/GlyphBuffer.h:
        (WebCore::GlyphBuffer::size):
        (WebCore::GlyphBuffer::glyphs):
        (WebCore::GlyphBuffer::advances):
        (WebCore::GlyphBuffer::fontDataAt):
        (WebCore::GlyphBuffer::advanceAt):
        (WebCore::GlyphBuffer::offsetAt):
        (WebCore::GlyphBuffer::reverse):
        (WebCore::GlyphBuffer::offsetInString):
        (WebCore::GlyphBuffer::swap):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::TextRunIterator::atEnd):
        * platform/graphics/Latin1TextIterator.h:
        (WebCore::Latin1TextIterator::Latin1TextIterator):
        (WebCore::Latin1TextIterator::currentCharacter):
        * platform/graphics/SimpleFontData.h:
        * platform/graphics/SurrogatePairAwareTextIterator.cpp:
        (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
        * platform/graphics/SurrogatePairAwareTextIterator.h:
        (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
        * platform/graphics/TextRun.h:
        (WebCore::TextRun::length):
        (WebCore::TextRun::charactersLength):
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::glyphDataForCharacter):
        (WebCore::applyFontTransforms):
        (WebCore::WidthIterator::advanceInternal):
        (WebCore::WidthIterator::advance):
        (WebCore::WidthIterator::advanceOneCharacter):
        * platform/graphics/WidthIterator.h:
        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::adjustSelectionRectForComplexText):
        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
        (WebCore::HarfBuzzShaper::setNormalizedBuffer):
        * platform/graphics/mac/FontComplexTextMac.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontCGWin.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/graphics/win/FontWin.cpp:
        (WebCore::Font::adjustSelectionRectForComplexText):
        (WebCore::Font::getGlyphsAndAdvancesForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        * platform/graphics/wince/FontWinCE.cpp:
        (WebCore::Font::drawGlyphs):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::drawEmphasisMarksForComplexText):
        (WebCore::Font::selectionRectForComplexText):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::isSelected):
        (WebCore::InlineTextBox::selectionState):
        (WebCore::adjustCharactersAndLengthForHyphen):
        (WebCore::InlineTextBox::localSelectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::selectionStartEnd):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintCompositionBackground):
        (WebCore::InlineTextBox::paintDocumentMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::computeRectForReplacementMarker):
        (WebCore::InlineTextBox::paintCompositionUnderline):
        (WebCore::InlineTextBox::positionForOffset):
        (WebCore::InlineTextBox::constructTextRun):
        * rendering/InlineTextBox.h:
        * rendering/RenderCombineText.cpp:
        (WebCore::RenderCombineText::getStringToRender):
        * rendering/RenderCombineText.h:
        * rendering/svg/SVGInlineFlowBox.cpp:
        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::positionForOffset):
        (WebCore::SVGInlineTextBox::localSelectionRect):
        (WebCore::SVGInlineTextBox::paintSelectionBackground):
        (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGInlineTextBox::paintText):
        * rendering/svg/SVGInlineTextBox.h:
        * rendering/svg/SVGTextMetricsBuilder.cpp:
        (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
        (WebCore::SVGTextMetricsBuilder::advance):
        * rendering/svg/SVGTextQuery.cpp:
        (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
        (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
        (WebCore::SVGTextQuery::subStringLengthCallback):
        (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
        (WebCore::SVGTextQuery::rotationOfCharacterCallback):
        (WebCore::SVGTextQuery::extentOfCharacterCallback):
        (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
        * rendering/svg/SVGTextQuery.h:
        * rendering/svg/SVGTextRunRenderingContext.cpp:
        (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
        (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
        * rendering/svg/SVGTextRunRenderingContext.h:
        * svg/SVGFontData.cpp:
        (WebCore::SVGFontData::applySVGGlyphSelection):
        * svg/SVGFontData.h:

2014-06-21  Zan Dobersek  <zdobersek@igalia.com>

        createCairoGLSurface should take in a FloatSize reference as its first parameter
        https://bugs.webkit.org/show_bug.cgi?id=134159

        Reviewed by Martin Robinson.

        The ImageBuffer constructor operates with a FloatSize reference, which is also
        passed to createCairoGLSurface when accelerated 2D canvas support is enabled.
        That function should take in a reference to the same type.

        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::createCairoGLSurface):

2014-06-21  Dean Jackson  <dino@apple.com>

        [Mac] Margins for new form controls need tweaking
        https://bugs.webkit.org/show_bug.cgi?id=134135
        <rdar://problem/17262164>

        Reviewed by Sam Weinig.

        Take 2 of this patch. Only the mac-mountainlion LayoutTest
        results are different from the first attempt.

        With the newer animated controls in OS X Yosemite, we need
        to tweak the fudge-factor margins for positioning. In a recent
        patch I added another fudge, which I'm removing with this. I'm
        not sure where the older values came from, but I've checked with
        the latest AppKit sources and am using the sizes they implement
        for the controls.

        This will rebaseline a lot of tests, since I've made small tweaks
        to the form layout.

        * platform/mac/ThemeMac.mm:
        (WebCore::checkboxMargins): New margin amounts.
        (WebCore::radioSizes): New sizes.
        (WebCore::radioMargins): New margin amounts.
        (WebCore::paintToggleButton): No need to call the positioning fudge any more.
        (WebCore::checkboxOffsets): Deleted.
        (WebCore::radioOffsets): Deleted.

2014-06-20  Sam Weinig  <sam@webkit.org>

        Remove static tables for bindings that use eager reification
        https://bugs.webkit.org/show_bug.cgi?id=134126

        Reviewed by Oliver Hunt.

        This shaves about 1MB off of WebCore's .o files.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        (GenerateConstructorHelperMethods):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        * bindings/scripts/test/JS/JSTestException.cpp:
        * bindings/scripts/test/JS/JSTestException.h:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        * bindings/scripts/test/JS/JSTestNode.cpp:
        * bindings/scripts/test/JS/JSTestNode.h:
        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
        * bindings/scripts/test/JS/JSTestNondeterministic.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        * bindings/scripts/test/JS/JSTestObj.h:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        * bindings/scripts/test/JS/JSattribute.cpp:
        * bindings/scripts/test/JS/JSattribute.h:
        * bindings/scripts/test/JS/JSreadonly.cpp:
        * bindings/scripts/test/JS/JSreadonly.h:

2014-06-21  Brady Eidson  <beidson@apple.com>

        Gamepad API - Deprecate the existing implementation
        https://bugs.webkit.org/show_bug.cgi?id=134108

        Reviewed by Timothy Hatcher.

        -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
        -Move some implementation files into a "deprecated" subdirectory.

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig:
        * PlatformGTK.cmake:

        * Modules/gamepad/deprecated/Gamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
        * Modules/gamepad/deprecated/Gamepad.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
        * Modules/gamepad/deprecated/Gamepad.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
        * Modules/gamepad/deprecated/GamepadList.cpp: Renamed from Source/WebCore/Modules/gamepad/GamepadList.cpp.
        * Modules/gamepad/deprecated/GamepadList.h: Renamed from Source/WebCore/Modules/gamepad/GamepadList.h.
        * Modules/gamepad/deprecated/GamepadList.idl: Renamed from Source/WebCore/Modules/gamepad/GamepadList.idl.
        * Modules/gamepad/deprecated/NavigatorGamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
        * Modules/gamepad/deprecated/NavigatorGamepad.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
        * Modules/gamepad/deprecated/NavigatorGamepad.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.

        * platform/Gamepads.h:
        * platform/efl/GamepadsEfl.cpp:
        * platform/gtk/GamepadsGtk.cpp:
        * platform/linux/GamepadDeviceLinux.cpp:
        * platform/linux/GamepadDeviceLinux.h:

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

        Mark TextRun's constructors as explicit
        https://bugs.webkit.org/show_bug.cgi?id=134124

        Reviewed by Sam Weinig.

        After r170072, nobody is implicitly converting a string to a TextRun. Therefore,
        we can make the constructors explicit.

        No new tests because there is no behavior change.

        * platform/graphics/TextRun.h:
        (WebCore::TextRun::TextRun):

2014-06-21  Commit Queue  <commit-queue@webkit.org>

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

        GTK/EFL bindings generator works differently, making this
        patch not work there.  Will fix entire patch after a rollout.
        (Requested by bradee-oh on #webkit).

        Reverted changeset:

        "Gamepad API - Deprecate the existing implementation"
        https://bugs.webkit.org/show_bug.cgi?id=134108
        http://trac.webkit.org/changeset/170244

2014-06-21  Zan Dobersek  <zdobersek@igalia.com>

        Fix the mismatched header build guards in WebKitDOMNodeFilterPrivate.h
        which are throwing compilation warnings when building with Clang.

        * bindings/gobject/WebKitDOMNodeFilterPrivate.h:

2014-06-21  Brady Eidson  <beidson@apple.com>

        Gamepad API - Deprecate the existing implementation
        https://bugs.webkit.org/show_bug.cgi?id=134108

        Reviewed by Timothy Hatcher.

        -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
        -Add the "Deprecated" suffix to some implementation files

        * CMakeLists.txt:
        * PlatformGTK.cmake:
        * Configurations/FeatureDefines.xcconfig:
        
        * Modules/gamepad/GamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
        * Modules/gamepad/GamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
        * Modules/gamepad/GamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.

        * Modules/gamepad/GamepadList.cpp:
        * Modules/gamepad/GamepadList.h:
        * Modules/gamepad/GamepadList.idl:

        * Modules/gamepad/NavigatorGamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
        * Modules/gamepad/NavigatorGamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
        * Modules/gamepad/NavigatorGamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.

        * platform/Gamepads.h:
        * platform/efl/GamepadsEfl.cpp:
        * platform/gtk/GamepadsGtk.cpp:
        * platform/linux/GamepadDeviceLinux.cpp:
        * platform/linux/GamepadDeviceLinux.h:

2014-06-21  Commit Queue  <commit-queue@webkit.org>

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

        Caused 9 layout test failures on Mountain Lion
        http://build.webkit.org/builders/Apple%20MountainLion%20Release%20WK2%20(Tests)/builds/19216
        (Requested by bradee-oh on #webkit).

        Reverted changeset:

        "[Mac] Margins for new form controls need tweaking"
        https://bugs.webkit.org/show_bug.cgi?id=134135
        http://trac.webkit.org/changeset/170228

2014-06-21  Jer Noble  <jer.noble@apple.com>

        [Mac] Create and attach the AVPlayerLayer to the AVPlayer immediately if the media element is <video>.
        https://bugs.webkit.org/show_bug.cgi?id=134131

        Reviewed by Eric Carlson.

        The AVPlayer uses the presence of an AVPlayerLayer to decide which alternate to display in the case of
        HLS streams with audio-only alternates. To give the AVPlayer the most information with which to make its
        decision, always create and attach an AVPlayerLayer before attaching an AVPlayerItem to the AVPlayerLayer.
        In addition, retrieve the <video> element bounds and create an AVPlayerLayer with a matching size, so that
        the AVPlayer can choose an alternate with the correct dimensions.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLayerRenderer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):

2014-06-21  Jeremy Jones  <jeremyj@apple.com>

        Implement ios -[WAKWindow convertBaseToScreen:]
        https://bugs.webkit.org/show_bug.cgi?id=134053

        Reviewed by Eric Carlson.

        * platform/ios/wak/WAKWindow.mm:
        (-[WAKWindow convertBaseToScreen:]):
        Traverse layer hierarchy and convert point.

        (-[WAKWindow convertScreenToBase:]):
        Traverse layer hierarchy and convert point.

2014-06-21  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>

        Removing PAGE_VISIBILITY_API compile guard.
        https://bugs.webkit.org/show_bug.cgi?id=133844

        Reviewed by Gavin Barraclough.

        No new tests because no functional changes.

        * Configurations/FeatureDefines.xcconfig:
        * Modules/vibration/NavigatorVibration.cpp:
        (WebCore::NavigatorVibration::vibrate):
        * dom/Document.cpp:
        (WebCore::Document::hidden):
        * dom/Document.h:
        * dom/Document.idl:
        * dom/Element.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::registerWithDocument):
        (WebCore::HTMLMediaElement::unregisterWithDocument):
        (WebCore::HTMLMediaElement::parseAttribute):
        * html/HTMLMediaElement.h:
        * page/Page.cpp:
        (WebCore::Page::setIsVisibleInternal):
        (WebCore::Page::visibilityState):
        (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
        * page/Page.h:
        * page/PageVisibilityState.cpp:
        * page/PageVisibilityState.h:
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
        * page/Settings.h:
        * platform/audio/MediaSession.cpp:
        (WebCore::MediaSession::updateClientDataBuffering):
        * platform/audio/MediaSession.h:

2014-06-21  Frédéric Wang  <fred.wang@free.fr>

        [GTK][EFL] Use OpenType MATH fonts by default.
        https://bugs.webkit.org/show_bug.cgi?id=133604

        Reviewed by Chris Fleizach.

        In order to support stretching of horizontal operators and large
        operators in display mode as well as to improve the drawing of radicals,
        we need to use an OpenType MATH table. This commit makes the MathML code
        try "Latin Modern Math" first, which is an OpenType version of Knuth's
        popular Computer Modern font and is packaged with most TeX
        distributions (e.g. TeX Live on Linux). This should work well on the
        EFL & GTK ports for which the initial OpenType MATH support has been
        tested. Other ports will be handled later.

        No new tests. This is already tested in LayoutTests/mathml/opentype/.

        * css/mathml.css:
        (math): Add "Latin Modern Math" as the first font-family of the <math> element.

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

        Unreviewed EFL build fix since r170224.

        Add retainPlatformLayer() and releasePlatformLayer() in ScrollingStateNodeCoordinatedGraphics.cpp
        as well. Thouse functions were missed in r170224.

        * page/scrolling/ScrollingStateNode.h:
        * page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp:
        (WebCore::LayerRepresentation::retainPlatformLayer):
        (WebCore::LayerRepresentation::releasePlatformLayer):

2014-06-20  Dean Jackson  <dino@apple.com>

        [Mac] Margins for new form controls need tweaking
        https://bugs.webkit.org/show_bug.cgi?id=134135
        <rdar://problem/17262164>

        Reviewed by Sam Weinig.

        With the newer animated controls in OS X Yosemite, we need
        to tweak the fudge-factor margins for positioning. In a recent
        patch I added another fudge, which I'm removing with this. I'm
        not sure where the older values came from, but I've checked with
        the latest AppKit sources and am using the sizes they implement
        for the controls.

        This will rebaseline a lot of tests, since I've made small tweaks
        to the form layout.

        * platform/mac/ThemeMac.mm:
        (WebCore::checkboxMargins): New margin amounts.
        (WebCore::radioSizes): New sizes.
        (WebCore::radioMargins): New margin amounts.
        (WebCore::paintToggleButton): No need to call the positioning fudge any more.
        (WebCore::checkboxOffsets): Deleted.
        (WebCore::radioOffsets): Deleted.

2014-06-20  Alex Christensen  <achristensen@webkit.org>

        Fix css jit on armv7.
        https://bugs.webkit.org/show_bug.cgi?id=134143
        <rdar://problem/17348060>

        Reviewed by Benjamin Poulain.

        This fixes the acid3 test.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
        Correct high and low bits.

2014-06-20  Beth Dakin  <bdakin@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=134117
        Unreproducible crashes under WebCore::ScrollingTree::updateTreeFromStateNode() 
        from messaging a deleted Obj-C object
        -and corresponding-
        <rdar://problem/17149252>

        Reviewed by Simon Fraser.

        This is a speculative fix. It makes LayerRepresentation retain m_platformLayer.

        * WebCore.exp.in:
        * page/scrolling/ScrollingStateNode.h:
        (WebCore::LayerRepresentation::LayerRepresentation):
        (WebCore::LayerRepresentation::~LayerRepresentation):
        (WebCore::LayerRepresentation::operator=):
        (WebCore::LayerRepresentation::operator==):
        (WebCore::LayerRepresentation::operator ==): Deleted.

        Make this ASSERT an ASSERT_WITH_SECURITY_IMPLICATION
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::updateTreeFromStateNode):

        Moved ScrollingStateNodeMac.mm, which was empty anyway, to cocoa/
        ScrollingStateNode.mm so that iOS can use it too.
        * page/scrolling/cocoa: Added.
        * page/scrolling/cocoa/ScrollingStateNode.mm: Copied from page/scrolling/mac/ScrollingStateNodeMac.mm.

        Actual implementation for retain and release.
        (WebCore::LayerRepresentation::retainPlatformLayer):
        (WebCore::LayerRepresentation::releasePlatformLayer):

        Deleted.
        * page/scrolling/mac/ScrollingStateNodeMac.mm: Removed.

2014-06-19  Zalan Bujtas  <zalan@apple.com>

        Introduce RenderLayer::offsetFromAncestorLayer() to make convertToLayerCoords() calls with
        LayoutPoint(0, 0) as parameter more explicit.
        https://bugs.webkit.org/show_bug.cgi?id=134092

        Reviewed by Simon Fraser.

        Most of the RenderLayer::convertToLayerCoords() callers are only interested in
        the offset from the ancestor layer by passing LayoutPoint(0, 0) as the coordinate to convert.
        Introducing offsetFromAncestorLayer() makes those calls more explicit/self-explanatory.
        It helps simplifying the callsite's code.

        No change in functionality.

        * rendering/RenderGeometryMap.cpp:
        (WebCore::RenderGeometryMap::mapToContainer):
        (WebCore::RenderGeometryMap::pushMappingsToAncestor):
        (WebCore::RenderGeometryMap::push):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::computeOffsetFromRoot):
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::expandClipRectForRegionAndReflection):
        (WebCore::expandClipRectForDescendantsAndReflection):
        (WebCore::transparencyClipBox):
        (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
        (WebCore::accumulateOffsetTowardsAncestor):
        (WebCore::RenderLayer::convertToLayerCoords):
        (WebCore::RenderLayer::offsetFromAncestorLayer):
        (WebCore::RenderLayer::clipToRect):
        (WebCore::RenderLayer::paintLayerContents):
        (WebCore::RenderLayer::paintLayerByApplyingTransform):
        (WebCore::RenderLayer::collectFragments):
        (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
        (WebCore::RenderLayer::createLocalTransformState):
        (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateCompositedBounds):
        (WebCore::RenderLayerBacking::updateGeometry):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::repaintInCompositedAncestor):

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

        Removing dead code in platform/graphics/gpu
        https://bugs.webkit.org/show_bug.cgi?id=134065

        Reviewed by Simon Fraser.

        No new tests because there is no behavior change.

        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/LoopBlinnClassifier.cpp: Removed.
        * platform/graphics/gpu/LoopBlinnClassifier.h: Removed.
        * platform/graphics/gpu/LoopBlinnConstants.h: Removed.
        * platform/graphics/gpu/LoopBlinnLocalTriangulator.cpp: Removed.
        * platform/graphics/gpu/LoopBlinnLocalTriangulator.h: Removed.
        * platform/graphics/gpu/LoopBlinnMathUtils.cpp: Removed.
        * platform/graphics/gpu/LoopBlinnMathUtils.h: Removed.
        * platform/graphics/gpu/LoopBlinnPathCache.cpp: Removed.
        * platform/graphics/gpu/LoopBlinnPathCache.h: Removed.
        * platform/graphics/gpu/LoopBlinnPathProcessor.h: Removed.
        * platform/graphics/gpu/LoopBlinnShader.cpp: Removed.
        * platform/graphics/gpu/LoopBlinnShader.h: Removed.
        * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Removed.
        * platform/graphics/gpu/LoopBlinnSolidFillShader.h: Removed.
        * platform/graphics/gpu/LoopBlinnTextureCoords.cpp: Removed.
        * platform/graphics/gpu/LoopBlinnTextureCoords.h: Removed.
        * platform/graphics/gpu/Shader.cpp: Removed.
        * platform/graphics/gpu/Shader.h: Removed.
        * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
        * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
        * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
        * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: Removed.
        * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Removed.
        * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: Removed.
        * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Removed.
        * platform/graphics/gpu/opencl/OpenCLFEImage.cpp: Removed.
        * platform/graphics/gpu/opencl/OpenCLFEMerge.cpp: Removed.
        * platform/graphics/gpu/opencl/OpenCLFESourceAlpha.cpp: Removed.
        * platform/graphics/gpu/opencl/OpenCLFESourceGraphic.cpp: Removed.
        * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp: Removed.
        * platform/graphics/gpu/opencl/OpenCLHandle.h: Removed.

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

        [iOS] Support Khmer and Lao fallback fonts
        https://bugs.webkit.org/show_bug.cgi?id=134114

        Reviewed by Enrica Casucci.

        iOS has fonts which have glyphs for the Khmer and Lao languages.

        This patch also does a little refactoring of the language-specific fallback
        font path to increase readability.

        Test: fast/text/khmer-lao-font.html

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::languageSpecificFallbackFont):
        (WebCore::FontCache::systemFallbackForCharacters):

2014-06-20  Anders Carlsson  <andersca@apple.com>

        Give NPAPI post requests a default content type
        https://bugs.webkit.org/show_bug.cgi?id=134120

        Reviewed by Andreas Kling.

        * WebCore.exp.in:

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

        REGRESSION (r169972): fix issue when removing masks from compositing layers
        https://bugs.webkit.org/show_bug.cgi?id=134118
        <rdar://problem/17366654>

        Reviewed by Dean Jackson.
        
        After r169972 when removing the mask, we could destroy the mask
        layer before the call into m_graphicsLayer->setMaskLayer(), which would
        try to call functions on the old mask. Fix by clearing the mask layer
        on the GraphicsLayer before the mask layer gets destroyed.

        Test: compositing/masks/toggle-mask.html

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

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

        [Cocoa] Release freed up blocks from the JS heap after simulated memory pressure.
        <https://webkit.org/b/134112>

        Reviewed by Mark Hahnenberg.

        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        (WebCore::MemoryPressureHandler::install):

2014-06-20  Zalan Bujtas  <zalan@apple.com>

        Remove redundant RenderLayer::computeOffsetFromRoot() function.
        https://bugs.webkit.org/show_bug.cgi?id=134088

        Reviewed by Benjamin Poulain.

        No change in functionality.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        (WebCore::RenderLayer::computeOffsetFromRoot): Deleted.
        * rendering/RenderLayer.h:

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

        [iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
        https://bugs.webkit.org/show_bug.cgi?id=134085
        <rdar://problem/16440586>

        Reviewed by Tim Horton.
        
        When nodes were detached from the scrolling tree, we would previously throw away
        all descendant nodes, expecting that they would be re-attached as we walk the compositing
        layer tree in RenderLayerCompositor.
        
        However, this doesn't work across frame boundaries; the subframe may never update
        its compositing layers again, so would lose all its scrolling nodes.
        
        Fix by having ScrollingStateTree::detachNode() by default set aside subframe nodes
        into a hash map. On reattach, we'll look in the hash map and pull out an existing node
        (with its children intact) if possible.

        Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html
               platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html
               platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame.html

        * page/scrolling/ScrollingStateNode.cpp:
        (WebCore::ScrollingStateNode::ScrollingStateNode):
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::attachNode):
        (WebCore::ScrollingStateTree::detachNode):
        (WebCore::ScrollingStateTree::clear):
        (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
        (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
        * page/scrolling/ScrollingStateTree.h:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitNewTreeState): Go back to removing the deleted
        nodes from m_nodeMap first.
        (WebCore::ScrollingTree::removeDestroyedNodes): There is no need for this to
        actually make use of ScrollingTreeNode* any more; the ASSERT(!node->parent())
        is bogus because it can fire when whole subtrees are removed, and to clear the
        latched node we just need the ID.

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

        Handle scrolling tree modifications which remove intermediate nodes
        https://bugs.webkit.org/show_bug.cgi?id=134082

        Reviewed by Tim Horton.

        When updating the scrolling tree from the state tree, we failed to maintain
        the children arrays correctly. Fix by removing all children on scrolling nodes,
        and allowing the calls on children to add them back. A temporary hash map
        keeps the nodes alive.
        
        The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
        to make it easier to handle removal followed by re-insertion.

        * WebCore.exp.in:
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::attachNode): If a node is (possibly re-)added,
        remove it from m_nodesRemovedSinceLastCommit.remove.
        (WebCore::ScrollingStateTree::willRemoveNode):
        (WebCore::ScrollingStateTree::setRemovedNodes):
        * page/scrolling/ScrollingStateTree.h:
        (WebCore::ScrollingStateTree::removedNodes):
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitNewTreeState):
        (WebCore::ScrollingTree::updateTreeFromStateNode): Clean up to have only one call
        to updateBeforeChildren(), and remove all children from the scrolling node
        before visiting state children.
        (WebCore::ScrollingTree::removeDestroyedNodes): It was very wrong to assume
        that all non-root nodes were parented in the root! Now we don't need to
        remove from the parent anyway.
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ScrollingTreeNode.h:
        (WebCore::ScrollingTreeNode::children):

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

        Make ScrollingTreeNodes refounted, for easier tree reconfiguration
        https://bugs.webkit.org/show_bug.cgi?id=134075

        Reviewed by Tim Horton.

        Make ScrollingTreeNode be ref-counted.

        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::updateTreeFromStateNode):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::rootNode):
        * page/scrolling/ScrollingTreeNode.cpp:
        (WebCore::ScrollingTreeNode::appendChild):
        * page/scrolling/ScrollingTreeNode.h:
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::createNode):
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/ios/ScrollingCoordinatorIOS.h:
        * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
        (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
        * page/scrolling/ios/ScrollingTreeIOS.cpp:
        (WebCore::ScrollingTreeIOS::createNode):
        * page/scrolling/ios/ScrollingTreeIOS.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
        (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
        * page/scrolling/mac/ScrollingTreeFixedNode.h:
        * page/scrolling/mac/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::create):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
        * page/scrolling/mac/ScrollingTreeStickyNode.h:
        * page/scrolling/mac/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::create):

2014-06-20  Enrica Casucci  <enrica@apple.com>

        iOS build fix after http://trac.webkit.org/changeset/170167.

        Reviewed by Geoff Garen.

        * bindings/js/JSDeviceMotionEventCustom.cpp:
        * bindings/js/JSDeviceOrientationEventCustom.cpp:

2014-06-19  Pratik Solanki  <psolanki@apple.com>

        Enable synchronous willSendRequest on iOS
        https://bugs.webkit.org/show_bug.cgi?id=134081
        <rdar://problem/17350927>

        Reviewed by Andreas Kling.

        We lost the call to make willSendrequest callbacks be synchronous if possible during code
        refactoring. The call is present in ResourceHandleMac.mm but that code is not called when
        we use the CFNetwork based loader. Call the SPI in setupRequest().

        No new tests because existing tests should cover this functionality.

        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):

2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Do not build quota files when QUOTA is disabled
        https://bugs.webkit.org/show_bug.cgi?id=134101

        Reviewed by Philippe Normand.

        * CMakeLists.txt: Remove exception for GTK+ that is no longer
        required since r170173.
        * PlatformGTK.cmake: Generate GObject DOM bindings for Quota when enabled.

2014-06-20  Manuel Rego Casasnovas  <rego@igalia.com>

        [CSS Grid Layout] Add GridSpan::iterator
        https://bugs.webkit.org/show_bug.cgi?id=134058

        Reviewed by Bem Jones-Bey.

        Once that GridResolvedPosition has been introduced in r169934, this
        patch adds a GridSpan::iterator which allows to simplify the loops over
        GridResolvedPositions.
        From now on we could use range-based for loops.

        No new tests as it is already covered by current tests
        (fast/css-grid-layout/).

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeNormalizedFractionBreadth): Change loop to
        ranged-based for.
        (WebCore::RenderGrid::insertItemIntoGrid): Ditto.
        (WebCore::RenderGrid::gridAreaBreadthForChild): Ditto.
        * rendering/style/GridCoordinate.h: Define GridSpan::iterator.
        (WebCore::GridSpan::begin): Return resolved initial position.
        (WebCore::GridSpan::end): Return next to resolved final position.
        * rendering/style/GridResolvedPosition.h:
        (WebCore::GridResolvedPosition::operator*): Add operator required by
        range-based for loops.
        (WebCore::GridResolvedPosition::operator!=): Add not equal operator.

2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ debug build after r170174.

        * bindings/gobject/WebKitDOMNodeFilter.cpp:
        (WebKit::nodeFilterObjectDestroyedCallback):

2014-06-20  Tim Horton  <timothy_horton@apple.com>

        LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
        https://bugs.webkit.org/show_bug.cgi?id=134050
        <rdar://problem/17315114>

        Reviewed by Simon Fraser.

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        (WebCore::MemoryPressureHandler::platformReleaseMemory):
        Drain all LayerPools upon memory pressure.

        * platform/graphics/ca/LayerPool.cpp:
        (WebCore::LayerPool::LayerPool):
        (WebCore::LayerPool::~LayerPool):
        (WebCore::LayerPool::allLayerPools):
        (WebCore::LayerPool::sharedPool): Deleted.
        * platform/graphics/ca/LayerPool.h:
        * platform/graphics/ca/PlatformCALayer.cpp:
        (WebCore::PlatformCALayer::createCompatibleLayerWithSize):
        Add createCompatibleLayerWithSize, which optionally tries to take said layer from the LayerPool.

        (WebCore::PlatformCALayer::moveToLayerPool):
        Add moveToLayerPool, which moves the layer to the LayerPool.

        (WebCore::PlatformCALayer::layerPool):
        The LayerPool for each layer is obtained via PlatformCALayer::layerPool(), which subclasses can override for special behaviors.
        The base class uses a global LayerPool.

        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::createTileLayer):
        * platform/graphics/ca/TileGrid.cpp:
        (WebCore::TileGrid::removeTiles):

2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] webkit_dom_document_create_tree_walker impossible to use due to WebKitDOMNodeFilter
        https://bugs.webkit.org/show_bug.cgi?id=93002

        Reviewed by Gustavo Noronha Silva.

        Add custom implementation of WebKitDOMNodeFilter to expose it as
        an interface instead of a class.

        * PlatformGTK.cmake: Add new files to compilation.
        * bindings/gobject/GObjectNodeFilterCondition.cpp: Added.
        (WebCore::GObjectNodeFilterCondition::~GObjectNodeFilterCondition):
        Reset the NodeFilter WebCore object associated to the
        WebKitDOMNodeFilter object.
        (WebCore::GObjectNodeFilterCondition::acceptNode): Call webkit_dom_node_filter_accept_node().
        * bindings/gobject/GObjectNodeFilterCondition.h: Added.
        (WebCore::GObjectNodeFilterCondition::create): Create a new
        GObjectNodeFilterCondition for the given WebKitDOMNodeFilter.
        (WebCore::GObjectNodeFilterCondition::GObjectNodeFilterCondition):
        * bindings/gobject/WebKitDOMNodeFilter.cpp: Added.
        (webkit_dom_node_filter_default_init):
        (webkit_dom_node_filter_accept_node):
        (WebKit::nodeFilterMap): Map NodeFilter WebCore objects to
        WebKitDOMNodeFilter objects.
        (WebKit::nodeFilterObjectDestroyedCallback): Remove the node
        filter form the map when the WebKitDOMNodeFilter objecrt is destroyed.
        (WebKit::kit): Return the WebKitDOMNodeFilter object for the given
        NodeFilter WebCore object.
        (WebKit::core): Get or create a NodeFilter WebCore object
        associated to the given WebKitDOMNodeFilter.
        * bindings/gobject/WebKitDOMNodeFilter.h: Added.
        * bindings/gobject/WebKitDOMNodeFilter.symbols: Added.
        * bindings/gobject/WebKitDOMNodeFilterPrivate.h: Added.
        * bindings/scripts/CodeGeneratorGObject.pm:
        (GenerateFunction): Add exceptions for NodeFilter parameters since
        the core method returns a PassRefPtr.

2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Limit the amount of API exposed to GObject DOM bindings API
        https://bugs.webkit.org/show_bug.cgi?id=133726

        Reviewed by Gustavo Noronha Silva.

        Split the GObject DOM bindings API into stable and unstable. The
        unstable API is not included in the main webkitdom.h file, so that
        to use it users have to include the headers individually and
        define a macro WEBKIT_DOM_USE_UNSTABLE_API. For unstable methods
        of stable classes we generate a {ClassName}Unstable.h header file
        containing the unstable API. From now on we only keep backwards
        compatibility for the stable API.

        * PlatformGTK.cmake: Split GObject DOM bindings related variables
        into Stable and Unstable. Add also
        * bindings/gobject/WebKitDOMCustom.cpp:
        (webkit_dom_html_media_element_set_current_time): Deleted.
        (webkit_dom_text_track_get_kind): Deleted.
        (webkit_dom_text_track_get_mode): Deleted.
        (webkit_dom_text_track_set_mode): Deleted.
        * bindings/gobject/WebKitDOMCustom.h:
        * bindings/gobject/WebKitDOMCustom.symbols: Remove custom symbols
        added due to API changes.
        * bindings/gobject/WebKitDOMPrivate.h: Include webkitdomdefines-unstable.h.
        * bindings/gobject/webkitdom.symbols: Remove all unstable symbols.
        * bindings/scripts/CodeGeneratorGObject.pm:
        (SkipFunction): Do not skip webkit_dom_html_media_element_set_current_time anymore.
        (GenerateHeader): Only force single header include for stable
        headers and add WEBKIT_DOM_USE_UNSTABLE_API #ifdef to unstable headers.
        (GenerateFunction): Only add stable symbols to the symbols
        array. Add function prototypes to main header or unstable header
        depending on whether it's an unstable symbol for a stable class or
        not. Also add Stability gtk-doc tag to unstable methods.
        (GenerateEndHeader): Add required #endifs
        (WriteData): Write also an Unstable.h header when appropriate and
        only generate a symbols file for stable classes.
        (ReadStableSymbols): Read the stable symbols for the current class.
        (GenerateInterface): Call ReadStableSymbols.
        * bindings/scripts/gobject-generate-headers.pl: Generate webkitdomdefines-unstable.h.
        * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
        * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
        * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
        * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
        * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
        * bindings/scripts/test/GObject/WebKitDOMTestException.h:
        * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
        * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
        * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
        * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
        * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
        * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
        * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
        * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
        * bindings/scripts/test/GObject/WebKitDOMattribute.h:
        * bindings/scripts/test/GObject/WebKitDOMreadonly.h:

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

        When simulating memory pressure, GC *after* releasing WebCore resources.

        Since clearing the page cache is likely to create lots of garbage, defer the
        synchronous GC until after the WebCore pressure relief, so we can see the
        effect of clearing out all those pages.

        Rubber-stamped by Gavin Barraclough.

        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
        (WebCore::MemoryPressureHandler::install):

2014-06-18  Sam Weinig  <sam@webkit.org>

        Move generate prototype and constructor classes into the generated implementation files
        https://bugs.webkit.org/show_bug.cgi?id=134054

        Reviewed by Oliver Hunt.

        In an effort to reduce the size of the generated bindings headers, which is important
        as the generated headers get included in a lot of places, this patch moves the prototype
        and constructor declarations from the header to implementation file. This works because,
        for the most part, no code cares about the prototype or constructors except the instance.

        There are a few exceptions which had to be accounted for:
        - The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
          available during initialization, so they remain in the header.
        - JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
          and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
          remains in the header.
        - A few classes had custom constructor functions. Instead of keeping the entire constructor
          in the header, I opted for pulling just the static constructor function into the header, and
          modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
          more specific type was unnecessary.

        As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
        all the headers, which brought in quite a bit.

        * bindings/js/JSAudioContextCustom.cpp:
        (WebCore::constructJSAudioContext):
        (WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
        * bindings/js/JSBlobCustom.cpp:
        (WebCore::constructJSBlob):
        (WebCore::JSBlobConstructor::constructJSBlob): Deleted.
        * bindings/js/JSCryptoCustom.cpp:
        * bindings/js/JSDOMFormDataCustom.cpp:
        (WebCore::constructJSDOMFormData):
        (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
        * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
        * bindings/js/JSDOMPluginArrayCustom.cpp:
        * bindings/js/JSDOMPluginCustom.cpp:
        * bindings/js/JSDataCueCustom.cpp:
        (WebCore::constructJSDataCue):
        (WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
        * bindings/js/JSDataTransferCustom.cpp:
        * bindings/js/JSEventCustom.cpp:
        * bindings/js/JSFileReaderCustom.cpp:
        * bindings/js/JSHistoryCustom.cpp:
        * bindings/js/JSIDBAnyCustom.cpp:
        * bindings/js/JSIDBDatabaseCustom.cpp:
        * bindings/js/JSIDBObjectStoreCustom.cpp:
        * bindings/js/JSImageConstructor.cpp:
        (WebCore::JSImageConstructor::finishCreation):
        * bindings/js/JSImageDataCustom.cpp:
        * bindings/js/JSInspectorFrontendHostCustom.cpp:
        * bindings/js/JSLocationCustom.cpp:
        * bindings/js/JSMessagePortCustom.cpp:
        * bindings/js/JSMutationObserverCustom.cpp:
        (WebCore::constructJSMutationObserver):
        (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
        * bindings/js/JSSQLResultSetRowListCustom.cpp:
        * bindings/js/JSSQLTransactionSyncCustom.cpp:
        * bindings/js/JSSVGLengthCustom.cpp:
        * bindings/js/JSSharedWorkerCustom.cpp:
        (WebCore::constructJSSharedWorker):
        (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
        * bindings/js/JSStorageCustom.cpp:
        * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
        * bindings/js/JSWebKitPointCustom.cpp:
        (WebCore::constructJSWebKitPoint):
        (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
        * bindings/js/JSWorkerCustom.cpp:
        (WebCore::constructJSWorker):
        (WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
        * bindings/js/SerializedScriptValue.cpp:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        (GeneratePrototypeDeclaration):
        (GenerateConstructorDeclaration):
        (GenerateConstructorHelperMethods):
        (HeaderNeedsPrototypeDeclaration):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        * bindings/scripts/test/JS/JSTestException.cpp:
        * bindings/scripts/test/JS/JSTestException.h:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        * bindings/scripts/test/JS/JSTestNode.cpp:
        * bindings/scripts/test/JS/JSTestNode.h:
        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
        * bindings/scripts/test/JS/JSTestNondeterministic.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        * bindings/scripts/test/JS/JSTestObj.h:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        * bindings/scripts/test/JS/JSattribute.cpp:
        * bindings/scripts/test/JS/JSattribute.h:
        * bindings/scripts/test/JS/JSreadonly.cpp:
        * bindings/scripts/test/JS/JSreadonly.h:


2014-06-19  peavo@outlook.com  <peavo@outlook.com>

        [Curl] Compile errors related to http header field names.
        https://bugs.webkit.org/show_bug.cgi?id=134029

        Reviewed by Brent Fulgham.

        Http header field names should now be specified with an enum, not a string.

        * platform/network/curl/MultipartHandle.cpp:
        (WebCore::MultipartHandle::didReceiveResponse):
        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::getProtectionSpace):

2014-06-19  Anders Carlsson  <andersca@apple.com>

        Put the divider in the right place.

        * DerivedSources.make:

2014-06-19  Anders Carlsson  <andersca@apple.com>

        Address a review comment from Darin.

        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::willLoadXHR):

2014-06-19  Anders Carlsson  <andersca@apple.com>

        Simplify two HistoryController member functions
        https://bugs.webkit.org/show_bug.cgi?id=134064

        Reviewed by Dan Bernstein.

        Remove the FrameLoadType parameter from recursiveSetProvisionalItem,
        use early returns and modern loops.

        * loader/HistoryController.cpp:
        (WebCore::HistoryController::goToItem):
        (WebCore::HistoryController::recursiveSetProvisionalItem):
        (WebCore::HistoryController::recursiveGoToItem):
        * loader/HistoryController.h:

2014-06-19  David Kilzer  <ddkilzer@apple.com>

        MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
        <http://webkit.org/b/134052>

        Reviewed by Eric Carlson.

        Fixes the following static analyzer warning:

            WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:688:43: warning: Potential leak of an object stored into 'outOfBandTracks'
                    NSMutableArray* outOfBandTracks = [[NSMutableArray alloc] init];
                                                      ^

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
        Use RetainPtr<NSMutableArray> to prevent a leak.  Use
        Objective-C literals to clean up the code.

2014-06-18  Zan Dobersek  <zdobersek@igalia.com>

        ScriptExecutionContext::Task, FileThread::Task parameters should be values
        https://bugs.webkit.org/show_bug.cgi?id=134035

        Reviewed by Anders Carlsson.

        r170106 and similar previous changesets enforced ScriptExecutionContext::Task and
        FileThread::Task parameters as rvalue references. There's technically nothing wrong
        with that, but since both classes are move-only it is also not strictly required.
        Accepting these parameters as values is more common in C++ value semantics as well.

        * dom/Document.cpp:
        (WebCore::Document::postTask):
        * dom/Document.h:
        * dom/ScriptExecutionContext.h:
        * fileapi/FileThread.cpp:
        (WebCore::FileThread::postTask):
        * fileapi/FileThread.h:
        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::SharedWorkerProxy::postTaskToLoader):
        (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::postTask):
        * workers/WorkerGlobalScope.h:
        * workers/WorkerLoaderProxy.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::postTaskToLoader):
        (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
        * workers/WorkerMessagingProxy.h:
        * workers/WorkerRunLoop.cpp:
        (WebCore::WorkerRunLoop::postTask):
        (WebCore::WorkerRunLoop::postTaskAndTerminate):
        (WebCore::WorkerRunLoop::postTaskForMode):
        (WebCore::WorkerRunLoop::Task::create):
        (WebCore::WorkerRunLoop::Task::Task):
        * workers/WorkerRunLoop.h:

2014-06-18  James Craig  <jcraig@apple.com>

        Web Inspector: AXI: expose aria-relevant
        https://bugs.webkit.org/show_bug.cgi?id=130913

        Reviewed by Joseph Pecoraro.

        Expose ARIA live region relevance in Web Inspector.
        E.g. "Live: Assertive (Additions, Text)"

        Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html

        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): Support for liveRegionRelevant.
        * inspector/protocol/DOM.json: Defined enum values and array passed to client.

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

        Add rebeccapurple to CSS named color list
        https://bugs.webkit.org/show_bug.cgi?id=133804

        Reviewed by Jer Noble.

        Add the named color "rebeccapurple" (#639).

        * css/SVGCSSValueKeywords.in:
        * platform/ColorData.gperf:

2014-06-11  Jeffrey Pfau  <jpfau@apple.com>

        Fix flaky beforeload tests
        https://bugs.webkit.org/show_bug.cgi?id=133685

        Reviewed by David Kilzer.

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

2014-06-18  Anders Carlsson  <andersca@apple.com>

        Make FrameLoadType a strongly typed enum
        https://bugs.webkit.org/show_bug.cgi?id=134047

        Reviewed by Andreas Kling.

        * history/BackForwardController.cpp:
        (WebCore::BackForwardController::goBackOrForward):
        (WebCore::BackForwardController::goBack):
        (WebCore::BackForwardController::goForward):
        * history/PageCache.cpp:
        (WebCore::logCanCachePageDecision):
        (WebCore::PageCache::canCache):
        * loader/FrameLoader.cpp:
        (WebCore::isBackForwardLoadType):
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::loadURLIntoChildFrame):
        (WebCore::FrameLoader::prepareForLoadStart):
        (WebCore::FrameLoader::loadFrameRequest):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::reloadWithOverrideEncoding):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::isReplacing):
        (WebCore::FrameLoader::setReplacing):
        (WebCore::FrameLoader::subresourceCachePolicy):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
        (WebCore::FrameLoader::shouldPerformFragmentNavigation):
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        * loader/FrameLoaderTypes.h:
        * loader/HistoryController.cpp:
        (WebCore::HistoryController::restoreDocumentState):
        (WebCore::HistoryController::updateForReload):
        (WebCore::HistoryController::isReplaceLoadTypeWithProvisionalItem):
        (WebCore::HistoryController::isReloadTypeWithProvisionalItem):
        * loader/NavigationAction.cpp:
        (WebCore::navigationType):
        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::PolicyChecker):
        (WebCore::PolicyChecker::checkNavigationPolicy):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::cachePolicy):
        * loader/icon/IconController.cpp:
        (WebCore::IconController::startLoader):

2014-06-18  Alex Christensen  <achristensen@webkit.org>

        [curl] Unreviewed speculative build fix after r170021.

        * platform/network/curl/CurlCacheEntry.cpp:
        (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
        (WebCore::CurlCacheEntry::parseResponseHeaders):
        * platform/network/curl/CurlDownload.cpp:
        (WebCore::CurlDownload::didReceiveHeader):
        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::getProtectionSpace):
        (WebCore::headerCallback):
        Use HTTPHeaderName constants.

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

        Move the removeNode() tree walking from ScrollingStateNote into ScrollingStateTree
        https://bugs.webkit.org/show_bug.cgi?id=134043

        Reviewed by Beth Dakin.

        It's cleaner if ScrollingStateTree does the descendant walk when removing nodes.
        We can simply start the "willBeRemoved" walk at the node in question.
        
        Have willRemoveNode() just remove the node from the m_stateNodeMap directly, rather
        than this happening in a separate walk of m_nodesRemovedSinceLastCommit.

        * page/scrolling/ScrollingStateNode.cpp:
        (WebCore::ScrollingStateNode::removeDescendant): Deleted.
        (WebCore::ScrollingStateNode::willBeRemovedFromStateTree): Deleted.
        * page/scrolling/ScrollingStateNode.h:
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::attachNode):
        (WebCore::ScrollingStateTree::detachNode):
        (WebCore::ScrollingStateTree::clear):
        (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
        (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
        (WebCore::ScrollingStateTree::willRemoveNode):
        (WebCore::ScrollingStateTree::removeNode): Deleted.
        * page/scrolling/ScrollingStateTree.h:

2014-06-18  Alex Christensen  <achristensen@webkit.org>

        [iOS WebGL] Fixed WEBGL_compressed_texture_pvrtc.
        https://bugs.webkit.org/show_bug.cgi?id=133561
        
        Based on Blink r153971 by bajones@chromium.org.

        Reviewed by Dean Jackson.

        No new tests, but this should fix webgl-compressed-texture-pvrtc.html.

        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
        (WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions):
        Added checks for pvrtc.

2014-06-18  Anders Carlsson  <andersca@apple.com>

        Work around a Windows compiler crash.

        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::createFromSelection):

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

        Subtrees with :first-child and :last-child are not invalidated when siblings are added/removed
        https://bugs.webkit.org/show_bug.cgi?id=133934

        Reviewed by Antti Koivisto.

        When adding/removing nodes on an element, we try to invalidate only the elements that are
        affected. In the case of :first-child and :last-child, that optimizations is implemented
        through two types of flags that are updated during style resolution.

        The first flag is childrenAffectedByFirstChildRules (childrenAffectedByLastChildRules),
        set on the parent of any element that could be affected by :first-child (:last-child).

        The other part of the optimization is marking the style itself with firstChildState (lastChildState)
        to further reduce invalidations.

        The problem in this case happen with a subtree of element is detached. Since there is no renderer,
        the computed style is resolved ad-hoc and stored directly on the element. When the element is moved,
        the computed style was never cleared because the invalidation optimizations were not handling
        elements without style.

        Credit to Yusuke Suzuki for discovering the issue and creating test cases.

        Tests: fast/css/getComputedStyle/empty-update-without-renderer.html
               fast/css/getComputedStyle/first-child-update-without-renderer.html
               fast/css/getComputedStyle/last-child-update-without-renderer.html

        * dom/Element.cpp:
        (WebCore::checkForEmptyStyleChange):
        Clean up: pull the style directly from the function instead of expection the call sites to do that.
        Refine the checks to avoid invalidation.

        (WebCore::checkForSiblingStyleChanges):
        Do not early return if the parent is detached, the children may still need invalidation.

        When there is no renderer, assume the worst first-child/last-child and force the invalidation.

        (WebCore::Element::childrenChanged):

2014-06-18  Daniel Bates  <dabates@apple.com>

        REGRESSION (r167856): Unable to log into HSBC app
        https://bugs.webkit.org/show_bug.cgi?id=133991
        <rdar://problem/17044839>

        Reviewed by David Kilzer.

        Following <http://trac.webkit.org/changeset/167856> we disallow "navigation to any URL that is
        invalid, except for JavaScript URLs, which need not be valid." A byproduct of this policy
        decision is that we no longer notify the WebKit client to about a navigation if the destination
        URL is invalid. And some apps, including the HSBC app for iOS, have logic to intercept URLs
        as a means to pass data from their WebView-embedded web app to the WebView. We should expose a
        setting called allowNavigationToInvalidURL (disabled by default on all ports and conditionally
        enabled on iOS) to toggle whether WebCore allows navigation to any URL, even if its invalid,
        so as to not break clients that intercept URLs and have custom logic to handle them.

        Tests: fast/loader/allow-redirect-to-invalid-url-using-javascript.html
               fast/loader/allow-redirect-to-invalid-url-using-meta-refresh.html
               fast/loader/disallow-redirect-to-invalid-url-using-javascript.html
               fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh.html

        * loader/NavigationScheduler.cpp:
        (WebCore::NavigationScheduler::shouldScheduleNavigation): Modified to only validate
        the URL when the setting allowNavigationToInvalidURL is disabled.
        * page/Settings.in: Added setting allowNavigationToInvalidURL (disabled by default).

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

        Make ScrollingStateNodes refcounted, and other minor cleanup
        https://bugs.webkit.org/show_bug.cgi?id=134040

        Reviewed by Beth Dakin.

        Prepare for future scrolling frame gyrations by making
        ScrollingStateNodes refcounted.
        
        Rename ScrollingStateNode::removeChild() to removeDescendant()
        since that's what it does. Also rename didRemoveNode() to willRemoveNode()
        to better match the behavior.
        
        Use 'auto' in more places.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::syncChildPositions):
        * page/scrolling/ScrollingStateFixedNode.cpp:
        (WebCore::ScrollingStateFixedNode::create):
        (WebCore::ScrollingStateFixedNode::clone):
        * page/scrolling/ScrollingStateFixedNode.h:
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::create):
        (WebCore::ScrollingStateFrameScrollingNode::clone):
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingStateNode.cpp:
        (WebCore::ScrollingStateNode::cloneAndReset):
        (WebCore::ScrollingStateNode::appendChild):
        (WebCore::ScrollingStateNode::removeDescendant):
        (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
        (WebCore::ScrollingStateNode::removeChild): Deleted.
        * page/scrolling/ScrollingStateNode.h:
        (WebCore::ScrollingStateNode::children):
        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
        (WebCore::ScrollingStateOverflowScrollingNode::create):
        (WebCore::ScrollingStateOverflowScrollingNode::clone):
        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
        * page/scrolling/ScrollingStateStickyNode.cpp:
        (WebCore::ScrollingStateStickyNode::create):
        (WebCore::ScrollingStateStickyNode::clone):
        * page/scrolling/ScrollingStateStickyNode.h:
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::attachNode):
        (WebCore::ScrollingStateTree::removeNode):
        (WebCore::ScrollingStateTree::willRemoveNode):
        (WebCore::ScrollingStateTree::didRemoveNode): Deleted.
        * page/scrolling/ScrollingStateTree.h:
        (WebCore::ScrollingStateTree::setRootStateNode):
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::updateTreeFromStateNode):

2014-06-18  Anders Carlsson  <andersca@apple.com>

        Adopt modern C++11 loops and fix WebArchive creation functions
        https://bugs.webkit.org/show_bug.cgi?id=134032

        Reviewed by Andreas Kling.

        Use modern loops in a couple of places, fix DocumentLoader::subresources() to return a Vector,
        and stop using Vectors of PassRefPtrs.

        * WebCore.exp.in:
        * dom/Document.cpp:
        (WebCore::Document::textInserted):
        (WebCore::Document::textRemoved):
        (WebCore::Document::textNodesMerged):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::subresources):
        (WebCore::DocumentLoader::getSubresources): Deleted.
        * loader/DocumentLoader.h:
        * loader/appcache/ApplicationCache.cpp:
        (WebCore::ApplicationCache::dump):
        * loader/appcache/ApplicationCache.h:
        (WebCore::ApplicationCache::resources):
        (WebCore::ApplicationCache::begin): Deleted.
        (WebCore::ApplicationCache::end): Deleted.
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::fillResourceList):
        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
        (WebCore::ApplicationCacheStorage::store):
        (WebCore::ApplicationCacheStorage::empty):
        (WebCore::ApplicationCacheStorage::storeCopyOfCache):
        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::create):
        (WebCore::LegacyWebArchive::createFromSelection):
        * loader/archive/cf/LegacyWebArchive.h:
        * xml/XMLHttpRequestProgressEventThrottle.cpp:
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):

2014-06-18  Alex Christensen  <achristensen@webkit.org>

        Remove duplicate code using sdiv.
        https://bugs.webkit.org/show_bug.cgi?id=133764

        Reviewed by Daniel Bates.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
        Use template sdiv for apple armv7s and arm64.

2014-06-18  Zan Dobersek  <zdobersek@igalia.com>

        ScriptExecutionContext::Task parameters should always be rvalue references
        https://bugs.webkit.org/show_bug.cgi?id=133615

        Reviewed by Darin Adler.

        ScriptExecutionContext::Task parameters should be rvalue references as the
        passed-in objects are always ScriptExecutionContext::Task rvalues that were
        implicitly constructed from a lambda function or rvalues of objects that
        derive from ScriptExecutionContext::Task.

        This isn't really necessary since ScriptExecutionContext::Task is non-copyable
        and we have to use move semantics anyway, but it makes it clear that these
        objects are expiring rvalues that must be properly dealt with.

        * dom/Document.cpp:
        (WebCore::Document::postTask):
        * dom/Document.h:
        * dom/ScriptExecutionContext.h:
        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::SharedWorkerProxy::postTaskToLoader):
        (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::postTask):
        * workers/WorkerGlobalScope.h:
        * workers/WorkerLoaderProxy.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::postTaskToLoader):
        (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
        * workers/WorkerMessagingProxy.h:
        * workers/WorkerRunLoop.cpp:
        (WebCore::WorkerRunLoop::postTask):
        (WebCore::WorkerRunLoop::postTaskAndTerminate):
        (WebCore::WorkerRunLoop::postTaskForMode):
        (WebCore::WorkerRunLoop::Task::create):
        (WebCore::WorkerRunLoop::Task::Task):
        * workers/WorkerRunLoop.h:

2014-06-18  peavo@outlook.com  <peavo@outlook.com>

        [WinCairo] Compile errors when trying to compile CA code.
        https://bugs.webkit.org/show_bug.cgi?id=134030

        Reviewed by Simon Fraser.

        WinCairo does not USE(CA).

        * WebCore.vcxproj/WebCore.vcxproj:
        * platform/graphics/ca/TileController.h:

2014-06-17  Tim Horton  <timothy_horton@apple.com>

        [iOS][wk2] Use ImageDocument to display subframe PDFs
        https://bugs.webkit.org/show_bug.cgi?id=133944
        <rdar://problem/17205983>

        Reviewed by Dan Bates.

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument):
        Make a ImageDocument to show our subframe PDF, if the setting is enabled.

        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::finishedParsing):
        (WebCore::ImageDocument::createDocumentStructure):
        Set the ResourceResponse on the ImageElement upon creation, instead of
        when the load finishes. This way, when the internal CachedImage creates
        its Image, it can have the correct MIME type for the response, and can
        make a PDFDocumentImage if necessary.

        We never noticed this before because CachedImage falls back to making a
        BitmapImage, and that was the only case that was normally used.

        Throw an explicit white background behind PDF ImageDocuments; PDFDocumentImage
        paints with a transparent background, but when used as an ImageDocument
        it seems reasonable to assume that there should be a white page background
        (similar to what PDFPlugin and friends do).

        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::createDocument):
        Don't make a PDFDocument if we want to use an ImageDocument for this subframe PDF.

        * page/Settings.in:

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::isPDFMIMEType):
        * platform/MIMETypeRegistry.h:
        Expose the already implemented pdfMIMETypes table just like all the rest.

2014-06-17  Ryuan Choi  <ryuan.choi@samsung.com>

        Unreviewed build fix with ENABLE_NOSNIFF after r170021

        * loader/cache/CachedScript.cpp:
        (WebCore::CachedScript::mimeTypeAllowedByNosniff):

2014-06-17  Jeremy Jones  <jeremyj@apple.com>

        Improve enter and exit fullscreen transition by using two step transition.
        https://bugs.webkit.org/show_bug.cgi?id=133706

        Reviewed by Simon Fraser.

        setupFullscreen, creates the fullscreen views ready to receive the video layer.
        Once they are in place, didSetupFullscreen will move the video layer into the 
        new view hierarchy and initiate enterFullscreen to animate.

        Reverse process for exit fullscreen.

        * WebCore.exp.in: Add exports.
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (-[WebVideoFullscreenController enterFullscreen:]):
        Refactor into didSetupFullscreen.
        (-[WebVideoFullscreenController didSetupFullscreen]):
        Move the video layer once fullscreen is ready to receive it.
        (-[WebVideoFullscreenController didExitFullscreen]):
        Move the video layer back into we the web page, and initiate cleanup.
        (-[WebVideoFullscreenController didCleanupFullscreen]):
        Refactord cleanup from didExitFullscreen.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add delcarations.
        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
        (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
        Refactored from enterFullscreen. Builds views ready to receive video layer.
        (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
        Animates into fullscreen.
        (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
        Animates from fullscreen. Cleanup is refactored into cleanupFullscreen()
        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
        Refactored from exitFullscreen(), removes views.

2014-06-17  Sam Weinig  <sam@webkit.org>

        Remove unnecessary Structure flags from generated bindings
        https://bugs.webkit.org/show_bug.cgi?id=133992

        Reviewed by Daniel Bates.

        - Remove OverridesVisitChildren flag from DOM prototype objects. They never
          implement visitChildren.
        - Remove OverridesGetOwnPropertySlot and ImplementsHasInstance from DOM constructor
          objects. getOwnPropertySlot is never implemented and ImplementsHasInstance is inherited
          automatically from DOMConstructorObject.
        - If we are not changing any flags, we now don't emit StructureFlags at all for the class.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GeneratePrototypeDeclaration):
        (GenerateConstructorDeclaration):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
        (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
        (WebCore::JSTestCustomNamedGetterPrototype::JSTestCustomNamedGetterPrototype):
        (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
        (WebCore::JSTestEventTargetConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestException.h:
        (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
        (WebCore::JSTestExceptionConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
        (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestInterface.h:
        (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
        (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
        (WebCore::JSTestNamedConstructorConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestNode.h:
        (WebCore::JSTestNodePrototype::JSTestNodePrototype):
        * bindings/scripts/test/JS/JSTestNondeterministic.h:
        (WebCore::JSTestNondeterministicPrototype::JSTestNondeterministicPrototype):
        (WebCore::JSTestNondeterministicConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestObj.h:
        (WebCore::JSTestObjPrototype::JSTestObjPrototype):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
        (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
        * bindings/scripts/test/JS/JSattribute.h:
        (WebCore::JSattributePrototype::JSattributePrototype):
        (WebCore::JSattributeConstructor::createStructure):
        * bindings/scripts/test/JS/JSreadonly.h:
        (WebCore::JSreadonlyPrototype::JSreadonlyPrototype):
        (WebCore::JSreadonlyConstructor::createStructure):

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

        [iOS] Input type=time elements styled with SVG fonts have 0 width
        https://bugs.webkit.org/show_bug.cgi?id=133524

        Reviewed by Simon Fraser.

        Refactor how the LocalizedDateCache returns maximum widths for input elements. Currently,
        measuring the width of an SVG font requires a RenderObject for context, which the
        LocalizedDateCache can't know about (it would be a platform violation). Instead, the
        LocalizedDateCache can return the strings that it would use to measure the width, and the
        caller can actually run the width computation.

        Test: fast/forms/time-input-svg-font.html

        * platform/text/PlatformLocale.h:
        * platform/text/ios/LocalizedDateCache.h:
        * platform/text/ios/LocalizedDateCache.mm:
        (WebCore::LocalizedDateCache::maximumWidthForDateType): Take a delegate which can
        measure text
        (WebCore::LocalizedDateCache::calculateMaximumWidth): Perform maximum width
        computation using delegate.
        * platform/text/mac/LocaleMac.h:
        * platform/text/mac/LocaleMac.mm:
        (WebCore::LocaleMac::formatDateTime):
        (WebCore::LocaleMac::maximumWidthForDateType): Deleted. Short-circuit this and go
        directly to the LocalizedDateCache. This makes sense because we have to explicitly
        insert computed values back into the cache in this new model.
        * rendering/RenderThemeIOS.mm:
        (WebCore::adjustInputElementButtonStyle): Create a delegate and pass it to the
        LocalizedDateCache

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

        [UI-side compositing] fix reflections on composited layers
        https://bugs.webkit.org/show_bug.cgi?id=133942

        Reviewed by Tim Horton.

        Fix reflections on composited layers. There are two main set of changes.
        
        First, a PlatformCALayerRemote which is a clone has to track the layer
        it is a clone of, so it knows where to grab the contents from in the UI process.
        This layer may be told that its contents need updating out of order during
        recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
        to allow a layer to add itself to the set of layers requiring commit.
        
        In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
        to go through clones, and copy their contents from the origin layer.
        
        The second set of changes makes platformCALayerLayerDidDisplay() work for
        UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
        PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
        what the origin layer is.

        Test: compositing/reflections/repaint-with-reflection.html

        * WebCore.exp.in:
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::layerDidDisplay): Deleted.
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::LayerClient::platformCALayerLayerDidDisplay): Deleted.
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::layerDidDisplay):
        (WebCore::GraphicsLayerCA::findOrMakeClone):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/PlatformCALayerClient.h:
        (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
        * platform/graphics/ca/mac/PlatformCALayerMac.h:
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
        (PlatformCALayerMac::copyContentsFromLayer):
        (PlatformCALayerMac::superlayer):
        (PlatformCALayerMac::setContentsChanged): Deleted.
        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
        (PlatformCALayerWinInternal::displayCallback):
        * platform/graphics/mac/WebLayer.mm:
        (-[WebSimpleLayer display]):

2014-06-17  Anders Carlsson  <andersca@apple.com>

        Use strongly typed enums for AnimationState and AnimationInputState
        https://bugs.webkit.org/show_bug.cgi?id=133988

        Reviewed by Tim Horton.

        * page/animation/AnimationBase.cpp:
        (WebCore::AnimationBase::AnimationBase):
        (WebCore::nameForState):
        (WebCore::AnimationBase::updateStateMachine):
        (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
        (WebCore::AnimationBase::updatePlayState):
        (WebCore::AnimationBase::timeToNextService):
        (WebCore::AnimationBase::goIntoEndingOrLoopingState):
        (WebCore::AnimationBase::freezeAtTime):
        (WebCore::AnimationBase::beginAnimationUpdateTime):
        * page/animation/AnimationBase.h:
        (WebCore::AnimationBase::clear):
        (WebCore::AnimationBase::onAnimationStartResponse):
        (WebCore::AnimationBase::waitingToStart):
        (WebCore::AnimationBase::preActive):
        (WebCore::AnimationBase::postActive):
        (WebCore::AnimationBase::fillingForwards):
        (WebCore::AnimationBase::paused):
        (WebCore::AnimationBase::inPausedState):
        (WebCore::AnimationBase::isNew):
        (WebCore::AnimationBase::waitingForStartTime):
        (WebCore::AnimationBase::waitingForStyleAvailable):
        (WebCore::AnimationBase::isAnimatingProperty):
        (WebCore::AnimationBase::styleAvailable):
        (WebCore::AnimationBase::compositeAnimation):
        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::onAnimationEnd):
        (WebCore::ImplicitAnimation::sendTransitionEvent):
        (WebCore::ImplicitAnimation::reset):
        (WebCore::ImplicitAnimation::setOverridden):
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::KeyframeAnimation):
        (WebCore::KeyframeAnimation::animate):
        (WebCore::KeyframeAnimation::sendAnimationEvent):

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

        Avoid synchronous layout in window.scrollTo(0,0) when already at (0,0)
        <https://webkit.org/b/133893>

        Going from 0,0 to 0,0 is a no-op since there is no way a layout will
        affect the current scroll position.

        We don't send scroll events when moving to the previous position,
        so this change is not observable.

        Reviewed by Anders Carlsson.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::scrollTo):

2014-06-17  Alex Christensen  <achristensen@webkit.org>

        Fix css jit register usage on armv7.
        https://bugs.webkit.org/show_bug.cgi?id=133952

        Reviewed by Benjamin Poulain.

        * cssjit/RegisterAllocator.h:
        List r7 as a callee saved register, which it is.
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
        Save r6, which is used as a temporary register and must be preserved.

2014-06-17  Miyoung Shin  <myid.shin@samsung.com>

        Use references instead of pointers to RenderBlock in enclosingBoxModelObject()
        https://bugs.webkit.org/show_bug.cgi?id=133978

        Reviewed by Andreas Kling.

        Just a straightforward conversion from pointers to references.

        No new tests, no behavior change.

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paint):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::enclosingBoxModelObject):
        * rendering/RenderObject.h:

2014-06-17  Zan Dobersek  <zdobersek@igalia.com>

        Cache the gst_query_get_n_buffering_ranges() return value for the for-loop conditional
        https://bugs.webkit.org/show_bug.cgi?id=133953

        Reviewed by Philippe Normand.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::buffered): Avoid the extra call in the for-loop
        conditional expression by caching the return value of gst_query_get_n_buffering_ranges().

2014-06-17  Zan Dobersek  <zdobersek@igalia.com>

        Avoid Vector<char> copies in the OffsetBuffer constructor
        https://bugs.webkit.org/show_bug.cgi?id=133956

        Reviewed by Andreas Kling.

        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::OffsetBuffer::OffsetBuffer): Take the Vector parameter by value and
        move it into the member variable.
        (WebCore::openFunc): Move the Vector object into the OffsetBuffer constructor.

2014-06-17  Jer Noble  <jer.noble@apple.com>

        [MSE] Overwritten samples are removed from buffered ranges using decode times; added samples using presentation times
        https://bugs.webkit.org/show_bug.cgi?id=133959

        Reviewed by Eric Carlson.

        Test: media/media-source/media-source-overlapping-append-buffered.html

        Explicitly call presentationTime() on removed samples, rather than implicitly asking for the iterator's "first"
        member. When iterating over samples, "first" can either be presentation time, or decode time, depending on which
        iteration method is called. In the case of removing samples, this was using the decode time incorrectly.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

2014-06-16  Mihnea Ovidenie  <mihnea@adobe.com>

        [CSSRegions] Region with border radius and overflow:hidden does not clip content
        https://bugs.webkit.org/show_bug.cgi?id=133476

        Reviewed by Andrei Bucur.

        When setting the clip before painting the named flow content,
        use the region's foreground rect to take the region's border radius
        into account if needed.

        Test: fast/regions/region-border-radius-overflow-clip.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):

2014-06-16  Sam Weinig  <sam@webkit.org>

        Extract prototype declaration generation into a helper function
        https://bugs.webkit.org/show_bug.cgi?id=133969

        Reviewed by Dan Bernstein.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GeneratePrototypeDeclaration):

2014-06-16  Sam Weinig  <sam@webkit.org>

        Move forward declaration of bindings static functions into their implementation files
        https://bugs.webkit.org/show_bug.cgi?id=133943

        Reviewed by Geoffrey Garen.

        - Moves the forward declaration of static functions for generated files to the implementation.
        - Adds a new extended attribute, ForwardDeclareInHeader, for functions that still need a 
          forward declaration in the header.

        * bindings/js/JSDOMBinding.h:
        (WebCore::nonCachingStaticFunctionGetter):
        Move this helper here from JSDOMWindowCustom.cpp.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::getOwnPropertySlot):
        Switch to comparing the property name directly rather than looking up in the static table and
        comparing function pointers.

        * bindings/js/JSHistoryCustom.cpp:
        (WebCore::JSHistory::getOwnPropertySlotDelegate):
        Switch to comparing the property name directly rather than looking up in the static table and
        comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.

        * bindings/js/JSLocationCustom.cpp:
        (WebCore::JSLocation::getOwnPropertySlotDelegate):
        (WebCore::JSLocation::putDelegate):
        Switch to comparing the property name directly rather than looking up in the static table and
        comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        Move forward declaration creation to the implementation file where possible.

        * bindings/scripts/IDLAttributes.txt:
        Add ForwardDeclareInHeader.

        * page/DOMWindow.idl:
        * page/History.idl:
        * page/Location.idl:
        Add ForwardDeclareInHeader where necessary.

2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>

        Unreviewed build fix after r170029

        Use String() instead of AtomicString().

        * platform/network/HTTPParsers.cpp:
        (WebCore::parseHTTPHeader):
        * platform/network/soup/ResourceRequestSoup.cpp:
        (WebCore::ResourceRequest::updateSoupMessageHeaders):
        * platform/network/soup/ResourceResponseSoup.cpp:
        (WebCore::ResourceResponse::toSoupMessage):

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

        [Win] Use TileController on Windows
        https://bugs.webkit.org/show_bug.cgi?id=133895

        Reviewed by Tim Horton.

        * WebCore.vcxproj/WebCore.vcxproj: Add Tiled Drawing files.
        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
        * platform/graphics/TiledBacking.h: No longer Cocoa-only.
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Windows
        now uses the same layer type as Mac.
        * platform/graphics/ca/LayerPool.cpp:
        (WebCore::LayerPool::takeLayerWithSize): Use nullptr
        rather than nil for C++ code.
        * platform/graphics/ca/PlatformCALayer.cpp:
        * platform/graphics/ca/PlatformCALayer.h: Expose necessary
        drawing functions for Windows port.
        * platform/graphics/ca/TileController.cpp: Remove unneeded
        header include for WebLayer.
        * platform/graphics/ca/TileCoverageMap.cpp: Correct #includes.
        * platform/graphics/ca/TileGrid.h: Not just for Cococa.
        * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove
        extra whitespace.
        * platform/graphics/ca/mac/PlatformCALayerMac.h: Remove
        unneeded overload.
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        (PlatformCALayer::collectRectsToPaint): Added stub.
        (PlatformCALayer::drawLayerContents): Added.
        (PlatformCALayer::frameForLayer): Added.
        (PlatformCALayerWin::PlatformCALayerWin): Remove unneeded
        assert now that we support these types. Add TileController
        support.
        (PlatformCALayerWin::setEdgeAntialiasingMask): Added.
        (printLayer): Add newly-supported tile types.
        (PlatformCALayerWin::tiledBacking): Added.
        * platform/graphics/ca/win/PlatformCALayerWin.h: Update to
        support Tiled Drawing.
        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
        (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Update to
        recognize newly-supported layer types.
        (PlatformCALayerWinInternal::setNeedsDisplay): Ditto.
        (PlatformCALayerWinInternal::setSublayers): Ditto.
        (PlatformCALayerWinInternal::getSublayers): Ditto.
        (PlatformCALayerWinInternal::removeAllSublayers): Ditto.
        (PlatformCALayerWinInternal::insertSublayer): Ditto.
        (PlatformCALayerWinInternal::sublayerCount): Ditto.
        (PlatformCALayerWinInternal::indexOfSublayer): Ditto.
        (PlatformCALayerWinInternal::sublayerAtIndex): Ditto.
        (PlatformCALayerWinInternal::setBounds): Ditto.
        (PlatformCALayerWinInternal::setFrame): Ditto.
        (PlatformCALayerWinInternal::drawTile): Ditto.
        (PlatformCALayerWinInternal::createTileController): Ditto.
        (PlatformCALayerWinInternal::tiledBacking): Ditto.
        * platform/graphics/ca/win/PlatformCALayerWinInternal.h: Update to use
        TileController.

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

        Remove unnecessary style invalidation in RenderTextControl::styleDidChange().
        <https://webkit.org/b/133949>

        This explicit invalidation of the text control's inner text element
        was hacked in to fix an editing test back in 2011, long before lazy
        render tree construction.

        It should be safe to remove, since doing so doesn't affect any tests.

        Reviewed by Antti Koivisto.

        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::styleDidChange):

2014-06-16  Anders Carlsson  <andersca@apple.com>

        Fix iOS build.

        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::setHeaderFields):

2014-06-16  Anders Carlsson  <andersca@apple.com>

        Accept-Ranges is not specific to GStreamer.

        * platform/network/HTTPHeaderNames.in:

2014-06-16  Anders Carlsson  <andersca@apple.com>

        Don't use AtomicString in HTTPHeaderMap
        https://bugs.webkit.org/show_bug.cgi?id=133957
        <rdar://problem/15256572>

        Reviewed by Andreas Kling.

        Use the string data that comes from the generated HTTPHeaderNames.cpp file
        for sharing header name data instead. In the future we can do something more fancy where
        we'll hash the HTTPHeaderName enum directly, but this is good enough for now.

        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::readHTTPHeaders):
        * WebCore.exp.in:
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::buildObjectForHeaders):
        * loader/CrossOriginPreflightResultCache.cpp:
        (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::parseHeader):
        * loader/cache/CachedResource.cpp:
        (WebCore::shouldUpdateHeaderAfterRevalidation):
        * platform/network/HTTPHeaderMap.cpp:
        (WebCore::HTTPHeaderMap::copyData):
        (WebCore::internHTTPHeaderNameString):
        (WebCore::HTTPHeaderMap::get):
        (WebCore::HTTPHeaderMap::set):
        (WebCore::HTTPHeaderMap::add):
        (WebCore::CaseFoldingCStringTranslator::hash): Deleted.
        (WebCore::CaseFoldingCStringTranslator::equal): Deleted.
        (WebCore::CaseFoldingCStringTranslator::translate): Deleted.
        * platform/network/HTTPHeaderMap.h:
        * platform/network/HTTPHeaderNames.in:
        * platform/network/HTTPParsers.cpp:
        (WebCore::parseHTTPHeader):
        * platform/network/HTTPParsers.h:
        * platform/network/ResourceRequestBase.cpp:
        (WebCore::ResourceRequestBase::httpHeaderField):
        (WebCore::ResourceRequestBase::setHTTPHeaderField):
        (WebCore::ResourceRequestBase::addHTTPHeaderField):
        * platform/network/ResourceRequestBase.h:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::httpHeaderField):
        (WebCore::ResourceResponseBase::setHTTPHeaderField):
        (WebCore::ResourceResponseBase::addHTTPHeaderField):
        * platform/network/ResourceResponseBase.h:
        * platform/network/mac/ResourceRequestMac.mm:
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::platformLazyInit):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::setRequestHeader):
        (WebCore::XMLHttpRequest::setRequestHeaderInternal):
        (WebCore::XMLHttpRequest::getRequestHeader):
        (WebCore::XMLHttpRequest::getResponseHeader):
        * xml/XMLHttpRequest.h:

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

        AX: Safari crashed once in WebCore::AccessibilityObject::ariaIsHidden
        https://bugs.webkit.org/show_bug.cgi?id=133825

        Reviewed by Enrica Casucci.

        Sometimes asking accessibilityIsIgnored() will cause a newObject to be detached immediately after its created. 
        The creation function holds a reference with RefPtr as long as it lives, but when that method returns, the object goes away.

        With that out of the way, I saw the same backtrace lead to updateLayoutIgnorePendingStylesheets being called while still inLayout.

        I tried my best but could not create a reproducible layout test.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::getOrCreate):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::updateBackingStore):

2014-06-16  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed. Add more GStreamer-specific header names that are required
        after changes in r170021, fixing the build for ports using GStreamer.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (StreamingClient::handleResponseReceived):
        * platform/network/HTTPHeaderNames.in:

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

        AX: Crash at WebCore::AXObjectCache::textChanged
        https://bugs.webkit.org/show_bug.cgi?id=133873

        Reviewed by Enrica Casucci.

        This looks like a very similar problem to 
        https://bugs.webkit.org/show_bug.cgi?id=133825

        The object is being created and deallocated almost right away because calling accessibilityIsIgnored triggers
        a deferred layout that invalidates the associated render element.

        Despite my best efforts, I could not come up with a way to reproduce this in a layout test.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::getOrCreate):

2014-06-15  Anders Carlsson  <andersca@apple.com>

        Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
        https://bugs.webkit.org/show_bug.cgi?id=133925

        Reviewed by Sam Weinig.

        * WebCore.exp.in:
        * platform/network/ResourceRequestBase.cpp:
        (WebCore::ResourceRequestBase::setHTTPHeaderFields):
        (WebCore::ResourceRequestBase::addHTTPHeaderFields): Deleted.
        * platform/network/ResourceRequestBase.h:
        * plugins/PluginView.cpp:
        (WebCore::PluginView::handlePost):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createRequest):

2014-06-16  Jeongeun Kim  <je_julie.kim@samsung.com>

        Use references instead of pointers to RenderBlock in RenderObject::enclosingBox().
        https://bugs.webkit.org/show_bug.cgi?id=133902

        Reviewed by Andreas Kling.

        Just a straightforward conversion from pointers to references.

        No new tests, no behavior change.

        * bindings/objc/DOMUIKitExtensions.mm:
        (-[DOMHTMLElement structuralComplexityContribution]):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
        * inspector/InspectorOverlay.cpp:
        (WebCore::buildObjectForRendererFragments):
        * page/EventHandler.cpp:
        (WebCore::scrollNode):
        (WebCore::EventHandler::scrollOverflow):
        (WebCore::EventHandler::logicalScrollOverflow):
        * page/FrameView.cpp:
        (WebCore::FrameView::layout):
        * rendering/RenderBox.cpp:
        (WebCore::computeInlineStaticDistance):
        * rendering/RenderFlowThread.cpp:
        (WebCore::RenderFlowThread::computedRegionRangeForBox):
        (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
        (WebCore::RenderFlowThread::objectInFlowRegion):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::enclosingBox): Removed FIXME comment
        * rendering/RenderObject.h:
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::owningRenderer):

2014-06-16  Anders Carlsson  <andersca@apple.com>

        Use HTTPHeaderName in more places
        https://bugs.webkit.org/show_bug.cgi?id=133948

        Reviewed by Andreas Kling.

        * loader/cache/CachedRawResource.cpp:
        (WebCore::shouldIgnoreHeaderForCacheReuse):
        * platform/network/HTTPHeaderNames.in:
        * xml/XMLHttpRequest.cpp:
        (WebCore::isSetCookieHeader):
        (WebCore::isForbiddenRequestHeader):
        (WebCore::XMLHttpRequest::isAllowedHTTPHeader):
        (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Deleted.
        (WebCore::staticData): Deleted.

2014-06-16  Anders Carlsson  <andersca@apple.com>

        Add HTTPHeaderName overloads on ResourceResponseBase
        https://bugs.webkit.org/show_bug.cgi?id=133946

        Reviewed by Andreas Kling.

        * WebCore.exp.in:
        * dom/Document.cpp:
        (WebCore::Document::lastModified):
        * loader/CrossOriginAccessControl.cpp:
        (WebCore::passesAccessControlCheck):
        * loader/CrossOriginPreflightResultCache.cpp:
        (WebCore::CrossOriginPreflightResultCacheItem::parse):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::receivedFirstData):
        (WebCore::FrameLoader::didBeginDocument):
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::createResourceHandle):
        * loader/cache/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::canUseSheet):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):
        * loader/cache/CachedScript.cpp:
        (WebCore::CachedScript::mimeType):
        * platform/network/HTTPHeaderNames.in:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::httpHeaderField):
        (WebCore::ResourceResponseBase::setHTTPHeaderField):
        * platform/network/ResourceResponseBase.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getAllResponseHeaders):
        (WebCore::XMLHttpRequest::getResponseHeader):
        (WebCore::XMLHttpRequest::responseMIMEType):
        (WebCore::XMLHttpRequest::didReceiveResponse):

2014-04-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>

        [Bindings] "nullable" sequence support is incomplete (i.e. sequence<NativeType>?)
        https://bugs.webkit.org/show_bug.cgi?id=131240

        Reviewed by Darin Adler.

        Nullable sequences are not fully supported in WebKit's
        code generator machinery. Although the generated code
        does add "is nullable" check to the evaluation condition
        (i.e. if (arg.isNull() || ...)), when the JSValue
        that holds a "null" JSObject is actually to be "converted"
        to a native Vector<T>, it fails.

        The reason for the failure is in JSDOMBindings::toNativeArray.
        This method verifies that JSValue does not hold a "non-null"
        object, and it bails out.
        Analogly, the "ref ptr" variant of this method (toRefPtrNativeArray)
        does support nullables.

        Patch fixes it be checking for a "null" JSValue check before hand.

        Tests: Binding tests updated.

        * bindings/js/JSDOMBinding.h:
        (WebCore::toNativeArray):
        * bindings/scripts/CodeGeneratorJS.pm:
        (JSValueToNative):
        * Modules/websocket/WebSocket.idl:
        Removed one overload ctor now that
        we can use nullable sequences.

2014-06-16  Jer Noble  <jer.noble@apple.com>

        [MSE][Mac] Occasional image corruption after seeking
        https://bugs.webkit.org/show_bug.cgi?id=133879

        Reviewed by Eric Carlson.

        Change the order of operations for seeks: change the current time of the AVSampleBufferRenderSynchronizer
        before flushing and appending non-displaying samples.

        Rather than having a single function which retrieves the fast seek time and then seeks, split this out
        into two functions: one which gets the fast seek time, and one which seeks. (The later of course already
        exists: seekToTime()).

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
        (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Renamed from seekToTime()
        (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Deleted.

2014-06-16  Zan Dobersek  <zdobersek@igalia.com>

        Have ScriptExecutionContext::Task functions take in a ScriptExecutionContext reference
        https://bugs.webkit.org/show_bug.cgi?id=133795

        Reviewed by Andreas Kling.

        The pointer to the ScriptExecutionContext object that is passed to the C++11 lambdas or
        helper functions wrapped in ScriptExecutionContext::Task is never null, so that parameter
        should be a reference instead.

        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::~Database):
        (WebCore::Database::runTransaction):
        (WebCore::Database::scheduleTransactionCallback):
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::openDatabase):
        * Modules/webdatabase/SQLCallbackWrapper.h:
        (WebCore::SQLCallbackWrapper::clear):
        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
        (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
        (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks): Dereference the
        member variable that holds a never-null pointer to the ScriptExecutionContext. This should
        similarly be a reference.
        (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback):
        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::workerGlobalScopeDidSend):
        (WebCore::workerGlobalScopeDidGetBufferedAmount):
        (WebCore::workerGlobalScopeDidConnect):
        (WebCore::workerGlobalScopeDidReceiveMessage):
        (WebCore::workerGlobalScopeDidReceiveBinaryData):
        (WebCore::workerGlobalScopeDidUpdateBufferedAmount):
        (WebCore::workerGlobalScopeDidStartClosingHandshake):
        (WebCore::workerGlobalScopeDidClose):
        (WebCore::workerGlobalScopeDidReceiveMessageError):
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend):
        (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume):
        * Modules/websockets/WorkerThreadableWebSocketChannel.h:
        * bindings/js/JSCallbackData.h:
        (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
        * bindings/js/JSDOMGlobalObjectTask.cpp:
        (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
        * dom/Document.cpp:
        (WebCore::Document::postTask):
        (WebCore::Document::pendingTasksTimerFired):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
        * dom/ScriptExecutionContext.h:
        (WebCore::ScriptExecutionContext::Task::performTask):
        (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
        * dom/StringCallback.cpp:
        (WebCore::StringCallback::scheduleCallback):
        * fileapi/FileReader.cpp:
        (WebCore::delayedAbort):
        (WebCore::FileReader::abort):
        (WebCore::FileReader::doAbort): Deleted.
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel):
        (WebCore::workerGlobalScopeDidSendData):
        (WebCore::workerGlobalScopeDidReceiveResponse):
        (WebCore::workerGlobalScopeDidReceiveData):
        (WebCore::workerGlobalScopeDidFinishLoading):
        (WebCore::workerGlobalScopeDidFail):
        (WebCore::workerGlobalScopeDidFailAccessControlCheck):
        (WebCore::workerGlobalScopeDidFailRedirectCheck):
        * loader/WorkerThreadableLoader.h:
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::postListenerTask):
        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
        (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches):
        * loader/cache/MemoryCache.h:
        * workers/DefaultSharedWorkerRepository.cpp:
        (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
        (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
        (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
        * workers/WorkerEventQueue.cpp:
        (WebCore::WorkerEventQueue::enqueueEvent):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::close):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
        (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
        (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
        (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
        (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
        (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
        (WebCore::WorkerMessagingProxy::connectToInspector):
        (WebCore::WorkerMessagingProxy::disconnectFromInspector):
        (WebCore::WorkerMessagingProxy::sendMessageToInspector):
        (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
        (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
        (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
        (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
        (WebCore::WorkerMessagingProxy::reportPendingActivity):
        * workers/WorkerRunLoop.cpp:
        (WebCore::WorkerRunLoop::Task::performTask):
        * workers/WorkerScriptLoader.cpp:
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::stop):
        (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):

2014-06-16  Zan Dobersek  <zdobersek@igalia.com>

        Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
        https://bugs.webkit.org/show_bug.cgi?id=133677

        Reviewed by Anders Carlsson.

        * WebCore.exp.in: Update the changed symbol.
        * page/Page.cpp:
        (WebCore::Page::findStringMatchingRanges): The method expects the matchRanges parameter to be non-null,
        so it should take in that parameter by reference instead of pointer.
        * page/Page.h:

2014-06-16  Radu Stavila  <stavila@adobe.com>

        REGRESSION (r168046): Incorrect layout for multicol spanners when moving from one thread to another
        https://bugs.webkit.org/show_bug.cgi?id=133589

        Reviewed by Antti Koivisto.

        When a spanner is moved from a multicol thre