Changeset 201923 in webkit


Ignore:
Timestamp:
Jun 10, 2016 5:58:12 AM (8 years ago)
Author:
Carlos Garcia Campos
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:
Location:
trunk/Source/WebKit2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r201922 r201923  
     12016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [Threaded Compositor] Content and viewport sizes are mixed
     4        https://bugs.webkit.org/show_bug.cgi?id=158564
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Make ThreadedCoordinatedLayerTreeHost::sizeDidChange() update the viewport size for consistency with all other
     9        LayerTreeHost implementations and rename viewportSizeChanged() as contentsSizeChanged() and update the contents
     10        size.
     11
     12        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     13        (WebKit::WebChromeClient::contentsSizeChanged): Remove ifdefed code here, the drawing area is notified two lines below.
     14        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
     15        (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged): Update the viewport size to the contents size
     16        only when using a fixed layout here instead of in cross-platform code.
     17        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
     18        (WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged):
     19        (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
     20        (WebKit::ThreadedCoordinatedLayerTreeHost::viewportSizeChanged): Deleted.
     21        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
     22        * WebProcess/WebPage/DrawingAreaImpl.cpp:
     23        (WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Call LayerTreeHost::contentsSizeChanged().
     24        (WebKit::DrawingAreaImpl::updateBackingStoreState): Remove ifdefed code for the threadecd compositor since it's
     25        now consistent with all other LayerTreeHost implementations.
     26        * WebProcess/WebPage/LayerTreeHost.h:
     27
    1282016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
    229
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r199951 r201923  
    511511        return;
    512512
    513 #if USE(COORDINATED_GRAPHICS)
    514     if (m_page->useFixedLayout())
    515         m_page->drawingArea()->layerTreeHost()->sizeDidChange(size);
    516 #endif
    517 
    518513    m_page->send(Messages::WebPageProxy::DidChangeContentSize(size));
    519514
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp

    r201802 r201923  
    152152}
    153153
    154 void CoordinatedDrawingArea::mainFrameContentSizeChanged(const WebCore::IntSize&)
    155 {
     154void CoordinatedDrawingArea::mainFrameContentSizeChanged(const WebCore::IntSize& size)
     155{
     156    if (m_webPage.useFixedLayout())
     157        m_layerTreeHost->sizeDidChange(size);
    156158    m_webPage.mainFrame()->pageOverlayController().didChangeDocumentSize();
    157159}
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp

    r201803 r201923  
    141141}
    142142
    143 void ThreadedCoordinatedLayerTreeHost::sizeDidChange(const WebCore::IntSize& newSize)
    144 {
    145     m_coordinator->sizeDidChange(newSize);
     143void ThreadedCoordinatedLayerTreeHost::contentsSizeChanged(const WebCore::IntSize& newSize)
     144{
    146145    m_compositor->didChangeContentsSize(newSize);
    147146}
     
    169168}
    170169
    171 void ThreadedCoordinatedLayerTreeHost::viewportSizeChanged(const WebCore::IntSize& size)
    172 {
     170void ThreadedCoordinatedLayerTreeHost::sizeDidChange(const WebCore::IntSize& size)
     171{
     172    m_coordinator->sizeDidChange(size);
    173173    m_compositor->didChangeViewportSize(size);
    174174}
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h

    r201802 r201923  
    7878    void forceRepaint() override;
    7979    bool forceRepaintAsync(uint64_t /*callbackID*/) override;
    80     void sizeDidChange(const WebCore::IntSize& newSize) override;
     80    void sizeDidChange(const WebCore::IntSize&) override;
    8181    void deviceOrPageScaleFactorChanged() override;
    8282
     
    8787    void pageBackgroundTransparencyChanged() override { };
    8888
    89     void viewportSizeChanged(const WebCore::IntSize&) override;
     89    void contentsSizeChanged(const WebCore::IntSize&) override;
    9090    void didChangeViewportProperties(const WebCore::ViewportAttributes&) override;
    9191
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp

    r201860 r201923  
    231231#if USE(COORDINATED_GRAPHICS_THREADED)
    232232    if (m_layerTreeHost)
    233         m_layerTreeHost->sizeDidChange(newSize);
     233        m_layerTreeHost->contentsSizeChanged(newSize);
    234234#else
    235235    UNUSED_PARAM(newSize);
     
    350350        m_webPage.scrollMainFrameIfNotAtMaxScrollPosition(scrollOffset);
    351351
    352         if (m_layerTreeHost) {
    353 #if USE(COORDINATED_GRAPHICS_THREADED)
    354             m_layerTreeHost->viewportSizeChanged(m_webPage.size());
    355 #else
     352        if (m_layerTreeHost)
    356353            m_layerTreeHost->sizeDidChange(m_webPage.size());
    357 #endif
    358         } else
     354        else
    359355            m_dirtyRegion = m_webPage.bounds();
    360356    } else {
  • trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h

    r201802 r201923  
    8787
    8888#if USE(COORDINATED_GRAPHICS_THREADED)
    89     virtual void viewportSizeChanged(const WebCore::IntSize&) = 0;
     89    virtual void contentsSizeChanged(const WebCore::IntSize&) = 0;
    9090    virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&) = 0;
    9191#endif
Note: See TracChangeset for help on using the changeset viewer.