⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243381 in webkit


Ignore:
Timestamp:
Mar 22, 2019, 9:38:57 AM (7 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r242687): Flicker when pinch-zooming pages in macOS Safari
https://bugs.webkit.org/show_bug.cgi?id=196126
rdar://problem/49095791

Reviewed by Antti Koivisto.

The scrolling tree doesn't have an accurate picture of the main view's scroll position
during pinch-zooming, so don't have it apply layer positions if a transient zoom is
in progress.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r243380 r243381  
     12019-03-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r242687): Flicker when pinch-zooming pages in macOS Safari
     4        https://bugs.webkit.org/show_bug.cgi?id=196126
     5        rdar://problem/49095791
     6
     7        Reviewed by Antti Koivisto.
     8
     9        The scrolling tree doesn't have an accurate picture of the main view's scroll position
     10        during pinch-zooming, so don't have it apply layer positions if a transient zoom is
     11        in progress.
     12
     13        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
     14        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     15        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
     16        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
     17
    1182019-03-22  Antti Koivisto  <antti@apple.com>
    219
  • trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h

    r243360 r243381  
    8989    bool dispatchDidReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone>) override;
    9090
    91     void flushLayers();
     91    enum class FlushType { Normal, TransientZoom };
     92    void flushLayers(FlushType = FlushType::Normal);
    9293
    9394    // Message handlers.
  • trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r243360 r243381  
    452452}
    453453
    454 void TiledCoreAnimationDrawingArea::flushLayers()
     454void TiledCoreAnimationDrawingArea::flushLayers(FlushType flushType)
    455455{
    456456    if (layerTreeStateIsFrozen())
     
    494494        if (auto* scrollingCoordinator = m_webPage.corePage()->scrollingCoordinator()) {
    495495            scrollingCoordinator->commitTreeStateIfNeeded();
    496             scrollingCoordinator->applyScrollingTreeLayerPositions();
     496            if (flushType == FlushType::TransientZoom)
     497                scrollingCoordinator->applyScrollingTreeLayerPositions();
    497498        }
    498499#endif
     
    924925    m_webPage.scalePage(scale / m_webPage.viewScaleFactor(), roundedIntPoint(-unscrolledOrigin));
    925926    m_transientZoomScale = 1;
    926     flushLayers();
     927    flushLayers(FlushType::TransientZoom);
    927928}
    928929
Note: See TracChangeset for help on using the changeset viewer.