Title: [240386] branches/safari-607-branch/Source/WebKitLegacy/win
Revision
240386
Author
[email protected]
Date
2019-01-23 17:21:52 -0800 (Wed, 23 Jan 2019)

Log Message

Cherry-pick r240131. rdar://problem/47458219

    [Win][HighDPI] Repaint glitches when scrolling.
    https://bugs.webkit.org/show_bug.cgi?id=173152
    <rdar://problem/45269953>

    Reviewed by Brent Fulgham.

    Non-integral device scale factors are causing repaint glitches, because the computation of the scroll
    delta in pixel coordinates from the scroll delta in logical coordinates will not always be correct.
    Instead of blitting the scroll rectangle, repaint the entire region affected by scrolling.

    * WebView.cpp:
    (WebView::scrollBackingStore):

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

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebKitLegacy/win/ChangeLog (240385 => 240386)


--- branches/safari-607-branch/Source/WebKitLegacy/win/ChangeLog	2019-01-24 01:21:50 UTC (rev 240385)
+++ branches/safari-607-branch/Source/WebKitLegacy/win/ChangeLog	2019-01-24 01:21:52 UTC (rev 240386)
@@ -1,3 +1,38 @@
+2019-01-23  Alan Coon  <[email protected]>
+
+        Cherry-pick r240131. rdar://problem/47458219
+
+    [Win][HighDPI] Repaint glitches when scrolling.
+    https://bugs.webkit.org/show_bug.cgi?id=173152
+    <rdar://problem/45269953>
+    
+    Reviewed by Brent Fulgham.
+    
+    Non-integral device scale factors are causing repaint glitches, because the computation of the scroll
+    delta in pixel coordinates from the scroll delta in logical coordinates will not always be correct.
+    Instead of blitting the scroll rectangle, repaint the entire region affected by scrolling.
+    
+    * WebView.cpp:
+    (WebView::scrollBackingStore):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-17  Per Arne Vollan  <[email protected]>
+
+            [Win][HighDPI] Repaint glitches when scrolling.
+            https://bugs.webkit.org/show_bug.cgi?id=173152
+            <rdar://problem/45269953>
+
+            Reviewed by Brent Fulgham.
+
+            Non-integral device scale factors are causing repaint glitches, because the computation of the scroll
+            delta in pixel coordinates from the scroll delta in logical coordinates will not always be correct.
+            Instead of blitting the scroll rectangle, repaint the entire region affected by scrolling.
+
+            * WebView.cpp:
+            (WebView::scrollBackingStore):
+
 2018-12-24  Fujii Hironori  <[email protected]>
 
         Remove "using namespace std;"

Modified: branches/safari-607-branch/Source/WebKitLegacy/win/WebView.cpp (240385 => 240386)


--- branches/safari-607-branch/Source/WebKitLegacy/win/WebView.cpp	2019-01-24 01:21:50 UTC (rev 240385)
+++ branches/safari-607-branch/Source/WebKitLegacy/win/WebView.cpp	2019-01-24 01:21:52 UTC (rev 240386)
@@ -951,6 +951,19 @@
 
 void WebView::scrollBackingStore(FrameView* frameView, int logicalDx, int logicalDy, const IntRect& logicalScrollViewRect, const IntRect& logicalClipRect)
 {
+    if (deviceScaleFactor() != static_cast<int>(deviceScaleFactor())) {
+        // Non-integral device scale factors are causing repaint glitches, because the computation of the scroll
+        // delta in pixel coordinates from the scroll delta in logical coordinates will not always be correct.
+        // Instead of blitting the scroll rectangle, repaint the entire region affected by scrolling.
+        // FIXME: This is inefficient, we should be able to blit the scroll rectangle in this case as well,
+        // see https://bugs.webkit.org/show_bug.cgi?id=193542.
+        IntRect repaintRect = logicalScrollViewRect;
+        repaintRect.move(logicalDx, logicalDy);
+        repaintRect.unite(logicalScrollViewRect);
+        repaint(repaintRect, true);
+        return;
+    }
+
     m_needsDisplay = true;
 
     // Dimensions passed to us from WebCore are in logical units. We must convert to pixels:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to