Title: [189026] trunk
- Revision
- 189026
- Author
- [email protected]
- Date
- 2015-08-27 08:48:33 -0700 (Thu, 27 Aug 2015)
Log Message
Subpixel positioned iframe's repaint area calculation problem.
https://bugs.webkit.org/show_bug.cgi?id=148422
When the repaint rect position is floored for iframes, we need
to expand the size so that it still covers the content.
Reviewed by Simon Fraser.
Source/WebCore:
Test: fast/repaint/content-inside-subpixel-positioned-iframe.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
LayoutTests:
* fast/repaint/content-inside-subpixel-positioned-iframe-expected.txt: Added.
* fast/repaint/content-inside-subpixel-positioned-iframe.html: Copied from LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html.
* fast/repaint/hidpi-content-inside-iframe-leaves-trails.html:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (189025 => 189026)
--- trunk/LayoutTests/ChangeLog 2015-08-27 15:35:12 UTC (rev 189025)
+++ trunk/LayoutTests/ChangeLog 2015-08-27 15:48:33 UTC (rev 189026)
@@ -1,3 +1,17 @@
+2015-08-27 Zalan Bujtas <[email protected]>
+
+ Subpixel positioned iframe's repaint area calculation problem.
+ https://bugs.webkit.org/show_bug.cgi?id=148422
+
+ When the repaint rect position is floored for iframes, we need
+ to expand the size so that it still covers the content.
+
+ Reviewed by Simon Fraser.
+
+ * fast/repaint/content-inside-subpixel-positioned-iframe-expected.txt: Added.
+ * fast/repaint/content-inside-subpixel-positioned-iframe.html: Copied from LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html.
+ * fast/repaint/hidpi-content-inside-iframe-leaves-trails.html:
+
2015-08-27 Enrica Casucci <[email protected]>
Add some new emoji with modifiers and new sequence.
Added: trunk/LayoutTests/fast/repaint/content-inside-subpixel-positioned-iframe-expected.txt (0 => 189026)
--- trunk/LayoutTests/fast/repaint/content-inside-subpixel-positioned-iframe-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/repaint/content-inside-subpixel-positioned-iframe-expected.txt 2015-08-27 15:48:33 UTC (rev 189026)
@@ -0,0 +1,5 @@
+PASS repaintRects.indexOf('rect 0 0 11 11') is not -1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: trunk/LayoutTests/fast/repaint/content-inside-subpixel-positioned-iframe.html (from rev 189025, trunk/LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html) (0 => 189026)
--- trunk/LayoutTests/fast/repaint/content-inside-subpixel-positioned-iframe.html (rev 0)
+++ trunk/LayoutTests/fast/repaint/content-inside-subpixel-positioned-iframe.html 2015-08-27 15:48:33 UTC (rev 189026)
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that subpixel positioned iframe content's repaint rect is properly calculated.</title>
+<script>jsTestIsAsync = true;</script>
+<script src=""
+<script>
+ if (window.testRunner && window.internals) {
+ testRunner.dumpAsText(false);
+ internals.startTrackingRepaints();
+ }
+
+var repaintRects;
+function test() {
+ setTimeout(function() {
+ var iframeDocument = window.frames["embeddedFrame"].document;
+ var divInsideIframe = iframeDocument.getElementById("foo");
+ divInsideIframe.style.left = "20px";
+ divInsideIframe.style.top = "20px";
+ iframeDocument.body.offsetWidth;
+ if (window.testRunner && window.internals) {
+ repaintRects = internals.repaintRectsAsText();
+ shouldNotBe("repaintRects.indexOf('rect 0 0 11 11')", "-1");
+ internals.stopTrackingRepaints();
+ finishJSTest();
+ }
+ }, 10);
+ }
+</script>
+</head>
+<body>
+ <iframe _onload_="test()" name="embeddedFrame" style="position:absolute; top: 0.5px; left: 0.5px; width: 200px; height: 200px" frameBorder=0; srcdoc='
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <style>
+ div {
+ position: absolute;
+ background: red;
+ height: 10px;
+ width: 10px;
+ top: 0px;
+ left: 0px;
+ }
+ </style>
+ </head>
+ <body>
+ <div id=foo></div>
+ </body>
+ </html>'>
+ </iframe>
+</body>
+<script src=""
+</html>
+
\ No newline at end of file
Modified: trunk/LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails-expected.txt (189025 => 189026)
--- trunk/LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails-expected.txt 2015-08-27 15:35:12 UTC (rev 189025)
+++ trunk/LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails-expected.txt 2015-08-27 15:48:33 UTC (rev 189026)
@@ -1,4 +1,4 @@
-PASS repaintRects.indexOf('rect 0 0 101 100') is not -1
+PASS repaintRects.indexOf('rect 0 0 101.50 100') is not -1
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html (189025 => 189026)
--- trunk/LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html 2015-08-27 15:35:12 UTC (rev 189025)
+++ trunk/LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html 2015-08-27 15:48:33 UTC (rev 189026)
@@ -18,7 +18,7 @@
iframeDocument.body.offsetWidth;
if (window.testRunner && window.internals) {
repaintRects = internals.repaintRectsAsText();
- shouldNotBe("repaintRects.indexOf('rect 0 0 101 100')", "-1");
+ shouldNotBe("repaintRects.indexOf('rect 0 0 101.50 100')", "-1");
internals.stopTrackingRepaints();
finishJSTest();
}
Modified: trunk/Source/WebCore/ChangeLog (189025 => 189026)
--- trunk/Source/WebCore/ChangeLog 2015-08-27 15:35:12 UTC (rev 189025)
+++ trunk/Source/WebCore/ChangeLog 2015-08-27 15:48:33 UTC (rev 189026)
@@ -1,3 +1,18 @@
+2015-08-27 Zalan Bujtas <[email protected]>
+
+ Subpixel positioned iframe's repaint area calculation problem.
+ https://bugs.webkit.org/show_bug.cgi?id=148422
+
+ When the repaint rect position is floored for iframes, we need
+ to expand the size so that it still covers the content.
+
+ Reviewed by Simon Fraser.
+
+ Test: fast/repaint/content-inside-subpixel-positioned-iframe.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeRectForRepaint):
+
2015-08-27 Enrica Casucci <[email protected]>
Add some new emoji with modifiers and new sequence.
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (189025 => 189026)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2015-08-27 15:35:12 UTC (rev 189025)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2015-08-27 15:48:33 UTC (rev 189026)
@@ -2243,12 +2243,15 @@
LayoutSize locationOffset = this->locationOffset();
// FIXME: This is needed as long as RenderWidget snaps to integral size/position.
- if (isRenderReplaced() && isWidget())
- locationOffset = toIntSize(flooredIntPoint(locationOffset));
+ if (isRenderReplaced() && isWidget()) {
+ LayoutSize flooredLocationOffset = toIntSize(flooredIntPoint(locationOffset));
+ rect.expand(locationOffset - flooredLocationOffset);
+ locationOffset = flooredLocationOffset;
+ }
LayoutPoint topLeft = rect.location();
topLeft.move(locationOffset);
- // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
+ // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
// in the parent's coordinate space that encloses us.
if (hasLayer() && layer()->transform()) {
fixed = position == FixedPosition;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes