WebKit Bugzilla
Attachment 371644 Details for
Bug 198664
: REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198664-20190607202114.patch (text/plain), 16.94 KB, created by
Said Abou-Hallawa
on 2019-06-07 20:21:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2019-06-07 20:21:15 PDT
Size:
16.94 KB
patch
obsolete
>Subversion Revision: 246229 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2c72d6f1bf895007b2ae184cdd8c39905a6ced89..3f2b878a1070607804723447cdcbb20654ee1aec 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,59 @@ >+2019-06-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately >+ https://bugs.webkit.org/show_bug.cgi?id=198664 >+ >+ Reviewed by Simon Fraser. >+ >+ Because WK1 is a single process, scheduleCompositingLayerFlush() has to >+ be called immediately when layers' update is needed. Otherwise no content >+ will be drawn for the current frame. Doing this will get smooth scrolling >+ back to WK1. >+ >+ RenderingUpdateScheduler now has three different scheduling methods: >+ >+ 1. scheduleTimedRenderingUpdate(): This is a two-steps scheduling method. >+ DisplayRefreshMonitor has to fire before scheduleCompositingLayerFlush() >+ is called. This is used by rAF, WebAnimations and intersection and >+ resize observers. >+ >+ 2. scheduleImmediateRenderingUpdate(): This is a one-step scheduling method. >+ layerTreeAsText() calls this method because it has to process the rendering >+ update within the current frame. >+ >+ 3. scheduleRenderingUpdate(): RenderLayerCompositor::scheduleLayerFlush() >+ calls this function to decide either immediately flush layers or wait >+ for the next timed frame. scheduleImmediateRenderingUpdate() will be >+ called for WK1. scheduleTimedRenderingUpdate() will be called for WK2. >+ >+ * animation/DocumentTimeline.cpp: >+ (WebCore::DocumentTimeline::scheduleAnimationResolution): >+ * dom/Document.cpp: >+ (WebCore::Document::scheduleTimedRenderingUpdate): >+ (WebCore::Document::scheduleInitialIntersectionObservationUpdate): >+ (WebCore::Document::updateResizeObservations): >+ (WebCore::Document::scheduleRenderingUpdate): Deleted. >+ * dom/Document.h: >+ * dom/ScriptedAnimationController.cpp: >+ (WebCore::ScriptedAnimationController::scheduleAnimation): >+ * page/ChromeClient.h: >+ * page/PageOverlayController.cpp: >+ (WebCore::PageOverlayController::didChangeViewExposedRect): >+ (WebCore::PageOverlayController::notifyFlushRequired): >+ * page/RenderingUpdateScheduler.cpp: >+ (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate): >+ (WebCore::RenderingUpdateScheduler::displayRefreshFired): >+ (WebCore::RenderingUpdateScheduler::scheduleImmediateRenderingUpdate): >+ (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate): >+ (WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush): Deleted. >+ * page/RenderingUpdateScheduler.h: >+ * page/ResizeObserver.cpp: >+ (WebCore::ResizeObserver::observe): >+ * page/mac/ServicesOverlayController.mm: >+ (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::layerTreeAsText): >+ > 2019-06-07 Megan Gardner <megan_gardner@apple.com> > > Extend quirks to emulate bold/italic/underline in hidden editable areas >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index e8d099365b10c918d5ccac368401dda01953947b..c4334a9723881ce33fa8281f4a9d95df956ce3a4 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1 +1,13 @@ >+2019-06-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately >+ https://bugs.webkit.org/show_bug.cgi?id=198664 >+ >+ Reviewed by Simon Fraser. >+ >+ WK1 has to skip using DisplayRefreshMonitor when layers need to be updated. >+ >+ * WebCoreSupport/WebChromeClient.h: >+ (WebChromeClient::needsImmediateScheduleCompositingLayerFlush): >+ > == Rolled over to ChangeLog-2019-06-05 == >diff --git a/Source/WebCore/animation/DocumentTimeline.cpp b/Source/WebCore/animation/DocumentTimeline.cpp >index bbdd3917d6d1ff57c3ebce680b5b7df899dc3d58..c995b461271603de603cf2b441d54c2b0a4310ce 100644 >--- a/Source/WebCore/animation/DocumentTimeline.cpp >+++ b/Source/WebCore/animation/DocumentTimeline.cpp >@@ -318,7 +318,7 @@ void DocumentTimeline::scheduleAnimationResolution() > if (!m_document || !m_document->page()) > return; > >- m_document->page()->renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_document->page()->renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > m_animationResolutionScheduled = true; > } > >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 58b6d6a9c748b1a8e2633c76881244a8b67e3125..65193913c58778f68637fbc7720ebce65ce49d72 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -540,7 +540,7 @@ Document::Document(Frame* frame, const URL& url, unsigned documentClasses, unsig > #endif > #if ENABLE(INTERSECTION_OBSERVER) > , m_intersectionObserversNotifyTimer(*this, &Document::notifyIntersectionObserversTimerFired) >- , m_intersectionObserversInitialUpdateTimer(*this, &Document::scheduleRenderingUpdate) >+ , m_intersectionObserversInitialUpdateTimer(*this, &Document::scheduleTimedRenderingUpdate) > #endif > , m_loadEventDelayTimer(*this, &Document::loadEventDelayTimerFired) > #if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION) >@@ -7292,10 +7292,10 @@ void Document::removeAppearanceDependentPicture(HTMLPictureElement& picture) > m_appearanceDependentPictures.remove(&picture); > } > >-void Document::scheduleRenderingUpdate() >+void Document::scheduleTimedRenderingUpdate() > { > if (auto page = this->page()) >- page->renderingUpdateScheduler().scheduleRenderingUpdate(); >+ page->renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > #if ENABLE(INTERSECTION_OBSERVER) >@@ -7523,7 +7523,7 @@ void Document::notifyIntersectionObserversTimerFired() > void Document::scheduleInitialIntersectionObservationUpdate() > { > if (m_readyState == Complete) >- scheduleRenderingUpdate(); >+ scheduleTimedRenderingUpdate(); > else if (!m_intersectionObserversInitialUpdateTimer.isActive()) > m_intersectionObserversInitialUpdateTimer.startOneShot(intersectionObserversInitialUpdateDelay); > } >@@ -7605,7 +7605,7 @@ void Document::updateResizeObservations(Page& page) > getParserLocation(url, line, column); > reportException("ResizeObserver loop completed with undelivered notifications.", line, column, url, nullptr, nullptr); > // Starting a new schedule the next round of notify. >- scheduleRenderingUpdate(); >+ scheduleTimedRenderingUpdate(); > } > } > #endif >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 29f730e5db9f7e166d2805c8531c1dc60d73bebd..ea9c81bd104f88fce8c7a0c2ab46b421daad6098 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -1380,7 +1380,7 @@ public: > void addAppearanceDependentPicture(HTMLPictureElement&); > void removeAppearanceDependentPicture(HTMLPictureElement&); > >- void scheduleRenderingUpdate(); >+ void scheduleTimedRenderingUpdate(); > > #if ENABLE(INTERSECTION_OBSERVER) > void addIntersectionObserver(IntersectionObserver&); >diff --git a/Source/WebCore/dom/ScriptedAnimationController.cpp b/Source/WebCore/dom/ScriptedAnimationController.cpp >index 4718a923e55bbe2ee89feab7438d98eb86dccc51..c7d6d3afebe154684f81bffe0fd02e2c90e8d8d1 100644 >--- a/Source/WebCore/dom/ScriptedAnimationController.cpp >+++ b/Source/WebCore/dom/ScriptedAnimationController.cpp >@@ -256,7 +256,7 @@ void ScriptedAnimationController::scheduleAnimation() > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) > if (!m_isUsingTimer && !isThrottled()) { > if (auto* page = this->page()) { >- page->renderingUpdateScheduler().scheduleRenderingUpdate(); >+ page->renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > return; > } > >diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h >index ad705882b1033f0c032ce7121a77b5141233bf1a..c66b1a74f22e56b00a49417f87a77e17310e23b7 100644 >--- a/Source/WebCore/page/ChromeClient.h >+++ b/Source/WebCore/page/ChromeClient.h >@@ -320,6 +320,7 @@ public: > // Sets a flag to specify that the view needs to be updated, so we need > // to do an eager layout before the drawing. > virtual void scheduleCompositingLayerFlush() = 0; >+ virtual bool needsImmediateRenderingUpdate() const { return false; } > // Returns whether or not the client can render the composited layer, > // regardless of the settings. > virtual bool allowsAcceleratedCompositing() const { return true; } >diff --git a/Source/WebCore/page/PageOverlayController.cpp b/Source/WebCore/page/PageOverlayController.cpp >index 0c03315a8dea987b653c03caf57c4881ec8d0666..53f6e37c540ae0fd70cf91dd20d261f81f8293fa 100644 >--- a/Source/WebCore/page/PageOverlayController.cpp >+++ b/Source/WebCore/page/PageOverlayController.cpp >@@ -318,7 +318,7 @@ void PageOverlayController::didChangeDeviceScaleFactor() > > void PageOverlayController::didChangeViewExposedRect() > { >- m_page.renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_page.renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > void PageOverlayController::didScrollFrame(Frame& frame) >@@ -412,7 +412,7 @@ float PageOverlayController::deviceScaleFactor() const > > void PageOverlayController::notifyFlushRequired(const GraphicsLayer*) > { >- m_page.renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_page.renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > void PageOverlayController::didChangeOverlayFrame(PageOverlay& overlay) >diff --git a/Source/WebCore/page/RenderingUpdateScheduler.cpp b/Source/WebCore/page/RenderingUpdateScheduler.cpp >index 02083b867ab200812e701553b205ff908fb8e620..56a011c4cee99789901fad36302be10c34566527 100644 >--- a/Source/WebCore/page/RenderingUpdateScheduler.cpp >+++ b/Source/WebCore/page/RenderingUpdateScheduler.cpp >@@ -42,14 +42,14 @@ RenderingUpdateScheduler::RenderingUpdateScheduler(Page& page) > #endif > } > >-void RenderingUpdateScheduler::scheduleRenderingUpdate() >+void RenderingUpdateScheduler::scheduleTimedRenderingUpdate() > { > if (isScheduled()) > return; > > // Optimize the case when an invisible page wants just to schedule layer flush. > if (!m_page.isVisible()) { >- scheduleCompositingLayerFlush(); >+ scheduleImmediateRenderingUpdate(); > return; > } > >@@ -102,12 +102,20 @@ void RenderingUpdateScheduler::displayRefreshFired() > tracePoint(TriggerRenderingUpdate); > > clearScheduled(); >- scheduleCompositingLayerFlush(); >+ scheduleImmediateRenderingUpdate(); > } > >-void RenderingUpdateScheduler::scheduleCompositingLayerFlush() >+void RenderingUpdateScheduler::scheduleImmediateRenderingUpdate() > { > m_page.chrome().client().scheduleCompositingLayerFlush(); > } > >+void RenderingUpdateScheduler::scheduleRenderingUpdate() >+{ >+ if (m_page.chrome().client().needsImmediateRenderingUpdate()) >+ scheduleImmediateRenderingUpdate(); >+ else >+ scheduleTimedRenderingUpdate(); >+} >+ > } >diff --git a/Source/WebCore/page/RenderingUpdateScheduler.h b/Source/WebCore/page/RenderingUpdateScheduler.h >index 879a2ad027956390eca52ebc49145444a6afc681..fade62fc787ee48979af6dd82662779804d37517 100644 >--- a/Source/WebCore/page/RenderingUpdateScheduler.h >+++ b/Source/WebCore/page/RenderingUpdateScheduler.h >@@ -46,8 +46,9 @@ public: > } > > RenderingUpdateScheduler(Page&); >+ void scheduleTimedRenderingUpdate(); >+ void scheduleImmediateRenderingUpdate(); > void scheduleRenderingUpdate(); >- void scheduleCompositingLayerFlush(); > > private: > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >diff --git a/Source/WebCore/page/ResizeObserver.cpp b/Source/WebCore/page/ResizeObserver.cpp >index b9bd9bd9665c28da60dbe6461c0f03f5ae5ee5a4..cbe5168e8b7fdbf88044637bd498b6b3bcc72d4a 100644 >--- a/Source/WebCore/page/ResizeObserver.cpp >+++ b/Source/WebCore/page/ResizeObserver.cpp >@@ -73,7 +73,7 @@ void ResizeObserver::observe(Element& target) > > if (m_document) { > m_document->addResizeObserver(*this); >- m_document->scheduleRenderingUpdate(); >+ m_document->scheduleTimedRenderingUpdate(); > } > } > >diff --git a/Source/WebCore/page/mac/ServicesOverlayController.mm b/Source/WebCore/page/mac/ServicesOverlayController.mm >index 22b65d9acfb9ed7ab3bf5a42545ce05a5b7981ae..4ebf518a3595cfce88708a6b9de442a3dcb2bf20 100644 >--- a/Source/WebCore/page/mac/ServicesOverlayController.mm >+++ b/Source/WebCore/page/mac/ServicesOverlayController.mm >@@ -121,7 +121,7 @@ void ServicesOverlayController::Highlight::notifyFlushRequired(const GraphicsLay > if (!m_controller) > return; > >- m_controller->page().renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_controller->page().renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect&, GraphicsLayerPaintBehavior) >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 1eafb8e0929b6dde618cb25c871645d48b7b60d1..f633f3223320462e211d2383a0f29ba3913e4ee2 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -2061,7 +2061,7 @@ String RenderLayerCompositor::layerTreeAsText(LayerTreeFlags flags) > return String(); > > flushPendingLayerChanges(true); >- page().renderingUpdateScheduler().scheduleCompositingLayerFlush(); >+ page().renderingUpdateScheduler().scheduleImmediateRenderingUpdate(); > > LayerTreeAsTextBehavior layerTreeBehavior = LayerTreeAsTextBehaviorNormal; > if (flags & LayerTreeFlagsIncludeDebugInfo) >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h >index 7e0a6258ac02a87ca9c10ce4a9f85cf432759996..4cbd904060ccf551eac2229a30d8de238ba17dff 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h >@@ -176,6 +176,7 @@ private: > void attachViewOverlayGraphicsLayer(WebCore::GraphicsLayer*) final; > void setNeedsOneShotDrawingSynchronization() final; > void scheduleCompositingLayerFlush() final; >+ bool needsImmediateRenderingUpdate() const final { return true; } > > CompositingTriggerFlags allowedCompositingTriggers() const final > { >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 71cef122fcd2214d96c230a4ef65d3cca6c1f26a..589c812c320291983d0a095f4cb5635d056e9341 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2019-06-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately >+ https://bugs.webkit.org/show_bug.cgi?id=198664 >+ >+ Reviewed by Simon Fraser. >+ >+ Delete repeated entries which were submitted by mistake. >+ >+ * Tracing/SystemTracePoints.plist: >+ > 2019-06-07 Wenson Hsieh <wenson_hsieh@apple.com> > > Allow clients to vend custom -inputView and -inputAccessoryView by overriding WKWebView methods >diff --git a/Tools/Tracing/SystemTracePoints.plist b/Tools/Tracing/SystemTracePoints.plist >index ad281569215a0d8ad1892d223ae00e046788f5ea..b44dc437600bd279674faf9530a9e3626ed5f878 100644 >--- a/Tools/Tracing/SystemTracePoints.plist >+++ b/Tools/Tracing/SystemTracePoints.plist >@@ -260,38 +260,6 @@ > <key>CodeEnd</key> > <string>5031</string> > </dict> >- <dict> >- <key>Name</key> >- <string>Schedule rendering update</string> >- <key>Type</key> >- <string>Impulse</string> >- <key>Component</key> >- <string>47</string> >- <key>Code</key> >- <string>5028</string> >- </dict> >- <dict> >- <key>Name</key> >- <string>Trigger rendering update</string> >- <key>Type</key> >- <string>Impulse</string> >- <key>Component</key> >- <string>47</string> >- <key>Code</key> >- <string>5029</string> >- </dict> >- <dict> >- <key>Name</key> >- <string>Rendering update</string> >- <key>Type</key> >- <string>Interval</string> >- <key>Component</key> >- <string>47</string> >- <key>CodeBegin</key> >- <string>5030</string> >- <key>CodeEnd</key> >- <string>5031</string> >- </dict> > <dict> > <key>Name</key> > <string>Paint WebHTMLView</string>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198664
:
371594
|
371603
|
371626
|
371638
|
371642
| 371644