Skip to content
  • simon.fraser@apple.com's avatar
    Make WKViews work when layer-backed · b7c0cd3f
    simon.fraser@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=106166
    
    Reviewed by Sam Weinig.
    
    When not in TileCache mode, WebKit2 views had redraw problems on scrolling,
    if layer-backed.
    
    The issue is that the DrawingAreaProxy code tries to optimize scrolling by
    calling -scrollRect:by: on the WKView (an NSView) to copy bits, rather than
    repainting the entire view. However, -scrollRect:by: does nothing for NSViews
    that have layers.
    
    Fix by plumbing through a canScrollView() function which PageClientImpl()
    implements, returning true if the view does not have layer backing.
    When canScrollView() is false, DrawingAreaProxyImpl::incorporateUpdate()
    dirties the entire view.
    
    * UIProcess/API/gtk/PageClientImpl.h:
    (WebKit::PageClientImpl::canScrollView):
    * UIProcess/API/mac/PageClientImpl.h:
    (PageClientImpl):
    * UIProcess/API/mac/PageClientImpl.mm:
    (WebKit::PageClientImpl::canScrollView):
    * UIProcess/API/qt/raw/qrawwebview_p_p.h:
    (QRawWebViewPrivate::canScrollView):
    * UIProcess/DrawingAreaProxyImpl.cpp:
    (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
    * UIProcess/PageClient.h:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::canScrollView):
    * UIProcess/WebPageProxy.h:
    * UIProcess/efl/PageClientBase.h:
    (WebKit::PageClientBase::canScrollView):
    * UIProcess/qt/QtPageClient.h:
    (WebKit::QtPageClient::canScrollView):
    * UIProcess/win/WebView.h:
    (WebKit::WebView::canScrollView):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b7c0cd3f