Remove ScrollView::clipsRepaints() which was only used by Chromium
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2017 02:05:28 +0000 (02:05 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2017 02:05:28 +0000 (02:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175594

Reviewed by Tim Horton.

clipsRepaints() was added in r74568 but was only used by Chromium. It's always
true for other platforms, so remove conditionals that test for it and assume true.

* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):
* platform/ScrollView.cpp:
(WebCore::ScrollView::repaintContentRectangle):
(WebCore::ScrollView::setClipsRepaints): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::clipsRepaints const): Deleted.

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

Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollView.h

index 93ab3ea..25cbc56 100644 (file)
@@ -1,5 +1,23 @@
 2017-08-15  Simon Fraser  <simon.fraser@apple.com>
 
+        Remove ScrollView::clipsRepaints() which was only used by Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=175594
+
+        Reviewed by Tim Horton.
+
+        clipsRepaints() was added in r74568 but was only used by Chromium. It's always
+        true for other platforms, so remove conditionals that test for it and assume true.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollContentsFastPath):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::repaintContentRectangle):
+        (WebCore::ScrollView::setClipsRepaints): Deleted.
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::clipsRepaints const): Deleted.
+
+2017-08-15  Simon Fraser  <simon.fraser@apple.com>
+
         Allow WebCore logging channels to be set from the UI process
         https://bugs.webkit.org/show_bug.cgi?id=175608
 
index a2d1840..c5bd754 100644 (file)
@@ -2309,7 +2309,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
         // FIXME: use pixel snapping instead of enclosing when ScrollView has finished transitioning from IntRect to Float/LayoutRect.
         IntRect updateRect = enclosingIntRect(layer->repaintRectIncludingNonCompositingDescendants());
         updateRect = contentsToRootView(updateRect);
-        if (!isCompositedContentLayer && clipsRepaints())
+        if (!isCompositedContentLayer)
             updateRect.intersect(rectToScroll);
         if (!updateRect.isEmpty())
             regionToUpdate.unite(updateRect);
@@ -2329,8 +2329,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
             renderView()->layer()->setBackingNeedsRepaintInRect(updateRect);
             continue;
         }
-        if (clipsRepaints())
-            updateRect.intersect(rectToScroll);
+        updateRect.intersect(rectToScroll);
         frame().page()->chrome().invalidateContentsAndRootView(updateRect);
     }
 
index 7521a62..9eee442 100644 (file)
@@ -192,11 +192,6 @@ void ScrollView::setPaintsEntireContents(bool paintsEntireContents)
     m_paintsEntireContents = paintsEntireContents;
 }
 
-void ScrollView::setClipsRepaints(bool clipsRepaints)
-{
-    m_clipsRepaints = clipsRepaints;
-}
-
 void ScrollView::setDelegatesScrolling(bool delegatesScrolling)
 {
     if (m_delegatesScrolling == delegatesScrolling)
@@ -1071,7 +1066,7 @@ void ScrollView::positionScrollbarLayers()
 void ScrollView::repaintContentRectangle(const IntRect& rect)
 {
     IntRect paintRect = rect;
-    if (clipsRepaints() && !paintsEntireContents())
+    if (!paintsEntireContents())
         paintRect.intersect(visibleContentRect(LegacyIOSDocumentVisibleRect));
     if (paintRect.isEmpty())
         return;
index 9622188..a0c0f14 100644 (file)
@@ -129,11 +129,6 @@ public:
     bool paintsEntireContents() const { return m_paintsEntireContents; }
     WEBCORE_EXPORT void setPaintsEntireContents(bool);
 
-    // By default, paint events are clipped to the visible area.  If set to
-    // false, paint events are no longer clipped.  paintsEntireContents() implies !clipsRepaints().
-    bool clipsRepaints() const { return m_clipsRepaints; }
-    void setClipsRepaints(bool);
-
     // By default programmatic scrolling is handled by WebCore and not by the UI application.
     // In the case of using a tiled backing store, this mode can be set, so that the scroll requests
     // are delegated to the UI application.
@@ -481,7 +476,6 @@ private:
     bool m_useFixedLayout { false };
 
     bool m_paintsEntireContents { false };
-    bool m_clipsRepaints { true };
     bool m_delegatesScrolling { false };