[Win] Scrollbars are sometimes not rendered in accelerated compositing mode.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Dec 2017 21:36:01 +0000 (21:36 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Dec 2017 21:36:01 +0000 (21:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180431
<rdar://problem/34531264>

Reviewed by Simon Fraser.

Source/WebCore:

No new tests, covered by existing tests.

When a scroll layer is required, we will create an overflow control hosts layer.
In this case the method RenderLayerCompositor::shouldCompositeOverflowControls()
should return true, otherwise the scrollbars will not be rendered.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):

Source/WebKitLegacy/win:

Fix the signatures of GraphicsLayerClient that should have been overridden, and use
'override' to make sure this doesn't break in the future.

* WebView.cpp:
(WebView::notifyAnimationStarted):
(WebView::paintContents):
* WebView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebView.cpp
Source/WebKitLegacy/win/WebView.h

index 2a7147c..fcc5357 100644 (file)
@@ -1,3 +1,20 @@
+2017-12-05  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win] Scrollbars are sometimes not rendered in accelerated compositing mode.
+        https://bugs.webkit.org/show_bug.cgi?id=180431
+        <rdar://problem/34531264>
+
+        Reviewed by Simon Fraser.
+
+        No new tests, covered by existing tests.
+
+        When a scroll layer is required, we will create an overflow control hosts layer.
+        In this case the method RenderLayerCompositor::shouldCompositeOverflowControls()
+        should return true, otherwise the scrollbars will not be rendered.
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):
+
 2017-12-05  Youenn Fablet  <youenn@apple.com>
 
         Call "Terminate Service Worker" on all workers when all their clients are gone
index 42a4e62..eb3b556 100644 (file)
@@ -2880,6 +2880,9 @@ bool RenderLayerCompositor::shouldCompositeOverflowControls() const
     if (documentUsesTiledBacking())
         return true;
 
+    if (m_overflowControlsHostLayer && isMainFrameCompositor())
+        return true;
+
 #if !USE(COORDINATED_GRAPHICS_THREADED)
     if (!frameView.hasOverlayScrollbars())
         return false;
index ff39e58..b07eafb 100644 (file)
@@ -1,3 +1,19 @@
+2017-12-05  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win] Scrollbars are sometimes not rendered in accelerated compositing mode.
+        https://bugs.webkit.org/show_bug.cgi?id=180431
+        <rdar://problem/34531264>
+
+        Reviewed by Simon Fraser.
+
+        Fix the signatures of GraphicsLayerClient that should have been overridden, and use
+        'override' to make sure this doesn't break in the future.
+
+        * WebView.cpp:
+        (WebView::notifyAnimationStarted):
+        (WebView::paintContents):
+        * WebView.h:
+
 2017-11-23  Darin Adler  <darin@apple.com>
 
         Fix dictionary leak in lookup, convert FindOptions to OptionSet, tweak code style nearby
index 4ec3a72..5910f33 100644 (file)
@@ -7301,7 +7301,7 @@ HRESULT WebView::nextDisplayIsSynchronous()
     return S_OK;
 }
 
-void WebView::notifyAnimationStarted(const GraphicsLayer*, double)
+void WebView::notifyAnimationStarted(const GraphicsLayer*, const String&, double)
 {
     // We never set any animations on our backing layer.
     ASSERT_NOT_REACHED();
@@ -7312,7 +7312,7 @@ void WebView::notifyFlushRequired(const GraphicsLayer*)
     flushPendingGraphicsLayerChangesSoon();
 }
 
-void WebView::paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& inClipPixels)
+void WebView::paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& inClipPixels, GraphicsLayerPaintBehavior)
 {
     Frame* frame = core(m_mainFrame);
     if (!frame)
index 6624da4..576da03 100644 (file)
@@ -568,9 +568,9 @@ private:
     DWORD m_lastDropEffect { 0 };
 
     // GraphicsLayerClient
-    virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
-    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
-    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& inClip);
+    void notifyAnimationStarted(const WebCore::GraphicsLayer*, const String&, double time) override;
+    void notifyFlushRequired(const WebCore::GraphicsLayer*) override;
+    void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& inClip, WebCore::GraphicsLayerPaintBehavior) override;
 
     // CACFLayerTreeHostClient
     virtual void flushPendingGraphicsLayerChanges();