Title: [201923] trunk/Source/WebKit2
- Revision
- 201923
- Author
- [email protected]
- Date
- 2016-06-10 05:58:12 -0700 (Fri, 10 Jun 2016)
Log Message
[Threaded Compositor] Content and viewport sizes are mixed
https://bugs.webkit.org/show_bug.cgi?id=158564
Reviewed by Žan Doberšek.
Make ThreadedCoordinatedLayerTreeHost::sizeDidChange() update the viewport size for consistency with all other
LayerTreeHost implementations and rename viewportSizeChanged() as contentsSizeChanged() and update the contents
size.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged): Remove ifdefed code here, the drawing area is notified two lines below.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged): Update the viewport size to the contents size
only when using a fixed layout here instead of in cross-platform code.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged):
(WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
(WebKit::ThreadedCoordinatedLayerTreeHost::viewportSizeChanged): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Call LayerTreeHost::contentsSizeChanged().
(WebKit::DrawingAreaImpl::updateBackingStoreState): Remove ifdefed code for the threadecd compositor since it's
now consistent with all other LayerTreeHost implementations.
* WebProcess/WebPage/LayerTreeHost.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (201922 => 201923)
--- trunk/Source/WebKit2/ChangeLog 2016-06-10 12:52:38 UTC (rev 201922)
+++ trunk/Source/WebKit2/ChangeLog 2016-06-10 12:58:12 UTC (rev 201923)
@@ -1,5 +1,32 @@
2016-06-10 Carlos Garcia Campos <[email protected]>
+ [Threaded Compositor] Content and viewport sizes are mixed
+ https://bugs.webkit.org/show_bug.cgi?id=158564
+
+ Reviewed by Žan Doberšek.
+
+ Make ThreadedCoordinatedLayerTreeHost::sizeDidChange() update the viewport size for consistency with all other
+ LayerTreeHost implementations and rename viewportSizeChanged() as contentsSizeChanged() and update the contents
+ size.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::contentsSizeChanged): Remove ifdefed code here, the drawing area is notified two lines below.
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
+ (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged): Update the viewport size to the contents size
+ only when using a fixed layout here instead of in cross-platform code.
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
+ (WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged):
+ (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
+ (WebKit::ThreadedCoordinatedLayerTreeHost::viewportSizeChanged): Deleted.
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
+ * WebProcess/WebPage/DrawingAreaImpl.cpp:
+ (WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Call LayerTreeHost::contentsSizeChanged().
+ (WebKit::DrawingAreaImpl::updateBackingStoreState): Remove ifdefed code for the threadecd compositor since it's
+ now consistent with all other LayerTreeHost implementations.
+ * WebProcess/WebPage/LayerTreeHost.h:
+
+2016-06-10 Carlos Garcia Campos <[email protected]>
+
[Threaded Compositor] Make it clear that compositing thread operations are always scheduled from the main thread
https://bugs.webkit.org/show_bug.cgi?id=158562
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (201922 => 201923)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2016-06-10 12:52:38 UTC (rev 201922)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2016-06-10 12:58:12 UTC (rev 201923)
@@ -510,11 +510,6 @@
if (&frame->page()->mainFrame() != frame)
return;
-#if USE(COORDINATED_GRAPHICS)
- if (m_page->useFixedLayout())
- m_page->drawingArea()->layerTreeHost()->sizeDidChange(size);
-#endif
-
m_page->send(Messages::WebPageProxy::DidChangeContentSize(size));
m_page->drawingArea()->mainFrameContentSizeChanged(size);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp (201922 => 201923)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp 2016-06-10 12:52:38 UTC (rev 201922)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp 2016-06-10 12:58:12 UTC (rev 201923)
@@ -151,8 +151,10 @@
m_webPage.corePage()->settings().setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()));
}
-void CoordinatedDrawingArea::mainFrameContentSizeChanged(const WebCore::IntSize&)
+void CoordinatedDrawingArea::mainFrameContentSizeChanged(const WebCore::IntSize& size)
{
+ if (m_webPage.useFixedLayout())
+ m_layerTreeHost->sizeDidChange(size);
m_webPage.mainFrame()->pageOverlayController().didChangeDocumentSize();
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp (201922 => 201923)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp 2016-06-10 12:52:38 UTC (rev 201922)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp 2016-06-10 12:58:12 UTC (rev 201923)
@@ -140,9 +140,8 @@
return true;
}
-void ThreadedCoordinatedLayerTreeHost::sizeDidChange(const WebCore::IntSize& newSize)
+void ThreadedCoordinatedLayerTreeHost::contentsSizeChanged(const WebCore::IntSize& newSize)
{
- m_coordinator->sizeDidChange(newSize);
m_compositor->didChangeContentsSize(newSize);
}
@@ -168,8 +167,9 @@
return m_coordinator.get();
}
-void ThreadedCoordinatedLayerTreeHost::viewportSizeChanged(const WebCore::IntSize& size)
+void ThreadedCoordinatedLayerTreeHost::sizeDidChange(const WebCore::IntSize& size)
{
+ m_coordinator->sizeDidChange(size);
m_compositor->didChangeViewportSize(size);
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h (201922 => 201923)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h 2016-06-10 12:52:38 UTC (rev 201922)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h 2016-06-10 12:58:12 UTC (rev 201923)
@@ -77,7 +77,7 @@
void scrollNonCompositedContents(const WebCore::IntRect& scrollRect) override;
void forceRepaint() override;
bool forceRepaintAsync(uint64_t /*callbackID*/) override;
- void sizeDidChange(const WebCore::IntSize& newSize) override;
+ void sizeDidChange(const WebCore::IntSize&) override;
void deviceOrPageScaleFactorChanged() override;
void pauseRendering() override;
@@ -86,7 +86,7 @@
WebCore::GraphicsLayerFactory* graphicsLayerFactory() override;
void pageBackgroundTransparencyChanged() override { };
- void viewportSizeChanged(const WebCore::IntSize&) override;
+ void contentsSizeChanged(const WebCore::IntSize&) override;
void didChangeViewportProperties(const WebCore::ViewportAttributes&) override;
#if PLATFORM(GTK)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp (201922 => 201923)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2016-06-10 12:52:38 UTC (rev 201922)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2016-06-10 12:58:12 UTC (rev 201923)
@@ -230,7 +230,7 @@
{
#if USE(COORDINATED_GRAPHICS_THREADED)
if (m_layerTreeHost)
- m_layerTreeHost->sizeDidChange(newSize);
+ m_layerTreeHost->contentsSizeChanged(newSize);
#else
UNUSED_PARAM(newSize);
#endif
@@ -349,13 +349,9 @@
m_webPage.layoutIfNeeded();
m_webPage.scrollMainFrameIfNotAtMaxScrollPosition(scrollOffset);
- if (m_layerTreeHost) {
-#if USE(COORDINATED_GRAPHICS_THREADED)
- m_layerTreeHost->viewportSizeChanged(m_webPage.size());
-#else
+ if (m_layerTreeHost)
m_layerTreeHost->sizeDidChange(m_webPage.size());
-#endif
- } else
+ else
m_dirtyRegion = m_webPage.bounds();
} else {
ASSERT(size == m_webPage.size());
Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h (201922 => 201923)
--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h 2016-06-10 12:52:38 UTC (rev 201922)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h 2016-06-10 12:58:12 UTC (rev 201923)
@@ -86,7 +86,7 @@
#endif
#if USE(COORDINATED_GRAPHICS_THREADED)
- virtual void viewportSizeChanged(const WebCore::IntSize&) = 0;
+ virtual void contentsSizeChanged(const WebCore::IntSize&) = 0;
virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&) = 0;
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes