Title: [121722] trunk
Revision
121722
Author
[email protected]
Date
2012-07-02 19:22:46 -0700 (Mon, 02 Jul 2012)

Log Message

Position replaced elements on pixel bounds
https://bugs.webkit.org/show_bug.cgi?id=90354

Reviewed by Eric Seidel.

To avoid sizing and repaint issues we should layout replaced elements on
pixel bounds. We already ensure that replaced elements are sized in full
pixels and that they are painted on pixel bounds. By also ensuring that
they are placed on pixel bounds we avoid pixel having the size be
expanded by pixel snapping and repainting/invalidation rect issues when
scrolling.

Test: fast/repaint/repaint-during-scroll-with-zoom.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):

Modified Paths

Added Paths

Diff

Added: trunk/LayoutTests/fast/repaint/repaint-during-scroll-with-zoom.html (0 => 121722)


--- trunk/LayoutTests/fast/repaint/repaint-during-scroll-with-zoom.html	                        (rev 0)
+++ trunk/LayoutTests/fast/repaint/repaint-during-scroll-with-zoom.html	2012-07-03 02:22:46 UTC (rev 121722)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        body {
+            margin: 0;
+            background: silver;
+            zoom: 1.25;
+        }
+        iframe {
+            position: absolute;
+            top: 50px;
+            width: 200px;
+            height: 200px;
+            overflow: auto;
+        }
+    </style>
+</head>
+<body>
+    <iframe src=""
+    <script>
+        var frame = window.frames[0];
+        var doc = frame.document;
+        doc.body.style.backgroundColor = 'white';
+        doc.body.style.width = '2000px';
+        doc.body.style.height = '2000px';
+        doc.body.appendChild(doc.createTextNode('scroll me'));
+        frame.scrollBy(100, 100);
+    </script>
+    <script>
+        function testScrollRepaint()
+        {
+            if (window.layoutTestController) {
+                layoutTestController.waitUntilDone();
+                frame._onscroll_ = function() {
+                    if (window.layoutTestController)
+                        layoutTestController.notifyDone();
+                };
+            }
+            frame.scrollBy(-90, -90);
+        }
+
+        if (window.layoutTestController) {
+            layoutTestController.display();
+            testScrollRepaint();
+        } else {
+            setTimeout(testScrollRepaint, 100);
+        }
+    </script>
+</body>
+</html>

Added: trunk/LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.png (0 => 121722)


--- trunk/LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.png	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.png	2012-07-03 02:22:46 UTC (rev 121722)
@@ -0,0 +1,9 @@
+\x89PNG
+
+
+IHDR X')tEXtchecksum486fb4a9cce591081e6fbe328386edd8<PI\xE6\x86IDATx\x9C\xED\xDDMh\U\xC7\xE1\xD0-\xC8HM\xA2](\xC5*XJ\xDCWA\x86.\xEC\xA6 \x88uѕ\xA1*.\x8A\xCBt\xA1\x88 \xA8EEa\xB4\x85\xA2\x9B@\x95KV\x82fPiA\xA2\xF5+.\xA4Š]4\xF3.fc?\xF3&\xFF\xCE$\x93\xE7Y\xB4g\xA6\xB7\x93\x93r\xE1\xFEr\xCF\xED\xBD\x93\x93\x93\x80\x9C\x9Bz=\x80~#\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa l\xF0\xFC\xF9\xF3\xBD\x9E\xF4\xC0\xF0\xF0p\xAF\xA7@\xDFr\x8B\xCDhll\xAC\xD7S\xA0\x9F
+\xB6~\x9B\x9B\x9B\xEB\xED<`\xED\x8D\xC6\xC2\xC2\xC2\xD5\xFE\xB4R\xA9T\xAB\xD5Rʁ\xBA8)6\xA3\xC1^O2\xEA\xF5z\xADV[\xFB6\xB0v\xE1%“'O\xEEڵk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0\xE0SO=u\xFF\xFD\xF7?~\xBC\xFFQ\xED\x8B\xDC=\xEC\x99
+m\xE5t\x91;]\xE0a\xCF\xF4\x89z\xBD\xDE\xEB)@[\xF8Q98\x83E\x9Fؿ\xFF\xE5o^~\xA7\x8FS\xA7Nue:lj\xCE`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x8Fʡ\xCD\xCC\xCC,999٫\x99\xB09	,\xFAP繄\x97?\x8B\xBA\xC0!@\x983X\xF4!K\x84\xF4\x96\xC0\xA2Y"\xA0\xB7,\x849\x83E\xB2D@o	,\xFA\x90%Bz\xCB!@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98;\xB9\xD3'.y<\xF4\x90\xC0\xA2O\xECٳg%\x9B\xCD\xCF\xCF\xDF\xE8\x99\x80%B\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800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E]8p\xA0\x94r\xEEܹ0#(\xA5Xccc\xBD\x9E	t\x95\xC0\xE0ƹ\xA9\xA8+\x80\xA8\xC1\xE1\xE1a?\xCA]\xE76
+\xFC\xBF@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\x98\xC0Xa L`\x84	,\x800\x81&\xB0\xC2@\xD8\xFF\xE35L<?1\xA6\xB7IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt (0 => 121722)


--- trunk/LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt	2012-07-03 02:22:46 UTC (rev 121722)
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x0
+  RenderBlock {HTML} at (0,0) size 800x0
+    RenderBody {BODY} at (0,0) size 800x0 [bgcolor=#C0C0C0]
+layer at (0,63) size 254x254
+  RenderPartObject {IFRAME} at (0,63) size 254x254 [border: (2px inset #000000)]
+    layer at (0,0) size 2008x2016
+      RenderView at (0,0) size 235x235
+    layer at (0,0) size 235x2016
+      RenderBlock {HTML} at (0,0) size 235x2016
+        RenderBody {BODY} at (8,8) size 2000x2000 [bgcolor=#FFFFFF]
+          RenderText {#text} at (0,0) size 54x19
+            text run at (0,0) width 54: "scroll me"

Modified: trunk/LayoutTests/platform/chromium-win/fast/box-sizing/box-sizing-expected.txt (121721 => 121722)


--- trunk/LayoutTests/platform/chromium-win/fast/box-sizing/box-sizing-expected.txt	2012-07-03 02:19:01 UTC (rev 121721)
+++ trunk/LayoutTests/platform/chromium-win/fast/box-sizing/box-sizing-expected.txt	2012-07-03 02:22:46 UTC (rev 121722)
@@ -81,10 +81,10 @@
     RenderBR {BR} at (6,26) size 0x19
     RenderBR {BR} at (6,46) size 0x19
 layer at (13,757) size 20x20
-  RenderImage {IMG} at (13,757) size 20x21 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]
+  RenderImage {IMG} at (13,757) size 20x20 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]
 layer at (43,757) size 20x20
-  RenderImage {IMG} at (43,757) size 20x21 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]
+  RenderImage {IMG} at (43,757) size 20x20 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]
 layer at (73,757) size 20x20
-  RenderImage {IMG} at (73,757) size 20x21 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]
+  RenderImage {IMG} at (73,757) size 20x20 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]
 layer at (103,757) size 20x20
-  RenderImage {IMG} at (103,757) size 20x21 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]
+  RenderImage {IMG} at (103,757) size 20x20 [color=#FFFFFF] [bgcolor=#FFA500] [border: (2px solid #000000)]

Modified: trunk/LayoutTests/platform/chromium-win/media/media-document-audio-repaint-expected.txt (121721 => 121722)


--- trunk/LayoutTests/platform/chromium-win/media/media-document-audio-repaint-expected.txt	2012-07-03 02:19:01 UTC (rev 121721)
+++ trunk/LayoutTests/platform/chromium-win/media/media-document-audio-repaint-expected.txt	2012-07-03 02:22:46 UTC (rev 121722)
@@ -15,7 +15,7 @@
             RenderBlock {HTML} at (0,0) size 380x330
               RenderBody {BODY} at (8,8) size 364x314 [bgcolor=#000000]
           layer at (40,165) size 300x1
-            RenderVideo {VIDEO} at (40,164) size 300x2
+            RenderVideo {VIDEO} at (40,165) size 300x1
           layer at (40,165) size 300x1
             RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 300x1
               RenderBlock {DIV} at (0,0) size 300x35

Modified: trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt (121721 => 121722)


--- trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt	2012-07-03 02:19:01 UTC (rev 121721)
+++ trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt	2012-07-03 02:22:46 UTC (rev 121722)
@@ -14,7 +14,7 @@
             RenderSVGRoot {svg} at (0,0) size 250x113
               RenderSVGRect {rect} at (0,0) size 250x113 [fill={[type=SOLID] [color=#ADD8E6]}] [x=0.00] [y=0.00] [width=250.00] [height=112.50]
               RenderSVGRect {rect} at (12,5) size 226x102 [fill={[type=SOLID] [color=#008000]}] [x=12.50] [y=5.63] [width=225.00] [height=101.25]
-layer at (0,118) size 250x112
-  RenderSVGRoot {svg} at (0,117) size 250x113
-    RenderSVGRect {rect} at (0,117) size 250x113 [fill={[type=SOLID] [color=#ADD8E6]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-    RenderSVGRect {rect} at (12,122) size 226x103 [fill={[type=SOLID] [color=#008000]}] [x=5.00] [y=5.00] [width=90.00] [height=90.00]
+layer at (0,118) size 250x113
+  RenderSVGRoot {svg} at (0,118) size 250x113
+    RenderSVGRect {rect} at (0,118) size 250x113 [fill={[type=SOLID] [color=#ADD8E6]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (12,123) size 226x102 [fill={[type=SOLID] [color=#008000]}] [x=5.00] [y=5.00] [width=90.00] [height=90.00]

Modified: trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt (121721 => 121722)


--- trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt	2012-07-03 02:19:01 UTC (rev 121721)
+++ trunk/LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt	2012-07-03 02:22:46 UTC (rev 121722)
@@ -14,7 +14,7 @@
             RenderSVGRoot {svg} at (0,0) size 125x113
               RenderSVGRect {rect} at (0,0) size 125x113 [fill={[type=SOLID] [color=#ADD8E6]}] [x=0.00] [y=0.00] [width=125.00] [height=112.50]
               RenderSVGRect {rect} at (6,5) size 113x102 [fill={[type=SOLID] [color=#008000]}] [x=6.25] [y=5.63] [width=112.50] [height=101.25]
-layer at (0,118) size 125x112
-  RenderSVGRoot {svg} at (0,117) size 125x113
-    RenderSVGRect {rect} at (0,117) size 125x113 [fill={[type=SOLID] [color=#ADD8E6]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-    RenderSVGRect {rect} at (6,122) size 113x103 [fill={[type=SOLID] [color=#008000]}] [x=5.00] [y=5.00] [width=90.00] [height=90.00]
+layer at (0,118) size 125x113
+  RenderSVGRoot {svg} at (0,118) size 125x113
+    RenderSVGRect {rect} at (0,118) size 125x113 [fill={[type=SOLID] [color=#ADD8E6]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (6,123) size 113x102 [fill={[type=SOLID] [color=#008000]}] [x=5.00] [y=5.00] [width=90.00] [height=90.00]

Modified: trunk/Source/WebCore/ChangeLog (121721 => 121722)


--- trunk/Source/WebCore/ChangeLog	2012-07-03 02:19:01 UTC (rev 121721)
+++ trunk/Source/WebCore/ChangeLog	2012-07-03 02:22:46 UTC (rev 121722)
@@ -1,3 +1,23 @@
+2012-07-02  Emil A Eklund  <[email protected]>
+
+        Position replaced elements on pixel bounds
+        https://bugs.webkit.org/show_bug.cgi?id=90354
+
+        Reviewed by Eric Seidel.
+
+        To avoid sizing and repaint issues we should layout replaced elements on
+        pixel bounds. We already ensure that replaced elements are sized in full
+        pixels and that they are painted on pixel bounds. By also ensuring that
+        they are placed on pixel bounds we avoid pixel having the size be
+        expanded by pixel snapping and repainting/invalidation rect issues when
+        scrolling.
+
+        Test: fast/repaint/repaint-during-scroll-with-zoom.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
+        (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
+
 2012-07-02  Nico Weber  <[email protected]>
 
         Fix new -Wunused-private-field violations

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (121721 => 121722)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2012-07-03 02:19:01 UTC (rev 121721)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2012-07-03 02:22:46 UTC (rev 121722)
@@ -3265,7 +3265,7 @@
 
     LayoutUnit logicalLeftPos = logicalLeftValue + marginLogicalLeftAlias;
     computeLogicalLeftPositionedOffset(logicalLeftPos, this, logicalWidth(), containerBlock, containerLogicalWidth);
-    setLogicalLeft(logicalLeftPos);
+    setLogicalLeft(logicalLeftPos.round());
 }
 
 void RenderBox::computePositionedLogicalHeightReplaced()
@@ -3394,7 +3394,7 @@
     // Use computed values to calculate the vertical position.
     LayoutUnit logicalTopPos = logicalTopValue + marginBeforeAlias;
     computeLogicalTopPositionedOffset(logicalTopPos, this, logicalHeight(), containerBlock, containerLogicalHeight);
-    setLogicalTop(logicalTopPos);
+    setLogicalTop(logicalTopPos.round());
 }
 
 LayoutRect RenderBox::localCaretRect(InlineBox* box, int caretOffset, LayoutUnit* extraWidthToEndOfLine)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to