Title: [205920] trunk/Source/WebCore
Revision
205920
Author
[email protected]
Date
2016-09-14 11:46:32 -0700 (Wed, 14 Sep 2016)

Log Message

ShowRenderTree should take position offset into account when printing inflow positioned renderers.
https://bugs.webkit.org/show_bug.cgi?id=161978

Reviewed by Simon Fraser.

Adjust (x, y) with the inflow positioned renderer's offset.

Not testable.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRenderObject):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (205919 => 205920)


--- trunk/Source/WebCore/ChangeLog	2016-09-14 18:26:23 UTC (rev 205919)
+++ trunk/Source/WebCore/ChangeLog	2016-09-14 18:46:32 UTC (rev 205920)
@@ -1,3 +1,17 @@
+2016-09-14  Zalan Bujtas  <[email protected]>
+
+        ShowRenderTree should take position offset into account when printing inflow positioned renderers.
+        https://bugs.webkit.org/show_bug.cgi?id=161978
+
+        Reviewed by Simon Fraser.
+
+        Adjust (x, y) with the inflow positioned renderer's offset.  
+
+        Not testable.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::showRenderObject):
+
 2016-09-14  Alex Christensen  <[email protected]>
 
         URLParser: Add fast path for utf8 encoding queries

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (205919 => 205920)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2016-09-14 18:26:23 UTC (rev 205919)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2016-09-14 18:46:32 UTC (rev 205920)
@@ -1116,7 +1116,10 @@
         fprintf(stderr, "%s", name.utf8().data());
 
     if (is<RenderBox>(*this)) {
-        FloatRect boxRect = downcast<RenderBox>(*this).frameRect();
+        auto& renderBox = downcast<RenderBox>(*this);
+        FloatRect boxRect = renderBox.frameRect();
+        if (renderBox.isInFlowPositioned())
+            boxRect.move(renderBox.offsetForInFlowPosition());
         fprintf(stderr, "  (%.2f, %.2f) (%.2f, %.2f)", boxRect.x(), boxRect.y(), boxRect.width(), boxRect.height());
     } else if (is<RenderInline>(*this) && isInFlowPositioned()) {
         FloatSize inlineOffset = downcast<RenderInline>(*this).offsetForInFlowPosition();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to