Title: [237218] trunk
Revision
237218
Author
aj...@chromium.org
Date
2018-10-17 06:52:32 -0700 (Wed, 17 Oct 2018)

Log Message

Flaky IntersectionObserver web platform tests involving style updates
https://bugs.webkit.org/show_bug.cgi?id=189091

Reviewed by Simon Fraser.

Source/WebCore:

Update intersection observations when flushing layers from the WebProcess
to the UIProcess to make the timing of these updates more predictable, and
more consistent with the IntersectionObserver spec, since the spec expects
these updates to happen as part of the "Update the rendering" step in the
HTML EventLoop.

Getting a similar approach to work with WK1 seems to add more complexity than it's
worth, since flushes don't happen for scrolls handled by platform widgets, and
flushes for other invalidations only happen when in compositing mode.

The only remaining timer-driven intersection observation update is for handling
the initial observation on a newly added target, which needs to happen even if
there are no changes triggering a flush.

Tested by the following tests no longer being flaky:
    imported/w3c/web-platform-tests/intersection-observer/bounding-box.html
    imported/w3c/web-platform-tests/intersection-observer/display-none.html
    imported/w3c/web-platform-tests/intersection-observer/containing-block.html

* dom/Document.cpp:
(WebCore::Document::resolveStyle):
(WebCore::Document::updateIntersectionObservations):
(WebCore::Document::scheduleForcedIntersectionObservationUpdate):
(WebCore::Document::scheduleIntersectionObservationUpdate): Deleted.
* dom/Document.h:
* page/FrameView.cpp:
(WebCore::FrameView::flushCompositingStateForThisFrame):
(WebCore::FrameView::viewportContentsChanged):
* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::observe):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::willDisplayPage):
(WebCore::Page::addDocumentNeedingIntersectionObservationUpdate):
(WebCore::Page::updateIntersectionObservations):
(WebCore::Page::scheduleForcedIntersectionObservationUpdate):
* page/Page.h:

Source/WebKit:

Add a WebPage::willDisplayPage bottleneck that gets called when flushing layers
or, in the non-composited case, when rendering the page into a bitmap.

* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::updateBackingStoreState):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willDisplayPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

LayoutTests:

Remove expectation for tests that are no longer flaky.

Skip IntersectionObserver tests on WK1.

* TestExpectations:
* platform/mac-wk1/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (237217 => 237218)


--- trunk/LayoutTests/ChangeLog	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/LayoutTests/ChangeLog	2018-10-17 13:52:32 UTC (rev 237218)
@@ -1,3 +1,17 @@
+2018-10-17  Ali Juma  <aj...@chromium.org>
+
+        Flaky IntersectionObserver web platform tests involving style updates
+        https://bugs.webkit.org/show_bug.cgi?id=189091
+
+        Reviewed by Simon Fraser.
+
+        Remove expectation for tests that are no longer flaky.
+
+        Skip IntersectionObserver tests on WK1.
+
+        * TestExpectations:
+        * platform/mac-wk1/TestExpectations:
+
 2018-10-17  Charlie Turner  <ctur...@igalia.com>
 
         [EME] media/encrypted-media/mock-MediaKeySystemAccess.html crashes in CDM::createInstance

Modified: trunk/LayoutTests/TestExpectations (237217 => 237218)


--- trunk/LayoutTests/TestExpectations	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/LayoutTests/TestExpectations	2018-10-17 13:52:32 UTC (rev 237218)
@@ -2842,10 +2842,6 @@
 webkit.org/b/175609 imported/w3c/web-platform-tests/IndexedDB/idbdatabase-deleteObjectStore-exception-order.htm [ Pass Failure ]
 webkit.org/b/175609 imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html [ Pass Failure ]
 
-webkit.org/b/189091 imported/w3c/web-platform-tests/intersection-observer/bounding-box.html [ Pass Failure ]
-webkit.org/b/189091 imported/w3c/web-platform-tests/intersection-observer/display-none.html [ Pass Failure ]
-webkit.org/b/189091 imported/w3c/web-platform-tests/intersection-observer/containing-block.html [ Pass Failure ]
-
 webkit.org/b/186848 imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html [ Pass Failure ]
 webkit.org/b/179176 svg/wicd/test-rightsizing-a.xhtml [ Pass Failure ]
 

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (237217 => 237218)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2018-10-17 13:52:32 UTC (rev 237218)
@@ -524,7 +524,9 @@
 
 webkit.org/b/172044 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/open-request-queue.html [ Pass Timeout ]
 
-webkit.org/b/189731 intersection-observer/no-document-leak.html [ Pass Timeout ]
+# Not supported on WK1
+imported/w3c/web-platform-tests/intersection-observer [ Skip ]
+intersection-observer [ Skip ]
 
 webkit.org/b/180898 accessibility/mac/AOM-events.html [ Skip ]
 webkit.org/b/183023 accessibility/mac/AOM-events-all.html [ Skip ]

Modified: trunk/Source/WebCore/ChangeLog (237217 => 237218)


--- trunk/Source/WebCore/ChangeLog	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebCore/ChangeLog	2018-10-17 13:52:32 UTC (rev 237218)
@@ -1,3 +1,48 @@
+2018-10-17  Ali Juma  <aj...@chromium.org>
+
+        Flaky IntersectionObserver web platform tests involving style updates
+        https://bugs.webkit.org/show_bug.cgi?id=189091
+
+        Reviewed by Simon Fraser.
+
+        Update intersection observations when flushing layers from the WebProcess
+        to the UIProcess to make the timing of these updates more predictable, and
+        more consistent with the IntersectionObserver spec, since the spec expects
+        these updates to happen as part of the "Update the rendering" step in the
+        HTML EventLoop.
+
+        Getting a similar approach to work with WK1 seems to add more complexity than it's
+        worth, since flushes don't happen for scrolls handled by platform widgets, and
+        flushes for other invalidations only happen when in compositing mode.
+
+        The only remaining timer-driven intersection observation update is for handling
+        the initial observation on a newly added target, which needs to happen even if
+        there are no changes triggering a flush.
+
+        Tested by the following tests no longer being flaky:
+            imported/w3c/web-platform-tests/intersection-observer/bounding-box.html
+            imported/w3c/web-platform-tests/intersection-observer/display-none.html
+            imported/w3c/web-platform-tests/intersection-observer/containing-block.html
+
+        * dom/Document.cpp:
+        (WebCore::Document::resolveStyle):
+        (WebCore::Document::updateIntersectionObservations):
+        (WebCore::Document::scheduleForcedIntersectionObservationUpdate):
+        (WebCore::Document::scheduleIntersectionObservationUpdate): Deleted.
+        * dom/Document.h:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::flushCompositingStateForThisFrame):
+        (WebCore::FrameView::viewportContentsChanged):
+        * page/IntersectionObserver.cpp:
+        (WebCore::IntersectionObserver::observe):
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        (WebCore::Page::willDisplayPage):
+        (WebCore::Page::addDocumentNeedingIntersectionObservationUpdate):
+        (WebCore::Page::updateIntersectionObservations):
+        (WebCore::Page::scheduleForcedIntersectionObservationUpdate):
+        * page/Page.h:
+
 2018-10-17  Charlie Turner  <ctur...@igalia.com>
 
         [EME] Sanity check key ID length in the keyids init data format

Modified: trunk/Source/WebCore/dom/Document.cpp (237217 => 237218)


--- trunk/Source/WebCore/dom/Document.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebCore/dom/Document.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -510,7 +510,6 @@
     , m_documentClasses(documentClasses)
     , m_eventQueue(*this)
 #if ENABLE(INTERSECTION_OBSERVER)
-    , m_intersectionObservationUpdateTimer(*this, &Document::updateIntersectionObservations)
     , m_intersectionObserversNotifyTimer(*this, &Document::notifyIntersectionObserversTimerFired)
 #endif
     , m_loadEventDelayTimer(*this, &Document::loadEventDelayTimerFired)
@@ -1929,8 +1928,8 @@
         // Usually this is handled by post-layout.
         if (!frameView.needsLayout()) {
             frameView.frame().selection().scheduleAppearanceUpdateAfterStyleChange();
-            if (m_needsIntersectionObservationUpdate)
-                scheduleIntersectionObservationUpdate();
+            if (m_needsForcedIntersectionObservationUpdate)
+                page()->scheduleForcedIntersectionObservationUpdate(*this);
         }
 
         // As a result of the style recalculation, the currently hovered element might have been
@@ -7645,7 +7644,6 @@
 
 void Document::updateIntersectionObservations()
 {
-    ASSERT(m_needsIntersectionObservationUpdate);
     auto* frameView = view();
     if (!frameView)
         return;
@@ -7654,7 +7652,7 @@
     if (needsLayout || hasPendingStyleRecalc())
         return;
 
-    m_needsIntersectionObservationUpdate = false;
+    m_needsForcedIntersectionObservationUpdate = false;
 
     for (auto observer : m_intersectionObservers) {
         bool needNotify = false;
@@ -7719,13 +7717,15 @@
         m_intersectionObserversNotifyTimer.startOneShot(0_s);
 }
 
-void Document::scheduleIntersectionObservationUpdate()
+void Document::scheduleForcedIntersectionObservationUpdate()
 {
-    if (m_intersectionObservers.isEmpty() || m_intersectionObservationUpdateTimer.isActive())
+    ASSERT(!m_intersectionObservers.isEmpty());
+    if (m_needsForcedIntersectionObservationUpdate)
         return;
 
-    m_needsIntersectionObservationUpdate = true;
-    m_intersectionObservationUpdateTimer.startOneShot(0_s);
+    m_needsForcedIntersectionObservationUpdate = true;
+    if (auto* page = this->page())
+        page->scheduleForcedIntersectionObservationUpdate(*this);
 }
 
 void Document::notifyIntersectionObserversTimerFired()

Modified: trunk/Source/WebCore/dom/Document.h (237217 => 237218)


--- trunk/Source/WebCore/dom/Document.h	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebCore/dom/Document.h	2018-10-17 13:52:32 UTC (rev 237218)
@@ -1394,8 +1394,8 @@
     void addIntersectionObserver(IntersectionObserver&);
     void removeIntersectionObserver(IntersectionObserver&);
     unsigned numberOfIntersectionObservers() const { return m_intersectionObservers.size(); }
+    void scheduleForcedIntersectionObservationUpdate();
     void updateIntersectionObservations();
-    void scheduleIntersectionObservationUpdate();
 #endif
 
 #if ENABLE(MEDIA_STREAM)
@@ -1825,10 +1825,6 @@
 #if ENABLE(INTERSECTION_OBSERVER)
     Vector<WeakPtr<IntersectionObserver>> m_intersectionObservers;
     Vector<WeakPtr<IntersectionObserver>> m_intersectionObserversWithPendingNotifications;
-
-    // FIXME: Schedule intersection observation updates in a way that fits into the HTML
-    // EventLoop. See https://bugs.webkit.org/show_bug.cgi?id=160711.
-    Timer m_intersectionObservationUpdateTimer;
     Timer m_intersectionObserversNotifyTimer;
 #endif
 
@@ -2017,7 +2013,7 @@
 #endif
 
 #if ENABLE(INTERSECTION_OBSERVER)
-    bool m_needsIntersectionObservationUpdate { false };
+    bool m_needsForcedIntersectionObservationUpdate { false };
 #endif
 
 #if ENABLE(MEDIA_STREAM)

Modified: trunk/Source/WebCore/page/FrameView.cpp (237217 => 237218)


--- trunk/Source/WebCore/page/FrameView.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebCore/page/FrameView.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -1000,6 +1000,7 @@
 #endif
 
     renderView->compositor().flushPendingLayerChanges(&rootFrameForFlush == m_frame.ptr());
+
     return true;
 }
 
@@ -2008,8 +2009,12 @@
     });
 
 #if ENABLE(INTERSECTION_OBSERVER)
-    if (auto* document = frame().document())
-        document->scheduleIntersectionObservationUpdate();
+    if (auto* document = frame().document()) {
+        if (document->numberOfIntersectionObservers()) {
+            if (auto* page = frame().page())
+                page->addDocumentNeedingIntersectionObservationUpdate(*document);
+        }
+    }
 #endif
 }
 

Modified: trunk/Source/WebCore/page/IntersectionObserver.cpp (237217 => 237218)


--- trunk/Source/WebCore/page/IntersectionObserver.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebCore/page/IntersectionObserver.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -156,7 +156,7 @@
     auto* document = trackingDocument();
     if (!hadObservationTargets)
         document->addIntersectionObserver(*this);
-    document->scheduleIntersectionObservationUpdate();
+    document->scheduleForcedIntersectionObservationUpdate();
 }
 
 void IntersectionObserver::unobserve(Element& target)

Modified: trunk/Source/WebCore/page/Page.cpp (237217 => 237218)


--- trunk/Source/WebCore/page/Page.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebCore/page/Page.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -242,6 +242,9 @@
     , m_storageNamespaceProvider(*WTFMove(pageConfiguration.storageNamespaceProvider))
     , m_userContentProvider(*WTFMove(pageConfiguration.userContentProvider))
     , m_visitedLinkStore(*WTFMove(pageConfiguration.visitedLinkStore))
+#if ENABLE(INTERSECTION_OBSERVER)
+    , m_intersectionObservationUpdateTimer(*this, &Page::updateIntersectionObservations)
+#endif
     , m_sessionID(PAL::SessionID::defaultSessionID())
 #if ENABLE(VIDEO)
     , m_playbackControlsManagerUpdateTimer(*this, &Page::playbackControlsManagerUpdateTimerFired)
@@ -979,6 +982,13 @@
         m_performanceMonitor->didFinishLoad();
 }
 
+void Page::willDisplayPage()
+{
+#if ENABLE(INTERSECTION_OBSERVER)
+    updateIntersectionObservations();
+#endif
+}
+
 bool Page::isOnlyNonUtilityPage() const
 {
     return !isUtilityPage() && nonUtilityPageCount == 1;
@@ -1120,6 +1130,32 @@
     m_activityStateChangeObservers.remove(&observer);
 }
 
+#if ENABLE(INTERSECTION_OBSERVER)
+void Page::addDocumentNeedingIntersectionObservationUpdate(Document& document)
+{
+    if (m_documentsNeedingIntersectionObservationUpdate.find(&document) == notFound)
+        m_documentsNeedingIntersectionObservationUpdate.append(makeWeakPtr(document));
+}
+
+void Page::updateIntersectionObservations()
+{
+    m_intersectionObservationUpdateTimer.stop();
+    for (auto document : m_documentsNeedingIntersectionObservationUpdate) {
+        if (document)
+            document->updateIntersectionObservations();
+    }
+    m_documentsNeedingIntersectionObservationUpdate.clear();
+}
+
+void Page::scheduleForcedIntersectionObservationUpdate(Document& document)
+{
+    addDocumentNeedingIntersectionObservationUpdate(document);
+    if (m_intersectionObservationUpdateTimer.isActive())
+        return;
+    m_intersectionObservationUpdateTimer.startOneShot(0_s);
+}
+#endif
+
 void Page::suspendScriptedAnimations()
 {
     m_scriptedAnimationsSuspended = true;

Modified: trunk/Source/WebCore/page/Page.h (237217 => 237218)


--- trunk/Source/WebCore/page/Page.h	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebCore/page/Page.h	2018-10-17 13:52:32 UTC (rev 237218)
@@ -22,6 +22,7 @@
 
 #include "ActivityState.h"
 #include "DisabledAdaptations.h"
+#include "Document.h"
 #include "FindOptions.h"
 #include "FrameLoaderTypes.h"
 #include "LayoutMilestones.h"
@@ -325,6 +326,8 @@
     void didStartProvisionalLoad();
     void didFinishLoad(); // Called when the load has been committed in the main frame.
 
+    WEBCORE_EXPORT void willDisplayPage();
+
     // The view scale factor is multiplied into the page scale factor by all
     // callers of setPageScaleFactor.
     WEBCORE_EXPORT void setViewScaleFactor(float);
@@ -445,6 +448,12 @@
     WEBCORE_EXPORT void addActivityStateChangeObserver(ActivityStateChangeObserver&);
     WEBCORE_EXPORT void removeActivityStateChangeObserver(ActivityStateChangeObserver&);
 
+#if ENABLE(INTERSECTION_OBSERVER)
+    void addDocumentNeedingIntersectionObservationUpdate(Document&);
+    void scheduleForcedIntersectionObservationUpdate(Document&);
+    void updateIntersectionObservations();
+#endif
+
     WEBCORE_EXPORT void suspendScriptedAnimations();
     WEBCORE_EXPORT void resumeScriptedAnimations();
     bool scriptedAnimationsSuspended() const { return m_scriptedAnimationsSuspended; }
@@ -865,6 +874,14 @@
 
     HashSet<ActivityStateChangeObserver*> m_activityStateChangeObservers;
 
+#if ENABLE(INTERSECTION_OBSERVER)
+    Vector<WeakPtr<Document>> m_documentsNeedingIntersectionObservationUpdate;
+
+    // FIXME: Schedule intersection observation updates in a way that fits into the HTML
+    // EventLoop. See https://bugs.webkit.org/show_bug.cgi?id=160711.
+    Timer m_intersectionObservationUpdateTimer;
+#endif
+
 #if ENABLE(RESOURCE_USAGE)
     std::unique_ptr<ResourceUsageOverlay> m_resourceUsageOverlay;
 #endif

Modified: trunk/Source/WebKit/ChangeLog (237217 => 237218)


--- trunk/Source/WebKit/ChangeLog	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/ChangeLog	2018-10-17 13:52:32 UTC (rev 237218)
@@ -1,3 +1,27 @@
+2018-10-17  Ali Juma  <aj...@chromium.org>
+
+        Flaky IntersectionObserver web platform tests involving style updates
+        https://bugs.webkit.org/show_bug.cgi?id=189091
+
+        Reviewed by Simon Fraser.
+
+        Add a WebPage::willDisplayPage bottleneck that gets called when flushing layers
+        or, in the non-composited case, when rendering the page into a bitmap.
+
+        * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
+        (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+        (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
+        * WebProcess/WebPage/DrawingAreaImpl.cpp:
+        (WebKit::DrawingAreaImpl::display):
+        * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::willDisplayPage):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+
 2018-10-16  Patrick Griffis  <pgrif...@igalia.com>
 
         [GTK][WPE] Fix xdg-desktop-portal permissions from a sandbox

Modified: trunk/Source/WebKit/WebProcess/WebPage/AcceleratedDrawingArea.cpp (237217 => 237218)


--- trunk/Source/WebKit/WebProcess/WebPage/AcceleratedDrawingArea.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/WebProcess/WebPage/AcceleratedDrawingArea.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -252,6 +252,7 @@
         m_webPage.layoutIfNeeded();
         m_webPage.flushPendingEditorStateUpdate();
         m_webPage.scrollMainFrameIfNotAtMaxScrollPosition(scrollOffset);
+        m_webPage.willDisplayPage();
 
         if (m_layerTreeHost)
             m_layerTreeHost->sizeDidChange(m_webPage.size());

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp (237217 => 237218)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -189,6 +189,7 @@
 
     m_coordinator.syncDisplayState();
     m_webPage.flushPendingEditorStateUpdate();
+    m_webPage.willDisplayPage();
 
     if (!m_isValid || !m_coordinator.rootCompositingLayer())
         return;

Modified: trunk/Source/WebKit/WebProcess/WebPage/DrawingAreaImpl.cpp (237217 => 237218)


--- trunk/Source/WebKit/WebProcess/WebPage/DrawingAreaImpl.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/WebProcess/WebPage/DrawingAreaImpl.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -406,6 +406,7 @@
     if (m_layerTreeHost)
         return;
 
+    m_webPage.willDisplayPage();
     updateInfo.viewSize = m_webPage.size();
     updateInfo.deviceScaleFactor = m_webPage.corePage()->deviceScaleFactor();
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm (237217 => 237218)


--- trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm	2018-10-17 13:52:32 UTC (rev 237218)
@@ -334,6 +334,7 @@
     backingStoreCollection.willFlushLayers();
 
     m_webPage.layoutIfNeeded();
+    m_webPage.willDisplayPage();
 
     FloatRect visibleRect(FloatPoint(), m_viewSize);
     if (m_scrolledViewExposedRect)

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (237217 => 237218)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-10-17 13:52:32 UTC (rev 237218)
@@ -3392,6 +3392,11 @@
 }
 #endif
 
+void WebPage::willDisplayPage()
+{
+    m_page->willDisplayPage();
+}
+
 WebInspector* WebPage::inspector(LazyCreationPolicy behavior)
 {
     if (m_isClosed)

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (237217 => 237218)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2018-10-17 13:52:32 UTC (rev 237218)
@@ -289,6 +289,8 @@
     void didFlushLayerTreeAtTime(MonotonicTime);
 #endif
 
+    void willDisplayPage();
+
     enum class LazyCreationPolicy { UseExistingOnly, CreateIfNeeded };
 
     WebInspector* inspector(LazyCreationPolicy = LazyCreationPolicy::CreateIfNeeded);

Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (237217 => 237218)


--- trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2018-10-17 11:07:59 UTC (rev 237217)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2018-10-17 13:52:32 UTC (rev 237218)
@@ -419,6 +419,7 @@
 
         m_webPage.layoutIfNeeded();
         m_webPage.flushPendingEditorStateUpdate();
+        m_webPage.willDisplayPage();
 
         updateIntrinsicContentSizeIfNeeded();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to