WebKit Bugzilla
Attachment 360457 Details for
Bug 193961
: REGRESSION (PSON): Flash on link navigation on Mac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
attach-flash-4.patch (text/plain), 7.93 KB, created by
Antti Koivisto
on 2019-01-29 04:25:33 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-01-29 04:25:33 PST
Size:
7.93 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240651) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,40 @@ >+2019-01-29 Antti Koivisto <antti@apple.com> >+ >+ REGRESSION (PSON): Flash on link navigation on Mac >+ https://bugs.webkit.org/show_bug.cgi?id=193961 >+ <rdar://problem/47482507> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The target page sends EnterAcceleratedCompositingMode message too early, before we have a valid layer tree. >+ >+ * WebProcess/WebPage/DrawingArea.h: >+ (WebKit::DrawingArea::attach): Deleted. >+ >+ Not needed anymore. >+ >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::reinitializeWebPage): >+ (WebKit::WebPage::didCompletePageTransition): >+ (WebKit::m_shouldAttachDrawingAreaOnPageTransition): Deleted. >+ >+ Move message sending logic fully to TiledCoreAnimationDrawingArea. >+ Unfreezing the layer tree is sufficient to trigger the message. >+ >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: >+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: >+ (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): >+ >+ There is no need to treat process swap case differently. >+ >+ (WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded): >+ >+ Send this after the first successful layer flush with the root layer set. >+ >+ (WebKit::TiledCoreAnimationDrawingArea::flushLayers): >+ (WebKit::TiledCoreAnimationDrawingArea::attach): Deleted. >+ > 2019-01-28 Ryosuke Niwa <rniwa@webkit.org> > > User agent string override for navigator.userAgent should be site specific quirks >Index: Source/WebKit/WebProcess/WebPage/DrawingArea.h >=================================================================== >--- Source/WebKit/WebProcess/WebPage/DrawingArea.h (revision 240647) >+++ Source/WebKit/WebProcess/WebPage/DrawingArea.h (working copy) >@@ -149,8 +149,6 @@ public: > virtual void deviceOrPageScaleFactorChanged() = 0; > #endif > >- virtual void attach() { }; >- > protected: > DrawingArea(DrawingAreaType, WebPage&); > >Index: Source/WebKit/WebProcess/WebPage/WebPage.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.cpp (revision 240647) >+++ Source/WebKit/WebProcess/WebPage/WebPage.cpp (working copy) >@@ -401,9 +401,6 @@ WebPage::WebPage(uint64_t pageID, WebPag > , m_userInterfaceLayoutDirection(parameters.userInterfaceLayoutDirection) > , m_overrideContentSecurityPolicy { parameters.overrideContentSecurityPolicy } > , m_cpuLimit(parameters.cpuLimit) >-#if PLATFORM(MAC) >- , m_shouldAttachDrawingAreaOnPageTransition(parameters.isProcessSwap) >-#endif > { > ASSERT(m_pageID); > >@@ -700,9 +697,6 @@ void WebPage::reinitializeWebPage(WebPag > m_drawingArea->setShouldScaleViewToFitDocument(parameters.shouldScaleViewToFitDocument); > m_drawingArea->updatePreferences(parameters.store); > m_drawingArea->setPaintingEnabled(true); >-#if PLATFORM(MAC) >- m_shouldAttachDrawingAreaOnPageTransition = parameters.isProcessSwap; >-#endif > unfreezeLayerTree(LayerTreeFreezeReason::PageSuspended); > } > >@@ -3099,18 +3093,6 @@ void WebPage::didCompletePageTransition( > bool isInitialEmptyDocument = !m_mainFrame; > if (!isInitialEmptyDocument) > unfreezeLayerTree(LayerTreeFreezeReason::ProcessSwap); >- >-#if PLATFORM(MAC) >- if (m_shouldAttachDrawingAreaOnPageTransition && !isInitialEmptyDocument) { >- m_shouldAttachDrawingAreaOnPageTransition = false; >- // Unfreezing the layer tree above schedules a layer flush so we delay attaching the drawing area >- // after the next event loop iteration. >- RunLoop::main().dispatch([this, weakThis = makeWeakPtr(*this)] { >- if (weakThis && m_drawingArea) >- m_drawingArea->attach(); >- }); >- } >-#endif > } > > void WebPage::show() >Index: Source/WebKit/WebProcess/WebPage/WebPage.h >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.h (revision 240647) >+++ Source/WebKit/WebProcess/WebPage/WebPage.h (working copy) >@@ -1805,9 +1805,6 @@ private: > OptionSet<LayerTreeFreezeReason> m_LayerTreeFreezeReasons; > bool m_isSuspended { false }; > bool m_needsFontAttributes { false }; >-#if PLATFORM(MAC) >- bool m_shouldAttachDrawingAreaOnPageTransition { false }; >-#endif > }; > > } // namespace WebKit >Index: Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h >=================================================================== >--- Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (revision 240647) >+++ Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (working copy) >@@ -49,7 +49,7 @@ namespace WebKit { > > class LayerHostingContext; > >-class TiledCoreAnimationDrawingArea : public DrawingArea { >+class TiledCoreAnimationDrawingArea : public DrawingArea, public CanMakeWeakPtr<TiledCoreAnimationDrawingArea> { > public: > TiledCoreAnimationDrawingArea(WebPage&, const WebPageCreationParameters&); > virtual ~TiledCoreAnimationDrawingArea(); >@@ -102,7 +102,7 @@ private: > void addTransactionCallbackID(CallbackID) override; > void setShouldScaleViewToFitDocument(bool) override; > >- void attach() override; >+ void sendEnterAcceleratedCompositingModeIfNeeded(); > > void adjustTransientZoom(double scale, WebCore::FloatPoint origin) override; > void commitTransientZoom(double scale, WebCore::FloatPoint origin) override; >@@ -177,6 +177,7 @@ private: > > bool m_isThrottlingLayerFlushes { false }; > bool m_isLayerFlushThrottlingTemporarilyDisabledForInteraction { false }; >+ bool m_needsSendEnterAcceleratedCompositingMode { true }; > > WebCore::Timer m_layerFlushThrottlingTimer; > }; >Index: Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (revision 240647) >+++ Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (working copy) >@@ -96,9 +96,6 @@ TiledCoreAnimationDrawingArea::TiledCore > > updateLayerHostingContext(); > setColorSpace(parameters.colorSpace); >- >- if (!parameters.isProcessSwap) >- attach(); > } > > TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea() >@@ -106,11 +103,23 @@ TiledCoreAnimationDrawingArea::~TiledCor > invalidateLayerFlushRunLoopObserver(); > } > >-void TiledCoreAnimationDrawingArea::attach() >+void TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded() > { >- LayerTreeContext layerTreeContext; >- layerTreeContext.contextID = m_layerHostingContext->contextID(); >- m_webPage.send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, layerTreeContext)); >+ if (!m_rootLayer) >+ return; >+ >+ if (!m_needsSendEnterAcceleratedCompositingMode) >+ return; >+ m_needsSendEnterAcceleratedCompositingMode = false; >+ >+ // Let the first commit complete before sending. >+ RunLoop::main().dispatch([this, weakThis = makeWeakPtr(*this)] { >+ if (!weakThis) >+ return; >+ LayerTreeContext layerTreeContext; >+ layerTreeContext.contextID = m_layerHostingContext->contextID(); >+ m_webPage.send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, layerTreeContext)); >+ }); > } > > void TiledCoreAnimationDrawingArea::setNeedsDisplay() >@@ -502,8 +511,10 @@ void TiledCoreAnimationDrawingArea::flus > m_pendingCallbackIDs.clear(); > } > >- if (didFlushAllFrames) >+ if (didFlushAllFrames) { >+ sendEnterAcceleratedCompositingModeIfNeeded(); > invalidateLayerFlushRunLoopObserver(); >+ } > > if (m_isThrottlingLayerFlushes) > startLayerFlushThrottlingTimer();
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 193961
: 360457