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

        Merge r183524.

    2015-04-28  Brent Fulgham  <bfulgham@apple.com>

            REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
            https://bugs.webkit.org/show_bug.cgi?id=144366
            <rdar://problem/20533513>

            Reviewed by Dean Jackson.

            * rendering/RenderBlockFlow.cpp:
            (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
            before attempting to dereference it. 

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

        Merge r183280. rdar://problem/20694404

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

        Merge r181656 and r182985.

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

        Roll out r181656. rdar://problem/20545362

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

        Merge r182835. rdar://problem/20645249

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r182076. rdar://problem/20545378

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r181656. rdar://problem/20545362

    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.

            * platform/graphics/DisplayRefreshMonitorManager.cpp:
            (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
            (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
            Silently handle the case where we failed to make a DisplayRefreshMonitor.

            * platform/graphics/DisplayRefreshMonitor.h:
            * platform/graphics/DisplayRefreshMonitorClient.h:
            * platform/graphics/GraphicsLayerUpdater.cpp:
            (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
            * platform/graphics/GraphicsLayerUpdater.h:
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
            * rendering/RenderLayerCompositor.h:
            Adjust to the new signature of createDisplayRefreshMonitor, and return
            an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.

            * page/ChromeClient.h:
            Return Nullopt (indicating a lack of override) by default.

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

        Merge r180520. rdar://problem/20545427

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179850. rdar://problem/20545362

    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-04-17  Lucas Forschler  <lforschler@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-17  Lucas Forschler  <lforschler@apple.com>

    Rollout r182965

2015-04-17  Lucas Forschler  <lforschler@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-17  Lucas Forschler  <lforschler@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-17  Lucas Forschler  <lforschler@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-17  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-03-31  Babak Shafiei  <bshafiei@apple.com>

        Merge r182204.

    2015-03-31  Jer Noble  <jer.noble@apple.com>

            [Mac] Songza.com fails to play; QTKit path reports it is always "seeking".
            https://bugs.webkit.org/show_bug.cgi?id=143274

            Rubber-stamped by Eric Carlson.

            MediaTime::invalidTime() is always greater than any valid time. So when
            checking to see if MediaPlayerPrivateQTKit is seeking, first check if the
            m_seekTo time is valid before checking whether it's > 0.

            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::MediaPlayerPrivateQTKit::seeking):

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

        Merge r182014.

    2015-03-26  Jer Noble  <jer.noble@apple.com>

            [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
            https://bugs.webkit.org/show_bug.cgi?id=143080

            Reviewed by Eric Carlson.

            Null-check m_certificate before dereferencing.

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

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

        Merge r181587.

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

            WebKit1 Clients Are Not Reliably Repainted
            https://bugs.webkit.org/show_bug.cgi?id=142750
            <rdar://problem/20042453>

            Reviewed by Simon Fraser.

            * page/FrameView.cpp:
            (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
            the early return so we can see when this happening in debug builds.
            * page/FrameView.h:
            (WebCore::FrameView::inPaintableState): Added.

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

        Merge r181575.

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

            Addressing additional review feedback after http://trac.webkit.org/changeset/181565
            https://bugs.webkit.org/show_bug.cgi?id=142604

            Reviewed by Darin Adler.

            * loader/icon/IconController.cpp:
            (WebCore::IconController::startLoader): Null check page()

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

        Merge r181565.

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

            URLs visited during private browsing show up in WebpageIcons.db
            rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733

            Patch by Sam Weinig. Reviewed by Brady Eidson.

            * loader/icon/IconController.cpp:
            (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
            (WebCore::IconController::continueLoadWithDecision): Instead of here.

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

        Merge patch for rdar://problem/20128856.

2015-03-10  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-09  Babak Shafiei  <bshafiei@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-03-09  Babak Shafiei  <bshafiei@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-03-09  Babak Shafiei  <bshafiei@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-03-04  Lucas Forschler  <lforschler@apple.com>

        Merge r181038

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

            REGRESSION (r179597): Can't see power saver banner for plugins
            https://bugs.webkit.org/show_bug.cgi?id=142312
            <rdar://problem/20040517>

            Reviewed by Brent Fulgham.

            We were being a bit too restrictive when deciding a child
            should not create a renderer. All shadow root children
            of the snapshotted plugin need one.

            * html/HTMLPlugInImageElement.cpp:
            (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
            Test if we're part of the shadow tree.

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

        Merge r176554

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

            CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::HTMLPlugInImageElement::updateSnapshot + 108
            https://bugs.webkit.org/show_bug.cgi?id=139057

            Reviewed by Anders Carlsson.

            No test, don't know how to repro.

            * html/HTMLPlugInImageElement.cpp:
            (WebCore::HTMLPlugInImageElement::updateSnapshot): Null check the renderer.

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

        Merge r181005

    2015-03-04  Jer Noble  <jer.noble@apple.com>

            [MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
            https://bugs.webkit.org/show_bug.cgi?id=142285

            Reviewed by Eric Carlson.

            When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
            underlying AVStreamSession is invalidated, the decryption context for in-flight
            CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
            one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
            the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
            asynchronously the next time the layer needs new samples.

            Add a workaround until framework-level support lands to fully flush enqueued and
            encrypted frames.

            When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
            check to see if the session has been stopped. If so, and if the error in question is
            one that indicates that the samples decryption context has been invalidated, suppress
            the error and instruct the sender to suppress the error as well. This workaround will
            be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>

            Still, we'll make our best effort to flush undisplayed frames when our CDM session is
            invalidated. Move away from std::map and instead use HashMap to store the set of 
            AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
            the HashMap's set of values.

            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
            (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
                error code and bail before issuing the error.
            (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
                the layer is in the set of listened-to layers only back in the main thread; the
                listnener may have been unregistered by the time the main thread was called.
            (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
            (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
            (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
            (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
            (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
            (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
            (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
            (WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
                layers and audio renderers.
            (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
                asked to ignore the error, and if so, bail.
            (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.

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

        Merge r180065

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

            [MSE][Mac] Crash at WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset + 2357
            https://bugs.webkit.org/show_bug.cgi?id=141566
            rdar://problem/19826075

            Reviewed by Andreas Kling.

            Null check m_mediaSource before dereferencing.

            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):

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

        Merge r180839

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

            Fullscreen video layers are off by one sometimes
            https://bugs.webkit.org/show_bug.cgi?id=142122
            rdar://problem/19878821

            Reviewed by Eric Carlson.

            Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
            isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
            backends to use FloatSizes for natural size. Convert the video image drawing code
            paths to FloatSize, since naturalSize is used on the destination rect computation,
            and painting should be floating point anyway.

            Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.

            * html/HTMLVideoElement.cpp:
            (WebCore::HTMLVideoElement::videoWidth):
            (WebCore::HTMLVideoElement::videoHeight):
            (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
            * html/HTMLVideoElement.h:
            * html/canvas/CanvasRenderingContext2D.cpp:
            (WebCore::size):
            (WebCore::CanvasRenderingContext2D::drawImage):
            * html/canvas/WebGLRenderingContextBase.cpp:
            (WebCore::WebGLRenderingContextBase::videoFrameToImage):
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::NullMediaPlayerPrivate::naturalSize):
            (WebCore::MediaPlayer::naturalSize):
            (WebCore::MediaPlayer::paint):
            (WebCore::MediaPlayer::paintCurrentFrameInContext):
            (WebCore::NullMediaPlayerPrivate::paint): Deleted.
            * platform/graphics/MediaPlayer.h:
            * platform/graphics/MediaPlayerPrivate.h:
            (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
            (WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
            (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
            * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
            (WebCore::MediaSourcePrivateAVFObjC::naturalSize):
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
            (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
            * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
            (WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
            * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::MediaPlayerPrivateQTKit::naturalSize):
            (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
            (WebCore::MediaPlayerPrivateQTKit::paint):
            * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
            (WebCore::MockMediaPlayerMediaSource::naturalSize):
            (WebCore::MockMediaPlayerMediaSource::paint):
            * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
            * rendering/RenderVideo.cpp:
            (WebCore::RenderVideo::calculateIntrinsicSize):
            (WebCore::RenderVideo::paintReplaced):

2015-03-04  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-25  Dana Burkart  <dburkart@apple.com>

        Merged r180364. <rdar://problem/19720096>

    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-25  Dana Burkart  <dburkart@apple.com>

        Merged r180174. <rdar://problem/19947808>

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

        Follow-up merge for r179877.

2015-02-20  Dana Burkart  <dburkart@apple.com>

        Merged r180087. <rdar://problem/19850762>

    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-20  Dana Burkart  <dburkart@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-20  Dana Burkart  <dburkart@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-20  Dana Burkart  <dburkart@apple.com>

        Merged r180278. <rdar://problem/19878813>

    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  Dana Burkart  <dburkart@apple.com>

        Merged r180150. <rdar://problem/19894685>

    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  Dana Burkart  <dburkart@apple.com>

        Merged r180147. <rdar://problem/19850657>

    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-19  Dana Burkart  <dburkart@apple.com>

        Merged r180128. <rdar://problem/19850739>

    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-15  David Kilzer  <ddkilzer@apple.com>

            CoreText only needs to be soft-linked on Windows

            More work towards the Maverick Debug build fix:

            REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
            <http://webkit.org/b/141607>

            * page/CaptionUserPreferencesMediaAF.cpp:

2015-02-19  Dana Burkart  <dburkart@apple.com>

        Merged r180076. <rdar://problem/19850750>

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

            [Mac, iOS] Adjust pagination behavior for Mail.app printing use
            https://bugs.webkit.org/show_bug.cgi?id=141569
            <rdar://problem/14912763>

            Reviewed by Anders Carlsson.

            * page/Settings.in: Add new pagination setting flag.
            * rendering/RenderBlockFlow.cpp:
            (WebCore::messageContainerName): Added.
            (WebCore::needsPaginationQuirk): Added.
            (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Don't move the message content
            div to a new page when using this special printing mode.

2015-02-19  Dana Burkart  <dburkart@apple.com>

        Merged r180063. <rdar://problem/19812938>

    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-19  Dana Burkart  <dburkart@apple.com>

        Merged r180062. <rdar://problem/19812938>

    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-19  Dana Burkart  <dburkart@apple.com>

        Merged r179956. <rdar://problem/19812935>

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

            [MSE] SampleMap::addRange() returns an inverted iterator_range, possibly causing a crash when that iterator_range is traversed.
            https://bugs.webkit.org/show_bug.cgi?id=141479
            rdar://problem/19067597

            Reviewed by Chris Dumez.

            When looking backwards through a presentationOrder map to find samples, we then reverse our iterators
            and put them in an iterator_range to return to the caller. But in addition to reversing the iterators
            themselves, we also need to put them in the iterator_range in reverse order, so that when the caller
            iterates from iterator_range.first -> iterator_range.second, they don't end up off the end of the
            the underlying storage.

            * Modules/mediasource/SampleMap.cpp:
            (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):

2015-02-19  Dana Burkart  <dburkart@apple.com>

        Merged r179937. <rdar://problem/19812932>

    2015-02-11  Sam Weinig  <sam@webkit.org>

            performance.now can crash if accessed from a window that has navigated
            <rdar://problem/16892506>
            https://bugs.webkit.org/show_bug.cgi?id=141478

            Reviewed by Alexey Proskuryakov.

            Test: fast/performance/performance-now-crash-on-navigated-window.html

            * page/Performance.cpp:
            (WebCore::Performance::now):
            Check for a null frame, which can happen when the window has been navigated.

2015-02-19  Dana Burkart  <dburkart@apple.com>

        Merged r179933. <rdar://problem/19812926>

    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-19  Dana Burkart  <dburkart@apple.com>

        Merged r179877. <rdar://problem/19850766>

    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-19  Dana Burkart  <dburkart@apple.com>

        Merged r179776. <rdar://problem/19850771>

    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-16  Lucas Forschler  <lforschler@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-12  Brent Fulgham  <bfulgham@apple.com>

        Merge r173806. <rdar://problem/19830405>

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

        Merge r180028.

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

            Crashes under detectItemAroundHitTestResult when DataDetectors is not available
            https://bugs.webkit.org/show_bug.cgi?id=141549
            <rdar://problem/19180955>

            Reviewed by Dan Bernstein.

            * editing/mac/DataDetection.mm:
            (WebCore::DataDetection::detectItemAroundHitTestResult):
            Bail out from data detection if either of the relevant frameworks aren't loaded.

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

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

        Rubber-stamped by Matthew Hanson.

        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-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-11  Lucas Forschler  <lforschler@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-02-11  Lucas Forschler  <lforschler@apple.com>

        Merge r179750

    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-11  Lucas Forschler  <lforschler@apple.com>

        Merge r179706

    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-11  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-11  Lucas Forschler  <lforschler@apple.com>

        Merge r179691

    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-11  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-11  Lucas Forschler  <lforschler@apple.com>

        Merge r179597

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

            Crash when printing snapshotted plugins
            https://bugs.webkit.org/show_bug.cgi?id=141212

            Reviewed by Simon Fraser.

            Test: plugins/snapshotting/print-snapshotted-plugin.html

            * html/HTMLPlugInImageElement.cpp:
            (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer): New
            method. If the current renderer is a snapshotted plugin, only
            allow children to create renderers if they are part of the
            snapshot shadow dom. Otherwise RenderEmbeddedObject invariants
            will be violated. This DOM class can have many other renderers, but they
            can just follow their own rules.
            (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay): Make this
            const-correct, and don't create UA shadow DOM as a side effect if it doesn't
            already exist.
            * html/HTMLPlugInImageElement.h:

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

        Merge r179569

    2015-02-03  Ryosuke Niwa  <rniwa@webkit.org>

            Smart quoting could move the caret backwards in some configurations
            https://bugs.webkit.org/show_bug.cgi?id=141203
            <rdar://problem/17452543>

            Reviewed by Enrica Casucci.

            The bug was caused by markAndReplaceFor not running the code to preserve the selection after
            text replacement only when smart quote is enabled. Furthermore, when smart link was disabled,
            we never applied smart quote due to the following condition at line 2502:

            if (!(shouldPerformReplacement || shouldCheckForCorrection || shouldMarkLink) || !doReplacement)
                continue;

            This condition prevented the code to apply smart quote from running when both continuous
            spellchecking, smart link, and text replacement are disabled.

            Fixed the bug by treating smart quotes and smart dashes like any other text replacement and set
            shouldPerformReplacement to true whenever either one of those text checking options are present.

            Smart link didn't have this issue due to the explicit check for shouldMarkLink.

            Smart dashes didn't suffer this problem either because dashes replacement happens only once
            the caret has moved past the dashes but his patch makes go through the same code path to preserve
            the selection as well for consistency.

            Test: editing/inserting/smart-quote-with-all-configurations.html

            * editing/Editor.cpp:
            (WebCore::Editor::markAndReplaceFor):

2015-02-11  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-11  Lucas Forschler  <lforschler@apple.com>

        Merge r179563

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

            [Mac][EME] Crash in CDMSessionMediaSourceAVFObjC::layerDidReceiveError() - NSError not KVO compliant for key NSUnderlyingError.
            https://bugs.webkit.org/show_bug.cgi?id=140529

            Reviewed by Darin Adler.

            The underlying error should be fetched from the userInfo dictionary, not the error itself.

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

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-10  Lucas Forschler  <lforschler@apple.com>

        Merge r177849

    2015-01-01  Jeff Miller  <jeffm@apple.com>

            Update user-visible copyright strings to include 2015
            https://bugs.webkit.org/show_bug.cgi?id=139880

            Reviewed by Darin Adler.

            * Info.plist:

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

        Merge r177504 & r178298

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

            Log navigation types using DiagnosticLoggingClient
            https://bugs.webkit.org/show_bug.cgi?id=140323

            Reviewed by Darin Adler.

            Log navigation types using DiagnosticLoggingClient to help us understand
            what types of navigations are common and give us an estimate on the
            total number of navigations.

            * loader/FrameLoader.cpp:
            (WebCore::logNavigation):
            (WebCore::FrameLoader::loadWithDocumentLoader):
            (WebCore::logNavigationWithFeatureCounter): Deleted.
            * page/DiagnosticLoggingKeys.cpp:
            (WebCore::DiagnosticLoggingKeys::navigationKey):
            * page/DiagnosticLoggingKeys.h:

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

        Merge r176899

    2014-12-05  Simon Fraser  <simon.fraser@apple.com>

            Programmatic scrolling and content changes are not always synchronized
            https://bugs.webkit.org/show_bug.cgi?id=139245
            rdar://problem/18833612

            Reviewed by Anders Carlsson.

            For programmatic scrolls, AsyncScrollingCoordinator::requestScrollPositionUpdate()
            calls updateScrollPositionAfterAsyncScroll(), then dispatches the requested
            scroll position to the scrolling thread.

            Once the scrolling thread commits, it calls back to the main thread via
            scheduleUpdateScrollPositionAfterAsyncScroll(), which schedules a second
            call to updateScrollPositionAfterAsyncScroll() on a timer. That's a problem,
            because some other scroll may have happened in the meantime; when the timer
            fires, it can sometimes restore a stale scroll position.

            Fix by bailing early from scheduleUpdateScrollPositionAfterAsyncScroll()
            for programmatic scrolls, since we know that requestScrollPositionUpdate()
            already did the updateScrollPositionAfterAsyncScroll().

            Test:
                ManualTests/programmatic-scroll-flicker.html

            * page/FrameView.cpp:
            (WebCore::FrameView::reset): nullptr.
            (WebCore::FrameView::setScrollPosition): Ditto.
            (WebCore::FrameView::setWasScrolledByUser): Ditto.
            * page/scrolling/AsyncScrollingCoordinator.cpp:
            (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): Use a local variable for
            isProgrammaticScroll just to make sure we use the same value for the duration of this function.
            (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll): Do nothing
            if this is a programmatic scroll.

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

        Merge r179758.

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

            REGRESSION: Lookup doesn't work in RTL
            https://bugs.webkit.org/show_bug.cgi?id=141338
            <rdar://problem/19738407>

            Reviewed by Dan Bernstein.

            * editing/Editor.cpp:
            (WebCore::Editor::scanSelectionForTelephoneNumbers):
            * editing/mac/DictionaryLookup.mm:
            (WebCore::rangeExpandedAroundPositionByCharacters):
            Positions are independent of writing direction, so we don't
            need to (and shouldn't) do anything special for RTL here.

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-02-04  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r178490. rdar://problem/19687156

    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-03  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r178462. rdar://problem/19673708

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

            REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
            https://bugs.webkit.org/show_bug.cgi?id=137902
            rdar://problem/18568864

            Reviewed by Darin Adler.

            Test: editing/text-iterator/invalid-subrange.html

            characterSubrange should check the iterator position after each advance.
            This changed adds a new method to the Internals object to be able to test this.

            * editing/TextIterator.cpp:
            (WebCore::characterSubrange):
            (WebCore::TextIterator::subrange):
            (WebCore::findPlainText):
            * testing/Internals.cpp:
            (WebCore::Internals::subrange):
            * testing/Internals.h:
            * testing/Internals.idl:

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

        Merge r176750. rdar://problem/19617755

    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  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175236. rdar://problem/19451378

    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-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 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-02-04  David Kilzer  <ddkilzer@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  David Kilzer  <ddkilzer@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-03  Dean Jackson  <dino@apple.com>

        Merge r178380. <rdar://problem/19465133>

        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-02-02  Brent Fulgham  <bfulgham@apple.com>

        Merge r178661. rdar://problem/19617731 

    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-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 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 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 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 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 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-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 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 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 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 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 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):

2015-01-28  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r179027. rdar://problem/19585744

    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  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r178571. rdar://problem/19585723

    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-01-28  Matthew  <matthew_hanson@apple.com>

        Merge r178363. rdar://problem/19617795

    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-01-28  Matthew  <matthew_hanson@apple.com>

        Merge r178231. rdar://problem/19617801

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

            Calling clearSelection on a detached RenderObject leads to segfault.
            https://bugs.webkit.org/show_bug.cgi?id=140275

            Reviewed by Simon Fraser.

            We collect selection rects and compute selection gaps in order to
            paint/clear selection. With certain content, we need to be able
            to walk the tree up to a particular container to compute the selection rect.
            However this container might not be available when the selection is part of a detached tree.
            This is a null-check fix to ensure we don't crash in such cases, but in the long run
            selection gaps and rect should be cached between two layouts so that we don't need to
            keep collecting/recomputing them. Tracked here: webkit.org/b/140321

            Test: editing/selection/clearselection-on-detached-subtree-crash.html

            * rendering/RenderBox.cpp:
            (WebCore::RenderBox::containingBlockLogicalWidthForContent):
            (WebCore::RenderBox::containingBlockLogicalHeightForContent):
            * rendering/RenderView.cpp:
            (WebCore::RenderView::clearSelection):

2015-01-28  Matthew  <matthew_hanson@apple.com>

        Merge r177927. rdar://problem/19585726

    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-28  Matthew  <matthew_hanson@apple.com>

        Merge r177165. rdar://problem/19617570

    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-01-28  Matthew  <matthew_hanson@apple.com>

        Merge r177135. rdar://problem/19451316

    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-28  Matthew  <matthew_hanson@apple.com>

        Merge r177089. rdar://problem/19617712

    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-01-28  Matthew  <matthew_hanson@apple.com>

        Merge r177050. rdar://problem/19452133

    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-28  Matthew  <matthew_hanson@apple.com>

        Merge r176475. rdar://problem/19451346

    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-28  Matthew  <matthew_hanson@apple.com>

        Merge r175251. rdar://problem/19451346

    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-28  Matthew  <matthew_hanson@apple.com>

        Merge r179129. rdar://problem/19489518

    2015-01-26  Beth Dakin  <bdakin@apple.com>

            Blacklist iBooks for WebKit's default immediate actions
            https://bugs.webkit.org/show_bug.cgi?id=140854
            -and corresponding-
            rdar://problem/19489518

            Reviewed by Tim Horton.

            Add a runtime check for iBooks.
            * WebCore.exp.in:
            * platform/RuntimeApplicationChecks.cpp:
            (WebCore::applicationIsIBooks):
            * platform/RuntimeApplicationChecks.h:

2015-01-28  Matthew  <matthew_hanson@apple.com>

        Merge r179086. rdar://problem/19566089

    2015-01-25  Timothy Horton  <timothy_horton@apple.com>

            Long spins under Frame::rangeForPoint when doing Lookup on feedly.com
            https://bugs.webkit.org/show_bug.cgi?id=140862
            <rdar://problem/19566089>

            Reviewed by Dan Bernstein.

            * page/Frame.cpp:
            (WebCore::Frame::rangeForPoint):
            If there isn't a selectable text node at the given point, rangeForPoint
            will eventually return null. However, we can make it fail much faster
            by checking the initial position's text-ness and selectability.

2015-01-28  Matthew  <matthew_hanson@apple.com>

        Merge r179014. rdar://problem/19573674

    2015-01-23  Timothy Horton  <timothy_horton@apple.com>

            QLPreviewMenuItem popovers don't close when the page scrolls
            https://bugs.webkit.org/show_bug.cgi?id=140806
            <rdar://problem/19555618>

            Reviewed by Beth Dakin.

            * platform/spi/mac/QuickLookMacSPI.h:
            Add some SPI.

2015-01-23  Dana Burkart  <dburkart@apple.com>

        Merged r176354. <rdar://problem/19451336>

    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-23  Dana Burkart  <dburkart@apple.com>

        Merged r174489. <rdar://problem/19452129>

    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-22  Dana Burkart  <dburkart@apple.com>

        Merged r178967. <rdar://problem/19572776>

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

            [Mac][EME] Adopt changes to AVStreamSession class methods
            https://bugs.webkit.org/show_bug.cgi?id=140778
            rdar://problem/19458200

            Reviewed by Eric Carlson.

            AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
            read and modify records stored at non-default storage locations.

            * Modules/encryptedmedia/MediaKeySession.cpp:
            (WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
            * Modules/encryptedmedia/MediaKeySession.h:
            * platform/graphics/CDMSession.h:
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
            (WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
            (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
            (WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.

    2015-01-22  Michael Saboff  <msaboff@apple.com>

            REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
            https://bugs.webkit.org/show_bug.cgi?id=140794

            Reviewed by Anders Carlsson.

            If a document.open has been set, return it instead of always returning a new,
            non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.

            Test: js/dom/document-overwrite-open.html

            * bindings/js/JSHTMLDocumentCustom.cpp:
            (WebCore::JSHTMLDocument::getOwnPropertySlot):

2015-01-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r178426. rdar://problem/19526069

    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-01-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r178038. rdar://problem/19451263

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177360. rdar://problem/19451319

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177292. rdar://problem/19452139

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177152. rdar://problem/19451288

    2014-12-11  Alexey Proskuryakov  <ap@apple.com>

            REGRESSION (Async Text Input): Text input method state is not reset when reloading a page
            https://bugs.webkit.org/show_bug.cgi?id=139504
            rdar://problem/19034674

            Reviewed by Enrica Casucci.

            Explicitly notify EditorClient when a composition is voluntarily canceled by WebCore.
            These are almost certainly not all the places where this happens, but this fixes the bug,
            and lays the groundwork for using this new client call instead of didChangeSelection
            hacks.

            * editing/Editor.cpp:
            (WebCore::Editor::clear):
            (WebCore::Editor::cancelComposition):
            * loader/EmptyClients.h:
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::willTransitionToCommitted):
            * page/EditorClient.h:

2015-01-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176971. rdar://problem/19452174

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176768. rdar://problem/19451369

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176475. rdar://problem/19451346

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176285. rdar://problem/19452164

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175771. rdar://problem/19451238

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175131. rdar://problem/19452187

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174716. rdar://problem/19451273

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174698. rdar://problem/19451342

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

            [Win] Enable Encrypted Media Support
            https://bugs.webkit.org/show_bug.cgi?id=137710
            <rdar://problem/18652699>

            Reviewed by Jer Noble.

            This feature is covered by existing media tests.

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::destroyAVFWrapper): Remove redundant ASSERT.
            * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
            (displayOnMainThreadContext::displayOnMainThreadContext): Added.
            (redispatchOnMainQueue): Added.
            (PlatformCALayerWinInternal::displayCallback): Check if a display
            call is happening on a background queue, and re-dispatch on the
            main thread if necessary.

2015-01-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174345. rdar://problem/19451258

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r173790. rdar://problem/19451354

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r173688. rdar://problem/19451277

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172797. rdar://problem/19451324

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172504. rdar://problem/19451367

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172326. rdar://problem/19452126

    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-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171404. rdar://problem/19451349

    2014-07-22  Brent Fulgham  <bfulgham@apple.com>

            [Win] Build fix for bot.

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::createLegibleOutputSubtypes): Declare 'wvtt' locally, rather
            than relying on potentially unavailable declaration.

2015-01-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171392. rdar://problem/19451349

    2014-07-22  Brent Fulgham  <bfulgham@apple.com>

            [Win] Build fix for Windows bots

            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Provide missing
            structure definition when needed by bot.

2015-01-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171388. rdar://problem/19451349

    2014-07-22  Brent Fulgham  <bfulgham@apple.com>

            [Win] Build fix for EWS bots.

            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Forward declare
            structure definition.

2015-01-22  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r171385. rdar://problem/19451349

    2014-07-22  Brent Fulgham  <bfulgham@apple.com>

            [Win] Fix Crash when handling Legible Output callbacks
            https://bugs.webkit.org/show_bug.cgi?id=134946

            Reviewed by Dean Jackson.

            Relanding after adding fixes to support build bots.

            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
            (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Remove
            Windows-specific 'ASSERT_NOT_REACHED' code path.
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::createLegibleOutputSubtypes): Added.
            (WebCore::AVFWrapper::createPlayerItem): Updated to request native
            samples from AVFoundationCF.

2015-01-21  Matthew Hanson  <matthew_hanson@apple.com>

        Merge 171357. rdar://problem/19451349

    2014-07-22  Brent Fulgham  <bfulgham@apple.com>

            [Win] Fix Crash when handling Legible Output callbacks
            https://bugs.webkit.org/show_bug.cgi?id=134946

            Reviewed by Dean Jackson.

            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
            (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Remove
            Windows-specific 'ASSERT_NOT_REACHED' code path.
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::createLegibleOutputSubtypes): Added.
            (WebCore::AVFWrapper::createPlayerItem): Updated to request native
            samples from AVFoundationCF.

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

        Merge r174295. rdar://problem/19501151

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

            Unreviewed build fix for Windows.

            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

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

        Merge r174295. rdar://problem/19501151

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

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

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

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

2015-01-16  Brent Fulgham  <bfulgham@webkit.org>

        Merge r173391. rdar://problem/19501151

    2014-09-08  peavo@outlook.com  <peavo@outlook.com>

            [WinCairo] Compile error.
            https://bugs.webkit.org/show_bug.cgi?id=136633

            Reviewed by Darin Adler.

            Enum name has already been defined.

            * platform/audio/AudioHardwareListener.h:

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

        Merge r176896. rdar://problem/19451941

    2014-12-05  Roger Fong  <roger_fong@apple.com>

            [Win] proj files copying over too many resources..
            https://bugs.webkit.org/show_bug.cgi?id=139315.
            <rdar://problem/19148278>

            Reviewed by Brent Fulgham.

            * WebCore.vcxproj/WebCore.proj: Don't copy over bin32 build output.

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174713. rdar://problem/19451946

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

            [Win] Unreviewed build fix after r174710.

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174710. rdar://problem/19451946

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

            [Win] Unreviewed build fix after r174698 and r174709.

            * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
            * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
            (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174709. rdar://problem/19451946

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

            [Win] Unreviewed build fix after r174698

            * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
            * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174698. rdar://problem/19451946

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

            [Win] Enable Encrypted Media Support
            https://bugs.webkit.org/show_bug.cgi?id=137710
            <rdar://problem/18652699>

            Reviewed by Jer Noble.

            This feature is covered by existing media tests.

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::destroyAVFWrapper): Remove redundant ASSERT.
            * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
            (displayOnMainThreadContext::displayOnMainThreadContext): Added.
            (redispatchOnMainQueue): Added.
            (PlatformCALayerWinInternal::displayCallback): Check if a display
            call is happening on a background queue, and re-dispatch on the
            main thread if necessary.

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174106. rdar://problem/19451946

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

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

            Reviewed by Carlos Garcia Campos.

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

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

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174505. rdar://problem/19451946

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

            Layering violation: MediaPlayer should not reference/use FrameView
            https://bugs.webkit.org/show_bug.cgi?id=21562

            Reviewed by Darin Adler.

            Remove FrameView dependency from MediaPlayer.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::mediaPlayerIsInMediaDocument): Check if
            the element document is a media document.
            * html/HTMLMediaElement.h:
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::MediaPlayer): Remove m_frameView initialization.
            (WebCore::MediaPlayer::inMediaDocument): Use the MediaPlayerClient
            to check if the media player is in a media document.
            * platform/graphics/MediaPlayer.h:
            (WebCore::MediaPlayerClient::mediaPlayerIsInMediaDocument):
            (WebCore::MediaPlayer::setFrameView): Deleted.
            (WebCore::MediaPlayer::frameView): Deleted.
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
            (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
            Do not check if the media player has a frame view, checking whether it's visible
            is enough.
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            Remove unneeded header include.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Ditto.
            * rendering/RenderVideo.cpp:
            (WebCore::RenderVideo::~RenderVideo): Do not call MediaPlayer::setFrameView().
            (WebCore::RenderVideo::updatePlayer): Ditto.

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174350. rdar://problem/19451946

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

            [Win] Build fix aftr r174347.

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

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174346. rdar://problem/19451946

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

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

            Reviewed by Eric Carlson.

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

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

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

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r173218. rdar://problem/19451975

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

            [Win] Improper release of unretained AVCFAssetResourceLoaderRef
            https://bugs.webkit.org/show_bug.cgi?id=136493
            <rdar://problem/18112559>

            Reviewed by Eric Carlson.

            Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
            RetainPtr. We don't hold onto this value or want to control its lifetime; we just
            want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.

            Use of the RetainPtr created a double-release and crash.

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::AVFWrapper::createAssetForURL): 

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r173216. rdar://problem/19451946

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

            [Win] Prevent double-release on AVCFURLAssetRef
            https://bugs.webkit.org/show_bug.cgi?id=136492
            <rdar://problem/18206746>

            Reviewed by Eric Carlson.

            The AVFWrapper::setAsset method needs to retain the passed argument, since it
            originates from AVCFPlayerItemGetAsset, which does not increment the
            reference count of its return value as expected by Cocoa Get/Create/Copy
            semantics.

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::AVFWrapper::setAsset): Retain the passed argument.

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

        Merge r175083.

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

            REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
            https://bugs.webkit.org/show_bug.cgi?id=137990

            Reviewed by Alexey Proskuryakov.

            NULL-check m_mediaSource before using.

            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (WebCore::SourceBufferPrivateAVFObjC::destroyParser):

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175719. rdar://problem/19424169

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

            De-templatize Timer
            https://bugs.webkit.org/show_bug.cgi?id=138450

            Reviewed by Anders Carlsson.

            Timer does not need to be a templated class; only it's constructors need to be templated.
            Remove the template specifier from Timer and add same to its two class method
            constructors. Replace the function pointer typedefs with using statements. Add a
            helper typedef which allows invalid combinations of TimerFiredClass and
            TimerFiredFunction to be caught early by the compiler, while still allowing
            valid combinations (such as when the caller specifies a function on a subclass of
            TimerFiredClass).

            * Modules/encryptedmedia/MediaKeySession.cpp:
            (WebCore::MediaKeySession::keyRequestTimerFired):
            (WebCore::MediaKeySession::addKeyTimerFired):
            * Modules/encryptedmedia/MediaKeySession.h:
            * Modules/geolocation/Geolocation.cpp:
            (WebCore::Geolocation::GeoNotifier::timerFired):
            (WebCore::Geolocation::resumeTimerFired):
            * Modules/geolocation/Geolocation.h:
            * Modules/indexeddb/IDBTransactionBackend.cpp:
            (WebCore::IDBTransactionBackend::taskTimerFired):
            * Modules/indexeddb/IDBTransactionBackend.h:
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::appendBufferTimerFired):
            (WebCore::SourceBuffer::removeTimerFired):
            * Modules/mediasource/SourceBuffer.h:
            * Modules/mediastream/MediaStream.cpp:
            (WebCore::MediaStream::scheduledEventTimerFired):
            * Modules/mediastream/MediaStream.h:
            * Modules/mediastream/RTCDTMFSender.cpp:
            (WebCore::RTCDTMFSender::scheduledEventTimerFired):
            * Modules/mediastream/RTCDTMFSender.h:
            * Modules/mediastream/RTCDataChannel.cpp:
            (WebCore::RTCDataChannel::scheduledEventTimerFired):
            * Modules/mediastream/RTCDataChannel.h:
            * Modules/mediastream/RTCPeerConnection.cpp:
            (WebCore::RTCPeerConnection::scheduledEventTimerFired):
            * Modules/mediastream/RTCPeerConnection.h:
            * Modules/notifications/Notification.cpp:
            (WebCore::Notification::Notification):
            (WebCore::Notification::taskTimerFired):
            * Modules/notifications/Notification.h:
            * Modules/notifications/NotificationCenter.cpp:
            (WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
            * Modules/notifications/NotificationCenter.h:
            * Modules/vibration/Vibration.cpp:
            (WebCore::Vibration::timerFired):
            * Modules/vibration/Vibration.h:
            * Modules/websockets/WebSocketChannel.cpp:
            (WebCore::WebSocketChannel::resumeTimerFired):
            (WebCore::WebSocketChannel::closingTimerFired):
            * Modules/websockets/WebSocketChannel.h:
            * accessibility/AXObjectCache.cpp:
            (WebCore::AXObjectCache::notificationPostTimerFired):
            * accessibility/AXObjectCache.h:
            (WebCore::AXObjectCache::AXObjectCache):
            * bindings/js/GCController.cpp:
            (WebCore::GCController::gcTimerFired):
            * bindings/js/GCController.h:
            * css/CSSFontFaceSource.h:
            * css/CSSFontSelector.cpp:
            (WebCore::CSSFontSelector::beginLoadTimerFired):
            * css/CSSFontSelector.h:
            * css/StyleResolver.cpp:
            (WebCore::StyleResolver::sweepMatchedPropertiesCache):
            * css/StyleResolver.h:
            * dom/Document.cpp:
            (WebCore::Document::visualUpdatesSuppressionTimerFired):
            (WebCore::Document::styleRecalcTimerFired):
            (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
            (WebCore::Document::sharedObjectPoolClearTimerFired):
            (WebCore::Document::updateFocusAppearanceTimerFired):
            (WebCore::Document::pendingTasksTimerFired):
            (WebCore::Document::fullScreenChangeDelayTimerFired):
            (WebCore::Document::loadEventDelayTimerFired):
            (WebCore::Document::didAssociateFormControlsTimerFired):
            (WebCore::Document::domCookieCacheExpiryTimerFired):
            * dom/Document.h:
            * dom/EventSender.h:
            (WebCore::EventSender::timerFired):
            * dom/GenericEventQueue.cpp:
            (WebCore::GenericEventQueue::timerFired):
            * dom/GenericEventQueue.h:
            * dom/ScriptRunner.cpp:
            (WebCore::ScriptRunner::timerFired):
            * dom/ScriptRunner.h:
            * dom/ScriptedAnimationController.cpp:
            (WebCore::ScriptedAnimationController::animationTimerFired):
            * dom/ScriptedAnimationController.h:
            * dom/StyledElement.cpp:
            (WebCore::PresentationAttributeCacheCleaner::cleanCache):
            * editing/AlternativeTextController.cpp:
            (WebCore::AlternativeTextController::timerFired):
            * editing/AlternativeTextController.h:
            * editing/Editor.cpp:
            (WebCore::Editor::scanSelectionForTelephoneNumbers):
            (WebCore::Editor::editorUIUpdateTimerFired):
            * editing/Editor.h:
            * editing/FrameSelection.cpp:
            (WebCore::FrameSelection::caretBlinkTimerFired):
            * editing/FrameSelection.h:
            * editing/SpellChecker.cpp:
            (WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
            * editing/SpellChecker.h:
            * html/HTMLFormElement.cpp:
            (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
            * html/HTMLFormElement.h:
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::parseAttribute):
            * html/HTMLMediaElement.h:
            * html/HTMLPlugInElement.cpp:
            (WebCore::HTMLPlugInElement::swapRendererTimerFired):
            * html/HTMLPlugInElement.h:
            * html/HTMLPlugInImageElement.cpp:
            (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
            * html/HTMLPlugInImageElement.h:
            * html/HTMLSourceElement.cpp:
            (WebCore::HTMLSourceElement::errorEventTimerFired):
            * html/HTMLSourceElement.h:
            * html/HTMLTrackElement.cpp:
            (WebCore::HTMLTrackElement::loadTimerFired):
            * html/HTMLTrackElement.h:
            * html/MediaController.cpp:
            (MediaController::asyncEventTimerFired):
            (MediaController::clearPositionTimerFired):
            (MediaController::timeupdateTimerFired):
            * html/MediaController.h:
            * html/MediaDocument.cpp:
            (WebCore::MediaDocument::replaceMediaElementTimerFired):
            * html/MediaDocument.h:
            * html/SearchInputType.cpp:
            (WebCore::SearchInputType::searchEventTimerFired):
            * html/SearchInputType.h:
            * html/ValidationMessage.cpp:
            (WebCore::ValidationMessage::setMessage):
            (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
            (WebCore::ValidationMessage::buildBubbleTree):
            (WebCore::ValidationMessage::requestToHideMessage):
            (WebCore::ValidationMessage::deleteBubbleTree):
            * html/ValidationMessage.h:
            * html/canvas/WebGLRenderingContext.cpp:
            (WebCore::WebGLRenderingContext::dispatchContextLostEvent):
            (WebCore::WebGLRenderingContext::maybeRestoreContext):
            * html/canvas/WebGLRenderingContext.h:
            * html/parser/HTMLParserScheduler.cpp:
            (WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
            * html/parser/HTMLParserScheduler.h:
            * html/shadow/MediaControlElements.cpp:
            (WebCore::MediaControlPanelElement::transitionTimerFired):
            (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
            * html/shadow/MediaControlElements.h:
            * html/shadow/MediaControls.cpp:
            (WebCore::MediaControls::hideFullscreenControlsTimerFired):
            * html/shadow/MediaControls.h:
            * html/shadow/SpinButtonElement.cpp:
            (WebCore::SpinButtonElement::repeatingTimerFired):
            * html/shadow/SpinButtonElement.h:
            * html/track/LoadableTextTrack.cpp:
            (WebCore::LoadableTextTrack::loadTimerFired):
            * html/track/LoadableTextTrack.h:
            * html/track/VTTRegion.cpp:
            (WebCore::VTTRegion::scrollTimerFired):
            * html/track/VTTRegion.h:
            * inspector/InspectorCSSAgent.cpp:
            (WebCore::ChangeRegionOversetTask::timerFired):
            * inspector/InspectorDOMAgent.cpp:
            (WebCore::RevalidateStyleAttributeTask::timerFired):
            * inspector/InspectorFrontendClientLocal.cpp:
            (WebCore::InspectorBackendDispatchTask::timerFired):
            * inspector/InspectorOverlay.cpp:
            (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
            * inspector/InspectorOverlay.h:
            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
            * loader/DocumentLoader.h:
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::checkTimerFired):
            * loader/FrameLoader.h:
            * loader/ImageLoader.cpp:
            (WebCore::ImageLoader::timerFired):
            * loader/ImageLoader.h:
            * loader/LinkLoader.cpp:
            (WebCore::LinkLoader::linkLoadTimerFired):
            (WebCore::LinkLoader::linkLoadingErrorTimerFired):
            * loader/LinkLoader.h:
            * loader/NavigationScheduler.cpp:
            (WebCore::ScheduledNavigation::didStartTimer):
            (WebCore::NavigationScheduler::timerFired):
            * loader/NavigationScheduler.h:
            * loader/PingLoader.h:
            (WebCore::PingLoader::timeoutTimerFired):
            * loader/ProgressTracker.cpp:
            (WebCore::ProgressTracker::progressHeartbeatTimerFired):
            * loader/ProgressTracker.h:
            * loader/ResourceLoadScheduler.cpp:
            (WebCore::ResourceLoadScheduler::requestTimerFired):
            * loader/ResourceLoadScheduler.h:
            * loader/TextTrackLoader.cpp:
            (WebCore::TextTrackLoader::cueLoadTimerFired):
            * loader/TextTrackLoader.h:
            * loader/cache/CachedResource.cpp:
            (WebCore::CachedResource::Callback::timerFired):
            * loader/cache/CachedResource.h:
            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
            * loader/cache/CachedResourceLoader.h:
            * loader/icon/IconDatabase.cpp:
            (WebCore::IconDatabase::syncTimerFired):
            * loader/icon/IconDatabase.h:
            * page/AutoscrollController.cpp:
            (WebCore::AutoscrollController::autoscrollTimerFired):
            * page/AutoscrollController.h:
            * page/CaptionUserPreferences.cpp:
            (WebCore::CaptionUserPreferences::timerFired):
            * page/CaptionUserPreferences.h:
            * page/CaptionUserPreferencesMediaAF.cpp:
            (WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
            * page/CaptionUserPreferencesMediaAF.h:
            * page/DeviceController.cpp:
            (WebCore::DeviceController::fireDeviceEvent):
            * page/DeviceController.h:
            * page/EventHandler.cpp:
            (WebCore::EventHandler::cursorUpdateTimerFired):
            (WebCore::EventHandler::autoHideCursorTimerFired):
            (WebCore::EventHandler::recognizeLongMousePress):
            (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
            (WebCore::EventHandler::hoverTimerFired):
            * page/EventHandler.h:
            * page/EventSource.cpp:
            (WebCore::EventSource::connectTimerFired):
            * page/EventSource.h:
            * page/FocusController.cpp:
            (WebCore::FocusController::focusRepaintTimerFired):
            * page/FocusController.h:
            * page/Frame.cpp:
            (WebCore::Frame::overflowAutoScrollTimerFired):
            * page/Frame.h:
            * page/FrameView.cpp:
            (WebCore::FrameView::delayedScrollEventTimerFired):
            (WebCore::FrameView::speculativeTilingEnableTimerFired):
            (WebCore::FrameView::layoutTimerFired):
            (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
            (WebCore::FrameView::postLayoutTimerFired):
            * page/FrameView.h:
            * page/PageOverlay.cpp:
            (WebCore::PageOverlay::fadeAnimationTimerFired):
            * page/PageOverlay.h:
            * page/Settings.cpp:
            (WebCore::Settings::imageLoadingSettingsTimerFired):
            * page/Settings.h:
            * page/animation/AnimationController.cpp:
            (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
            (WebCore::AnimationControllerPrivate::animationTimerFired):
            * page/animation/AnimationControllerPrivate.h:
            * page/mac/ServicesOverlayController.h:
            * page/mac/ServicesOverlayController.mm:
            (WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
            * page/scrolling/AsyncScrollingCoordinator.cpp:
            (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
            * page/scrolling/AsyncScrollingCoordinator.h:
            * page/scrolling/ios/ScrollingCoordinatorIOS.h:
            * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
            (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
            * page/scrolling/mac/ScrollingCoordinatorMac.h:
            * page/scrolling/mac/ScrollingCoordinatorMac.mm:
            (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
            * platform/HysteresisActivity.h:
            (WebCore::HysteresisActivity::hysteresisTimerFired):
            * platform/ScrollAnimator.cpp:
            (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
            (WebCore::ScrollAnimator::startScrollSnapTimer):
            (WebCore::ScrollAnimator::stopScrollSnapTimer):
            (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
            (WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
            * platform/ScrollAnimator.h:
            * platform/ScrollAnimatorNone.cpp:
            (WebCore::ScrollAnimatorNone::animationTimerFired):
            * platform/ScrollAnimatorNone.h:
            * platform/Scrollbar.cpp:
            (WebCore::Scrollbar::autoscrollTimerFired):
            * platform/Scrollbar.h:
            * platform/Timer.h:
            (WebCore::Timer::Timer):
            * platform/audio/MediaSession.cpp:
            (WebCore::MediaSession::clientDataBufferingTimerFired):
            * platform/audio/MediaSession.h:
            * platform/efl/BatteryProviderEfl.cpp:
            (WebCore::BatteryProviderEfl::timerFired):
            * platform/efl/BatteryProviderEfl.h:
            * platform/graphics/BitmapImage.cpp:
            (WebCore::BitmapImage::startAnimation):
            (WebCore::BitmapImage::advanceAnimation):
            * platform/graphics/BitmapImage.h:
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::reloadTimerFired):
            * platform/graphics/MediaPlayer.h:
            * platform/graphics/ShadowBlur.cpp:
            (WebCore::ScratchBuffer::timerFired):
            * platform/graphics/TiledBackingStore.cpp:
            (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
            (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
            * platform/graphics/TiledBackingStore.h:
            * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
            * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
            (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
            * platform/graphics/ca/LayerPool.cpp:
            (WebCore::LayerPool::pruneTimerFired):
            * platform/graphics/ca/LayerPool.h:
            * platform/graphics/ca/TileController.cpp:
            (WebCore::TileController::tileRevalidationTimerFired):
            * platform/graphics/ca/TileController.h:
            * platform/graphics/ca/TileGrid.cpp:
            (WebCore::TileGrid::cohortRemovalTimerFired):
            * platform/graphics/ca/TileGrid.h:
            * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
            (WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
            * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
            * platform/graphics/cg/IOSurfacePool.cpp:
            (WebCore::IOSurfacePool::collectionTimerFired):
            * platform/graphics/cg/IOSurfacePool.h:
            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
            (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
            * platform/graphics/texmap/TextureMapper.cpp:
            (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
            * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
            (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
            * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
            * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
            (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
            * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
            * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
            (WebCore::CoordinatedImageBacking::clearContentsTimerFired):
            * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
            * platform/ios/LegacyTileCache.h:
            * platform/ios/LegacyTileCache.mm:
            (WebCore::LegacyTileCache::tileCreationTimerFired):
            * platform/mac/HIDGamepadProvider.cpp:
            (WebCore::HIDGamepadProvider::connectionDelayTimerFired):
            (WebCore::HIDGamepadProvider::inputNotificationTimerFired):
            * platform/mac/HIDGamepadProvider.h:
            * platform/mac/ScrollAnimatorMac.h:
            * platform/mac/ScrollAnimatorMac.mm:
            (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
            (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
            (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
            * platform/mock/DeviceMotionClientMock.cpp:
            (WebCore::DeviceMotionClientMock::timerFired):
            * platform/mock/DeviceMotionClientMock.h:
            * platform/mock/DeviceOrientationClientMock.cpp:
            (WebCore::DeviceOrientationClientMock::timerFired):
            * platform/mock/DeviceOrientationClientMock.h:
            * platform/mock/GeolocationClientMock.cpp:
            (WebCore::GeolocationClientMock::permissionTimerFired):
            (WebCore::GeolocationClientMock::controllerTimerFired):
            * platform/mock/GeolocationClientMock.h:
            * platform/mock/PlatformSpeechSynthesizerMock.cpp:
            (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
            * platform/mock/PlatformSpeechSynthesizerMock.h:
            * platform/mock/TimerEventBasedMock.h:
            (WebCore::TimerEvent::timerFired):
            * platform/network/DNSResolveQueue.cpp:
            (WebCore::DNSResolveQueue::timerFired):
            * platform/network/DNSResolveQueue.h:
            * platform/network/NetworkStateNotifier.h:
            * platform/network/ResourceHandle.cpp:
            (WebCore::ResourceHandle::failureTimerFired):
            * platform/network/ResourceHandle.h:
            * platform/network/ResourceHandleInternal.h:
            * platform/network/curl/ResourceHandleManager.cpp:
            (WebCore::ResourceHandleManager::downloadTimerCallback):
            * platform/network/curl/ResourceHandleManager.h:
            * platform/network/mac/NetworkStateNotifierMac.cpp:
            (WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
            * platform/network/win/ResourceHandleWin.cpp:
            (WebCore::ResourceHandle::fileLoadTimer):
            * plugins/PluginPackage.cpp:
            (WebCore::PluginPackage::freeLibraryTimerFired):
            * plugins/PluginPackage.h:
            * plugins/PluginStream.cpp:
            (WebCore::PluginStream::delayDeliveryTimerFired):
            * plugins/PluginStream.h:
            * plugins/PluginView.cpp:
            (WebCore::PluginView::popPopupsStateTimerFired):
            (WebCore::PluginView::requestTimerFired):
            (WebCore::PluginView::invalidateTimerFired):
            (WebCore::PluginView::lifeSupportTimerFired):
            * plugins/PluginView.h:
            * plugins/win/PluginMessageThrottlerWin.cpp:
            (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
            * plugins/win/PluginMessageThrottlerWin.h:
            * rendering/ImageQualityController.cpp:
            (WebCore::ImageQualityController::highQualityRepaintTimerFired):
            * rendering/ImageQualityController.h:
            * rendering/RenderButton.cpp:
            (WebCore::RenderButton::styleDidChange):
            (WebCore::RenderButton::timerFired):
            * rendering/RenderButton.h:
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
            (WebCore::RenderLayerCompositor::layerFlushTimerFired):
            (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
            * rendering/RenderLayerCompositor.h:
            * rendering/RenderMarquee.cpp:
            (WebCore::RenderMarquee::timerFired):
            * rendering/RenderMarquee.h:
            * rendering/RenderNamedFlowThread.cpp:
            (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
            * rendering/RenderNamedFlowThread.h:
            * rendering/RenderProgress.cpp:
            (WebCore::RenderProgress::animationTimerFired):
            * rendering/RenderProgress.h:
            * rendering/RenderView.cpp:
            (WebCore::RenderView::lazyRepaintTimerFired):
            * rendering/RenderView.h:
            * replay/EventLoopInputDispatcher.cpp:
            (WebCore::EventLoopInputDispatcher::timerFired):
            * replay/EventLoopInputDispatcher.h:
            * storage/StorageAreaImpl.cpp:
            (WebCore::StorageAreaImpl::closeDatabaseTimerFired):
            * storage/StorageAreaImpl.h:
            * storage/StorageAreaSync.cpp:
            (WebCore::StorageAreaSync::syncTimerFired):
            * storage/StorageAreaSync.h:
            * svg/SVGElement.cpp:
            (WebCore::SVGElement::svgLoadEventTimerFired):
            (WebCore::SVGElement::svgLoadEventTimer):
            * svg/SVGElement.h:
            * svg/SVGScriptElement.h:
            * svg/SVGStyleElement.h:
            * svg/SVGUseElement.h:
            * svg/animation/SMILTimeContainer.cpp:
            (WebCore::SMILTimeContainer::timerFired):
            * svg/animation/SMILTimeContainer.h:
            * xml/XMLHttpRequestProgressEventThrottle.cpp:
            (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
            * xml/XMLHttpRequestProgressEventThrottle.h:

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177225. rdar://problem/19424175

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

            [MSE] Add support for SourceBuffer.mode.
            https://bugs.webkit.org/show_bug.cgi?id=139265

            Reviewed by Eric Carlson.

            Support setting SourceBuffer's mode property, and add support for "sequence" mode. Prior
            to this change, "segments" mode was implied.

            * Modules/mediasource/MediaSource.cpp:
            (WebCore::MediaSource::addSourceBuffer):
            (WebCore::MediaSource::regenerateActiveSourceBuffers):
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::segmentsKeyword):
            (WebCore::SourceBuffer::sequenceKeyword):
            (WebCore::SourceBuffer::SourceBuffer):
            (WebCore::SourceBuffer::setTimestampOffset):
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
            (WebCore::SourceBuffer::setMode):
            * Modules/mediasource/SourceBuffer.h:
            * Modules/mediasource/SourceBuffer.idl:

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176879. rdar://problem/19424174

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

            [MSE][Mac] Return absolute value of error code from CDMSessionMediaSourceAVFObjC::update().
            https://bugs.webkit.org/show_bug.cgi?id=139316

            Reviewed by Eric Carlson.

            Similarly to our asynchronous error reporting, return the absolute value of the error code.

            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::systemCodeForError):
            (WebCore::CDMSessionMediaSourceAVFObjC::update):

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176482. rdar://problem/19424172

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

            [EME][Mac] Check the underlying error if the one returned by AVFoundation is AVErrorUnknown.
            https://bugs.webkit.org/show_bug.cgi?id=138986

            Reviewed by Eric Carlson.

            When we recieve an error with the code AVErrorUnknown, look for an underlying error from CoreMedia (or another
            lower-level framework) with a (presumably) more informative error code, and return that code instead.

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

2015-01-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175828. rdar://problem/19424171

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

            [EME][Mac] Add a systemCode to distinguish when no expired sessions were found in response to a "keyrelease" message.
            https://bugs.webkit.org/show_bug.cgi?id=138199

            Reviewed by Eric Carlson.

            Clients may want to be able to distinguish between cases where expired session data is not supported, and when
            those data are supported, but none are found.

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

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

        Merge r178378. rdar://problem/19274499

    2015-01-13  Beth Dakin  <bdakin@apple.com>

            Should disable immediate actions for iTunes
            https://bugs.webkit.org/show_bug.cgi?id=140405
            -and corresponding-
            rdar://problem/19461358

            Reviewed by Tim Horton.

            * WebCore.exp.in:

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

        Merge r178304. rdar://problem/19447156

    2015-01-12  Timothy Horton  <timothy_horton@apple.com>

            REGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
            https://bugs.webkit.org/show_bug.cgi?id=140373
            <rdar://problem/19447156>

            Reviewed by Simon Fraser.

            * page/mac/TextIndicatorWindow.mm:
            (WebCore::TextIndicatorWindow::setTextIndicator):
            Expand the window margin to the nearest integer.
            The window was already being pixel-snapped, but then we'd translate by
            the non-integral margin when building up the layer tree.
            It's OK to do this on 2x because it's fine to have the margin be bigger
            than needed.

            * platform/spi/cg/CoreGraphicsSPI.h:
            Add a CGCeiling to match CGFloor.

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

        Merge r178290. rdar://problem/19441243

    2015-01-12  Timothy Horton  <timothy_horton@apple.com>

            Multi-rect TextIndicators are vertically flipped in WebKit1
            https://bugs.webkit.org/show_bug.cgi?id=140350
            <rdar://problem/19441243>

            Reviewed by Beth Dakin.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithSelectionInFrame):
            (WebCore::TextIndicator::TextIndicator):
            * page/TextIndicator.h:
            (WebCore::TextIndicator::selectionRectInRootViewCoordinates):
            (WebCore::TextIndicator::textBoundingRectInRootViewCoordinates):
            (WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
            (WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            (WebCore::TextIndicatorWindow::setTextIndicator):
            Compute, store, and use TextIndicator's selectionRect and textBoundingRect
            in root view coordinates instead of window coordinates; this way, each
            WebKit can do the conversion itself, and the rootView vs. window flipping
            isn't wrongly factored into textRectsInBoundingRectCoordinates.

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

        Merge r173796.

    2014-09-21  Filip Pizlo  <fpizlo@apple.com>

            Unreviewed, speculative build fix.

            If you use typed arrays, you gotta include runtime/TypedArrayInlines.h.

            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r175615. <rdar://problem/19424167>

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

            [EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type field.
            https://bugs.webkit.org/show_bug.cgi?id=138380

            Reviewed by Eric Carlson.

            Parse out the requested FPS protocol version of the keySystem type string and pass it to
            AVStreamDataParser as an options dictionary.

            * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
            (WebCore::validKeySystemRE): Added, match comma-separated version suffixes.
            (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Call above.
            (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Parse out the version numbers
                and pass into the session as a vector.
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Take a vector of
                protocol version numbers.
            (WebCore::CDMSessionMediaSourceAVFObjC::update): Create an NSArray and pass into
                the key request creation method in an options dictionary.

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r175400. <rdar://problem/19424166>

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

            [EME] Add Setting for accessing storage location for MediaKeys data
            https://bugs.webkit.org/show_bug.cgi?id=138147

            Reviewed by Brady Eidson.

            Allow MediaPlayerPrivateAVFoundationObjC to query for the MediaKeys storage directory
            by piping that request down from WebKit and WebKit2 into Settings.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::mediaKeysStorageDirectory): Get the location from Settings and
                append the current origin.
            * html/HTMLMediaElement.h:
            * page/Settings.h:
            (WebCore::Settings::setMediaKeysStorageDirectory): Simple setter.
            (WebCore::Settings::mediaKeysStorageDirectory): Simple accessor.
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::mediaKeysStorageDirectory): Pass through to m_client.
            * platform/graphics/MediaPlayer.h:
            (WebCore::MediaPlayerClient::mediaPlayerMediaKeysStorageDirectory): Default implementation.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Fetch the location from MediaPlayer.
            (WebCore::sessionStorageDirectory): Deleted.

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r175333. <rdar://problem/19424165>

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

            [EME] NULL-dereference crash in MediaKeys::setMediaElement().
            https://bugs.webkit.org/show_bug.cgi?id=138177

            Reviewed by Eric Carlson.

            NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement
            has previously had stop() called.

            * Modules/encryptedmedia/MediaKeys.cpp:
            (WebCore::MediaKeys::setMediaElement):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r175332. <rdar://problem/19424161>

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

            [EME] MediaKeySession resources persist across page reloads
            https://bugs.webkit.org/show_bug.cgi?id=138176

            Reviewed by Eric Carlson.

            MediaKeySession is an ActiveDOMObject, so when told to stop() by our execution context,
            close() the session, releasing all our resources.

            * Modules/encryptedmedia/MediaKeySession.h:

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r175331. <rdar://problem/19424160>

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

            [EME][Mac] MediaKeySession type "keyrelease" is ignored.
            https://bugs.webkit.org/show_bug.cgi?id=138175

            Reviewed by Eric Carlson.

            To indicate that they would like to recevie expired session confirmation messages, clients
            will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
            this type needs to be updated to recognize "keyrelease" as a valid type.

            Also, the code which validates update() requests needs to allow updates containing the string
            "acknowledged", so that clients can request the confirmation messages be discarded.

            * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
            (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::CDMSessionMediaSourceAVFObjC::update):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r175284. <rdar://problem/19424157>

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

            [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
            https://bugs.webkit.org/show_bug.cgi?id=138149

            Reviewed by Brent Fulgham.

            AVStreamSession now requires its storage location at creation-time, rather than post-creation. This requires
            us to move storage location code from CDMSessionMediaSourceAVFObjC to MediaPlayerPrivateMediaSourceAVFObjC.

            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Renamed.
            (WebCore::CDMSessionMediaSourceAVFObjC::update):
            (WebCore::sessionStorageDirectory): Deleted.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::sessionStorageDirectory):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r175000. <rdar://problem/19424156>

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

            [EME][Mac] Update to match new AVStreamSession API and requirements.
            https://bugs.webkit.org/show_bug.cgi?id=137923

            Reviewed by Eric Carlson.

            The session identifier has moved from AVStreamDataParser to -[AVStreamSession contentProtectionSessionIdentifier]
            and the property is no longer KVObservable. A new notification key has been added in place of KVO.

            Additionally, the requirements for using AVStreamDataParser with AVStreamSession have changed. It is now
            required that AVStreamDataParsers be added to an AVStreamSession before the 
            -streamSession:didProvideContentKeyRequestInitializationData:forTrackID delegate method is called. A
            -streamParserWillProvideContentKeyRequestInitializationData:forTrackID delegate has been added, and
            an AVStreamSession must be created and the AVStreamDataParser added to it during the scope of that delegate
            method.

            To facilitate this, the MediaPlayerPrivateMediaSourceAVFObjC object will lazily create and own a AVStreamSession
            object when requested. The SourceBufferPrivateAVFObjC object will listen for the -willProvide delegate call
            and will add its AVStreamDataParser to that AVStreamSession when called.

            The CDMSessionMediaSourceAVFObjC object is no longer responsible for creating the AVStreamSession, and because
            the session identifier has moved from many AVStreamDataParsers to a single AVStreamSession, the
            CDMSessionMediaSourceAVFObjCObserver class can become much simpler, as it only has to observe a single object.

            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (-[CDMSessionMediaSourceAVFObjCObserver dealloc]): Deleted.
            (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): Deleted.
            (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): Deleted.
            (-[CDMSessionMediaSourceAVFObjCObserver invalidate]): Deleted.
            (-[CDMSessionMediaSourceAVFObjCObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
            (-[CDMSessionMediaSourceAVFObjCObserver contentProtectionSessionIdentifierChanged:]): Added.
            (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Call setStreamSession(nullptr).
            (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): The sessionId is now a value in the dictionary, not the key.
            (WebCore::CDMSessionMediaSourceAVFObjC::update): No longer create an AVStreamSession.
            (WebCore::CDMSessionMediaSourceAVFObjC::setStreamSession): Add and remove observers as appropriate.
            (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): No longer add or remove parsers from AVStreamSessions.
            (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Ditto.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Simple getter.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Lazy initializing getter.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Call setStreamSession().
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (-[WebAVStreamDataParserListener streamParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Synchronously pass to SourceBufferPrivateAVFObjC.
            (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): Add the parser to an AVStreamSession.
            (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Check the trackId.
            * platform/mac/SoftLinking.h:

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r174652. <rdar://problem/19424154>

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

            MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
            https://bugs.webkit.org/show_bug.cgi?id=137533

            Reviewed by Darin Adler.

            When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
            characteristics of the player may have changed.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r174460. <rdar://problem/19424153>

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

            [EME][Mac] Update CDMSessionMediaSourceAVFObjC to match new API provided by AVStreamSession
            https://bugs.webkit.org/show_bug.cgi?id=137469

            Reviewed by Brent Fulgham.

            Update our forward declaration to match the API provided by AVStreamSession.
            AVStreamSession now takes an error: parameter in its initialiazer. It also provides the
            sessionIdentifier used by the CDM, which CDMSessionMediaSourceAVFObjC will use as the
            value of sessionId. Having this identifier allows us to fire a
            secure-proof-of-key-release message after the client calls MediaKeySession.close().
            Because this call will now generate messages, which have to be responded to in order
            to remove those proofs from storage, do not clear the CDMSession from MediaKeySession
            after calling close().

            * Modules/encryptedmedia/MediaKeySession.cpp:
            (WebCore::MediaKeySession::~MediaKeySession):
            (WebCore::MediaKeySession::close):
            (WebCore::MediaKeySession::setError): Deleted.
            (WebCore::MediaKeySession::sessionId): Deleted.
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            (WebCore::CDMSessionMediaSourceAVFObjC::setSessionId):
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (-[CDMSessionMediaSourceAVFObjCListener initWithParent:]):
            (-[CDMSessionMediaSourceAVFObjCObserver dealloc]):
            (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
            (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
            (-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
            (-[CDMSessionMediaSourceAVFObjCListener observeValueForKeyPath:ofObject:change:context:]):
            (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
            (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
            (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
            (WebCore::CDMSessionMediaSourceAVFObjC::update):
            (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer):
            (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r173791. <rdar://problem/19424150>

    2014-09-19  Jer Noble  <jer.noble@apple.com>

            [EME][Mac] Support secure proof of key release in the com.apple.fps.2_0 keysystem.
            https://bugs.webkit.org/show_bug.cgi?id=136898

            Reviewed by Eric Carlson.

            Add support for proof of key release to the CDM by supporting a new "mime" type called
            "keyrelease". When a session of type "keyrelease" is created, the initData is the server
            certificate, the keyMessage contains the first stored proof of key release if present,
            and closing the session will remove that proof from storage.

            * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
            (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
            (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
            (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
            (WebCore::sessionStorageDirectory):
            (WebCore::CDMSessionMediaSourceAVFObjC::update):
            (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r173520. <rdar://problem/19424149>

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

            [EME] REGRESSION(??): test media/encrypted-media/encrypted-media-v2-syntax.html is failing
            https://bugs.webkit.org/show_bug.cgi?id=136723

            Reviewed by Eric Carlson.

            Update a comment to point to the implemented Working Draft 18 Feburary 2014 version of the spec.

            * Modules/encryptedmedia/MediaKeys.cpp:
            (WebCore::MediaKeys::createSession):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r173454. <rdar://problem/19424147>

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

            [MSE] http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html failing after r173318
            https://bugs.webkit.org/show_bug.cgi?id=136676

            Reviewed by Eric Carlson.

            Revert the inadvertant conditional change introduced in r173318.

            * Modules/mediasource/MediaSource.cpp:
            (WebCore::MediaSource::setDurationInternal):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r173439. <rdar://problem/19424146>

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

            [MSE] media/media-source tests broken after r173318
            https://bugs.webkit.org/show_bug.cgi?id=136675

            Reviewed by Eric Carlson.

            Fixes the following tests:
                http/tests/media/media-source/mediasource-play.html
                http/tests/media/media-source/mediasource-remove.html
                media/media-source/media-source-monitor-source-buffers.html
                media/media-source/media-source-overlapping-append-buffered.html   

            In r173318, a for loop was converted to a C++11 loop, but in so doing, left
            pre-initialized, empty values in the beginning of returned Vector, which caused
            the calling algorithm to miscalculate the amount of data buffered by the media
            source.

            * Modules/mediasource/MediaSource.cpp:
            (WebCore::MediaSource::activeRanges):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r173337. <rdar://problem/19424143>

    2014-09-05  Jer Noble  <jer.noble@apple.com>

            Unreviewed GTK build fix; include StringPrintStream to pull in toString().

            * html/HTMLMediaElement.h:

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r173318. <rdar://problem/19424143>

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

            Refactoring: make MediaTime the primary time type for audiovisual times.
            https://bugs.webkit.org/show_bug.cgi?id=133579

            Reviewed by Eric Carlson.

            In order to limit the number of floating-point rounding errors for media systems which
            can make use of rational time objects.

            Add some convenience methods to convert between QTTime and MediaTime.
            * platform/graphics/mac/MediaTimeQTKit.h: Added.
            * platform/graphics/mac/MediaTimeQTKit.mm: Added.
            (WebCore::toMediaTime):
            (WebCore::toQTTime):

            Rename MediaTimeMac -> MediaTimeAVFoundation:
            * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp: Renamed from Source/WebCore/platform/mac/MediaTimeMac.cpp.
            (WebCore::toMediaTime):
            (WebCore::toCMTime):
            * platform/graphics/avfoundation/MediaTimeAVFoundation.h: Renamed from Source/WebCore/platform/mac/MediaTimeMac.h.

            Use MediaTime instead of double:
            * Modules/mediasource/MediaSource.cpp:
            (WebCore::MediaSource::duration):
            (WebCore::MediaSource::currentTime):
            (WebCore::MediaSource::buffered):
            (WebCore::MediaSource::setDuration):
            (WebCore::MediaSource::activeRanges):
            * Modules/mediasource/MediaSource.h:
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::remove):
            (WebCore::SourceBuffer::removeCodedFrames):
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
            (WebCore::SourceBuffer::hasCurrentTime):
            (WebCore::SourceBuffer::hasFutureTime):
            (WebCore::SourceBuffer::canPlayThrough):
            * WebCore.xcodeproj/project.pbxproj:
            * bindings/js/JSDataCueCustom.cpp:
            (WebCore::JSDataCueConstructor::constructJSDataCue):
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::HTMLMediaElement):
            (WebCore::HTMLMediaElement::parseAttribute):
            * html/HTMLMediaElement.h:
            (WebCore::ValueToString<MediaTime>::string):
            * html/MediaFragmentURIParser.cpp:
            (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
            (WebCore::MediaFragmentURIParser::startTime):
            (WebCore::MediaFragmentURIParser::endTime):
            (WebCore::MediaFragmentURIParser::parseTimeFragment):
            (WebCore::MediaFragmentURIParser::parseNPTFragment):
            (WebCore::MediaFragmentURIParser::parseNPTTime):
            (WebCore::MediaFragmentURIParser::invalidTimeValue): Deleted.
            * html/MediaFragmentURIParser.h:
            * html/TimeRanges.h:
            (WebCore::TimeRanges::ranges):
            * html/track/DataCue.cpp:
            (WebCore::DataCue::DataCue):
            * html/track/DataCue.h:
            (WebCore::DataCue::create):
            * html/track/InbandDataTextTrack.cpp:
            (WebCore::InbandDataTextTrack::addDataCue):
            (WebCore::InbandDataTextTrack::updateDataCue):
            (WebCore::InbandDataTextTrack::removeDataCue):
            * html/track/InbandDataTextTrack.h:
            * html/track/InbandGenericTextTrack.cpp:
            (WebCore::InbandGenericTextTrack::updateCueFromCueData):
            (WebCore::InbandGenericTextTrack::addGenericCue):
            (WebCore::InbandGenericTextTrack::removeGenericCue):
            * html/track/InbandTextTrack.cpp:
            (WebCore::InbandTextTrack::startTimeVariance):
            * html/track/InbandTextTrack.h:
            * html/track/InbandWebVTTTextTrack.cpp:
            (WebCore::InbandWebVTTTextTrack::newCuesParsed):
            * html/track/TextTrack.cpp:
            (WebCore::TextTrack::addCue):
            (WebCore::TextTrack::hasCue):
            * html/track/TextTrack.h:
            (WebCore::TextTrack::startTimeVariance):
            * html/track/TextTrackCue.cpp:
            (WebCore::TextTrackCue::create):
            (WebCore::TextTrackCue::TextTrackCue):
            (WebCore::TextTrackCue::setStartTime):
            (WebCore::TextTrackCue::setEndTime):
            (WebCore::TextTrackCue::hasEquivalentStartTime):
            * html/track/TextTrackCue.h:
            (WebCore::TextTrackCue::startTime):
            (WebCore::TextTrackCue::endTime):
            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGeneric::TextTrackCueGeneric):
            * html/track/TextTrackCueGeneric.h:
            * html/track/TextTrackCueList.cpp:
            (WebCore::TextTrackCueList::add):
            * html/track/VTTCue.cpp:
            (WebCore::VTTCue::VTTCue):
            (WebCore::VTTCue::markFutureAndPastNodes):
            (WebCore::VTTCue::updateDisplayTree):
            * html/track/VTTCue.h:
            (WebCore::VTTCue::create):
            * html/track/WebVTTParser.cpp:
            (WebCore::WebVTTParser::WebVTTParser):
            (WebCore::WebVTTParser::resetCueValues):
            (WebCore::WebVTTParser::collectTimeStamp):
            (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
            * html/track/WebVTTParser.h:
            (WebCore::WebVTTCueData::startTime):
            (WebCore::WebVTTCueData::setStartTime):
            (WebCore::WebVTTCueData::endTime):
            (WebCore::WebVTTCueData::setEndTime):
            (WebCore::WebVTTCueData::WebVTTCueData): Deleted.
            * platform/graphics/InbandTextTrackPrivateClient.h:
            (WebCore::GenericCueData::startTime):
            (WebCore::GenericCueData::setStartTime):
            (WebCore::GenericCueData::endTime):
            (WebCore::GenericCueData::setEndTime):
            (WebCore::GenericCueData::GenericCueData):
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::duration):
            (WebCore::MediaPlayer::startTime):
            (WebCore::MediaPlayer::initialTime):
            (WebCore::MediaPlayer::currentTime):
            (WebCore::MediaPlayer::seekWithTolerance):
            (WebCore::MediaPlayer::seek):
            (WebCore::MediaPlayer::maxTimeSeekable):
            (WebCore::MediaPlayer::minTimeSeekable):
            (WebCore::MediaPlayer::mediaTimeForTimeValue):
            (WebCore::MediaPlayer::totalFrameDelay):
            * platform/graphics/MediaPlayer.h:
            * platform/graphics/MediaPlayerPrivate.h:
            (WebCore::MediaPlayerPrivateInterface::durationMediaTime):
            (WebCore::MediaPlayerPrivateInterface::currentMediaTime):
            (WebCore::MediaPlayerPrivateInterface::seek):
            (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
            (WebCore::MediaPlayerPrivateInterface::startTime):
            (WebCore::MediaPlayerPrivateInterface::initialTime):
            (WebCore::MediaPlayerPrivateInterface::seekable):
            (WebCore::MediaPlayerPrivateInterface::maxMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateInterface::minMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValue):
            (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
            (WebCore::MediaPlayerPrivateInterface::startTimeDouble): Deleted.
            (WebCore::MediaPlayerPrivateInterface::maxTimeSeekableDouble): Deleted.
            (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValueDouble): Deleted.
            * platform/graphics/MediaSourcePrivateClient.h:
            * platform/graphics/TrackPrivateBase.h:
            (WebCore::TrackPrivateBase::startTimeVariance):
            * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
            (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
            (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
            (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
            (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
            * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
            (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue):
            (WebCore::IncompleteMetaDataCue::startTime):
            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
            (WebCore::InbandTextTrackPrivateAVF::processCue):
            (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
            (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
            (WebCore::MediaPlayerPrivateAVFoundation::durationMediaTime):
            (WebCore::MediaPlayerPrivateAVFoundation::seek):
            (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance):
            (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundation::maxTimeLoaded):
            (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
            (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
            (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged):
            (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
            (WebCore::MediaPlayerPrivateAVFoundation::timeChanged):
            (WebCore::MediaPlayerPrivateAVFoundation::didEnd):
            (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
            (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
            (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
            (WebCore::MediaPlayerPrivateAVFoundation::duration): Deleted.
            (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble): Deleted.
            (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Deleted.
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
            (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
            (WebCore::MediaPlayerPrivateAVFoundation::Notification::time):
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
            (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
            (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
            (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
            (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
            (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
            (WebCore::AVFWrapper::seekToTime): Deleted.
            (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
            (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
            (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
            (WebCore::AVFWrapper::seekToTime): Deleted.
            (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
            (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
            (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
            (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
            (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationMediaTime):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTime):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Deleted.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Deleted.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble): Deleted.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble): Deleted.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable): Deleted.
            * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
            (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
            * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
            (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
            (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
            (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
            (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
            (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
            * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::maxValueForTimeRanges):
            (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
            (WebCore::MediaPlayerPrivateQTKit::durationMediaTime):
            (WebCore::MediaPlayerPrivateQTKit::currentMediaTime):
            (WebCore::MediaPlayerPrivateQTKit::seek):
            (WebCore::MediaPlayerPrivateQTKit::doSeek):
            (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
            (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
            (WebCore::MediaPlayerPrivateQTKit::seeking):
            (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
            (WebCore::MediaPlayerPrivateQTKit::buffered):
            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
            (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress):
            (WebCore::MediaPlayerPrivateQTKit::updateStates):
            (WebCore::MediaPlayerPrivateQTKit::timeChanged):
            (WebCore::MediaPlayerPrivateQTKit::didEnd):
            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
            (WebCore::MediaPlayerPrivateQTKit::createQTTime): Deleted.
            (WebCore::MediaPlayerPrivateQTKit::duration): Deleted.
            (WebCore::MediaPlayerPrivateQTKit::currentTime): Deleted.
            (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable): Deleted.
            (WebCore::MediaPlayerPrivateQTKit::maxTimeLoaded): Deleted.
            (WebCore::MediaPlayerPrivateQTKit::mediaTimeForTimeValue): Deleted.
            * platform/mac/PlatformClockCM.mm:
            * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
            (WebCore::MockMediaPlayerMediaSource::maxMediaTimeSeekable):
            (WebCore::MockMediaPlayerMediaSource::currentMediaTime):
            (WebCore::MockMediaPlayerMediaSource::durationMediaTime):
            (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
            (WebCore::MockMediaPlayerMediaSource::totalFrameDelay):
            (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Deleted.
            (WebCore::MockMediaPlayerMediaSource::currentTimeDouble): Deleted.
            (WebCore::MockMediaPlayerMediaSource::durationDouble): Deleted.
            * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
            * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
            (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
            * platform/mock/mediasource/MockMediaSourcePrivate.h:
            * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
            (WebCore::MockSourceBufferPrivate::enqueueSample):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r173197. <rdar://problem/19424142>

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

            [EME][Mac] Refactor CDMPrivateMediaSourceAVFObjC to allow sessions to be created without being attached to an AVStreamDataParser.
            https://bugs.webkit.org/show_bug.cgi?id=136016

            Reviewed by Eric Carlson.

            The CDMPrivateMediaPlayer class will delegate creation of CDMSession instances to the current MediaPlayer. This
            of course requires the MediaKeys object owning the CDM to be attached to a HTMLMediaElement, and specifically to
            one with a valid src attribute or source node which has sucessfully begun loading. For certain CDM operations,
            it would be better if a given MediaKeys could create a session without actually being connected to a
            HTMLMediaElement (yet).

            To facilitate this for CDMSessionPrivateMediaSourceAVFObjC, add a new class, CDMPrivateMediaSourceAVFObjC, which
            is the primary factory for CDMSessionPrivateMediaSOurceAVFObjC. Disclaim responsibility for creating these sessions
            in MediaPlayerPrivateMediaSourceAVFObjC by not passing the "supportsKeySystem" method when registering itself.

            Add methods to CDMSessionPrivateMediaSourceAVFObjC to allow SourceBuffers to be added and removed from the session,
            to support adding the session to the HTMLMediaElement after the session has been created.

            Since MediaPlayerPrivate instance and  CDMSession instances must be able to communicate with one another, add a type()
            enum and virtual method to allow CDMSession instnaces to be distinguisted from (and casted to) one another.

            * Modules/encryptedmedia/CDM.cpp:
            (WebCore::installedCDMFactories): Register CDMPrivateMediaSourceAVFObjC.
            (WebCore::CDM::createSession): Notify the MediaPlayer of the new CDMSession.
            * Modules/encryptedmedia/MediaKeySession.h:
            * Modules/encryptedmedia/MediaKeys.cpp:
            (WebCore::MediaKeys::setMediaElement): Notify the HTMLMediaElement of any existing sessions.
            * WebCore.xcodeproj/project.pbxproj:
            * platform/graphics/CDMSession.h:
            (WebCore::CDMSession::type): Added.
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::setCDMSession): Pass through to the MediaPlayerPrivate.
            * platform/graphics/MediaPlayer.h:
            * platform/graphics/MediaPlayerPrivate.h:
            (WebCore::MediaPlayerPrivateInterface::setCDMSession): Added. Default no-op.
            * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: Added.
            (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Simple constructor.
            (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Simple destructor.
            (WebCore::CDMPrivateMediaSourceAVFObjC::create): Simple factory.
            (WebCore::CDMPrivateMediaSourceAVFObjC::cdm): Simple accessor.
            * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: 
            (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Moved from MediaPlayerPrivateMediaSourceAVFObjC.
            (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType): Ditto.
            (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Ditto.
            (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Returns new CDMSessionMediaSourceAVFObjC.
            * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
            (WebCore::CDMSessionAVFoundationObjC::type): Added.
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            (WebCore::CDMSessionMediaSourceAVFObjC::type): Added.
            (WebCore::toCDMSessionMediaSourceAVFObjC): Throw assertion if type() is not correct.
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Removed m_parent ivar.
            (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Ditto.
            (WebCore::CDMSessionMediaSourceAVFObjC::update): Determing which SourceBuffer is protected.
            (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Added.
            (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Added.
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Remove supportsKeyType parameter.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Remove keyType check.
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Tell the CDMSession about outstanding SourceBuffers.
            * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r172651. <rdar://problem/19424141>

    2014-08-15  Jer Noble  <jer.noble@apple.com>

            [EME][Mac] Adopt AVStreamSession.
            https://bugs.webkit.org/show_bug.cgi?id=135983

            Reviewed by Eric Carlson.

            Add AVStreamDataParsers to a new AVStreamSession instance, and expire that session when asked to release
            the session's keys.

            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
            (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
            (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
            (WebCore::CDMSessionMediaSourceAVFObjC::update):

2015-01-14  Dana Burkart  <dburkart@apple.com>

        Merged r171215. <rdar://problem/19424110>

    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-17  David Kilzer  <ddkilzer@apple.com>

            SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
            <http://webkit.org/b/135006>

            Reviewed by Darin Adler.

            * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
            WebCore.xcconfig.
            * Configurations/DebugRelease.xcconfig: Remove empty
            SECTORDER_FLAGS definition.
            * Configurations/WebCoreTestShim.xcconfig: Ditto.
            * Configurations/WebCoreTestSupport.xcconfig: Ditto.
            * Configurations/WebCore.xcconfig: Use $(CONFIGURATION) so
            SECTORDER_FLAGS is only set on Production builds.

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

        Merge r178065. rdar://problem/19317526

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

            Manually-animated TextIndicator fades out blue selection if you click inside it
            https://bugs.webkit.org/show_bug.cgi?id=140224
            <rdar://problem/19317526>

            Reviewed by Beth Dakin.

            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView hasCompletedAnimation]):
            (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
            Avoid fading out the TextIndicator if the animation hadn't completed.
            Also, use wantsManualAnimation instead of duplicating the switch here.

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

        Merge r178056. rdar://problem/19300492

    2015-01-07  Beth Dakin  <bdakin@apple.com>

            Adopt delegate callbacks so that standardQuickLookMenuItem does not obscure the 
            link
            https://bugs.webkit.org/show_bug.cgi?id=140206
            -and corresponding-
            rdar://problem/19300492

            Reviewed by Tim Horton.

            More delegate methods.
            * platform/spi/mac/QuickLookMacSPI.h:

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

        Merge r177970. rdar://problem/19383425

    2015-01-06  Timothy Horton  <timothy_horton@apple.com>

            Make explicit which TextIndicator animations are driven manually, and which run automatically
            https://bugs.webkit.org/show_bug.cgi?id=140113
            <rdar://problem/19383425>

            Reviewed by Darin Adler.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::wantsManualAnimation):
            Add wantsManualAnimation(). The old transitions (Bounce and BounceAndCrossfade)
            run automatically, and the new ones (FadeIn and Crossfade) are driven manually.

            * page/TextIndicator.h:
            Add a comment explaining which animations are manual and which are not.

            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView present]):
            Make use of wantsManualAnimation(). The previous (wantsFadeIn || wantsCrossfade)
            was wrong, because it was true for BounceAndCrossfade, and would cause
            BounceAndCrossfade animations (which aren't driven manually) to stall at progress=0.

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

        Merge r177705. rdar://problem/19333076

    2014-12-23  Timothy Horton  <timothy_horton@apple.com>

            Install a TextIndicator for link immediate actions
            https://bugs.webkit.org/show_bug.cgi?id=139897
            <rdar://problem/19333076>

            Reviewed by Anders Carlsson.

            * platform/spi/mac/QuickLookMacSPI.h:
            Add a new piece of SPI.

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

        Merge r177656. rdar://problem/19311017

    2014-12-22  Timothy Horton  <timothy_horton@apple.com>

            TextIndicatorWindow is larger than it needs to be, especially when not bouncing
            https://bugs.webkit.org/show_bug.cgi?id=139876
            <rdar://problem/19311017>

            Reviewed by Sam Weinig.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::wantsBounce):
            (WebCore::TextIndicator::wantsContentCrossfade):
            (WebCore::TextIndicator::wantsFadeIn):
            * page/TextIndicator.h:
            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            (-[WebTextIndicatorView _animationDuration]):
            (-[WebTextIndicatorView present]):
            (WebCore::TextIndicatorWindow::setTextIndicator):
            (-[WebTextIndicatorView _textIndicatorWantsBounce]): Deleted.
            (-[WebTextIndicatorView _textIndicatorWantsContentCrossfade]): Deleted.
            (-[WebTextIndicatorView _textIndicatorWantsFadeIn]): Deleted.
            Move the various switches over TextIndicatorPresentationTransition into TextIndicator.
            Adjust the margin; only inflate by the shadow if we're not bouncing.
            If we are bouncing, fix the math to more tightly fit the bounce.
            Previously we were inflating by way too much, and even when we didn't need to.

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

        Merge r177641. rdar://problem/19283300

    2014-12-22  Timothy Horton  <timothy_horton@apple.com>

            Adjust TextIndicator shadow parameters
            https://bugs.webkit.org/show_bug.cgi?id=139871
            <rdar://problem/19283300>

            Reviewed by Sam Weinig.

            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            Slightly adjust the shadow and bounce size.

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

    Rollout r177935. rdar://problem/19283300

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

    Rollout r177936. rdar://problem/19311017

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

        Merge r177656. rdar://problem/19311017

    2014-12-22  Timothy Horton  <timothy_horton@apple.com>

            TextIndicatorWindow is larger than it needs to be, especially when not bouncing
            https://bugs.webkit.org/show_bug.cgi?id=139876
            <rdar://problem/19311017>

            Reviewed by Sam Weinig.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::wantsBounce):
            (WebCore::TextIndicator::wantsContentCrossfade):
            (WebCore::TextIndicator::wantsFadeIn):
            * page/TextIndicator.h:
            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            (-[WebTextIndicatorView _animationDuration]):
            (-[WebTextIndicatorView present]):
            (WebCore::TextIndicatorWindow::setTextIndicator):
            (-[WebTextIndicatorView _textIndicatorWantsBounce]): Deleted.
            (-[WebTextIndicatorView _textIndicatorWantsContentCrossfade]): Deleted.
            (-[WebTextIndicatorView _textIndicatorWantsFadeIn]): Deleted.
            Move the various switches over TextIndicatorPresentationTransition into TextIndicator.
            Adjust the margin; only inflate by the shadow if we're not bouncing.
            If we are bouncing, fix the math to more tightly fit the bounce.
            Previously we were inflating by way too much, and even when we didn't need to.

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

        Merge r177641. rdar://problem/19283300

    2014-12-22  Timothy Horton  <timothy_horton@apple.com>

            Adjust TextIndicator shadow parameters
            https://bugs.webkit.org/show_bug.cgi?id=139871
            <rdar://problem/19283300>

            Reviewed by Sam Weinig.

            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            Slightly adjust the shadow and bounce size.

2014-12-19  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176725. rdar://problem/19300244

    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".

2014-12-18  Matthew Hanson  <matthew_hanson@apple.com>

        Build fix.

        Unreviewed.

        * WebCore.exp.in:
        Added missing symbol.

2014-12-18  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177522. rdar://problem/19288547

    2014-12-18  Timothy Horton  <timothy_horton@apple.com>

            Change page preview loading order, and add a TextIndicator
            https://bugs.webkit.org/show_bug.cgi?id=139793
            <rdar://problem/19288547>

            Reviewed by Beth Dakin.

            * WebCore.exp.in:
            * platform/spi/mac/NSPopoverSPI.h:
            Add an export and some SPI.

2014-12-17  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177427. rdar://problem/19237945

    2014-12-16  Timothy Horton  <timothy_horton@apple.com>

            Implement and adopt two new TextIndicator presentation animations
            https://bugs.webkit.org/show_bug.cgi?id=139715
            <rdar://problem/19237945>

            Reviewed by Anders Carlsson.

            * WebCore.exp.in:
            Adjust one symbol and export another.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithSelectionInFrame):
            Take a blue-highlight snapshot if we're doing a crossfade without a bounce.

            * page/TextIndicator.h:
            (WebCore::TextIndicator::presentationTransition):
            Add FadeIn and Crossfade transition types.

            * page/mac/TextIndicatorWindow.h:
            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            (createBounceAnimation):
            (createContentCrossfadeAnimation):
            (createShadowFadeAnimation):
            (createFadeInAnimation):
            (-[WebTextIndicatorView _textIndicatorWantsBounce]):
            (-[WebTextIndicatorView _textIndicatorWantsContentCrossfade]):
            (-[WebTextIndicatorView _textIndicatorWantsFadeIn]):
            Factor out the animation construction.

            (-[WebTextIndicatorView _animationDuration]):
            Factor out the duration computation.

            (-[WebTextIndicatorView present]):
            (-[WebTextIndicatorView setAnimationProgress:]):
            Implement FadeIn and Crossfade transitions.
            They can be driven externally and then continue from where they
            left off when the progress reaches 100%.
            FadeIn changes the opacity of the whole bubble, Crossfade
            crossfades the content (from blue to yellow).

            (WebCore::TextIndicatorWindow::TextIndicatorWindow):
            (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
            Don't immediately destroy the window if it is crossfades or fades in.
            Fade it out, instead.

            (WebCore::TextIndicatorWindow::setAnimationProgress):
            Drive the paused animation manually. If progress hits 100%,
            start running it automatically from where it last left off.

            (WebCore::TextIndicatorWindow::setTextIndicator):
            (WebCore::TextIndicatorWindow::startFadeOut):
            (-[WebTextIndicatorView presentWithCompletionHandler:]): Deleted.
            (WebCore::TextIndicatorWindow::startFadeOutTimerFired): Deleted.
            Remove the completion block from -present.

            * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
            Add some SPI.

2014-12-17  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177409. rdar://problem/19271854

    2014-12-16  Beth Dakin  <bdakin@apple.com>

            REGRESSION: Preview popovers obscure the link, look wrong
            https://bugs.webkit.org/show_bug.cgi?id=139711
            -and corresponding-
            rdar://problem/19271854

            Reviewed by Tim Horton.

            New SPI.
            * WebCore.xcodeproj/project.pbxproj:
            * platform/spi/mac/NSPopoverSPI.h: Added.

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177326. <rdar://problem/19198414>

    2014-12-15  Beth Dakin  <bdakin@apple.com>

            Speculative build fix.

            * platform/spi/mac/LookupSPI.h:

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177325. <rdar://problem/19198414>

    2014-12-15  Beth Dakin  <bdakin@apple.com>

            Speculative build fix.

            * platform/spi/mac/LookupSPI.h:

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

            Switching src of <video> with clipping layer results in empty black square.
            https://bugs.webkit.org/show_bug.cgi?id=139650

            Reviewed by Simon Fraser.

            Test: compositing/video-clip-change-src.html

            When the contentsLayer changes after a contentsClippingLayer has already been created, make sure to parent the
            new contentsLayer, as updateRects() will only reparent when first creating a contentsClippingLayer.

            * platform/graphics/ca/GraphicsLayerCA.cpp:
            (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177323. <rdar://problem/19198414>

    2014-12-15  Beth Dakin  <bdakin@apple.com>

            Make lookup an immediate action instead of an action menu item
            https://bugs.webkit.org/show_bug.cgi?id=139661
            -and corresponding-
            rdar://problem/19198414

            Reviewed by Tim Horton.

            New SPI.
            * platform/spi/mac/LookupSPI.h:

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177303. <rdar://problem/19198539>

    2014-12-15  Timothy Horton  <timothy_horton@apple.com>

            Implement Data Detectors immediate actions for WebKit2
            https://bugs.webkit.org/show_bug.cgi?id=139617
            <rdar://problem/19198539>

            Reviewed by Beth Dakin.

            * platform/spi/mac/DataDetectorsSPI.h:
            Add some new SPI.

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

            REGRESSION (r168217): Images are cropped out during animation at jetblue.com
            https://bugs.webkit.org/show_bug.cgi?id=136410
            rdar://problem/18188533

            Reviewed by Dean Jackson.
            
            During GraphicsLayer flushing, for tiled layers we can compute a visible rect using
            the current state of an animation, which is obtained via the AnimationController.
            If that animation was running in a subframe, AnimationController could use a stale
            beginAnimationUpdateTime since no-one called its beginAnimationUpdate(). That
            resulted in an incorrect computation of the visible rect, resulting in missing tiles.
            
            There are two parts to this fix. First, add an assertion that beginAnimationUpdateTime()
            is being called inside an animation update block. This required moving m_beginAnimationUpdateCount
            into AnimationControllerPrivate, and changes to endAnimationUpdate().
            
            The second is adding a AnimationUpdateBlock to getAnimatedStyleForRenderer(), which
            can be called outside of style resolution. We also need some in other API functions.
            
            Testing revealed that layout can call via layoutOverflowRectForPropagation(), suggesting
            that we should have an animation batch inside FrameView::layout(). In addition, a single
            resolveStyle/layout should use the same animationBeginTime, so we add a batch to 
            updateLayoutAndStyleIfNeededRecursive().
            
            Identical to the patch that was rolled out in r177269 with the addition of a 
            Ref<Frame> protector(m_frame) in AnimationControllerPrivate::animationTimerFired()
            that ensures that the AnimationControllerPrivate is kept alive for the scope of
            the AnimationPrivateUpdateBlock, when a transitionEnd event destroys an iframe.
            
            No test because it's timing-dependent. Existing tests exercise the new assertion.

            * css/CSSComputedStyleDeclaration.cpp:
            (WebCore::computeRenderStyleForProperty):
            * page/FrameView.cpp:
            (WebCore::FrameView::layout):
            (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
            * page/animation/AnimationController.cpp:
            (WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
            (WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
            (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
            (WebCore::AnimationControllerPrivate::animationTimerFired):
            (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
            (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
            (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
            (WebCore::AnimationControllerPrivate::beginAnimationUpdate):
            (WebCore::AnimationControllerPrivate::endAnimationUpdate):
            (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
            (WebCore::AnimationController::AnimationController):
            (WebCore::AnimationController::notifyAnimationStarted):
            (WebCore::AnimationController::pauseAnimationAtTime):
            (WebCore::AnimationController::pauseTransitionAtTime):
            (WebCore::AnimationController::resumeAnimationsForDocument):
            (WebCore::AnimationController::startAnimationsIfNotSuspended):
            (WebCore::AnimationController::beginAnimationUpdate):
            (WebCore::AnimationController::endAnimationUpdate):
            * page/animation/AnimationController.h:
            * page/animation/AnimationControllerPrivate.h:

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

            REGRESSION (r168217): Images are cropped out during animation at jetblue.com
            https://bugs.webkit.org/show_bug.cgi?id=136410

            Reviewed by Dean Jackson.

            We were hitting the new assertion under Page::setPageScaleFactor(), which
            calls recalcStyle(), so move the AnimationUpdateBlock from updateStyleIfNeeded()
            to recalcStyle().

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

    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:

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

            Delete Notation because we don't use it
            https://bugs.webkit.org/show_bug.cgi?id=139171

            Reviewed by Kent Tamura.

            No tests because this is un-exposing something that never gets instantiated.

            * CMakeLists.txt:
            * DerivedSources.cpp:
            * DerivedSources.make:
            * WebCore.exp.in:
            * WebCore.order:
            * WebCore.vcxproj/WebCore.vcxproj:
            * WebCore.vcxproj/WebCore.vcxproj.filters:
            * WebCore.xcodeproj/project.pbxproj:
            * bindings/gobject/WebKitDOMNodeFilter.h:
            * bindings/gobject/WebKitDOMNodeFilter.symbols:
            * bindings/gobject/WebKitDOMPrivate.cpp:
            (WebKit::wrap):
            * bindings/gobject/webkitdom.symbols:
            * bindings/js/JSNodeCustom.cpp:
            (WebCore::createWrapperInline):
            * bindings/objc/DOM.mm:
            (kitClass):
            * bindings/objc/DOMCore.h:
            * bindings/objc/PublicDOMInterfaces.h:
            * dom/DOMAllInOne.cpp:
            * dom/Document.cpp:
            (WebCore::Document::importNode):
            (WebCore::Document::adoptNode):
            (WebCore::Document::childTypeAllowed):
            (WebCore::Document::canReplaceChild):
            * dom/Node.cpp:
            (WebCore::Node::dumpStatistics):
            (WebCore::Node::isDefaultNamespace):
            (WebCore::Node::lookupPrefix):
            (WebCore::Node::lookupNamespaceURI):
            (WebCore::appendTextContent):
            (WebCore::Node::setTextContent):
            * dom/Node.h:
            * dom/Node.idl:
            * dom/NodeFilter.h:
            * dom/NodeFilter.idl:
            * dom/Notation.cpp: Removed.
            * dom/Notation.h: Removed.
            * dom/Notation.idl: Removed.
            * dom/Range.cpp:
            (WebCore::lengthOfContentsInNode):
            (WebCore::Range::processContentsBetweenOffsets):
            (WebCore::Range::insertNode):
            (WebCore::Range::checkNodeWOffset):
            (WebCore::Range::checkNodeBA):
            (WebCore::Range::selectNode):
            (WebCore::Range::selectNodeContents):
            (WebCore::Range::surroundContents):
            * editing/MarkupAccumulator.cpp:
            (WebCore::MarkupAccumulator::appendStartMarkup):
            * xml/XPathUtil.cpp:
            (WebCore::XPath::isValidContextNode):

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177183. <rdar://problem/19208291>

    2014-12-11  Timothy Horton  <timothy_horton@apple.com>

            Fix the build.

            * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177182. <rdar://problem/19208291>

    2014-12-11  Timothy Horton  <timothy_horton@apple.com>

            Fix the build.

            * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177180. <rdar://problem/19208291>

    2014-12-11  Timothy Horton  <timothy_horton@apple.com>

            Move the preview popover to WKImmediateActionController
            https://bugs.webkit.org/show_bug.cgi?id=139560
            <rdar://problem/19208291>

            Reviewed by Beth Dakin.

            * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
            Add some requisite SPI.

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

            [Mac] Crash in -[WebVideoFullscreenHUDWindowController playing] in WK1 clients without FULLSCREEN_API enabled.
            https://bugs.webkit.org/show_bug.cgi?id=139546

            Reviewed by Eric Carlson.

            Finish the work started by r173230 and rename mediaElement -> videoElement in WebVideoFullscreenHUDWindowController.

            * platform/mac/WebVideoFullscreenHUDWindowController.h:
            * platform/mac/WebVideoFullscreenHUDWindowController.mm:
            (-[WebVideoFullscreenHUDWindowController endScrubbing]):
            (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
            (-[WebVideoFullscreenHUDWindowController currentTime]):
            (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
            (-[WebVideoFullscreenHUDWindowController duration]):
            (-[WebVideoFullscreenHUDWindowController decrementVolume]):
            (-[WebVideoFullscreenHUDWindowController incrementVolume]):
            (-[WebVideoFullscreenHUDWindowController volume]):
            (-[WebVideoFullscreenHUDWindowController setVolume:]):
            (-[WebVideoFullscreenHUDWindowController playing]):
            (-[WebVideoFullscreenHUDWindowController setPlaying:]):
            (-[WebVideoFullscreenHUDWindowController remainingTimeText]):
            (-[WebVideoFullscreenHUDWindowController elapsedTimeText]):
            (-[WebVideoFullscreenHUDWindowController rewind:]):
            (-[WebVideoFullscreenHUDWindowController fastForward:]):

2014-12-16  Dana Burkart  <dburkart@apple.com>

        Merged r177124. <rdar://problem/19198539>

    2014-12-10  Beth Dakin  <bdakin@apple.com>

            Speculative build fix.

            * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:

2014-12-15  Dana Burkart  <dburkart@apple.com>

        Merged r177113. <rdar://problem/19198539>

    2014-12-10  Beth Dakin  <bdakin@apple.com>

            WK2: Add initial support for immediate actions
            https://bugs.webkit.org/show_bug.cgi?id=139511

            Reviewed by Tim Horton.

            SPI needed for immediate actions.
            * WebCore.xcodeproj/project.pbxproj:
            * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h: Added.

2014-12-15  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r177253. rdar://problem/19221935

    2014-12-12  Beth Dakin  <bdakin@apple.com>

            Need a fake mouse move after hiding data detectors UI
            https://bugs.webkit.org/show_bug.cgi?id=139608
            -and corresponding-
            rdar://problem/19221935

            Reviewed by Tim Horton.

            * WebCore.exp.in:

2014-12-13  Babak Shafiei  <bshafiei@apple.com>

        Merge r177254.

    2014-12-12  Mark Rowe  <mrowe@apple.com>

            [Mac] Work around a bug in dsymutil on older OS versions
            <https://webkit.org/b/139609> / <rdar://problem/16045763>

            Older versions of dsymutil are unable to write out more than 2GB of symbols per architecture.
            WebCore has recently passed that threshold. To work around this we will reduce the level of
            symbols included in the dSYM bundles on the affected OS versions.

            Reviewed by Geoff Garen.

            * Configurations/Base.xcconfig: Include line tables only in the debug symbols for production
            builds on OS X 10.8 and 10.9.
            * Configurations/DebugRelease.xcconfig: Include full symbols in debug and release builds since they
            do not make use of dSYMs.

2014-12-10  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176999. rdar://problem/19149219

    2014-12-08  Beth Dakin  <bdakin@apple.com>

            Copy and Lookup menu items should be disabled when something is not copyable
            https://bugs.webkit.org/show_bug.cgi?id=139423

            Reviewed by Tim Horton.

            New function allowCopy() indicates whether the HitTestResult would allow itself to 
            be copied onto the pasteboard.
            * WebCore.exp.in:
            * rendering/HitTestResult.cpp:
            (WebCore::HitTestResult::allowsCopy):
            * rendering/HitTestResult.h:

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

        Crash in CachedRawResource::canReuse() when reloading http://dnd.wizards.com/dungeons-and-dragons/story
        https://bugs.webkit.org/show_bug.cgi?id=138164

        Reviewed by Andreas Kling.

        This patch fixes a crash when reloading the following URL:
        http://dnd.wizards.com/dungeons-and-dragons/story

        We were crashing in CachedRawResource::canReuse() because header.key
        would sometimes be a null String and we would call
        HashMap::get(nullString).

        The real issue was that header.key was null in the first place, which
        means that even though the HTTPHeaderMap iterator is valid, it->key
        is a null String, which should never happen. There was a bug in the
        HTTPHeaderMapConstIterator() constructor that would cause the
        iterator key/value pair to not get initialized if the HTTPHeaderMap
        contained *only* uncommon HTTP headers. This patch updates the
        constructor so that we fall back to updating the key/value from the
        uncommon header map, if we failed to initialized from the common
        header map (because it was empty).

        Test: http/tests/cache/xhr-uncommon-header.html

        * platform/network/HTTPHeaderMap.h:
        (WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::HTTPHeaderMapConstIterator):

2014-12-05  Dana Burkart  <dburkart@apple.com>

        Merge r176812. <rdar://problem/19140827>

    2014-12-04  Timothy Horton  <timothy_horton@apple.com>

            Further fix the 32-bit build.

            * page/mac/TextIndicatorWindow.mm:
            (WebCore::TextIndicatorWindow::setTextIndicator):


2014-12-05  Dana Burkart  <dburkart@apple.com>

        Merge r176811. <rdar://problem/19140827>

    2014-12-04  Timothy Horton  <timothy_horton@apple.com>

            Fix the 32-bit build.

            * page/mac/TextIndicatorWindow.h:
            * page/mac/TextIndicatorWindow.mm:
            (WebCore::TextIndicatorWindow::setTextIndicator):


2014-12-05  Dana Burkart  <dburkart@apple.com>

        Merge r176810. <rdar://problem/19140827>

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

            TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
            https://bugs.webkit.org/show_bug.cgi?id=139252
            <rdar://problem/19140827>

            Reviewed by Anders Carlsson.

            * WebCore.exp.in:
            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithSelectionInFrame):
            (WebCore::TextIndicator::TextIndicator):
            * page/TextIndicator.h:
            (WebCore::TextIndicator::selectionRectInWindowCoordinates):
            (WebCore::TextIndicator::textBoundingRectInWindowCoordinates):
            (WebCore::TextIndicator::selectionRectInScreenCoordinates): Deleted.
            (WebCore::TextIndicator::textBoundingRectInScreenCoordinates): Deleted.
            Go back to keeping the rects in "window" coordinates.

            * page/mac/TextIndicatorWindow.h:
            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            (WebCore::TextIndicatorWindow::setTextIndicator):
            Let callers pass in the contentRect instead of trying to share the code
            to compute it, since it needs to be different for legacy and modern WebKit.


2014-12-05  Babak Shafiei  <bshafiei@apple.com>

        Merge r176855.

    2014-12-05  Beth Dakin  <bdakin@apple.com>

            rdar://problem/19156353 Additional build-fixes needed.

            Rubber-stamped by Tim Horton.

            This is a bit unfortunate, but we need to always forward-declare this for now.
            * platform/spi/mac/QuickLookMacSPI.h:

2014-12-04  Dana Burkart  <dburkart@apple.com>

        Merge r176803. <rdar://problem/19034499>

    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-04  Dana Burkart  <dburkart@apple.com>

        Merge r176682. <rdar://problem/18903995>

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

            Always show the arrow for text selection services
            https://bugs.webkit.org/show_bug.cgi?id=139191
            <rdar://problem/18903995>

            Reviewed by Anders Carlsson.

            * platform/spi/mac/DataDetectorsSPI.h:
            * page/mac/ServicesOverlayController.mm:
            Move a few things to DataDetectorsSPI.h.

            (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
            (WebCore::ServicesOverlayController::buildSelectionHighlight):
            Make use of the real DDHighlightStyle names.
            Add DDHighlightStyleButtonShowAlways for selection services.

2014-12-04  Dana Burkart  <dburkart@apple.com>

        Merge r176766. <rdar://problem/19072083>

    2014-12-03  Beth Dakin  <bdakin@apple.com> 
            
               <input> elements get whitespace action menu instead of editable text menu 
               https://bugs.webkit.org/show_bug.cgi?id=139241 
               -and corresponding- 
               rdar://problem/19072083 

               Reviewed by Sam Weinig. 
        
              Since we will hit test form controls as form controls, we need a new function to  
              determine if the hit point is over text inside that form control or not. 
              * WebCore.exp.in: 
              * rendering/HitTestResult.cpp: 
              (WebCore::HitTestResult::isOverTextInsideFormControlElement): 
              * rendering/HitTestResult.h: 

2014-12-04  Dana Burkart  <dburkart@apple.com>

        Merge r173235. <rdar://problem/19072083>

    2014-09-03  Enrica Casucci  <enrica@apple.com>

            Remove PLATFORM(IOS) from WebCore/editing (Part 1).
            https://bugs.webkit.org/show_bug.cgi?id=136474

            Reviewed by Tim Horton.

            This is the first part of the work to remove PLATFORM(IOS) everywhere
            in the editing code.

            * dom/Range.cpp:
            (WebCore::Range::create): Adding create function that takes VisiblePosition.
            * dom/Range.h:
            * editing/CompositeEditCommand.cpp:
            (WebCore::CompositeEditCommand::apply):
            (WebCore::CompositeEditCommand::inputText):
            * editing/CompositeEditCommand.h:
            * editing/DeleteButton.h: No need for the platform guard since it is already under
            DELETION_UI
            * editing/DeleteButtonController.cpp:
            (WebCore::DeleteButtonController::enable):
            (WebCore::DeleteButtonController::disable):
            * editing/EditAction.h:
            * editing/EditCommand.h:
            (WebCore::EditCommand::isInsertTextCommand):
            * editing/Editor.cpp:
            (WebCore::ClearTextCommand::CreateAndApply):
            * editing/Editor.h:
            * editing/EditorCommand.cpp:
            (WebCore::executeClearText):
            (WebCore::enabledCopy):
            (WebCore::enabledCut):
            (WebCore::enabledClearText):
            (WebCore::createCommandMap):
            * editing/FrameSelection.cpp:
            (WebCore::FrameSelection::modifyExtendingRight):
            (WebCore::FrameSelection::modifyExtendingForward):
            (WebCore::FrameSelection::modifyMovingRight):
            (WebCore::FrameSelection::modifyMovingForward):
            (WebCore::FrameSelection::modifyExtendingLeft):
            (WebCore::FrameSelection::modifyExtendingBackward):
            (WebCore::FrameSelection::modifyMovingLeft):
            (WebCore::FrameSelection::modifyMovingBackward):
            * editing/InsertTextCommand.h:
            * editing/TextCheckingHelper.cpp:
            * editing/TextGranularity.h:
            * editing/VisiblePosition.h:
            (WebCore::operator>=):
            * editing/VisibleSelection.cpp:
            (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
            * editing/VisibleUnits.cpp:
            * editing/VisibleUnits.h:

2014-12-04  Dana Burkart  <dburkart@apple.com>

        Merge r176697. <rdar://problem/19121822>

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

            Remove a SnowLeopard-era quirk for QuickLook
            https://bugs.webkit.org/show_bug.cgi?id=139208
            <rdar://problem/19121822>

            Reviewed by Alexey Proskuryakov.

            * WebCore.exp.in:
            * WebCore.xcodeproj/project.pbxproj:
            * loader/EmptyClients.h:
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::subresourceCachePolicy):
            * loader/FrameLoaderClient.h:
            * platform/mac/QuickLookMac.h: Removed.
            * platform/mac/QuickLookMac.mm: Removed.

2014-12-03  Dana Burkart  <dburkart@apple.com>

        Merge r176753. <rdar://problem/19052381>

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

            Keyboard input should be disabled in the preview popover
            https://bugs.webkit.org/show_bug.cgi?id=139219
            <rdar://problem/19052381>

            Reviewed by Anders Carlsson.

            * page/ChromeClient.h:
            (WebCore::ChromeClient::shouldDispatchFakeMouseMoveEvents):
            * page/EventHandler.cpp:
            (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
            Allow ChromeClient to disable the dispatch of "fake" mouseMove events
            that happens during scrolling.

2014-12-03  Dana Burkart  <dburkart@apple.com>

        Merge r176694. <rdar://problem/18944696>

    2014-12-02  Beth Dakin  <bdakin@apple.com>

            More build fixing.

            * platform/spi/mac/QuickLookMacSPI.h:


2014-12-03  Dana Burkart  <dburkart@apple.com>

        Merge r176692. <rdar://problem/18944696>

    2014-12-02  Beth Dakin  <bdakin@apple.com>

            Another build fix.

            * platform/spi/mac/NSMenuSPI.h:


2014-12-03  Dana Burkart  <dburkart@apple.com>

        Merge r176689. <rdar://problem/18944696>

    2014-12-02  Beth Dakin  <bdakin@apple.com>

            Speculative build fix.

            * platform/spi/mac/QuickLookMacSPI.h:


2014-12-03  Dana Burkart  <dburkart@apple.com>

        Merge r176688. <rdar://problem/18944696>

    2014-12-02  Beth Dakin  <bdakin@apple.com>

            Speculative build fix.

            * platform/spi/mac/QuickLookMacSPI.h:


2014-12-03  Dana Burkart  <dburkart@apple.com>

        Merge r176684. <rdar://problem/18944696>

    2014-12-02  Beth Dakin  <bdakin@apple.com>

            Should use standardQuickLookMenuItem for apps that don't implement customizations
            https://bugs.webkit.org/show_bug.cgi?id=139193
            -and corresponding-
            rdar://problem/18944696

            Reviewed by Anders Carlsson.

            New SPI headers.
            * WebCore.xcodeproj/project.pbxproj:
            * platform/spi/mac/NSMenuSPI.h: Added.
            * platform/spi/mac/QuickLookMacSPI.h: Added.

2014-12-03  Dana Burkart  <dburkart@apple.com>

        Fix merge-related build failure.

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

2014-12-03  Dana Burkart  <dburkart@apple.com>

        Merge r176295. <rdar://problem/19122588>

    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-03  Dana Burkart  <dburkart@apple.com>

        Merge r175974. <rdar://problem/19122595>

    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-02  Dana Burkart  <dburkart@apple.com>

        Merge r176617. <rdar://problem/19107247>

    2014-12-01  Tim Horton  <timothy_horton@apple.com>

            Null deref under TextIndicator::createWithSelectionInFrame using find-in-page on bugzilla
            https://bugs.webkit.org/show_bug.cgi?id=139164
            <rdar://problem/19107247>

            Reviewed by Beth Dakin.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithSelectionInFrame):
            Null-check the ImageBuffer in addition to the Image.


2014-12-02  Dana Burkart  <dburkart@apple.com>

        Merge r176599. <rdar://problem/18992185>

    2014-12-01  Tim Horton  <timothy_horton@apple.com>

            Implement yellow highlight for WebKit1 data detectors
            https://bugs.webkit.org/show_bug.cgi?id=138956
            <rdar://problem/18992185>

            Reviewed by Beth Dakin.

            * page/TextIndicator.cpp:
            (WebCore::TextIndicator::createWithSelectionInFrame):
            (WebCore::TextIndicator::TextIndicator):
            * page/TextIndicator.h:
            (WebCore::TextIndicator::selectionRectInScreenCoordinates):
            (WebCore::TextIndicator::textBoundingRectInScreenCoordinates):
            (WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
            (WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
            Store TextIndicator rects in screen coordinates, since that's what we
            want anyway, and this makes it easier to share this code between the WebKits.

            * page/mac/TextIndicatorWindow.mm:
            (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
            (WebCore::TextIndicatorWindow::setTextIndicator):
            Avoid some rect conversion because the TextIndicator rects are already in screen coordinates.

2014-12-02  Dana Burkart  <dburkart@apple.com>

        Merge r176462. <rdar://problem/18992185>

    2014-11-21  Tim Horton  <timothy_horton@apple.com>

            Move TextIndicator{Window} to WebCore
            https://bugs.webkit.org/show_bug.cgi?id=138954
            <rdar://problem/18992185>

            Some adjustments by Csaba Osztrogonác.
            Reviewed by Anders Carlsson.

            Move TextIndicator and TextIndicatorWindow to WebCore so that both
            WebKits can share the implementation.

            * CMakeLists.txt:
            Build TextIndicator.

            * WebCore.exp.in:
            Export TextIndicator{Window} symbols for the WebKits.

            * WebCore.xcodeproj/project.pbxproj:
            * page/TextIndicator.cpp: Renamed from Source/WebKit2/Shared/TextIndicator.cpp.
            * page/TextIndicator.h: Renamed from Source/WebKit2/Shared/TextIndicator.h.
            Straighforward move of TextIndicator from WebKit2, except:

            Move TextIndicator::Data and TextIndicator::PresentationTransition out directly
            into the WebCore namespace to allow for implementation of WebKit2 argument coders.

            Use Image instead of ShareableBitmap internally.

            Move the TextIndicatorData encode/decode to WebCoreArgumentCoders.
            
            * page/mac/TextIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h.
            * page/mac/TextIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm.
            Straighforward move of TextIndicatorWindow from WebKit2.

2014-12-02  Dana Burkart  <dburkart@apple.com>

        Merge r176499. <rdar://problem/19031034>

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

            Support multiple signatures of diagnostic logging.
            https://bugs.webkit.org/show_bug.cgi?id=138690

            Reviewed by Anders Carlsson.

            Pull logDiagnosticMessage() out of ChromeClient and make a new client interface,
            DiagnosticLoggingClient, which supports multiple kinds of diagnostic logging,
            namely: simple logging without a parameter, logging with a success parameter, and
            logging with a generic string value parameter.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::parseAttribute): Use DiagnosticLoggingClient.
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
            * loader/SubframeLoader.cpp:
            (WebCore::logPluginRequest): Ditto.
            * page/ChromeClient.h:
            (WebCore::ChromeClient::logDiagnosticMessage): Deleted.
            * page/DiagnosticLoggingClient.h: 
            (WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Added.
            (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Added.
            (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Added.
            (WebCore::DiagnosticLoggingClient::~DiagnosticLoggingClient): Empty destructor.

            Rename Page::PageClient to PageConfiguration, and pass that configuration from
            Page into MainFrame upon construction.

            * inspector/InspectorOverlay.cpp:
            (WebCore::InspectorOverlay::overlayPage): Use PageConfiguration instead of PageClients.
            * loader/EmptyClients.cpp:
            (WebCore::fillWithEmptyClients): Ditto.
            * loader/EmptyClients.h:
            * page/MainFrame.cpp:
            (WebCore::MainFrame::MainFrame): Pass loaderClientForMainFrame through to the
                Frame constructor.
            (WebCore::MainFrame::create): Takes a PageConfiguration.
            * page/MainFrame.h:
            (WebCore::MainFrame::diagnosticLoggingClient): Simple accessor.
            * page/Page.cpp:
            (WebCore::Page::Page):
            (WebCore::Page::PageClients::PageClients): Deleted.
            (WebCore::Page::PageClients::~PageClients): Deleted.
            * page/Page.h:
            * page/PageConfiguration.cpp: Added.
            (WebCore::PageConfiguration::PageConfiguration): Renamed from PageClients().
            (WebCore::PageConfiguration::~PageConfiguration): Renamed from ~PageClients().
            * page/PageConfiguration.h: Added.
            * svg/graphics/SVGImage.cpp:
            (WebCore::SVGImage::dataChanged): Use PageConfiguration instead of PageClients.

            Add new files and symbols to the project.

            * CMakeLists.txt:
            * WebCore.exp.in:
            * WebCore.vcxproj/WebCore.vcxproj:
            * WebCore.xcodeproj/project.pbxproj:

2014-12-02  Dana Burkart  <dburkart@apple.com>

        Merge r176477. <rdar://problem/19056715>

    2014-11-21  Tim Horton  <timothy_horton@apple.com>

            REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
            ​https://bugs.webkit.org/show_bug.cgi?id=138960
            <rdar://problem/19056715>

            Reviewed by Anders Carlsson.

            * platform/spi/mac/DataDetectorsSPI.h:
            Add some DataDetectors SPI.


2014-12-02  Dana Burkart  <dburkart@apple.com>

        Merge r176463. <rdar://problem/19056715>

    2014-11-21  Tim Horton  <timothy_horton@apple.com>

            REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
            https://bugs.webkit.org/show_bug.cgi?id=138960
            <rdar://problem/19056715>

            Reviewed by Beth Dakin.

            * platform/spi/mac/DataDetectorsSPI.h:
            Softlink some SPI.


2014-12-02  Dana Burkart  <dburkart@apple.com>

        Merge r176417. rdar://problem/19021183

    2014-11-20  Tim Horton  <timothy_horton@apple.com>

            Remove a piece of DataDetectors SPI that we aren't using anymore
            https://bugs.webkit.org/show_bug.cgi?id=138917

            Reviewed by Beth Dakin.

            * platform/spi/mac/DataDetectorsSPI.h:

2014-12-02  Dana Burkart  <dburkart@apple.com>

        Merge r176412. rdar://problem/18904600

    2014-11-20  Beth Dakin  <bdakin@apple.com>

            Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
            https://bugs.webkit.org/show_bug.cgi?id=138568
            -and corresponding-
            rdar://problem/18904600

            Reviewed by Tim Horton.

            Add an optional parameter indicating whether or not to include images.
            * WebCore.exp.in:
            * editing/cocoa/HTMLConverter.h:
            * editing/cocoa/HTMLConverter.mm:
            (WebCore::editingAttributedStringFromRange):

2014-11-19  Dana Burkart  <dburkart@apple.com>

        Merge r176363. rdar://problem/18840128   

    2014-11-19  Tim Horton  <timothy_horton@apple.com>

            Add an optional entry transition (from selection highlight) to TextIndicator
            https://bugs.webkit.org/show_bug.cgi?id=138856
            <rdar://problem/18840128>

            Reviewed by Anders Carlsson.

            * WebCore.exp.in:
            Add an export.

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

2014-11-19  Dana Burkart  <dburkart@apple.com>

        Merge r176296. rdar://problem/18912505

    2014-11-18  Beth Dakin  <bdakin@apple.com>

            REGRESSION: Invoking dictionary lookup on text in some search fields searches for 
            incorrect item
            https://bugs.webkit.org/show_bug.cgi?id=138853
            -and corresponding-
            rdar://problem/18912505

            Reviewed by Tim Horton.

            Get the visible position based on the frame, not just the renderer.
            * editing/mac/DictionaryLookup.mm:
            (WebCore::rangeForDictionaryLookupAtHitTestResult):

2014-11-19  Dana Burkart  <dburkart@apple.com>

        Merge r176221. rdar://problem/18991369

    2014-11-17  Tim Horton  <timothy_horton@apple.com>

            DataDetectors PageOverlay callbacks can come in to the wrong overlay
            https://bugs.webkit.org/show_bug.cgi?id=138801
            <rdar://problem/18991369>

            Reviewed by Anders Carlsson.

            * page/PageOverlay.cpp:
            (WebCore::generatePageOverlayID):
            (WebCore::PageOverlay::PageOverlay):
            * page/PageOverlay.h:
            Give each PageOverlay a unique ID.

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

        Fix crash introduced in r175656
        https://bugs.webkit.org/show_bug.cgi?id=138453

        Reviewed by Dan Bernstein.

        repaintContainer can be null sometimes.
        
        Covered by existing tests.

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

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

        Avoid backing store for opacity:0 descendant layers
        https://bugs.webkit.org/show_bug.cgi?id=138448

        Reviewed by Dean Jackson.
        
        If a composited layer has no rendered content but a painting zero-opacity descendant
        layer, than we can avoid making backing store.
        
        When the opacity on such a child changes, we need to trigger a tree rebuild
        to force the backing store to come back (this could be optimized later).

        Tests: compositing/backing/no-backing-for-opacity-0-child.html
               compositing/backing/toggle-opacity-0-child.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::styleChangeRequiresLayerRebuild):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::containerForRepaint):

2014-11-18  Dana Burkart  <dburkart@apple.com>

        Merge r176166. rdar://problem/18953982

    2014-11-16  Tim Horton  <timothy_horton@apple.com>

            Use TextIndicator instead of the built in Lookup highlight
            https://bugs.webkit.org/show_bug.cgi?id=138775
            <rdar://problem/18953982>

            Follow-up to r176164.

            * platform/spi/mac/LookupSPI.h:
            (WebCore::canDisableLookupIndicator): Deleted.
            Remove canDisableLookupIndicator.

2014-11-18  Dana Burkart  <dburkart@apple.com>

        Merge r176164. rdar://problem/18953982

    2014-11-16  Tim Horton  <timothy_horton@apple.com>

            Use TextIndicator instead of the built in Lookup highlight
            https://bugs.webkit.org/show_bug.cgi?id=138775
            <rdar://problem/18953982>

            Reviewed by Anders Carlsson.

            * WebCore.exp.in:
            * platform/mac/WebCoreSystemInterface.h:
            * platform/mac/WebCoreSystemInterface.mm:
            Remove a WKSI import/export that we don't need anymore.
            
            * platform/spi/mac/LookupSPI.h: Added.
            (WebCore::canDisableLookupIndicator):
            Add Lookup SPI header.
            Add a 'canDisableLookupIndicator', which must be called in any translation
            unit that wants to use either of the soft-linked constants related to
            that functionality, before calling the get* function.

            * WebCore.xcodeproj/project.pbxproj:
            * editing/mac/DictionaryLookup.mm:
            (WebCore::rangeForDictionaryLookupForSelection):
            (WebCore::rangeForDictionaryLookupAtHitTestResult):
            Adopt the Lookup SPI header.

2014-11-18  Dana Burkart  <dburkart@apple.com>

        Merge r176108. rdar://problem/19005904

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

            Context menus should not offer the "Download video" option for videos that cannot 
            be downloaded
            https://bugs.webkit.org/show_bug.cgi?id=138530
            -and corresponding-
            rdar://problem/18919130

            Reviewed by Tim Horton.

            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::parseAttribute):
            * html/HTMLMediaElement.h:
            * page/ContextMenuController.cpp:
            (WebCore::ContextMenuController::populate):
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::canSaveMediaData):
            (WebCore::MediaPlayer::supportsSave): Deleted.
            * platform/graphics/MediaPlayer.h:
            * platform/graphics/MediaPlayerPrivate.h:
            (WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
            (WebCore::MediaPlayerPrivateInterface::canSaveMediaData):
            (WebCore::MediaPlayerPrivateInterface::supportsSave): Deleted.
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
            (WebCore::MediaPlayerPrivateAVFoundation::resolvedURL):
            (WebCore::MediaPlayerPrivateAVFoundation::canSaveMediaData):
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL):
            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
            (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::MediaPlayerPrivateQTKit::canSaveMediaData):
            * rendering/HitTestResult.cpp:
            (WebCore::HitTestResult::isDownloadableMedia):

2014-11-18  Dana Burkart  <dburkart@apple.com>

        Merge r175765. rdar://problem/19005917

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

            [Mac] Avoid repainting scrollbar track when the scrollbar track is transparent.
            <https://webkit.org/b/138521>
            <rdar://problem/18892090>

            Reviewed by Simon Fraser.

            Don't bother invalidating the entire WebCore scrollbar when we've opted into
            AppKit's special mode to use individual layers for scrollbar components.
            NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha.

            * platform/mac/ScrollAnimatorMac.mm:
            (-[WebScrollbarPartAnimation setCurrentProgress:]):

2014-11-17  Dana Burkart  <dburkart@apple.com>

        Merge r175492. <rdar://problem/18978410>

    2014-11-03  Simon Fraser  <simon.fraser@apple.com>
    
            Video controls have lots of compositing layers
            https://bugs.webkit.org/show_bug.cgi?id=138294
    
            Reviewed by Eric Carlson.
    
            After r175268 we get lots of separate small layers in the video
            controls (but they pop into a single layer when opacity animates).
            
            Fix this by putting an explicit z-index on -webkit-media-controls-panel
            which is the element that animates opacity.
    
            * Modules/mediacontrols/mediaControlsApple.css:
            (audio::-webkit-media-controls-panel):
    
2014-11-17  Dana Burkart  <dburkart@apple.com>

        Merge r173293. <rdar://problem/18978414>

    2014-09-04  Simon Fraser  <simon.fraser@apple.com>
    
            Improve the logic for compositing backing store avoidance
            https://bugs.webkit.org/show_bug.cgi?id=136556
    
            Reviewed by Dean Jackson.
            
            Avoid backing store allocation in more cases by improving the logic that detects
            whether a RenderLayer has any painted, non-layer descendent renderers.
            
            Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(),
            and make it recur 3 levels deep, walking child lists of up to 20 siblings looking
            for renderers that paint anything. Any renderer with box decorations paints;
            replaced elements paint, and non-whitespace text nodes paint. We can avoid
            making backing store when whitespace nodes are present only when user-select is none,
            since we have to ensure that there's backing store to paint the selection into.
    
            Tests: compositing/backing/inline-block-no-backing.html
                   compositing/backing/whitespace-nodes-no-backing.html
    
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants().
            (WebCore::RenderLayer::hasBoxDecorationsOrBackground):
            (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced()
            rather than isReplaced(), since the latter includes inline-blocks.
            * rendering/RenderLayerBacking.cpp:
            (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer()
            logic in the root layer, since it always wants backing store.
            (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto.
            (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes
            inline-block, so use isRenderReplaced() instead.
    
2014-11-17  Dana Burkart  <dburkart@apple.com>

        Merge r176156. <rdar://problem/18877535>

    2014-11-15  David Kilzer  <ddkilzer@apple.com>
    
            REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
    
            This regressed with the following commit:
    
                Move DataDetectors scanning code to WebCore
                https://bugs.webkit.org/show_bug.cgi?id=138731
                <rdar://problem/18877535>
    
            This fixes the following build failures:
    
                In file included from WebCore/editing/mac/DataDetection.mm:29:
                WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect'
                @property NSRect highlightFrame;
                          ^
                WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection'
                RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange)
                                           ^
                2 errors generated.
    
            * WebCore.exp.in:
            (DataDetection::detectItemAroundHitTestResult): Move symbol from
            shared section to Mac-only section.
            * editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around
            the entire implementation since it it unused on iOS.
            * platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC)
            check around DDActionContext class declarations.
    
2014-11-17  Dana Burkart  <dburkart@apple.com>

        Merge r176137. <rdar://problem/18877535>

    2014-11-14  Tim Horton  <timothy_horton@apple.com>
    
            Move DataDetectors scanning code to WebCore
            https://bugs.webkit.org/show_bug.cgi?id=138731
            <rdar://problem/18877535>
    
            Reviewed by Anders Carlsson.
    
            * WebCore.exp.in:
            Export our new function.
    
            * WebCore.xcodeproj/project.pbxproj:
            Add DataDetection.{mm, h}
            Adjust the project so that editing/mac actually points to editing/mac instead of editing/
    
            * editing/mac/DictionaryLookup.h:
            * editing/mac/DictionaryLookup.mm:
            Swap to PLATFORM(MAC) instead of !PLATFORM(IOS).
            Move DictionaryLookup.{mm, h} to editing/mac, where they were in the project but not on disk.
    
            * editing/mac/DataDetection.h: Added.
            * editing/mac/DataDetection.mm: Added.
            (WebCore::DataDetection::detectItemAroundHitTestResult):
            Moved from WebKit2.
    
2014-10-28  Jer Noble  <jer.noble@apple.com>

        REGRESSION(r171593) [Mac] Media controls create a large (and unnecessary) backing store
        https://bugs.webkit.org/show_bug.cgi?id=137757

        Reviewed by Eric Carlson.

        In r171593, a <div> was added to the media controls which is only ever used on iOS. Instead
        of creating and adding this <div> in mediaControlsApple.js (which is used on OS X), this 
        <div> should be created and added in mediaControlsiOS.js, which requires overloading
        Controller.addControls.

        * Modules/mediacontrols/mediaControlsApple.css:
        (audio::-webkit-media-controls-panel.hidden): Drive-by fix: allow the panel itself to be hidden.
        (video::-webkit-media-controls-panel-composited-parent): Deleted.
        * Modules/mediacontrols/mediaControlsApple.js:
        (Controller.prototype.createControls): Remove the composited parent.
        (Controller.prototype.addControls): Ditto.
        * Modules/mediacontrols/mediaControlsiOS.js:
        (ControllerIOS.prototype.createControls): Create the composited parent.
        (ControllerIOS.prototype.addControls): Copied from (previous) apple.js.

2014-11-12  Beth Dakin  <bdakin@apple.com>

        Speculative build fix.

        * WebCore.exp.in:

2014-11-12  Beth Dakin  <bdakin@apple.com>

        WK1: Support default actions for images
        https://bugs.webkit.org/show_bug.cgi?id=138668
        -and corresponding-
        rdar://problem/18785434

        Reviewed by Tim Horton.

        Symbol needed for copying image.
        * WebCore.exp.in:

2014-11-12  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175966. <rdar://problem/18866308>

    2014-11-11  Tim Horton  <timothy_horton@apple.com>

            DataDetectors' menu items aren't presented in the telephone number menu
            https://bugs.webkit.org/show_bug.cgi?id=138602
            <rdar://problem/18866308>

            Reviewed by Beth Dakin.

            * English.lproj/Localizable.strings:
            Remove a now-unused localized string.


2014-11-12  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r176037. <rdar://problem/18869900>

    2014-11-12  Tim Horton  <timothy_horton@apple.com>

            Need to show the text indicator when Data Detectors shows a popover
            https://bugs.webkit.org/show_bug.cgi?id=138664
            <rdar://problem/18869900>

            Reviewed by Beth Dakin.

            * platform/spi/mac/DataDetectorsSPI.h:
            Add new DataDetectors SPI.


2014-11-11  Tim Horton  <timothy_horton@apple.com>

        Add support for mailto: link action menus
        https://bugs.webkit.org/show_bug.cgi?id=138641
        <rdar://problem/18741567>

        Reviewed by Beth Dakin.

        * WebCore.exp.in:
        Add an export.

        * platform/spi/mac/DataDetectorsSPI.h:
        Add some DataDetectors SPI.

2014-11-12  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175964. <rdar://problem/18867627>

    2014-11-11  Tim Horton  <timothy_horton@apple.com>

            Adopt DDActionContext menu type SPI
            https://bugs.webkit.org/show_bug.cgi?id=138603
            <rdar://problem/18867627>

            Reviewed by Anders Carlsson.

            * platform/spi/mac/DataDetectorsSPI.h:
            Add the new SPI.


2014-11-12  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175963. <rdar://problem/18932770>

    2014-11-11  Tim Horton  <timothy_horton@apple.com>

            Data Detectors popovers should be dismissed upon scrolling
            https://bugs.webkit.org/show_bug.cgi?id=138600
            <rdar://problem/18932770>

            Reviewed by Beth Dakin.

            * platform/spi/mac/DataDetectorsSPI.h:
            Adjust the SPI header.


2014-11-12  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175962. <rdar://problem/18815343>

    2014-11-11  Tim Horton  <timothy_horton@apple.com>

            Localize strings for action menus
            https://bugs.webkit.org/show_bug.cgi?id=138591
            <rdar://problem/18815343>

            Reviewed by Dan Bates.

            * English.lproj/Localizable.strings:
            Add a bunch of localizable strings.


2014-11-10  Beth Dakin  <bdakin@apple.com>

        WK1: Support default actions for editable text with misspelled word
        https://bugs.webkit.org/show_bug.cgi?id=138590
        -and corresponding-
        rdar://problem/18877506

        Reviewed by Tim Horton.

        * WebCore.exp.in:

2014-11-11  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175823. <rdar://problem/18877483>

    2014-11-10  Beth Dakin  <bdakin@apple.com>
    
            Rolling out failed build fix 
            http://trac.webkit.org/changeset/175819
    
            * WebCore.exp.in:
    

2014-11-10  Beth Dakin  <bdakin@apple.com>

        Speculative build fix.

        * WebCore.exp.in:

2014-11-11  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175819. <rdar://problem/18877483>

    2014-11-10  Beth Dakin  <bdakin@apple.com>
    
            Speculative build fix.
    
            * WebCore.exp.in:
    

2014-11-11  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175816. <rdar://problem/18877483>

    2014-11-10  Beth Dakin  <bdakin@apple.com>
    
            Speculative build fix.
    
            * editing/DictionaryLookup.h:
            * editing/DictionaryLookup.mm:
    

2014-11-10  Beth Dakin  <bdakin@apple.com>

        WK1: Support default actions for read-only text
        https://bugs.webkit.org/show_bug.cgi?id=138552
        -and corresponding-
        rdar://problem/18877483

        Reviewed by Tim Horton.

        WK1 now needs to do a lot of dictionary lookup operations that it did not 
        previously have to handle. So this patch takes a lot of that functionality, which 
        was implemented as static functions in WebPageMac for WK2 and moves it into 
        WebCore.

        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:
        * editing/DictionaryLookup.h: Added.
        * editing/DictionaryLookup.mm: Added.
        (WebCore::isPositionInRange):
        (WebCore::shouldUseSelection):
        (WebCore::rangeExpandedAroundPositionByCharacters):
        (WebCore::rangeForDictionaryLookupForSelection):
        (WebCore::rangeForDictionaryLookupAtHitTestResult):
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:

2014-11-11  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175779. <rdar://problem/18742164>

    2014-11-08  Beth Dakin  <bdakin@apple.com>
    
            Implement action menu support for videos
            https://bugs.webkit.org/show_bug.cgi?id=138534
            -and corresponding-
            rdar://problem/18742164
    
            Reviewed by Tim Horton.
    
            Export needed symbols and added not-yet-implemented 
            HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as 
            expected once it is implemented.
            * WebCore.exp.in:
            * rendering/HitTestResult.cpp:
            (WebCore::HitTestResult::isMediaThatCanBeDownloaded):
            * rendering/HitTestResult.h:
    

2014-11-06  Dana Burkart  <dburkart@apple.com>

        Merge r175710. <rdar://problem/18898712>

    2014-11-06  Beth Dakin  <bdakin@apple.com>
    
            Preview views often misplaced inside popover
            https://bugs.webkit.org/show_bug.cgi?id=138472
    
            Reviewed by Tim Horton.
    
            * WebCore.exp.in:
    

2014-11-05  Dana Burkart  <dburkart@apple.com>

        Merge r175609. <rdar://problem/18869345>

    2014-11-04  Beth Dakin  <bdakin@apple.com>
    
            Un-anchor data detector popovers on scroll
            https://bugs.webkit.org/show_bug.cgi?id=138385
            -and corresponding-
            rdar://problem/18869345
    
            Reviewed by Tim Horton.
    
            * platform/spi/mac/DataDetectorsSPI.h:
    

2014-11-05  Dana Burkart  <dburkart@apple.com>

        Merge r175597. <rdar://problem/18875579>

    2014-11-04  Tim Horton  <timothy_horton@apple.com>
    
            Add bundle SPI allowing PageOverlay to customize the action menu
            https://bugs.webkit.org/show_bug.cgi?id=138388
            <rdar://problem/18875579>
    
            Reviewed by Anders Carlsson.
    
            * page/PageOverlayController.h:
            Expose the list of all overlays.
    

2014-11-05  Dana Burkart  <dburkart@apple.com>

        Merge r175564. <rdar://problem/18840102>

    2014-11-04  Tim Horton  <timothy_horton@apple.com>
    
            Implement yellow highlight over data detected items
            https://bugs.webkit.org/show_bug.cgi?id=138340
            <rdar://problem/18840102>
    
            Reviewed by Anders Carlsson.
    
            * platform/spi/mac/DataDetectorsSPI.h:
            Add completionHandler SPI.
    

2014-11-05  Dana Burkart  <dburkart@apple.com>

        Merge r175375. <rdar://problem/18883807>

    2014-10-30  Eric Carlson  <eric.carlson@apple.com>
    
            Add diagnostic logging to track page loads.
            https://bugs.webkit.org/show_bug.cgi?id=138205
            <rdar://problem/18173017>
    
            Reviewed by Jer Noble.
    
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.
    
            * page/DiagnosticLoggingKeys.cpp:
            (WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
            * page/DiagnosticLoggingKeys.h:
    

2014-11-05  Dana Burkart  <dburkart@apple.com>

        Merge r174740. <rdar://problem/18883801>

    2014-10-15  Simon Fraser  <simon.fraser@apple.com>
    
            Sometimes can't scroll overflow:scroll areas in subframes
            https://bugs.webkit.org/show_bug.cgi?id=137746
            rdar://problem/18603560
    
            Reviewed by Tim Horton.
            
            r169733 introduced a regression which caused us to no longer update the non-fast
            scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
            Revert to the previous code.
    
            Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
    
            * page/scrolling/AsyncScrollingCoordinator.cpp:
            (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
    

2014-11-05  Dana Burkart  <dburkart@apple.com>

        Merge r174740. <rdar://problem/18883801>

    2014-10-15  Simon Fraser  <simon.fraser@apple.com>
    
            Sometimes can't scroll overflow:scroll areas in subframes
            https://bugs.webkit.org/show_bug.cgi?id=137746
            rdar://problem/18603560
    
            Reviewed by Tim Horton.
            
            r169733 introduced a regression which caused us to no longer update the non-fast
            scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
            Revert to the previous code.
    
            Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
    
            * page/scrolling/AsyncScrollingCoordinator.cpp:
            (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
    

2014-11-04  Dana Burkart  <dburkart@apple.com>

        Potential build-fix for Mountain Lion / Mavericks

        Unreviewed.

        * platform/spi/mac/NSViewSPI.h:

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

        Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap
        https://bugs.webkit.org/show_bug.cgi?id=138300
        <rdar://problem/18855863>

        Reviewed by Simon Fraser.

        * WebCore.exp.in:
        * page/FrameSnapshotting.cpp:
        (WebCore::snapshotSelection):
        Move knowledge that selectionBounds can be empty down to WebCore.

2014-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r175417. <rdar://problem/18837197>

    2014-10-31  Tim Horton  <timothy_horton@apple.com>
    
            Remove "Add to iPhoto" from the action menu's sharing menu
            https://bugs.webkit.org/show_bug.cgi?id=138251
            <rdar://problem/18837197>
    
            Reviewed by Anders Carlsson.
    
            * platform/spi/mac/NSSharingServiceSPI.h:
            Add 'name' to the NSSharingService SPI header.
    
2014-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r175388. <rdar://problem/18819547>

    2014-10-30  Tim Horton  <timothy_horton@apple.com>
    
            Long spins under rangeExpandedAroundPosition on Yahoo Mail
            https://bugs.webkit.org/show_bug.cgi?id=138223
            <rdar://problem/18819547>
    
            Reviewed by Enrica Casucci.
    
            * WebCore.exp.in:
            Export some things.
    
2014-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r175347. <rdar://problem/18855973>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r175345. <rdar://problem/18856263>

    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-11-04 Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175197. <rdar://problem/18856002>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r175074. <rdar://problem/18856099>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r174946. <rdar://problem/18856105>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r174922. <rdar://problem/18856144>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r173845. <rdar://problem/18856096>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r173843. <rdar://problem/18856138>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r173738. <rdar://problem/18856133>

    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-11-04  Dana Burkart  <dburkart@apple.com>

        Merge r173424. <rdar://problem/18856153>

    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-11-03  Dana Burkart  <dburkart@apple.com>

        Merge r173061. <rdar://problem/18856115>

    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-11-03  Dana Burkart  <dburkart@apple.com>

        Merge r173046. <rdar://problem/18856092>

    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-11-03  Dana Burkart  <dburkart@apple.com>

        Merge r171849. <rdar://problem/18856127>

    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-29  Matthew Hanson  <matthew_hanson@apple.com>

        Add a missing symbol to fix the build after the merge of r175335. rdar://problem/18709436

        Rubber-stamped by Tim Horton.

        * WebCore.exp.in:
        Add __ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEENS0_10AnchorTypeE symbol.

2014-08-29  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r175335. rdar://problem/18709436

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

            Implement action menus for data detected items
            https://bugs.webkit.org/show_bug.cgi?id=138178
            <rdar://problem/18709436>

            Reviewed by Anders Carlsson.

            * WebCore.exp.in:
            Export a symbol from Position that we need.

            * WebCore.xcodeproj/project.pbxproj:
            * platform/spi/mac/DataDetectorsSPI.h:
            Add a combined SPI header for all of the random bits of DataDetectors that we use.

2014-10-29  Lucas Forschler  <lforschler@apple.com>

        Merge r175147

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

            Add some SPI headers for NSExtension and NSSharingService{Picker}
            https://bugs.webkit.org/show_bug.cgi?id=138027

            Reviewed by Anders Carlsson.

            * WebCore.xcodeproj/project.pbxproj:
            * platform/spi/cocoa/NSExtensionSPI.h: Added.
            * platform/spi/mac/NSSharingServicePickerSPI.h: Added.
            * platform/spi/mac/NSSharingServiceSPI.h: Added.
            Add modern SPI headers for NSExtension, and NSSharingService{Picker}.

            * rendering/RenderThemeMac.mm:
            Replace redefinitions with an SPI header #import.

2014-10-29  Lucas Forschler  <lforschler@apple.com>

        Merge r172542

    2014-08-13  Mark Rowe  <mrowe@apple.com>

            <https://webkit.org/b/135911> WebKit should build on Yosemite with the public SDK.

            Reviewed by Darin Adler.

            * rendering/RenderThemeMac.mm: Fix the forward-declaration of NSServicesRolloverButtonCell.

2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174791. <rdar://problem/18753175>

    2014-10-16  Tim Horton  <timothy_horton@apple.com>
    
            Implement selection services menu for Legacy WebKit
            https://bugs.webkit.org/show_bug.cgi?id=137582
            <rdar://problem/18604241>
    
            Reviewed by Brady Eidson.
    
            * WebCore.exp.in:
            * editing/Editor.h:
            * editing/ios/EditorIOS.mm:
            (WebCore::Editor::replaceSelectionWithAttributedString):
            * editing/mac/EditorMac.mm:
            (WebCore::Editor::replaceSelectionWithAttributedString):
            Add replaceSelectionWithAttributedString, which replaces the selection
            with the given attributed string (converting to plain text if the destination
            is not richly editable).
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174524. <rdar://problem/18640868>

    2014-10-09  Tim Horton  <timothy_horton@apple.com>
    
            Move ServicesOverlayController to WebCore
            https://bugs.webkit.org/show_bug.cgi?id=137416
            <rdar://problem/18546283>
    
            Reviewed by Anders Carlsson.
    
            Move ServicesOverlayController from WebKit2 to WebCore, as it can be used by both Legacy WebKit and WebKit2.
    
            * WebCore.xcodeproj/project.pbxproj:
            * editing/Editor.cpp:
            (WebCore::Editor::scanSelectionForTelephoneNumbers):
            * editing/SelectionRectGatherer.cpp:
            (WebCore::SelectionRectGatherer::Notifier::~Notifier):
            Notify ServicesOverlayController of changes via Page instead of EditorClient.
    
            * page/ChromeClient.h:
            (WebCore::ChromeClient::handleTelephoneNumberClick):
            (WebCore::ChromeClient::handleSelectionServiceClick):
            (WebCore::ChromeClient::hasRelevantSelectionServices):
            Add ChromeClient functions for services actions.
    
            * page/EditorClient.h:
            (WebCore::EditorClient::selectedTelephoneNumberRangesChanged): Deleted.
            (WebCore::EditorClient::selectionRectsDidChange): Deleted.
            Remove EditorClient functions for notifying ServicesOverlayController of changes,
            because it lives in WebCore proper now.
    
            * page/Page.cpp:
            (WebCore::Page::Page):
            * page/Page.h:
            (WebCore::Page::servicesOverlayController):
            Keep a ServicesOverlayController on Page.
    
            * page/PageOverlay.cpp:
            (WebCore::PageOverlay::mouseEvent):
            Use windowToContents instead of rootViewToContents; events come in in window coordinates.
    
            * page/PageOverlayController.cpp:
            (WebCore::PageOverlayController::updateSettingsForLayer):
            Get Settings from MainFrame, not Page.
    
            * page/Settings.in:
            Add servicesControlsEnabled setting.
    
            * page/mac/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h.
            * page/mac/ServicesOverlayController.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm.
            Moved from WebKit2. Mostly mechanical changes, plus:
                - Use windowToContents instead of rootViewToContents; events come in in window coordinates.
                - Cut off rebuild* if serviceControlsEnabled setting is false
                - Don't create the overlay if serviceControlsEnabled setting is false
                - Send click events via ChromeClient.
                - Tie our lifetime to MainFrame instead of Page, and get lots of things from MainFrame instead.
    
            * platform/Logging.h:
            Add Services logging channel (moved from WebKit2).
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174231. <rdar://problem/18640833>

    2014-10-02  Tim Horton  <timothy_horton@apple.com>
    
            Move PageOverlay[Controller] to WebCore
            https://bugs.webkit.org/show_bug.cgi?id=137164
            <rdar://problem/18508258>
    
            Reviewed by Anders Carlsson.
    
            * CMakeLists.txt:
            * WebCore.vcxproj/WebCore.vcxproj:
            * WebCore.vcxproj/WebCore.vcxproj.filters:
            * WebCore.xcodeproj/project.pbxproj:
            Make the appropriate build system changes.
    
            * WebCore.exp.in:
            Export the new PageOverlay[Controller] symbols from WebCore.
    
            * loader/EmptyClients.h:
            * page/ChromeClient.h:
            (WebCore::ChromeClient::documentOverlayLayerForFrame): Deleted.
            Add attachViewOverlayGraphicsLayer, which allows PageOverlayController
            to push view-relative page overlay root layers down to WebKit to be
            installed just inside the view.
    
            Remove documentOverlayLayerForFrame because RenderLayerCompositor can now
            talk directly to PageOverlayController.
    
            * page/EventHandler.cpp:
            (WebCore::EventHandler::handleMousePressEvent):
            (WebCore::EventHandler::mouseMoved):
            (WebCore::EventHandler::handleMouseReleaseEvent):
            When the mouse is moved, pressed, or released, give PageOverlayController
            the first shot at handling the event.
    
            * page/FrameView.cpp:
            (WebCore::FrameView::setFrameRect):
            Inform PageOverlayController that the main FrameView's size changed,
            so it can update the size of view-relative overlays.
    
            (WebCore::FrameView::setContentsSize):
            Inform PageOverlayController that the main FrameView's contents size changed,
            so it can update the size of document-relative overlays.
    
            (WebCore::FrameView::setFixedVisibleContentRect):
            (WebCore::FrameView::didChangeScrollOffset):
            (WebCore::FrameView::scrollTo):
            (WebCore::FrameView::wheelEvent):
            Inform PageOverlayController that something scrolled.
    
            (WebCore::FrameView::setExposedRect):
            Inform PageOverlayController that the exposed rect changed, so it can push
            the new exposed rect down to the overlays.
    
            * page/FrameView.h:
            Add didChangeScrollOffset.
    
            * page/MainFrame.cpp:
            (WebCore::MainFrame::MainFrame):
            * page/MainFrame.h:
            Keep one PageOverlayController per MainFrame.
    
            * page/Page.cpp:
            (WebCore::Page::setDeviceScaleFactor):
            Inform PageOverlayController that the device scale factor changed.
    
            (WebCore::Page::setSessionID):
            Remove a blank line.
    
            * page/PageOverlay.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp.
            Move PageOverlay from WebKit2 to WebCore.
            A few overarching changes that I won't detail in each place:
                - references instead of pointers in many places
                - WebCore types instead of WebKit2 types everywhere
    
            (WebCore::PageOverlay::bounds):
            It is possible to install an overlay before we have a FrameView.
            We will eventually get a view/contents size changed notification and try again.
    
            (WebCore::PageOverlay::copyAccessibilityAttributeStringValueForPoint):
            (WebCore::PageOverlay::copyAccessibilityAttributeBoolValueForPoint):
            (WebCore::PageOverlay::copyAccessibilityAttributeNames):
            Split copyAccessibilityAttribute into "StringValueForPoint" and "BoolValueForPoint"
            variants, because we don't have anything like WKTypeRef here.
    
            * page/PageOverlay.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.h.
            Make PageOverlay a normal RefCounted object instead of a WebKit2 API object.
            Leave a comment noting that we should move the PageOverlay's GraphicsLayer
            to PageOverlay instead of a map on PageOverlayController.
    
            * page/PageOverlayController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp.
            Move PageOverlayController from WebKit2 to WebCore.
            A few overarching changes that I won't detail in each place:
                - references instead of pointers in many places
                - WebCore types instead of WebKit2 types everywhere
    
            Leave a FIXME that didChangeSettings is not currently called when settings change.
            This is not a problem for normal use of overlays, only for dynamically changing
            layer border/repaint counter settings.
    
            (WebCore::PageOverlayController::PageOverlayController):
            (WebCore::PageOverlayController::createRootLayersIfNeeded):
            We will now lazily initialize the root layers when we first try to use them,
            because otherwise we try to create them before the ChromeClient's GraphicsLayerFactory
            is hooked up, in some cases, and that can cause us to create the wrong kind of GraphicsLayers.
    
            (WebCore::PageOverlayController::installPageOverlay):
            Enter compositing mode when installing a PageOverlay.
            Avoid pushing the Page to the PageOverlay until after we've set up
            its root layer, so that the installation process can make use of that layer;
            clients may, for example, expect to be able to setNeedsDisplay() in the
            didMoveToPage callback.
            Avoid updateOverlayGeometry until the layer is created and we've pushed
            the Page down, so that e.g. bounds() will use the right Page.
    
            (WebCore::PageOverlayController::didChangeSettings):
            Leave a FIXME about a future improvement to didChangeSettings.
    
            (WebCore::PageOverlayController::deviceScaleFactor):
            (WebCore::PageOverlayController::notifyFlushRequired):
            Null-check Page; these can get called when tearing down the Frame.
    
            * page/PageOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.h.
    
            * platform/graphics/GraphicsLayerClient.h:
            Add wtf/Forward.h, because GraphicsLayerClient.h uses String.
    
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::scrollTo):
            Inform PageOverlayController that something scrolled.
    
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers):
            Make hasAnyAdditionalCompositedLayers return true if there are any page overlays,
            because we need to avoid falling out of compositing mode if we still have
            page overlays.
    
            (WebCore::RenderLayerCompositor::updateCompositingLayers):
            Enter compositing mode if we have page overlays.
    
            (WebCore::RenderLayerCompositor::appendOverlayLayers): Deleted.
            (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
            Rename appendOverlayLayers -> appendDocumentOverlayLayers.
    
            (WebCore::RenderLayerCompositor::attachRootLayer):
            (WebCore::RenderLayerCompositor::detachRootLayer):
            Attach/detach the view overlay root layer when attaching/detaching the
            normal compositing root layer.
    
            (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
            * rendering/RenderLayerCompositor.h:
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174541. <rdar://problem/18753175>

    2014-10-09  Roger Fong  <roger_fong@apple.com>
    
            Build fix for Win EWS bots.
    
            * testing/Internals.idl: Move enum declaration to the top of the file.
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174516. <rdar://problem/18640864>

    2014-10-09  Chris Dumez  <cdumez@apple.com>
    
            [Mac] Spending too much time mapping desired font families to available ones
            https://bugs.webkit.org/show_bug.cgi?id=137539
    
            Reviewed by Darin Adler.
    
            While profiling the load of weather.com, I noticed that we are spending
            quite a bit of time trying to map the font family requested to a font
            that is available on the system. The process involves:
            1. Doing a linear search of all the installed font families and do a
               case-insensitive string comparison for each of them until we find a
               match,
            2. Then, if we don't find a match, do another linear search of the
               fonts' postscript names this time and do again a case-insensitive
               string comparison for each of them.
    
            This process is costly and the fonts requested by weather.com are not
            available, causing us to do 2 linear searches and a lot of string
            comparisons (accounting for ~2% of the WebProcess CPU time for the page
            load). As a result, we end up spending ~90ms in
            internalFontWithFamily() when loading weather.com.
    
            This patch introduces a cache for the mapping between desired font
            families and available font families. This cuts the time spent in
            internalFontWithFamily() in half (~45ms). The cache gets invalidated
            when fonts are installed / uninstalled on the system so we don't break
            that scenario. The cache is also limited in size to avoid using too
            much memory.
    
            No new tests, but manual testing making sure the cache gets invalidated
            when installing a font on the system.
    
            * platform/graphics/mac/FontCacheMac.mm:
            (WebCore::invalidateFontCache):
            * platform/mac/WebFontCache.h:
            * platform/mac/WebFontCache.mm:
            (desiredFamilyToAvailableFamilyDictionary):
            (rememberDesiredFamilyToAvailableFamilyMapping):
            (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
            (+[WebFontCache invalidate]):
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174457. <rdar://problem/18640864>

    2014-10-08  Chris Dumez  <cdumez@apple.com>
    
            Unreviewed build fix after r174456.
    
            I was comparing a signed int to an unsigned one.
    
            * platform/graphics/mac/FontCacheMac.mm:
            (WebCore::shouldAutoActivateFontIfNeeded):
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174456. <rdar://problem/18640864>

    2014-10-08  Christophe Dumez  <cdumez@apple.com>
    
            [Mac] We are spending a lot of time loading fonts when loading weather.com
            https://bugs.webkit.org/show_bug.cgi?id=137454
    
            Reviewed by Darin Adler.
    
            We are spending a lot of time loading fonts when loading weather.com:
            ~4.2% of WebProcess's cpu time in FontCache::getCachedFrontData().
            In particular, we are spending a lot of time doing font auto-activation
            because we don't have the Open Sans fonts installed and weather.com is
            trying to load those.
    
            Before this patch, we were doing font auto-activation ~250 times when
            loading weather.com, even though the site is loading ~10 distinct font
            families.
    
            This patch adds a cache of font families we already tried to
            auto-activate so that we don't try again. This results in ~10 font
            auto-activations when loading weather.com instead of 250. It reduces
            the amount of time spent in getCachedFrontData() to 62.6ms from 276ms
            (4.4x less) when loading weather.com.
    
            No new tests, no behavior change.
    
            * platform/graphics/mac/FontCacheMac.mm:
            (WebCore::shouldAutoActivateFontIfNeeded):
            (WebCore::FontCache::createFontPlatformData):
            * platform/mac/WebFontCache.h:
            * platform/mac/WebFontCache.mm:
            (+[WebFontCache fontWithFamily:traits:weight:size:shouldAutoActivateIfNeeded:]):
            (+[WebFontCache fontWithFamily:traits:weight:size:]):
            (+[WebFontCache fontWithFamily:traits:size:]):
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r174190. <rdar://problem/18640846>

    2014-10-01  Chris Dumez  <cdumez@apple.com>
    
            Add basic caching for Document.cookie API
            https://bugs.webkit.org/show_bug.cgi?id=137225
    
            Reviewed by Alexey Proskuryakov.
    
            While profiling the load of nytimes.com, I noticed that the site is
            accessing ~250 times document.cookie, just during page load. Accessing
            document.cookie is currently slow because we:
            - Call WebPlatformStrategies::cookiesForDOM() virtual function
            - Send a sync IPC message to the Network process to retrieve the
              cookies
                - The Network process gets the list of cookies from CFNetwork then
                  serializes the result to send it back to the WebProcess
            - We unserialize the cookies into an NSList of cookies
            - We filter-out the cookies that are 'httpOnly' and construct a new
              NSList of cookies
            - We create a WTF String out of the cookies NSList
    
            In the case of nytimes.com, it turns out that up to 100 calls to
            document.cookie() are made in the same event loop iteration. This patch
            thus caches / freezes the cookies until we return to the event
            loop so that consecutive calls to document.cookie() are extremely fast.
            Doing so seems to be sufficient to achieve a ~87% cache hit for
            nytimes.com page load.
    
            The cookies cache is invalidated whenever:
            - document.cookie is set
            - we return to the event loop
            - a network resource is loaded synchronously as it may cause cookies to
              be set before we return to the event loop
    
            Test: http/tests/cookies/sync-xhr-set-cookie-invalidates-cache.html
    
            * dom/Document.cpp:
            (WebCore::Document::Document):
            (WebCore::Document::open):
            (WebCore::Document::cookie):
            (WebCore::Document::setCookie):
            (WebCore::Document::setCookieURL):
            (WebCore::Document::initSecurityContext):
            (WebCore::Document::setDOMCookieCache):
            (WebCore::Document::invalidateDOMCookieCache):
            (WebCore::Document::domCookieCacheExpiryTimerFired):
            (WebCore::Document::didLoadResourceSynchronously):
            * dom/Document.h:
            (WebCore::Document::domCookieCache):
            (WebCore::Document::isDOMCookieCacheValid):
            (WebCore::Document::setCookieURL): Deleted.
            * dom/ScriptExecutionContext.cpp:
            (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
            * dom/ScriptExecutionContext.h:
            * loader/ThreadableLoader.cpp:
            (WebCore::ThreadableLoader::loadResourceSynchronously):
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r173184. <rdar://problem/18428699>

    2014-09-02  Simon Fraser  <simon.fraser@apple.com>
    
            Avoid backing store allocation with some combinations of replaced elements, masking and visibility:hidden
            https://bugs.webkit.org/show_bug.cgi?id=136400
    
            Reviewed by Tim Horton.
            
            RenderLayer::isVisuallyNonEmpty() would return true for replaced elements (e.g. images)
            with visibility:hidden, and for layers with a mask, and both would cause additional
            backing store in some cases.
            
            We can move the hasVisibleContent() to the top of the function, since visibility:hidden
            will always hide any content of this layer. The hasMask() check can also be removed;
            a mask can only mask content that is already visible; it never contributes additional
            pixels.
    
            Tests: compositing/backing/masked-child-no-backing.html
                   compositing/backing/replaced-child-no-backing.html
    
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::calculateClipRects):
    
2014-10-28  Dana Burkart  <dburkart@apple.com>

        Merge r173181

    2014-09-02  Simon Fraser  <simon.fraser@apple.com>

            Non-composited child RenderLayers cause allocation of unncessary backing store
            https://bugs.webkit.org/show_bug.cgi?id=136375

            Reviewed by David Hyatt.
            
            A composited element that has non-composited descendant elements that fall into
            RenderLayers was getting backing store when none was required. descendentLayerPaintsIntoAncestor()
            was simply checking the "visibility:visible" bit on descendant non-composited layers,
            instead of actually asking them if they have any visual content.
            
            Added a couple of FIXME comments.

            Test: compositing/backing/child-layer-no-backing.html

            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::calculateClipRects):
            * rendering/RenderLayerBacking.cpp:
            (WebCore::descendentLayerPaintsIntoAncestor):

2014-10-23  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r174908. <rdar://problem/18694470>

    2014-10-20  Beth Dakin  <bdakin@apple.com>
    
            Add support for action menus
            https://bugs.webkit.org/show_bug.cgi?id=137891
            rdar://problem/18451638
            rdar://problem/18694470
    
            Reviewed by Anders Carlsson.
    
            New SPI that is needed for this.
            * WebCore.exp.in:
            * WebCore.xcodeproj/project.pbxproj:
            * platform/spi/mac: Added.
            * platform/spi/mac/NSViewSPI.h: Added.
    
2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r174040.

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

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

            Reviewed by Ryosuke Niwa.

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

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

            No new tests, no behavior change.

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

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r173694.

    2014-09-17  Gavin Barraclough  <barraclough@apple.com>

            DOM timer throttling for hidden plugins
            https://bugs.webkit.org/show_bug.cgi?id=136197

            Reviewed by Geoff Garen & Andreas Kling.

            For non-visible web pages we slow timers (since they can't be driving animations, etc).
            We should do the same for plugins.

            There are a few steps to this:
                - JSPluginElementFunctions notifies DOMTimer when script interacts with a plugin.
                - DOMTimerFireState keeps a record of events that occur while a timer is firing.
                - DOMTimer::fired detects timers that interact with invisible/inaudible plugins, and flags itself for throtting.
                - DOMTimer::intervalClampedToMinimum sets timer intervals appropriately.

            * bindings/js/JSPluginElementFunctions.cpp:
            (WebCore::pluginScriptObject):
                - notify DOMTimer when script interacts with a plugin.
            * html/HTMLPlugInElement.cpp:
            (WebCore::HTMLPlugInElement::isDetectable):
            * html/HTMLPlugInElement.h:
                - added isDetectable, to check for visible / audible plugins.
            * page/DOMTimer.cpp:
            (WebCore::DOMTimerFireState::DOMTimerFireState):
            (WebCore::DOMTimerFireState::~DOMTimerFireState):
                - track current DOMTimerFireState.
            (WebCore::DOMTimer::DOMTimer):
                - initialize m_throttleState.
            (WebCore::DOMTimer::scriptDidInteractWithPlugin):
                - if interaction with a plugin occurs while a timer is firing, record on the DOMTimerFireState.
            (WebCore::DOMTimer::fired):
                - set DOMTimerFireState, and update m_throttleState accordingly.
            (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
                - remove redundant check of maxTimerNestingLevel (covered by intervalClampedToMinimum).
            (WebCore::DOMTimer::intervalClampedToMinimum):
                - Also take m_throttleState into account when throttling.
            * page/DOMTimer.h:
                - added scriptDidInteractWithPlugin, m_throttleState.
            * platform/audio/AudioHardwareListener.h:
                - enum -> enum class.
            * plugins/PluginViewBase.h:
            (WebCore::PluginViewBase::audioHardwareActivity):
                - expose audioHardwareActivity on PluginViewBase (previously available in subclass).

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r173208.

    2014-08-29  Gavin Barraclough  <barraclough@apple.com>

            Simplify DOMTimer::adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
            https://bugs.webkit.org/show_bug.cgi?id=136402

            Reviewed by Andreas Kling.

            When the minimum DOM timer interval changes, the Page updates all DOMTimers accordingly.
            Updating the fire/repeat interval on TimerBase requires a delta, but in
            DOMTimer::adjustMinimumTimerInterval we have the new requested interval. In the case of
            timers we can get the current interval to calculate the delta by calling repeatInterval(),
            but in the case of one-shot timers neither TimerBase nor DOMTimer have store the interval
            that was actually set for the timer (DOMTimer knows the original, unadjusted timer, but
            not the actual interval). The way this currently works is that when the minimum interval
            changes, Page calls adjustMinimumTimerInterval providing the previous minimum. If the
            timer is one-shot, then adjustMinimumTimerInterval will use this to compute the delta
            based on what the interval would have been.

            We can simplify & unify with the code to throttle interval timers when the nesting
            threshold is hit, by instead tracking the current timer interval as a member on DOMTimer &
            using this to compute the delta in all cases.

            * dom/ScriptExecutionContext.cpp:
            (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
                - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
            * page/DOMTimer.cpp:
            (WebCore::DOMTimer::DOMTimer):
                initialize m_currentTimerInterval
            (WebCore::DOMTimer::fired):
                - when the nesting level changes (potentially triggering throttling) just call updateTimerIntervalIfNecessary
            (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
                - compute delta based on m_currentTimerInterval
            (WebCore::DOMTimer::intervalClampedToMinimum):
                - this now always takes m_originalInterval and scriptExecutionContext()->minimumTimerInterval()
                  as its inputs, so remove arguments.
            (WebCore::DOMTimer::adjustMinimumTimerInterval): Deleted.
                - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
            * page/DOMTimer.h:
                - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary, added m_currentTimerInterval

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r173133.

    2014-08-29  Gavin Barraclough  <barraclough@apple.com>

            Make timerNestingLevel threadsafe
            https://bugs.webkit.org/show_bug.cgi?id=136401

            Reviewed by Tim Horton.

            timerNestingLevel, used by DOMTimer to determine whether a timer is 'nested'
            (repeating, possible due to a timer rescheduling itself) is a global. Since
            worker threads can set timers too this is not thread safe.

            * dom/ScriptExecutionContext.cpp:
            (WebCore::ScriptExecutionContext::ScriptExecutionContext):
                - added initialize m_timerNestingLevel
            * dom/ScriptExecutionContext.h:
            (WebCore::ScriptExecutionContext::timerNestingLevel):
            (WebCore::ScriptExecutionContext::setTimerNestingLevel):
                - added accessors
            * page/DOMTimer.cpp:
            (WebCore::DOMTimer::DOMTimer):
            (WebCore::DOMTimer::fired):
                - move timerNestingLevel to the context

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r173132.

    2014-08-29  Gavin Barraclough  <barraclough@apple.com>

            DOMTimer::m_nestingLevel is prone to overflow
            https://bugs.webkit.org/show_bug.cgi?id=136399

            Reviewed by Alexey Proskuryakov.

            Since this would happen after the 2 billionth timer fire this is unlikely,
            and consequences aren't severe (breaks throttling).

            This change has the following consequences.

                - m_nestingLevel saturates to its max value.
                - unnested timers are indicated by a nesting level of 0.
                - repeat timers update m_nestingLevel on every fire,
                  not just those that should have been throttled.

            The last point is subtle, but ultimately should be inconsequential. Timers
            whose requested timeout is less that the minimum interval will saturate quickly
            anyway; timers with an original interval greater than the minimum previously
            wouldn't have incremented m_nestingLevel, but doing so now doesn't hurt since
            they won't be throttled when they hit the threshold. This simplifies things
            conceptually a little & reduces the test performed on each timer fire.

            * page/DOMTimer.cpp:
            (WebCore::shouldForwardUserGesture):
                - unnested timers are indicated by a nesting level of 0
            (WebCore::DOMTimer::DOMTimer):
                - don't increment nesting level on construction
            (WebCore::DOMTimer::fired):
                - saturating increments
            (WebCore::DOMTimer::adjustMinimumTimerInterval):
            (WebCore::DOMTimer::intervalClampedToMinimum):
                - added ASSERTs

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r172964.

    2014-08-26  Tim Horton  <timothy_horton@apple.com>

            Fix the build after r172963

            * page/DOMTimer.h:

2014-10-23  Babak Shafiei  <bshafiei@apple.com>

        Merge r172963.

    2014-08-25  Gavin Barraclough  <barraclough@apple.com>

            DOMTimer may be deleted during timer fire
            https://bugs.webkit.org/show_bug.cgi?id=136198

            Reviewed by Geoff Garen.

            Consequentially ScheduledActions may also be deleted mid execution.
            This is fairly surprising & fragile, let's make this simpler.

            Currently DOMTimer instances are effectively owned by the ScriptExecutionContext.
            There is a 1-1 mapping between timers and contexts, all timers are help in a map
            on the context and if the context goes away all timers are deleted. Rather than
            being implemented in a straightforward fashion (a smart pointer type for the map
            value) this is currently implemented by having the timer objects listen for the
            context going away using contextDestroyed, and deleting themselves if so.

            Switch to using a smart pointer for values of m_timeouts in ScriptExecutionContext.
            By using a RefCounted object we can also extend the lifetime of the DOMTimer instance
            from within the DOMTimer::fired method, so the object is not destroyed while the
            member function is still on the stack.

            * WebCore.xcodeproj/project.pbxproj:
                - project -> private since DOMTimer could no longer be a forward declare in ScriptExecutionContext.h.
            * dom/ScriptExecutionContext.cpp:
            (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
            (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
                - auto* -> auto& since value type in map is no longer a raw pointer.
            * dom/ScriptExecutionContext.h:
            (WebCore::ScriptExecutionContext::addTimeout):
                - DOMTimer* -> PassRefPtr<DOMTimer>
            * page/DOMTimer.cpp:
            (WebCore::DOMTimer::DOMTimer):
                - adopt the initial ref, and pass to addTimeout.
            (WebCore::DOMTimer::install):
                - updated comment.
            (WebCore::DOMTimer::removeById):
                - instead of explicitly deleting the timer and assuming this will implicitly remove it from the context map,
                  we explicitly remove it from the context map and assume this will implicitly deleting the timer!
            (WebCore::DOMTimer::fired):
                - Add a RefPtr to keep the DOMTimer object alive until the fired method completes; to cancel a one-shot timer
                  just remove it from the context's map, rather than explicitly deleting it.
            (WebCore::DOMTimer::~DOMTimer): Deleted.
            (WebCore::DOMTimer::contextDestroyed): Deleted.
                - no need! object lifetime management now handled by smart pointers.
            * page/DOMTimer.h:
                - added parent class RefCounted<DOMTimer>.

2014-10-21  Dana Burkart  <dburkart@apple.com>

        Merge r174703

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

            Introduce an isCSSAnimated flag on RenderElement for performance
            https://bugs.webkit.org/show_bug.cgi?id=137583

            Reviewed by Simon Fraser.

            I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
            and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
            ~4.7 millions m_compositeAnimations HashMap lookups.

            This patch introduces an isCSSAnimated flag on RenderElement to return early if
            there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
            the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
            the following performance improvements:
            - isRunning*AnimationOnRenderer() / computeCompositingRequirements()
              - before: ~45ms  / ~90ms
              - after:  ~4ms / ~30ms

            No new tests, no behavior change.

            * page/animation/AnimationController.cpp:
            (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
            (WebCore::AnimationControllerPrivate::clear):
            (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
            (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
            (WebCore::AnimationController::isRunningAnimationOnRenderer):
            (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
            * rendering/RenderElement.cpp:
            (WebCore::RenderElement::RenderElement):
            * rendering/RenderElement.h:
            (WebCore::RenderElement::isCSSAnimating):
            (WebCore::RenderElement::setIsCSSAnimating):

2014-10-21  Dana Burkart  <dburkart@apple.com>

        Merge r174414

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

            Safari 8 on OSX 10.10 does not run WebGL in Retina HiDPI mode.
            https://bugs.webkit.org/show_bug.cgi?id=134854
            <rdar://problem/18465263>

            Reviewed by Tim Horton.

            The NSOpenGLLayer has to have its contentScale property
            set accordingly when on a retina display. Do this by
            adding another value to the GraphicsContext3D creation
            attribute dictionary, representing the device pixel ratio.
            Then, when we come to draw into the layer, make sure
            we set our GL viewport to the correct value.

            This is currently untestable because:
            - we can't just read from the GL buffer as it is always correct
            - WebGL isn't working in reftests
            - a layer dump doesn't show the change since it was done in a CALayer subclass.

            * html/canvas/WebGLRenderingContext.cpp:
            (WebCore::WebGLRenderingContext::create): Pass the devicePixelRatio into the attribute dictionary.
            * platform/graphics/GraphicsContext3D.h:
            (WebCore::GraphicsContext3D::Attributes::Attributes): Add a devicePixelRatio attribute.
            * platform/graphics/mac/WebGLLayer.h: New property to save us looking up the attributes
            each frame.
            * platform/graphics/mac/WebGLLayer.mm:
            (-[WebGLLayer initWithGraphicsContext3D:]): Store the devicePixelRatio, and set our
            contents scale appropriately.
            (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Draw into
            a correctly sized backbuffer.
            (-[WebGLLayer copyImageSnapshotWithColorSpace:]): Generate an image of the correct size.

2014-10-21  Dana Burkart  <dburkart@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-21  Dana Burkart  <dburkart@apple.com>

        Merge r173246

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

            Text caret changes to color of text in Mail and Notes
            https://bugs.webkit.org/show_bug.cgi?id=135904

            Reviewed by Simon Fraser.

            Consult with the background color of spans inside editable divs to determine what color
            the caret should be.

            Test: editing/caret/color-span-inside-editable.html

            * editing/FrameSelection.cpp:
            (WebCore::CaretBase::paintCaret):

2014-09-23  Lucas Forschler  <lforschler@apple.com>

    Rollout trunk r173848 | (r173897 on branch)

2014-09-23  Lucas Forschler  <lforschler@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-09-17  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r173664. rdar://problem/18187713

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

            Videos with controls enabled never receive 'dragstart' events.
            https://bugs.webkit.org/show_bug.cgi?id=136837

            Reviewed by Eric Carlson.

            Fixes a crash regression introduced by r173631. Node::contains() has an interesting property of returning false
            if `this` is NULL. Rather than depending on this behavior, explicitly NULL-check state.source and bail early.

            * page/DragController.cpp:
            (WebCore::DragController::startDrag):

2014-09-17  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r173632. rdar://problem/18187713

    2014-09-15  Jer Noble  <jer.noble@apple.com>

            Unreviewed logic fix from r173631. Logic for includeShadowDOM was reversed.

            * page/DragController.cpp:
            (WebCore::DragController::startDrag):

2014-09-17  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r173631. rdar://problem/18187713

    2014-09-15  Jer Noble  <jer.noble@apple.com>

            Videos with controls enabled never receive 'dragstart' events.
            https://bugs.webkit.org/show_bug.cgi?id=136837

            Reviewed by Simon Fraser.

            When initiating a drag, the DragController checks whether the hit-tested element at a
            drag location is a child of the drag source, and bails if early if that is not the case.
            For a <video> element with controls, the hit-tested element is an element within the
            <video> element's Shadow DOM. Because the DragController uses a method which does not
            take Shadow DOM into account when determining a child-parent relationship, this test fails
            and all drag operations fail as well.

            For <video> elements only, when testing whether the drag source is an ancestor of the
            hit-tested element, use containsIncludingShadowDOM() instead of contains(). To ensure that
            the controls are still usable when a drag listener is active on a <video> element, mark
            the controls as a draggable element, but simply call preventDefault() in the controls'
            'dragstart' handler, ensuring the timeline and volume controls are themselves still draggable.

            * Modules/mediacontrols/mediaControlsApple.css:
            (audio::-webkit-media-controls-panel):
            * Modules/mediacontrols/mediaControlsApple.js:
            (Controller.prototype.createControls):
            (Controller.prototype.handlePanelDragStart):
            * page/DragController.cpp:
            (WebCore::DragController::startDrag):

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

        [Mac] MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput doesn't work with rotated movies
        https://bugs.webkit.org/show_bug.cgi?id=136872

        Reviewed by Tim Horton.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): Add logging.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Apply the video track
            preferred transform.

2014-09-16  Dana Burkart <dburkart@apple.com>

        Merge r173635

    2014-09-15  Alexey Proskuryakov  <ap@apple.com>

            Crash when logging in to optionshouse.com
            https://bugs.webkit.org/show_bug.cgi?id=136834

            Reviewed by Anders Carlsson.

            No test, because I couldn't make one. I don't have a way to reproduce first-hand.

            * platform/network/cf/SocketStreamHandleCFNet.cpp:
            (WebCore::SocketStreamHandle::readStreamCallback):
            (WebCore::SocketStreamHandle::writeStreamCallback):

2014-09-12  Lucas Forschler  <lforschler@apple.com>

        Merge r173584

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

            [Fullscreen] Taking embedded youtube video full screen takes the whole page full screen
            https://bugs.webkit.org/show_bug.cgi?id=136792

            Reviewed by Beth Dakin.

            Recalculate style after beginning the enter fullscreen animation, but before sending the
            "webkitfullscreenchange" event to listeners.

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

2014-09-12  Lucas Forschler  <lforschler@apple.com>

        Merge r173544

    2014-09-11  Beth Dakin  <bdakin@apple.com>

            WebKit scrollbars flash in non-dominant spaces when entering Mission Control
            https://bugs.webkit.org/show_bug.cgi?id=136761
            -and corresponding-
            rdar://problem/18195616

            Reviewed by Tim Horton.

            This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
            Show match the logic in AppKit. We only want these notifications when the window 
            has become both visible and active (or lost both, in the case of hide).

            Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it 
            only when both visibility and active-state have changed.
            * page/FocusController.cpp:
            (WebCore::FocusController::setViewState):
            (WebCore::FocusController::setIsVisibleAndActiveInternal):
            (WebCore::FocusController::setIsVisibleInternal): Deleted.
            * page/FocusController.h:

            FocusController::setViewState() is the only place that needs to call 
            ScrollableArea::contentAreaDidHide/Show, so remove these callers.
            * page/FrameView.cpp:
            (WebCore::FrameView::didMoveOnscreen): Deleted.
            (WebCore::FrameView::willMoveOffscreen): Deleted.
            * page/FrameView.h:
            * page/Page.cpp:
            (WebCore::Page::setIsVisibleInternal):

2014-09-12  Lucas Forschler  <lforschler@apple.com>

        Merge r173533

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

            Add site-specific quirk for entering fullscreen on YouTube.com.
            https://bugs.webkit.org/show_bug.cgi?id=136742

            Reviewed by Eric Carlson.

            YouTube only resizes its <video> content when entering fullscreen after receiving the "webkitfullscreenchange"
            event, which is fired once the animation to enter fullscreen completes. This leaves the apparent <video> content
            too small during the animation, especially at the beginning of the animation. Add a site-specific hack for
            YouTube sites which fires the "webkitfullscreenchange" event synchronously with the beginning of the enter
            fullscreen animation. This will cause YouTube to resize their <video> content during the period of time where we
            disable screen updates, and makes the enter fullscreen animation seamless.

            Add a static utility method, hostIsYouTube(), for the various pieces of this site-specific hack, and expand it
            to match youtube.co.uk, youtube.fr, etc.

            * dom/Document.cpp:
            (WebCore::hostIsYouTube): Added.
            (WebCore::Document::webkitWillEnterFullScreenForElement): Fire fullscreenchange event if hacks are enabled.
            (WebCore::Document::webkitDidEnterFullScreenForElement): Don't fire the event if same.
            (WebCore::Document::webkitDidExitFullScreenForElement): Use hostIsYouTube().

2014-09-08  Lucas Forschler  <lforschler@apple.com>

        Merge r173365

    2014-09-06  Jer Noble  <jer.noble@apple.com>

            [Fullscreen] Add a site-specific hack to work around "flash on exit" behavior of YouTube.com.
            https://bugs.webkit.org/show_bug.cgi?id=136604

            Reviewed by Eric Carlson.

            YouTube.com will cause a "flash" of the full screen sized <video> element upon exiting full
            screen because the "fullscreenchange" event is fired asynchronously after the exit animation
            completes. Only YouTube sites and embeds, add a site-specific-quirk which runs the "fullscreenchange"
            event synchronously at the end of the exit animation. This causes YouTube's video resizing logic
            to run during the period of time where we've disabled screen updates, instead of immediately
            after.

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

2014-08-28  Lucas Forschler  <lforschler@apple.com>

        Merge r173097

    2014-08-28  Enrica Casucci  <enrica@apple.com>

            Can't hit tab key more than 3 times continuously.
            https://bugs.webkit.org/show_bug.cgi?id=136357
            rdar://problem/17927266

            Reviewed by Dean Jackson.

            Test: fast/css/multiple-tabs.html

            When computing the tabWidth disregard increments of less than half the size of the space character
            for the given font.

            * platform/graphics/Font.h:
            (WebCore::Font::tabWidth):

2014-08-28  Lucas Forschler  <lforschler@apple.com>

        Merge r173080

    2014-08-28  Pratik Solanki  <psolanki@apple.com>

            WebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing some websites
            https://bugs.webkit.org/show_bug.cgi?id=136347
            <rdar://problem/18073745>

            Reviewed by Andreas Kling.

            When passing data to ImageIO, we create a copy if we have to reallocate the buffer. We would
            set the size of the new buffer to be the size of the SharedBuffer data. This causes memory
            churn since we would create a new buffer for every data chunk we get. Fix this by at least
            doubling the capacity of the buffer when we duplicate it.

            * platform/SharedBuffer.cpp:
            (WebCore::SharedBuffer::duplicateDataBufferIfNecessary):

2014-08-28  Lucas Forschler  <lforschler@apple.com>

        Merge r173067

    2014-08-28  Chris Fleizach  <cfleizach@apple.com>

            AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse
            https://bugs.webkit.org/show_bug.cgi?id=136333

            Reviewed by David Kilzer.

            If a Node is asked for it's Document when it's not actually in a document, it can lead to an assert/crash.
            We can avoid this by checking that the node is in a document before asking for its document.

            I was not able to make a test case.      

            * accessibility/AXObjectCache.cpp:
            (WebCore::AXObjectCache::clearTextMarkerNodesInUse):

2014-08-28  Lucas Forschler  <lforschler@apple.com>

        Merge r173028

    2014-08-27  Andreas Kling  <akling@apple.com>

            Drawing text in an SVG font causes load events to be fired.
            <https://webkit.org/b/136269>
            <rdar://problem/15724915>

            Don't flush pending load events in Document::implicitClose() for frameless documents.
            This is a targeted fix for an issue where parsing SVG fonts during layout would cause
            event dispatch to happen in the main document, leading to arbitrary JS execution.

            Note that the testcase only works in DRT/WTR, since once the SVG font is in cached
            by WebCore, we won't reparse it again. Caches are cleared between tests, so it will
            correctly fail if this should regress.

            Longer-term, we should clean this up and get rid of the global dispatch entirely.

            Reviewed by Simon Fraser.

            Test: fast/text/svg-font-trigger-load-event.html

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

2014-08-28  Lucas Forschler  <lforschler@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-08-28  Lucas Forschler  <lforschler@apple.com>

        Merge r172871

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

            Google Canvas2D maps are too slow and uncontrollable with Safari with full screen mode
            https://bugs.webkit.org/show_bug.cgi?id=136168

            Reviewed by Tim Horton.

            When Google maps are using their 2D "lite" fallback and you're drawing in a huge
            window such as fullscreen 4K, we would drop back to unaccelerated mode, thinking
            that we'd exceeded the maximum IOSurface size.

            Remove the hardcoded limit on IOSurface sizes, and instead ask the system
            what it believe the maximum to be. This was significantly higher than our
            limit on the systems I tested.

            * platform/graphics/cg/ImageBufferCG.cpp:
            (WebCore::ImageBuffer::ImageBuffer): Include our IOSurface wrapper, which
            has a query for maximum size, and use that instead.

2014-08-26  Dana Burkart  <dburkart@apple.com>

        Merge r172977. <rdar://problem/18141703>

    2014-08-26  Brent Fulgham  <bfulgham@apple.com>
    
            [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
            https://bugs.webkit.org/show_bug.cgi?id=136258
            <rdar://problem/18134138>
    
            Reviewed by Tim Horton.
    
            Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
            values from passing through the 32-bit OLE_HANDLE data type.
    
            * platform/win/WindowMessageBroadcaster.cpp:
            (WebCore::WindowMessageBroadcaster::addListener):
            (WebCore::WindowMessageBroadcaster::removeListener):
            (WebCore::WindowMessageBroadcaster::destroy):
            (WebCore::WindowMessageBroadcaster::unsubclassWindow):
            (WebCore::WindowMessageBroadcaster::SubclassedWndProc):
    
2014-08-26  Dana Burkart  <dburkart@apple.com>

        Merge r172969. <rdar://problem/17435564>

    2014-08-26  Simon Fraser  <simon.fraser@apple.com>
    
            Ensure that layout is up-to-date before hit testing
            https://bugs.webkit.org/show_bug.cgi?id=136242
            rdar://problem/17435564
    
            Reviewed by Tim Horton.
            
            Various code paths can call into RenderView::hitTest() but fail to
            ensure that layout is up-to-date. This is a conservative change that
            fixes the issue for callers of EventHandler::hitTestResultAtPoint(),
            including WebPage::acceptsFirstMouse() and WebFrame::hitTest().
            
            This change is not general enough that we can ASSERT(!needsLayout())
            in RenderView::hitTest() yet.
            
            * page/EventHandler.cpp:
            (WebCore::EventHandler::hitTestResultAtPoint):
    
2014-08-22  Lucas Forschler  <lforschler@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):

2014-08-21  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r172841. <rdar://problem/17733682>

    2014-08-21  Brent Fulgham  <bfulgham@apple.com>
    
            [Win] WebCore.proj is not copying WebKit resource files.
            https://bugs.webkit.org/show_bug.cgi?id=136142
            <rdar://problem/17733682>
    
            Reviewed by Tim Horton.
    
            * WebCore.vcxproj/WebCore.proj: Copy missing resource files during
            post-build step.
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172317. <rdar://problem/18052514>

    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-19  Dana Burkart  <dburkart@apple.com>

        Merge r172720. <rdar://problem/17767169>

    2014-08-18  Brent Fulgham  <bfulgham@apple.com>
    
            [Mac] Unreviewed merge correction.
    
            * page/mac/EventHandlerMac.mm:
            (WebCore::EventHandler::platformCompleteWheelEvent): Revert an
            unintended change from r172705.
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172709. <rdar://problem/17850158>

    2014-08-18  Andy Estes  <aestes@apple.com>
    
            REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
            https://bugs.webkit.org/show_bug.cgi?id=136010
    
            Reviewed by Darin Adler.
    
            r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh,
            and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to
            an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the
            navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer
            scheduled, the policy delegate is never executed and the external app never launches.
    
            Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed
            and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load.
            This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and
            didCancelClientRedirectForFrame on the frame load delegate.
            
            To constrain this check only to the navigation types covered by r167856, only two NavigationSchedulers
            (ScheduledRedirect and ScheduledLocationChange) enable the invalid URL check.
    
            Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after
            check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this
            patch reverts r170120 (but keeps some of its tests).
    
            Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html
                   fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
                   fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html
                   fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
                   fast/loader/window-open-to-invalid-url-calls-policy-delegate.html
                   fast/loader/window-open-to-invalid-url-disallowed.html
    
            * WebCore.exp.in: Updated the symbol FrameLoader::loadFrameRequest.
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::changeLocation): Added an AllowNavigationToInvalidURL argument; passed down to urlSelected.
            (WebCore::FrameLoader::urlSelected): Added an AllowNavigationToInvalidURL argument; passed down to loadFrameRequest.
            (WebCore::FrameLoader::loadURLIntoChildFrame): Passed AllowNavigationToInvalidURL::Yes to loadURL.
            (WebCore::FrameLoader::loadFrameRequest): Added an AllowNavigationToInvalidURL argument; passed down to loadURL and loadPostRequest.
            (WebCore::FrameLoader::loadURL): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNewWindowPolicy and loadWithNavigationAction.
            (WebCore::FrameLoader::loadPostRequest): Ditto.
            (WebCore::FrameLoader::load): Passed AllowNavigationToInvalidURL::Yes to continueLoadAfterNewWindowPolicy.
            (WebCore::FrameLoader::loadWithNavigationAction): Added an AllowNavigationToInvalidURL argument; passed down to loadWithDocumentLoader.
            (WebCore::FrameLoader::loadWithDocumentLoader): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNavigationPolicy.
            (WebCore::FrameLoader::reloadWithOverrideEncoding): Passed AllowNavigationToInvalidURL::Yes to loadWithDocumentLoader.
            (WebCore::FrameLoader::reload): Ditto.
            (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
                Added an AllowNavigationToInvalidURL argument; if its value is No and the request's URL is invalid, do not continue.
                Added a FIXME about calling clientRedirectCancelledOrFinished on non-quick redirect cancellations.
            (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Added an AllowNavigationToInvalidURL argument; passed down to loadWithNavigationAction.
            (WebCore::FrameLoader::loadDifferentDocumentItem): Passed AllowNavigationToInvalidURL::Yes to either loadWithDocumentLoader or loadWithNavigationAction.
            * loader/FrameLoader.h:
            * loader/FrameLoaderTypes.h: Defined AllowNavigationToInvalidURL to have values of Yes and No.
            * loader/NavigationScheduler.cpp:
            (WebCore::ScheduledRedirect::fire): Passed AllowNavigationToInvalidURL::No to FrameLoader::changeLocation.
            (WebCore::ScheduledLocationChange::fire): Ditto.
            (WebCore::NavigationScheduler::shouldScheduleNavigation): Removed the URL::isValid check.
            (WebCore::NavigationScheduler::scheduleLocationChange): Passed AllowNavigationToInvalidURL::No to FrameLoder::changeLocation during fragment navigations.
            * page/ContextMenuController.cpp:
            (WebCore::openNewWindow): Passed AllowNavigationToInvalidURL::Yes to FrameLoader::loadFrameRequest.
            (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
            * page/Settings.in: Removed allowNavigationToInvalidURL.
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172705. <rdar://problem/17767169>

    2014-08-18  Brent Fulgham  <bfulgham@apple.com>
    
            [Mac] Follow-up to r136040 based on Darin Adler's comments.
    
            Pass Widget* as a Widget&, since it can never be null.
    
            * page/EventHandler.cpp:
            (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
            (WebCore::EventHandler::handleWheelEvent):
            * page/EventHandler.h:
            * page/mac/EventHandlerMac.mm:
            (WebCore::EventHandler::platformCompleteWheelEvent):
            (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172703. <rdar://problem/17767169>

    2014-08-17  Brent Fulgham  <bfulgham@apple.com>
    
            [Mac] Gesture scrolls don't work in the WebKit1 clients after scrolling a non-scrollable iFrame
            https://bugs.webkit.org/show_bug.cgi?id=136029
            <rdar://problem/17767169>
    
            Reviewed by Maciej Stachowiak.
    
            This is difficult to test in our layout tests, since it relies on specific host application
            behavior.
    
            If the platform widget is a frame view (IFrame), and we are in WebKit1, 'passWheelEventToWidget'
            has already called 'scrollWheel' on the underlying platform widget. We need to return true in
            this case to avoid getting multiple copies of the scrollWheel event sent to the platform widget.
    
            * page/EventHandler.cpp:
            (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Revise default stub to
            accept a Widget* argument.
            (WebCore::EventHandler::handleWheelEvent):
            * page/EventHandler.h:
            * page/mac/EventHandlerMac.mm:
            (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Check for WK1 case and
            return 'true' when the underlying NSScrollView has been issues a scrollWheel event.
            
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172693. <rdar://problem/17577321>

    2014-08-15  Dean Jackson  <dino@apple.com>
    
            REGRESSION (r164173): Safari AutoFill button in popover, default buttons on iCloud control panel and Safari Safe Browsing pages don't have default appearance
            https://bugs.webkit.org/show_bug.cgi?id=136011
    
            Reviewed by Sam Weinig.
    
            When we render some controls, we need to make sure the NSWindow subclass we
            use as the host of the AppKit views identifies itself as the key window (if
            the control state is correct). We already have a flag tracking this for
            key appearance - just make sure we do the same for isKeyWindow.
    
            * platform/mac/ThemeMac.mm:
            (-[WebCoreThemeWindow isKeyWindow]): New override to mirror the static
            variable for key appearance.
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172657. <rdar://problem/17896828>

    2014-08-15  Eric Carlson  <eric.carlson@apple.com>
    
            [MSE] Implement a maximum buffer size for SourceBuffer
            https://bugs.webkit.org/show_bug.cgi?id=135614
    
            Reviewed by Jer Noble.
    
            Implement the MSE coded frame eviction algorithm: when new buffers are appended attempt
            to keep the amount of data buffered below a maximum size (which is determined by the media
            session manager) by freeing coded frames as follows:
                1 - Free frames in 30 second chunks from 0 to 30 seconds before the current time.
                2 - If there are time ranges after the range with the current time, free frames in
                    30 second chunks from duration back to the beginning of the time range after
                    current time.
    
            For now we DO NOT throw a QUOTA_EXCEEDED_ERR when we are not able to free up enough
            space to remain below the prescribed quota, because some big name, widely deployed, 
            code bases ignore the error and continue appending data as though the failed append
            succeeded, leading to a corrupted bitstream and failure to play.
    
            * Modules/mediasource/SampleMap.cpp:
            (WebCore::SampleMap::addSample): Drive-by performance optimization: sample->presentationTime()
                is used more than once, stash it in a local variable.
            (WebCore::SampleMap::removeSample): Ditto.
    
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::logRanges): Debug-only function to log TimeRanges.
            (WebCore::SourceBuffer::SourceBuffer):
            (WebCore::SourceBuffer::remove): Optimize logging. Buffer full and coded frame eviction logic
                is in SourceBuffer instead of SourceBufferPrivate.
            (WebCore::SourceBuffer::appendBufferInternal): Ditto.
            (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Set m_bufferFull when more data
                has been buffered than allowed.
            (WebCore::removeSamplesFromTrackBuffer): Add logging.
            (WebCore::SourceBuffer::removeCodedFrames): Improve logging. Avoid debug build assert when
                current time is after last enqueued presentation time.
            (WebCore::SourceBuffer::evictCodedFrames): The coded frame eviction algorithm.
            (WebCore::SourceBuffer::maximumBufferSize): Return the maximum amount of data that can 
                be buffered.
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Improve logging. Don't attempt
                to create a PlatformTimeRanges with inverted start and end to avoid an assert in debug.
            (WebCore::SourceBuffer::hasAudio): New, return true if there are any audio tracks.
            (WebCore::SourceBuffer::hasVideo): New, return true if there are any video tracks.
            (WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Call hasAudio.
            (WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Call hasVideo.
            (WebCore::SourceBuffer::hasCurrentTime): Return true if currentTime is greater than duration.
            (WebCore::SourceBuffer::hasFutureTime): Ditto.
            (WebCore::SourceBuffer::extraMemoryCost): Return the amount of data buffered: the size of
                the input buffer plus the size of all track samples.
            (WebCore::SourceBuffer::reportExtraMemoryCost): Move buffered size calculation to extraMemoryCost.
            (WebCore::SourceBuffer::document): Document accessor.
            * Modules/mediasource/SourceBuffer.h: Drive-by size optimization by moving all bool member
                variables to the end of class.
    
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::refreshCachedTime): Drive-by removal of overly chatty logging.
            (WebCore::HTMLMediaElement::maximumSourceBufferSize): New, maximum source buffer size.
            * html/HTMLMediaElement.h:
    
            * html/HTMLMediaSession.cpp:
            (WebCore::HTMLMediaSession::maximumMediaSourceBufferSize): New, get maximum source buffer 
                size from settings, return full amount for an SourceBuffer with video and audio, return 5%
                of the maximum for an audio-only SourceBuffer.
            * html/HTMLMediaSession.h:
    
            * page/Settings.in: Add maximumSourceBufferSize. Default value is enough for approximately
                five minutes of 1080p video and stereo audio.
    
            * platform/graphics/PlatformTimeRanges.cpp:
            (WebCore::PlatformTimeRanges::totalDuration): Drive-by optimization.
            (WebCore::PlatformTimeRanges::dump): New, allow a PlatformTimeRanges to be printed.
            * platform/graphics/PlatformTimeRanges.h:
    
            * platform/graphics/SourceBufferPrivate.h: Delete evictCodedFrames and isFull, that logic
                is not in SourceBuffer.
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
            (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Drive-by logging fix.
            (WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames): Deleted.
            (WebCore::SourceBufferPrivateAVFObjC::isFull): Deleted.
    
            * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
            (WebCore::MockSourceBufferPrivate::evictCodedFrames): Deleted.
            (WebCore::MockSourceBufferPrivate::isFull): Deleted.
            * platform/mock/mediasource/MockSourceBufferPrivate.h:
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172656. <rdar://problem/17961698>

    2014-08-15  Zalan Bujtas  <zalan@apple.com>
    
            REGRESSION: Parts of the route/route options windows are invisible at maps.google.com
            https://bugs.webkit.org/show_bug.cgi?id=135977
            <rdar://problem/17961698>
    
            Reviewed by Andreas Kling.
    
            When the style change requires both layout and repaint, the style diff is set to
            'layout is needed' (and masks the repaint change) as normally layout is followed by a repaint.
            However, in compositing context, layout may not be followed by repaint, so when the style diff
            indicates layout, we need to figure out whether it implies repaint too.
            This logic should eventually be moved from RenderElement to RenderLayerModelObject/RenderLayer.
            -tracked here: webkit.org/b/135990
    
            Test: compositing/cliprect-and-position-change-on-compositing-layer.html
    
            * rendering/RenderElement.cpp:
            (WebCore::RenderElement::setNeedsPositionedMovementLayout):
            * rendering/style/RenderStyle.cpp:
            (WebCore::RenderStyle::changeRequiresLayerRepaint):
            (WebCore::RenderStyle::diffRequiresLayerRepaint):
            (WebCore::RenderStyle::diffRequiresRepaint): Deleted.
            * rendering/style/RenderStyle.h:
            * rendering/style/RenderStyleConstants.h:
    
2014-08-19  Dana Burkart  <dburkart@apple.com>

        Merge r172603

    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-19  Dana Burkart  <dburkart@apple.com>

        Merge r172600

    2014-08-14  Yoav Weiss  <yoav@yoav.ws>

            srcset with w descriptor doesn't behave as expected when sizes is not supported.
            https://bugs.webkit.org/show_bug.cgi?id=135935

            Reviewed by Dean Jackson.

            In current implementation, if sizes is not supported, when authors would write
            markup such as `<img src=fallback.jpg srcset="100px.jpg 100w, 400px.jpg 400w">`
            the first candidate in srcset would be picked, regardless of its dimensions 
            That is likely to be confusing for authors.
            Dropping these "not yet supported" candidates is likely to be less confusing,
            and will result in the "fallback.jpg" candidate being picked.

            No new tests since this change only concerns builds that are built
            with the PICTURE_SIZES compile flag turned off.

            * html/parser/HTMLSrcsetParser.cpp:
            (WebCore::parseDescriptors):
            Drop candidates that include either 'w' or 'h' descriptors when the
            sizes feature is not supported.

2014-08-19  Dana Burkart  <dburkart@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-19  Dana Burkart  <dburkart@apple.com>

        Merge r172481

    2014-08-11  Roger Fong  <roger_fong@apple.com>

            Adjust max-width of cues based on text alignment when cue size is expanded.
            https://bugs.webkit.org/show_bug.cgi?id=135823.

            Reviewed by Brent Fulgham.

            All units are in percentages.
            If we are left aligned the max cue width is the 100 minus the cue position.
            If we are right aligned the max cue width is the cue position.
            If we are centered the max cue width is just 100.

            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
            * html/track/VTTCue.cpp:
            (WebCore::VTTCueBox::applyCSSProperties):

2014-08-14  Lucas Forschler  <lforschler@apple.com>

        Merge r172609

    2014-08-14  Brent Fulgham  <bfulgham@apple.com>

            [Win] Correct build when DerivedSources location not supplied by build environment
            https://bugs.webkit.org/show_bug.cgi?id=135954
            <rdar://problem/18023620>

            Reviewed by Joseph Pecoraro.

            The DerivedSourcesDirectory is not always defined, depending on what
            solution is being used to build this project. Instead, just define
            it directly, since we already know where it needs to go.

            Also:
            1. Stop redirecting the copy output to NUL so I can see if this fails in the future.
            2. Make sure the target directory exists before copying to it.

            * WebCore.vcxproj/copyForwardingHeaders.cmd: Properly specify
            the directories for copying the JS file.

2014-08-14  Lucas Forschler  <lforschler@apple.com>

        Merge r172584

    2014-08-14  Jer Noble  <jer.noble@apple.com>

            [MSE] Altering the quality of a YouTube video will cause the video to distort and display an error message
            https://bugs.webkit.org/show_bug.cgi?id=135931

            Reviewed by Eric Carlson.

            When removing samples from the TrackBuffer's sample map, also remove those samples from the
            TrackBuffer's decode queue. Otherwise, removed samples may persist in the decode queue and
            either break sync-sample dependencies or cause decoding artifacts.

            Pull the code which removes samples from a track buffer into its own utility function, and
            use this function both from removeCodedFrames(), and also when samples are removed due to
            overlapping appends in sourceBufferPrivateDidReceiveSample(). In order to reference
            TrackBuffers outside of SourceBuffer (and in the static removeSamplesFromTrackBuffer()
            function), make TrackBuffer a public forward declaration.

            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::removeSamplesFromTrackBuffer):
            (WebCore::SourceBuffer::removeCodedFrames):
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
            * Modules/mediasource/SourceBuffer.h:

2014-08-14  Lucas Forschler  <lforschler@apple.com>

        Merge r172506

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

            [MSE] YouTube will lose audio, video after seeking backwards to an unbuffered range.
            https://bugs.webkit.org/show_bug.cgi?id=135855

            Reviewed by Eric Carlson.

            When seeking into an unbuffered or partially buffered range, we will unconditionally pass samples to the
            decode queue even if there exist large gaps between those samples. Subsequently, the decoder will not
            notify us that it has become ready for new samples until playback reaches those later samples and the samples
            are discarded.

            When sending samples to be decoded in provideMediaData(), stop if there exists a large gap in the sample timeline.
            Do this by tracking the last enqueued decode end time, and look to see if the next sample's decode time indicates
            a gap of greater than 1 second.

            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Initialize lastEnqueuedDecodeEndTime.
            (WebCore::SourceBuffer::seekToTime): Set needsReenqueueing, in case samples do not yet exist in the trackBuffer
                sufficient to re-enqueue for the destination time, so that re-enqueueing will occur after the next append.
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check against lastEnqueuedDecodeEndTime, rather than
                lastEnqueuedPresentationTime before adding samples to the decodeQueue.
            (WebCore::SourceBuffer::provideMediaData): Stop when we reach a large gap between samples.
            (WebCore::SourceBuffer::reenqueueMediaForTime): Set or clear lastEnqueuedDecodeEndTime based on whether we
                have appended any non-displaying samples after flushing.

2014-08-13  Lucas Forschler  <lforschler@apple.com>

        Merge r172538

    2014-08-13  Jer Noble  <jer.noble@apple.com>

            [MSE] Replacing existing samples with overlapping new samples will cause playback to stutter.
            https://bugs.webkit.org/show_bug.cgi?id=135902

            Reviewed by Eric Carlson.

            Only mark the TrackBuffer as needing re-enqueueing if the samples removed by overlapping samples
            themselves overlap with potentially enqueued but not yet displayed frames.

            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

2014-08-13  Lucas Forschler  <lforschler@apple.com>

        Merge r172534

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

            [WK1] A fixed-position <img> may not show on page load
            https://bugs.webkit.org/show_bug.cgi?id=135893

            Reviewed by Tim Horton.

            A position:fixed image could fail to display because we didn't make a
            compositing layer for it under some circumstances. This can happen if
            RenderLayerCompositor::requiresCompositingForPosition() runs before the
            image is loaded, in which cause the layer is zero-sized, so does not get
            composited.

            When the image loads, there was no code path that ensured that compositing
            would be re-evaluated (unlike size changes due to style updates). Fix by
            having RenderLayer::contentChanged() also check for ImageChanged.

            Test: compositing/fixed-image-loading.html

            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::contentChanged):

2014-08-13  Lucas Forschler  <lforschler@apple.com>

        Merge r172507

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

            [MSE][Mac] Seeking to the very beginning of a buffered range stalls video playback
            https://bugs.webkit.org/show_bug.cgi?id=135865

            Reviewed by Eric Carlson.

            AVSampleBufferRenderSynchronizer will report a current time of about 100ms or so before
            the destination seek time when seeking. It does this in order to pre-roll the synchronized
            audio renderer, but this can lead to playback stalling when MediaSource::monitorSourceBuffers()
            looks at the media element's current time and determines that the current time is 100ms before
            any buffered samples.

            Clamp the value of currentMediaTime() to, at a minimum, the last requested seek time. This was
            the suggested course of action from <rdar://problem/17789374>.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

2014-08-13  Lucas Forschler  <lforschler@apple.com>

        Merge r172501

    2014-08-12  Tim Horton  <timothy_horton@apple.com>

            Small region (~1px tall) where you get the selection button instead of the phone number overlay
            https://bugs.webkit.org/show_bug.cgi?id=135852
            <rdar://problem/17992795>

            Reviewed by Enrica Casucci.

            * WebCore.exp.in:

2014-08-13  Lucas Forschler  <lforschler@apple.com>

        Merge r172383

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

            Yelp phone number highlights often disappear
            https://bugs.webkit.org/show_bug.cgi?id=135789
            <rdar://problem/17971057>

            Reviewed by Brady Eidson.

            * editing/Editor.cpp:
            (WebCore::Editor::scanSelectionForTelephoneNumbers):
            (WebCore::Editor::clearDataDetectedTelephoneNumbers): Deleted.
            * editing/Editor.h:
            (WebCore::Editor::detectedTelephoneNumberRanges):
            * page/EditorClient.h:
            (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
            Cache and expose detected telephone number ranges on Editor.
            Change selectedTelephoneNumberRangesChanged to take no arguments; it's
            just a notification now.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172471

    2014-08-12  Brent Fulgham  <bfulgham@apple.com>

            [Win] Unreviewed build fix after r17425

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Remove
            unused 'currentTime' declaration from header file. This is now fully implemented
            in platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Rollout r172278

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172425

    2014-08-11  Brent Fulgham  <bfulgham@apple.com>

            [Mac, iOS] Some media content never reaches full 'loaded' state
            https://bugs.webkit.org/show_bug.cgi?id=135814
            <rdar://problem/17476923>

            Reviewed by Jer Noble.

            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
            (WebCore::MediaPlayerPrivateAVFoundation::duration): Change to a wrapper that just calls
            the durationDouble method and narrows to a float.
            (WebCore::MediaPlayerPrivateAVFoundation::durationDouble): Revised version of duration
            that works with doubles.
            (WebCore::MediaPlayerPrivateAVFoundation::currentTime): Wrapper that calls the
            currentTimeDouble method and narrows to a float.
            (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Use durationDouble for
            comparison with passed 'time' argument (which is a double).
            (WebCore::MediaPlayerPrivateAVFoundation::didEnd): Use 'currentTimeDouble' so we can
            cache the double precision version of this value.
            (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Use 'durationDouble' since
            the rest of the calculation is in terms of doubles.
            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
            (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Convert to 'double'. All
            uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
            (WebCore::MediaPlayerPrivateAVFoundationCF::currentTimeDouble): Switch from float implementation.
            (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Deleted. (Moved to parent class)
            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Convert to 'double'. All
            uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTimeDouble): Switch from floating implementation.
            (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted. (Moved to parent class)

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172424

    2014-08-11  Enrica Casucci  <enrica@apple.com>

            Improve look and feel of combined service menu..
            https://bugs.webkit.org/show_bug.cgi?id=135824
            <rdar://problem/17936880>

            Reviewed by Tim Horton.

            Adding some localizable strings.

            * English.lproj/Localizable.strings:

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172428

    2014-08-11  Mark Rowe  <mrowe@apple.com>

            Fix the Mac build.

            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
            #if a function that's only used on iOS.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172422

    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-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172421

    2014-08-11  Roger Fong  <roger_fong@apple.com>

            Adjustments to CueBox CSS Width calculations Part 2.
            https://bugs.webkit.org/show_bug.cgi?id=135820
            <rdar://problem/17954473>.

            Reviewed by Brent Fulgham.

            Two adjustments made:
            a) The default font size used was incorrect. It is not just 10px, 
            but should be based off a percentage of the video size.
            b) The top/left CSS property needs to be adjusted appropriately if the cue
            is center aligned and we change the cue's size such that the cue remains centered.
            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
            * html/track/VTTCue.cpp:
            (WebCore::VTTCueBox::applyCSSProperties):
            * html/track/VTTCue.h: Remove unnecessary constant.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172417

    2014-08-11  Beth Dakin  <bdakin@apple.com>

            Fixed backgrounds don't paint in blurred inset areas
            https://bugs.webkit.org/show_bug.cgi?id=135712

            Reviewed by Simon Fraser.

            Background geometry calculations for fixed background need to use the larger 
            visible rect.

            The first version of this patch caused a regression because it universally 
            adjusted the value for top to account for the inset whether or not the 
            viewportRect location was adjusted for the same. This version fixes that — those 
            two changes go hand-in-hand.
            * rendering/RenderBoxModelObject.cpp:
            (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172404

    2014-08-11  Timothy Hatcher  <timothy@apple.com>

            Web Inspector: console.profile shouldn't stop auto-recorded profiles
            https://bugs.webkit.org/show_bug.cgi?id=135810

            Reviewed by Joseph Pecoraro.

            * inspector/InspectorTimelineAgent.cpp:
            (WebCore::InspectorTimelineAgent::start): Added. Call internalStart. Set m_enabledFromFrontend.
            (WebCore::InspectorTimelineAgent::stop): Added. Calls internalStop. Clear m_enabledFromFrontend.
            (WebCore::InspectorTimelineAgent::internalStart): Renamed from start.
            (WebCore::InspectorTimelineAgent::internalStop): Renamed from stop.
            (WebCore::InspectorTimelineAgent::startFromConsole): Use internalStart.
            (WebCore::InspectorTimelineAgent::stopFromConsole): Use internalStop. Only stop if !m_enabledFromFrontend.
            (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Initialize m_enabledFromFrontend.
            * inspector/InspectorTimelineAgent.h: Added m_enabledFromFrontend.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172397

    2014-08-11  Brent Fulgham  <bfulgham@apple.com>

            [Win] Adjust build script for Windows production build.
            https://bugs.webkit.org/show_bug.cgi?id=135806
            <rdar://problem/17978299>

            Reviewed by Timothy Hatcher.

            * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy file needed
            for WebInspectorUI build.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172373

    2014-08-09  Zalan Bujtas  <zalan@apple.com>

            Subpixel rendering: Transforms on non-compositing layers leave bits behind when the box boundaries changes.
            https://bugs.webkit.org/show_bug.cgi?id=135786

            Reviewed by Simon Fraser.

            Since we don't control the transformed context painting's snapping strategy, our best bet to fully
            include the transformed box when requesting for repaint is to use enclosing.
            Pixelsnapping doesn't work here for all cases. For example, a scaled box at 0.8px can be anti-aliased painted
            both at 0.5px and 1px, while with pixelsnapping we'd expect it to be painted starting from 1px;

            Test: fast/repaint/hidpi-transform-on-subpixel-repaintrect.html

            * rendering/RenderBox.cpp:
            (WebCore::RenderBox::computeRectForRepaint): enclose the result of the transform.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172365

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

            [WK2] Scrolling does not work inside nested frames
            https://bugs.webkit.org/show_bug.cgi?id=135775
            <rdar://problem/17959896>

            Reviewed by Tim Horton.

            r169733 added an "isMainFrame" check in AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged.
            However we have to rebuild the non-fast-scrollable region when any subframe changes,
            even a deeply nested one. So always rebuild it, starting from the root frame.

            Fixes scrolling on nested framesets like http://www.opengl.org/sdk/docs/man3/.

            Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html

            * page/scrolling/AsyncScrollingCoordinator.cpp:
            (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172351

    2014-08-08  Roger Fong  <roger_fong@apple.com>

            Adjustments to CueBox CSS Width calculations.
            https://bugs.webkit.org/show_bug.cgi?id=135759
            <rdar://problem/17954473>.

            Reviewed by Eric Carlson.

            This is a followup patch that addresses some of the test failures caused by r172224.
            These tests were skipped in r172253.
            * html/shadow/MediaControlElements.cpp:
            (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
            Tell the cue boxes that they need to be updated when the font size specified in the user prefs changes.

            Cap width to 100%, calculate max-width in percentages instead of pixels.
            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
            * html/track/VTTCue.cpp:
            (WebCore::VTTCueBox::applyCSSProperties):

            (WebCore::VTTCue::setFontSize):
            Remove some unnecessary code that doesn't actually work.
            Make sure to tell cuebox that it needs to be updated.
            * html/track/VTTCue.h: Change float constant to double.

2014-08-12  Lucas Forschler  <lforschler@apple.com>

        Merge r172235

    2014-08-07  Gordon Sheridan  <gordon_sheridan@apple.com>

            Provide methods to clear undesired references to HistoryItems that have been removed from the back/forard list.
            https://bugs.webkit.org/show_bug.cgi?id=135634
            <rdar://problem/17388461>

            Reviewed by Brady Eidson.

            No new tests.  Would require an API test that also needs an httpd, which we don't currently support.

            * WebCore.exp.in:
            Added export for Page::clearPreviousItemFromAllPages.

            * loader/HistoryController.cpp:
            (WebCore::HistoryController::clearPreviousItem):
            Clear m_previousItem and iterate over children recursively calling clearPreviousItem().
            The m_previousItem is cleared for the target HistoryController, and all of its descendents.

            * loader/HistoryController.h:
            Declared HistoryController::clearPreviousItem.

            * page/Page.cpp:
            (WebCore::Page::clearPreviousItemFromAllPages):
            Iterate over each page in the web process, checking if the previous item of
            the HistoryController for the main frame is the same as the item being removed. If so, the
            frameTree is traversed and each associated HistoryController has its m_previousItem cleared.

            * page/Page.h:
            Declared Page::clearPreviousItemFromAllPages.

2014-08-08  Lucas Forschler  <lforschler@apple.com>

        Merge r172332

    2014-08-07  Commit Queue  <commit-queue@webkit.org>

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

            broke background-attachment-fixed with backround-size-contain
            (e.g. iCloud.com) (Requested by thorton on #webkit).

            Reverted changeset:

            "Fixed backgrounds don't paint in blurred inset areas"
            https://bugs.webkit.org/show_bug.cgi?id=135712
            http://trac.webkit.org/changeset/172291

2014-08-07  Lucas Forschler  <lforschler@apple.com>

        Merge r172287

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

            [EME][Mac] Error codes returned by AVSampleBufferDisplayLayer are negative; clip when passed to JavaScript as doubles.
            https://bugs.webkit.org/show_bug.cgi?id=135710

            Reviewed by Brent Fulgham.

            Return the absolute value of the error codes returned by AVSampleBufferDisplayLayer, so that the conversion from
            unsigned -> double does not clip due to the (converted) value being greater than 2^53.

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

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge patch from <rdar://problem/17952779>.

    2014-08-07  Brent Fulgham  <bfulgham@apple.com>

            [Win] Branch-only build workaround.

            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Use custom
            DirectX header for branch build.

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172301

    2014-08-07  Enrica Casucci  <enrica@apple.com>

            [Services with UI] Action menu does not appear if selection includes both text and an image.
            https://bugs.webkit.org/show_bug.cgi?id=135731
            <rdar://problem/17837491>

            Reviewed by Brady Eidson.

            When collecting selection rects via SelectionRectGatherer we should also note if the selection
            contains non text elements. This way the Notifier class can send that information to ServicesOverlayController
            to properly handle the highlight for the service.

            * editing/SelectionRectGatherer.cpp:
            (WebCore::SelectionRectGatherer::SelectionRectGatherer):
            (WebCore::SelectionRectGatherer::Notifier::~Notifier):
            (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
            * editing/SelectionRectGatherer.h:
            (WebCore::SelectionRectGatherer::setTextOnly):
            (WebCore::SelectionRectGatherer::isTextOnly):
            * page/EditorClient.h:
            (WebCore::EditorClient::selectionRectsDidChange):
            * rendering/RenderView.cpp:
            (WebCore::RenderView::applySubtreeSelection):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172293

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

            [Mac] Parental Controls content filter is mistakenly enabled for HTTP responses
            https://bugs.webkit.org/show_bug.cgi?id=135730

            Reviewed by Brady Eidson.

            On the Mac, the WebFilterEvaluator (Parental Controls) content filter should only be enabled for HTTPS
            responses. During iOS upstreaming we mistakenly enabled it for HTTP responses as well, and this causes HTTP
            responses to be filtered twice -- once by the Parental Controls HTTP proxy and once by WebCore. Revert to the
            pre-upstreaming behavior and only enable the content filter for HTTPS responses.

            No new tests. Content filtering is not testable from WebKit.

            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::responseReceived): Passed the response to ContentFilter::canHandleResponse().
            * platform/ContentFilter.h:
            * platform/mac/ContentFilterMac.mm:
            (WebCore::ContentFilter::canHandleResponse): Renamed from isEnabled(). Checks the response's scheme on Mac to
            determine whether WebFilterEvaluator should be used.
            (WebCore::ContentFilter::isEnabled): Deleted.

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172291

    2014-08-07  Beth Dakin  <bdakin@apple.com>

            Fixed backgrounds don't paint in blurred inset areas
            https://bugs.webkit.org/show_bug.cgi?id=135712

            Reviewed by Simon Fraser.

            Background geometry calculations for fixed background need to use the larger 
            visible rect. 

            * rendering/RenderBoxModelObject.cpp:
            (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172275

    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  Dana Burkart <dburkart@apple.com>

        Merge r172231

    2014-08-07  Roger Fong  <roger_fong@apple.com>

            Unreviewed build fix attempt #2 following r172224.

            * html/track/VTTCue.cpp:
            (WebCore::VTTCueBox::applyCSSProperties):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172228

    2014-08-07  Roger Fong  <roger_fong@apple.com>

            Unreviewed build fix following r172224.

            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
            * html/track/VTTCue.cpp:
            (WebCore::VTTCueBox::applyCSSProperties):
            * html/track/VTTCue.h:

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172224

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

            Increase width of caption container if a larger font size is selected from user prefs.
            https://bugs.webkit.org/show_bug.cgi?id=135677.

            Reviewed by Brent Fulgham.

            * html/shadow/MediaControlElements.cpp:
            (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
            Upon creation of a VTTCueBox make sure to supply the font size set by the user prefs.
            * html/track/TextTrackCueGeneric.cpp:
            (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
            Increase the width of the cue box based on user prefs font size selection.

            * html/track/VTTCue.h:
            Keep track of the font size set in the user prefs for use when the cue boxes are created.
            (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
            * html/track/VTTCue.cpp:
            (WebCore::VTTCueBox::applyCSSProperties):
            Increase the width of the cue box based on user prefs font size selection.
            (WebCore::VTTCue::getDisplayTree):
            (WebCore::VTTCue::setFontSize):
            If the font size set is important then we don't want to use the font size set by user prefs, set it to 0.

2014-08-07  Dana Burkart <dburkart@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.

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172244

    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  Dana Burkart <dburkart@apple.com>

        Merge r172197

    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  Dana Burkart <dburkart@apple.com>

        Merge r172191

    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  Dana Burkart <dburkart@apple.com>

        Merge r172183

    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  Dana Burkart <dburkart@apple.com>

        Merge r172027

    2014-08-04  Chris Fleizach  <cfleizach@apple.com>

            AX: Select activity behavior does not work when an existing range is already selected
            https://bugs.webkit.org/show_bug.cgi?id=135579

            Reviewed by Mario Sanchez Prada.

            If you have an existing range selected, and try to apply a select and replace operation, like capitalize,
            searching for that range will fail because it skips the currently selected range.

            For these cases, it seems the best way is to start the search from the start position, rather than relying on the
            entire range.

            Updated existing test: platform/mac/accessibility/select-text.html

            * accessibility/AccessibilityObject.cpp:
            (WebCore::AccessibilityObject::selectText):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172005

    2014-08-04  Chris Fleizach  <cfleizach@apple.com>

            AX: isWordEndMatch should allow for multiple word selections
            https://bugs.webkit.org/show_bug.cgi?id=135573

            Reviewed by Mario Sanchez Prada.

            isWordEndMatch was searching from the beginning of the selected range, which meant
            that if the result was multiple words, we'd reject the result. 
            Instead, we should search from the end of the range, so that we encompass all words.

            Modified existing test: platform/mac/accessibility/select-text-should-match-whole-words.html

            * editing/TextIterator.cpp:
            (WebCore::SearchBuffer::isWordEndMatch):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r171997

    2014-08-04  Chris Fleizach  <cfleizach@apple.com>

            AX: SelectText functionality always selects text after current selection even if closer selection is behind it
            https://bugs.webkit.org/show_bug.cgi?id=135546

            Reviewed by Mario Sanchez Prada.

            Logic was incorrect for comparing ranges found before the current selection.
            ASSERT was incorrect for allowed ranges. We need to allow ranges that are right at the boundaries of our found ranges.

            Extended existing test: platform/mac/accessibility/select-text.html

            * accessibility/AccessibilityObject.cpp:
            (WebCore::rangeClosestToRange):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r171996

    2014-08-04  Chris Fleizach  <cfleizach@apple.com>

            AX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning letters of a word
            https://bugs.webkit.org/show_bug.cgi?id=135547

            Reviewed by Mario Sanchez Prada.

            Allow text search to specify that it wants to match end of words as well as start of words.
            This allows select text criteria to match on whole words only.

            Test: platform/mac/accessibility/select-text-should-match-whole-words.html

            * accessibility/AccessibilityObject.cpp:
            (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
            * editing/FindOptions.h:
            * editing/TextIterator.cpp:
            (WebCore::SearchBuffer::isWordEndMatch):
            (WebCore::SearchBuffer::search):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r171994

    2014-08-04  Chris Fleizach  <cfleizach@apple.com>

            AX: The Dictation command "Replace <phrase> with <phrase>" always capitalizes the replacement string
            https://bugs.webkit.org/show_bug.cgi?id=135557

            Reviewed by Mario Sanchez Prada.

            When replacing text, we should match the capitalization of the word being replaced 
            (unless the replacement looks like an abbreviation).   
     
            Test: platform/mac/accessibility/find-and-replace-match-capitalization.html

            * accessibility/AccessibilityObject.cpp:
            (WebCore::AccessibilityObject::selectText):

2014-08-07  Dana Burkart <dburkart@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):

2014-08-07  Dana Burkart <dburkart@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-07  Dana Burkart <dburkart@apple.com>

        Merge r172202

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

            [Win] Correct build errors when WebGL Disabled
            https://bugs.webkit.org/show_bug.cgi?id=135687

            Unreviewed build fix.

            * WebCore.vcxproj/WebCore.vcxproj: Don't build Cairo files
            when building CG.
            * platform/graphics/GLContext.cpp: Correct use of 3D_GRAPHICS macro.
            * platform/graphics/GraphicsContext3DPrivate.cpp: Ditto.
            * platform/graphics/opengl/GLPlatformContext.cpp: Ditto.
            * platform/graphics/opengl/GLPlatformSurface.cpp: Ditto.

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172195

    2014-08-06  Enrica Casucci  <enrica@apple.com>

            Services menu doesn't show up after you defocus/refocus the Safari window.
            https://bugs.webkit.org/show_bug.cgi?id=135678
            <rdar://problem/17929247>

            Reviewed by Tim Horton.

            In setSelection we create a SelectionRectGatherer::Notifier object that will notify
            SelectionOverlayController about changes to the selection rects.
            Upon creation, the list of selections rects is cleared, since it is populated by
            the code that collects the selection rects. That code is never called
            when setSelection won't change the selection, which the case when the window is
            activated. The fix consists in postponing the SelectionRectGatherer::Notifier object
            creation until we know for sure that the selection is indeed going to change.
            
            * rendering/RenderView.cpp:
            (WebCore::RenderView::setSelection):

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172193

    2014-08-06  Brady Eidson  <beidson@apple.com>

            IDB transactions never reset if the Web Process ends before cleaning up
            https://bugs.webkit.org/show_bug.cgi?id=135218

            Reviewed by David Kilzer.

            No new tests (Covered by existing tests).

            * Modules/indexeddb/IDBServerConnection.h: Add sync versions of reset/rollback.

            * Modules/indexeddb/IDBTransactionBackend.cpp:
            (WebCore::IDBTransactionBackend::abort): Call the sync versions.

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172183

    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  Dana Burkart <dburkart@apple.com>

        Merge r172179

    2014-08-06  Tim Horton  <timothy_horton@apple.com>

            Document-relative overlays disappear after doing page-cache navigations
            https://bugs.webkit.org/show_bug.cgi?id=135669
            <rdar://problem/17929171>

            Reviewed by Simon Fraser.

            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
            When navigating from one page to another, the document-relative overlay
            layer is moved from the layer tree of the RenderLayerCompositor of the
            first RenderView to the layer tree of the RenderLayerCompositor of the
            new RenderView, upon layer tree construction.
            When going "back" via a page cache navigation, we don't rebuild the
            layer tree, and just assume that it is in a valid state.
            However, the document-relative overlay layer was *moved*, and as such,
            needs to be moved back. To do this, reattach the document-relative
            overlay layer whenever the root layer attachment of a RenderLayerCompositor
            changes, which will happen in the right order when going back to a cached page.

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172172

    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-07  Dana Burkart <dburkart@apple.com>

        Merge r172160

    2014-08-05  Brent Fulgham  <bfulgham@apple.com>

            [Mac] Unable to scroll to bottom of nested scrollable areas
            https://bugs.webkit.org/show_bug.cgi?id=135637
            <rdar://problem/17910241>

            Reviewed by Zalan Bujtas.

            Test: platform/mac/fast/scrolling/scroll-latched-nested-div.html

            Avoid truncating the fractional portion of scroll ranges.

            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::updateScrollbarsAfterLayout): Round
            the LayoutUnit values for scroll width and height rather than
            truncating.

2014-08-07  Dana Burkart <dburkart@apple.com>

        Merge r172159

    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-07  Dana Burkart <dburkart@apple.com>

        Merge r172151

    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-07  Dana Burkart <dburkart@apple.com>

        Merge r172112

    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-07  Dana Burkart  <dburkart@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 r172025. <rdar://problem/17715503>

    2014-08-04  Jer Noble  <jer.noble@apple.com>

            [MSE] Videos will report a stall when within 1 frame-duration before the end of a movie.
            https://bugs.webkit.org/show_bug.cgi?id=135586

            Reviewed by Eric Carlson.

            Under certain circumstances, videos which are within 1/24 seconds before the end of a media stream when
            monitorSourceBuffers() is called will fail the hasFutureTime() check. This is because hasFutureTime()
            checks whether enough media is buffered to play back at least some time in the future, but when the
            current time is close to the duration, not enough data is buffered to satisfy that check.

            Add some logic which will break out early when the SourceBuffer has buffered up to and including the
            media's duration, and return that the buffer indeed hasFutureTime() available.

            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::hasFutureTime):

2014-08-05  Dana Burkart  <dburkart@apple.com>

        Merge r172114

    2014-08-05  Brent Fulgham  <bfulgham@apple.com>

            [Win] Build attempts to use ANGLE when not building WebGL.
            https://bugs.webkit.org/show_bug.cgi?id=135630
            <rdar://problem/135630>

            Unreviewed build fix.

            * platform/graphics/win/GraphicsContext3DWin.cpp: Move #include of GraphicsContext3D.h
            inside USE(3D_GRAPHICS) guard.

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r172083

    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  Lucas Forschler  <lforschler@apple.com>

        Merge r172053

    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  Lucas Forschler  <lforschler@apple.com>

        Merge r172039

    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  Lucas Forschler  <lforschler@apple.com>

        Merge r172032

    2014-08-05  Jer Noble  <jer.noble@apple.com>

            [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
            https://bugs.webkit.org/show_bug.cgi?id=135422

            Reviewed by Eric Carlson.

            Three related fixes:

            In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush
            samples, so that the next time samples are re-enqueued, the starting point for re-enqueueing
            is correct.

            In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue
            if they are before the current media time.

            When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
            the SourceBufferPrivate may signal that it's ready for new samples through the
            sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
            continue to provideMediaData(), as that will append samples from the prior-to-seeking media
            timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
            display those frames as quickly as possible (the "fast forward" behavior) in order to catch
            up to the new current time.

            If a re-enqueue is pending, don't provide media data in response to being notified that the
            SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
            are appended.

            Also, don't provide media data if we are waiting for a seek to complete.

            * Modules/mediasource/MediaSource.h:
            (WebCore::MediaSource::isSeeking): Convenience method.
            * Modules/mediasource/SourceBuffer.cpp:
            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
            (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
            (WebCore::SourceBuffer::reenqueueMediaForTime):

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r172028

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

            AX: Select text activity should return replaced text instead of previously selected text
            https://bugs.webkit.org/show_bug.cgi?id=135595

            Reviewed by Mario Sanchez Prada.

            When the select activity API is used to replace text, the replacement string should be returned instead of the old selected text.

            Updated existing test: platform/mac/accessibility/select-text.html

            * accessibility/AccessibilityObject.cpp:
            (WebCore::AccessibilityObject::selectText):

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r172026

    2014-08-04  Jer Noble  <jer.noble@apple.com>

            [MSE][Mac] Seeking past buffered range will not resume playback when seek completes.
            https://bugs.webkit.org/show_bug.cgi?id=135591

            Reviewed by Eric Carlson.

            If a seek is delayed due to seeking into an unbuffered area, playback will not be restarted
            at that point. Instead, playback must resume when enough media data has been added, and
            the MediaSource indicates the seek should complete.

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

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r172018

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

            Lots of crashes in WebKit1 after r172013.
            https://bugs.webkit.org/show_bug.cgi?id=135582
            <rdar://problem/17837636>

            Reviewed by Enrica Casucci.

            * editing/SelectionRectGatherer.cpp:
            (WebCore::SelectionRectGatherer::addRect):
            (WebCore::SelectionRectGatherer::addGapRects):
            Don't try to do local-to-absolute coordinate conversion if we don't have
            a repaint container, which happens a lot in WebKit1.

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r172013

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

            Selection services menu dropdown is in the wrong place when selecting some text on Yelp
            https://bugs.webkit.org/show_bug.cgi?id=135582
            <rdar://problem/17837636>

            Reviewed by Simon Fraser.

            * editing/SelectionRectGatherer.cpp:
            (WebCore::SelectionRectGatherer::addRect):
            (WebCore::SelectionRectGatherer::addGapRects):
            (WebCore::SelectionRectGatherer::addRects): Deleted.
            Rename addRects to addGapRects for clarity.
            Map rects and gapRects to absolute RenderView coordinates so that
            they are in a form WebKit2 can use. Previously they were sometimes
            relative to a different repaint container, but that information was
            lost when moving through SelectionRectGatherer.

            Ideally we would keep selection rects as full quads instead of rects
            for more of their life, but that problem is much deeper than just SelectionRectGatherer.

            * editing/SelectionRectGatherer.h:
            Add a comment clarifying the coordinate space of the stored selection rects.

            * rendering/RenderView.cpp:
            (WebCore::RenderView::applySubtreeSelection):
            Rename addRects to addGapRects for clarity.

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r172006

    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-05  Lucas Forschler  <lforschler@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-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171952

    2014-08-01  Beth Dakin  <bdakin@apple.com>

            Inspector highlights clipped at the bottom on the page in WK1 views with 
            contentInsets
            https://bugs.webkit.org/show_bug.cgi?id=135480
            -and corresponding-
            <rdar://problem/17850323>

            Forgot to commit this one very critical part with 
            http://trac.webkit.org/changeset/171951 

            * platform/ScrollView.cpp:
            (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171951

    2014-08-01  Beth Dakin  <bdakin@apple.com>

            Inspector highlights clipped at the bottom on the page in WK1 views with 
            contentInsets
            https://bugs.webkit.org/show_bug.cgi?id=135480
            -and corresponding-
            <rdar://problem/17850323>

            Reviewed by Simon Fraser.

            unscaledTotalVisibleContentSize() was the main function on Mac that was expected 
            to return the rect representing ALL visible content, including content that might 
            be in an inset area and obscured by UI elements. This patch re-names that function 
            to unscaledVisibleContentSizeIncludingObscuredArea(), and that patch makes that 
            function return the right thing in the platformWidget() case.

            Re-name.
            * inspector/InspectorOverlay.cpp:
            (WebCore::InspectorOverlay::update):

            Return platformVisibleContentSizeIncludingObscuredArea() for the platformWidget() 
            case and re-name.
            * platform/ScrollView.cpp:
            (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):

            This was just wrong. It was returning the big rectangle instead of the small one 
            for platformWidget().
            (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):

            New platform functions.
            (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
            (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
            (WebCore::ScrollView::unscaledTotalVisibleContentSize): Deleted.
            * platform/ScrollView.h:
            * platform/ios/ScrollViewIOS.mm:
            (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
            (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
            * platform/mac/ScrollViewMac.mm:
            (WebCore::ScrollView::platformVisibleContentRect):
            (WebCore::ScrollView::platformVisibleContentSize):
            (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
            (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):

            Re-name.
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
            (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
            (WebCore::RenderLayerCompositor::updateRootLayerPosition):
            (WebCore::RenderLayerCompositor::ensureRootLayer):

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r172047

    2014-08-05  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 Antoine Quint.

            Antoine found me on iMessage to tell me I'm an idiot and that I've
            forgotten how to write JavaScript. Embarrassingly, this code is what
            I originally had, but then second-guessed myself.

            * Modules/mediacontrols/mediaControlsiOS.js:
            (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need for the local
            variable or conditional statement, since null and "" both evaluate as false.

2014-08-05  Lucas Forschler  <lforschler@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-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171937

    2014-08-01  Jer Noble  <jer.noble@apple.com>

            [MSE][Mac] Volume is not remembered between items in a YouTube playlist
            https://bugs.webkit.org/show_bug.cgi?id=135479

            Reviewed by Eric Carlson.

            When an AVSampleBufferAudioRenderer is added to the player, set its -volume and -muted
            properties with the current values from the HTMLMediaElement. 

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

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171895

    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-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171932

    2014-08-01  Tim Horton  <timothy_horton@apple.com>

            Fix the iOS build after r171891

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

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171905

    2014-07-31  Timothy Horton  <timothy_horton@apple.com>

            Build fix for platforms where we should have automaticallyAdjustsContentInsets but it isn't public yet

            * platform/mac/ScrollViewMac.mm:

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171891

    2014-07-31  Beth Dakin  <bdakin@apple.com>

            Hit-testing broken in WebKit 1 views with AppKit's contentInsets
            https://bugs.webkit.org/show_bug.cgi?id=135434
            -and corresponding-
            <rdar://problem/17850323>

            Reviewed by Benjamin Poulain.

            AppKit's contentInsets are factored into scroll positions and mouse positions, but
            in WebCore, we generally want all of those things to be factored out so that, for
            example, the scroll position of a document pinned to the top is the same whether
            or not there is a contentInset. So to fix hit-testing in WebKit 1 views with
            contentInsets, this patch factors the inset out or into of all coordinate
            conversion methods just like we do for the WebKit2 contentInset.

            This patch also adds the ability to test WK1 platformContentInsets with
            window.internals, and it re-names convertFromRenderer to 
            convertFromRendererToContainingView and also re-names convertToRenderer to
            convertFromContainingViewToRenderer.

            ScrollView::topContentInset() takes an optional parameter indicating whether the
            caller wants the WebCore::Page contentInset or the platform content inset. It’s
            necessary to distinguish between these cases because there is a lot of code that
            only wants the WebCore::Page contentInset since that feature is actually
            implemented in WebCore as opposed to being implemented at the platform level.
            * WebCore.exp.in:
            * page/FrameView.cpp:
            (WebCore::FrameView::topContentInset):

            For layout test purposes, set the platforTopContentInset here if there is a 
            platformWidget().
            (WebCore::FrameView::topContentInsetDidChange):

            Re-named functions, also all coordinate conversion functions call 
            topContentInset(ManualOrPlatformContentInset)
            (WebCore::FrameView::convertFromContainingViewToRenderer):
            (WebCore::FrameView::convertToContainingView):
            (WebCore::FrameView::convertFromContainingView):
            (WebCore::FrameView::convertFromRenderer): Deleted.
            (WebCore::FrameView::convertToRenderer): Deleted.
            * page/FrameView.h:
            * page/Page.cpp:
            (WebCore::Page::setTopContentInset):
            * platform/ScrollView.cpp:
            (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
            (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
            (WebCore::ScrollView::contentsToRootView):
            (WebCore::ScrollView::rootViewToTotalContents):
            (WebCore::ScrollView::contentsToWindow):
            (WebCore::ScrollView::platformTopContentInset):
            (WebCore::ScrollView::platformSetTopContentInset):
            * platform/ScrollView.h:
            (WebCore::ScrollView::topContentInset):
            * platform/ios/ScrollViewIOS.mm:
            (WebCore::ScrollView::platformTopContentInset):
            (WebCore::ScrollView::platformSetTopContentInset):

            Implement new platform inset-related functions using AppKit's implementation.
            * platform/mac/ScrollViewMac.mm:
            (WebCore::ScrollView::platformTopContentInset):
            (WebCore::ScrollView::platformSetTopContentInset):

            When we set the scroll position for the documentView, we have to factor the inset
            back into the WebCore scroll position.
            (WebCore::ScrollView::platformSetScrollPosition):

            Re-named functions.
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::convertFromScrollbarToContainingView):
            (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
            * rendering/RenderListBox.cpp:
            (WebCore::RenderListBox::convertFromScrollbarToContainingView):
            (WebCore::RenderListBox::convertFromContainingViewToScrollbar):

2014-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171889

    2014-07-31  Tim Horton  <timothy_horton@apple.com>

            DOM::renderedImageForcingBlackText returns an image with the wrong logical size on 2x displays
            https://bugs.webkit.org/show_bug.cgi?id=135442
            <rdar://problem/17614632>

            Reviewed by Simon Fraser.

            * bindings/objc/DOM.mm:
            (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
            Scale the NSImage size by the device scale factor,
            similar to what we did for drag images in r167403.
            Ideally this scaling would happen in the code that
            generates the images, but this is a much larger change
            with much more regression potential.

2014-08-05  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-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171866

    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-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171866

    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-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171851

    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-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171292

    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-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171279

    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-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r171259

    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-30  Lucas Forschler  <lforschler@apple.com>

        Merge r171802

    2014-07-30  Dan Bernstein  <mitz@apple.com>

            <rdar://problem/17199364> [Mac] Popup button arrows appear on the left, underlapping text, when the UI layout direction is right-to-left
            https://bugs.webkit.org/show_bug.cgi?id=135426

            Reviewed by Dean Jackson.

            No test, because the UI layout direction in the test harness is always left-to-right.

            * rendering/RenderThemeMac.mm:
            (WebCore::RenderThemeMac::popupButton): Forced the user interface layout direction of the
            NSPopUpButtonCell to left-to-right. Added a FIXME about how we could make this vary based on
            the direction of the <select>, though that would require additional changes elsewhere.

2014-07-30  Lucas Forschler  <lforschler@apple.com>

        Merge r171785

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

            Crash when using 'em' units to specify font-size inside animation keyframe.
            <https://webkit.org/b/135395>
            <rdar://problem/17851910>

            We'd forgotten to initialize the "parent style" when resolving keyframe
            styles, and this led to a crash in length conversion where the code
            assumes a parent style will be present.

            To keep this fix minimal, simply make the "parent style" a clone of the
            base element style.

            Reviewed by Simon Fraser.

            Test: fast/animation/keyframe-with-font-size-in-em-units.html

            * css/StyleResolver.cpp:
            (WebCore::StyleResolver::styleForKeyframe):

2014-07-30  Lucas Forschler  <lforschler@apple.com>

        Merge r171766

    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  Lucas Forschler  <lforschler@apple.com>

        Merge r171749

    2014-07-29  Brady Eidson  <beidson@apple.com>

            Make WKOriginDataManager actually operate on IndexedDatabases.
            https://bugs.webkit.org/show_bug.cgi?id=135346

            Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)

            * WebCore.exp.in:

2014-07-30  Lucas Forschler  <lforschler@apple.com>

        Merge r171718

    2014-07-28  Zalan Bujtas  <zalan@apple.com>

            REGRESSION(r164133): Selection disappears after scrolling on nytimes.com
            https://bugs.webkit.org/show_bug.cgi?id=135361

            Reviewed by Ryosuke Niwa.

            Ensure that when a RenderElement, part of the current selection is removed,
            we recalculate and update the selection soon after layout.

            Test: fast/dynamic/selection-gets-cleared-when-part-of-it-gets-removed.html

            * editing/FrameSelection.cpp:
            (WebCore::FrameSelection::setNeedsSelectionUpdate):
            (WebCore::FrameSelection::didLayout): didLayout name reflects its functionality better.
            (WebCore::FrameSelection::layoutDidChange): Deleted.
            * editing/FrameSelection.h: : move some functions to private.
            * page/FrameView.cpp:
            (WebCore::FrameView::performPostLayoutTasks):
            * rendering/RenderBlockFlow.cpp:
            (WebCore::RenderBlockFlow::willBeDestroyed):
            * rendering/RenderElement.cpp:
            (WebCore::RenderElement::removeChildInternal):
            * rendering/RenderInline.cpp:
            (WebCore::RenderInline::willBeDestroyed):

2014-07-29  Lucas Forschler  <lforschler@apple.com>

        Merge r171711

    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  Lucas Forschler  <lforschler@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):

2014-07-29  Lucas Forschler  <lforschler@apple.com>

        Merge r171703

    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  Lucas Forschler  <lforschler@apple.com>

        Merge r171702

    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  Lucas Forschler  <lforschler@apple.com>

        Merge r171700

    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  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-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::Gam