Title: [118094] trunk
Revision
118094
Author
[email protected]
Date
2012-05-22 18:39:09 -0700 (Tue, 22 May 2012)

Log Message

RenderInline::absoluteRects does some incorrect layout math
https://bugs.webkit.org/show_bug.cgi?id=87036

Reviewed by Eric Seidel.

Source/WebCore:

http://trac.webkit.org/changeset/88297/trunk/Source/WebCore/rendering/RenderInline.cpp
contained a typo.  We should accumulate offsets, not add sizes to
offsets.

Test: fast/inline/boundingBox-with-continuation.html

* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteRects):
(WebCore):

LayoutTests:

* fast/inline/boundingBox-with-continuation-expected.txt: Added.
* fast/inline/boundingBox-with-continuation.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (118093 => 118094)


--- trunk/LayoutTests/ChangeLog	2012-05-23 01:28:03 UTC (rev 118093)
+++ trunk/LayoutTests/ChangeLog	2012-05-23 01:39:09 UTC (rev 118094)
@@ -1,3 +1,13 @@
+2012-05-22  Adam Barth  <[email protected]>
+
+        RenderInline::absoluteRects does some incorrect layout math
+        https://bugs.webkit.org/show_bug.cgi?id=87036
+
+        Reviewed by Eric Seidel.
+
+        * fast/inline/boundingBox-with-continuation-expected.txt: Added.
+        * fast/inline/boundingBox-with-continuation.html: Added.
+
 2012-05-22  Jessie Berlin  <[email protected]>
 
         Do some more clean up on the WK2 Skipped list.

Added: trunk/LayoutTests/fast/inline/boundingBox-with-continuation-expected.txt (0 => 118094)


--- trunk/LayoutTests/fast/inline/boundingBox-with-continuation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/boundingBox-with-continuation-expected.txt	2012-05-23 01:39:09 UTC (rev 118094)
@@ -0,0 +1,3 @@
+
+
+PASS

Added: trunk/LayoutTests/fast/inline/boundingBox-with-continuation.html (0 => 118094)


--- trunk/LayoutTests/fast/inline/boundingBox-with-continuation.html	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/boundingBox-with-continuation.html	2012-05-23 01:39:09 UTC (rev 118094)
@@ -0,0 +1,24 @@
+<!doctype html> <html> <head>
+<script>
+if (window.layoutTestController)
+    window.layoutTestController.dumpAsText()
+
+function runTest()
+{
+    var elem = document.getElementById('test');
+    if (window.internals) {
+        var rect = internals.boundingBox(elem);
+        if (rect.width == 400)
+            document.getElementById('console').innerHTML = "PASS"
+        else
+            document.getElementById('console').innerHTML = "FAIL: width was not 400: " + JSON.stringify(rect);
+    }
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<div id="container" style="width:400px"><span id="test"><img style="width: 50px; height: 50px" src="" style="width: 75px; height: 200px "></div><img style="width: 50px; height: 50px" src=""
+<div id="console">FAIL: Test did not run.</div>
+</body>
+</html>
+

Modified: trunk/Source/WebCore/ChangeLog (118093 => 118094)


--- trunk/Source/WebCore/ChangeLog	2012-05-23 01:28:03 UTC (rev 118093)
+++ trunk/Source/WebCore/ChangeLog	2012-05-23 01:39:09 UTC (rev 118094)
@@ -1,3 +1,20 @@
+2012-05-22  Adam Barth  <[email protected]>
+
+        RenderInline::absoluteRects does some incorrect layout math
+        https://bugs.webkit.org/show_bug.cgi?id=87036
+
+        Reviewed by Eric Seidel.
+
+        http://trac.webkit.org/changeset/88297/trunk/Source/WebCore/rendering/RenderInline.cpp
+        contained a typo.  We should accumulate offsets, not add sizes to
+        offsets.
+
+        Test: fast/inline/boundingBox-with-continuation.html
+
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::absoluteRects):
+        (WebCore):
+
 2012-05-22  Dana Jansens  <[email protected]>
 
         [chromium] Don't force the visibleLayerRect to be empty for animating layers whose front face is not visible

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (118093 => 118094)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2012-05-23 01:28:03 UTC (rev 118093)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2012-05-23 01:39:09 UTC (rev 118094)
@@ -611,7 +611,7 @@
     if (continuation()) {
         if (continuation()->isBox()) {
             RenderBox* box = toRenderBox(continuation());
-            continuation()->absoluteRects(rects, toLayoutPoint(accumulatedOffset - containingBlock()->location() + box->size()));
+            continuation()->absoluteRects(rects, toLayoutPoint(accumulatedOffset - containingBlock()->location() + box->locationOffset()));
         } else
             continuation()->absoluteRects(rects, toLayoutPoint(accumulatedOffset - containingBlock()->location()));
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to