Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1434)

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 256743006: [New Multicolumn] Make offsetLeft, offsetTop and getClientRects() behave. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index ddc564a6cd30aced7b51ef9f6dcf881dd5ae2be1..e3bc8587d8e937e58c487dca8927ddba1b89a0dc 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1882,8 +1882,18 @@ LayoutSize RenderBox::offsetFromContainer(RenderObject* o, const LayoutPoint& po
if (offsetDependsOnPoint)
*offsetDependsOnPoint = true;
- } else
+ } else {
offset += topLeftLocationOffset();
+ if (o->isRenderFlowThread()) {
+ // So far the point has been in flow thread coordinates (i.e. as if everything in
+ // the fragmentation context lived in one tall single column). Convert it to a
+ // visual point now.
+ LayoutPoint pointInContainer = point + offset;
+ offset += o->columnOffset(pointInContainer);
+ if (offsetDependsOnPoint)
+ *offsetDependsOnPoint = true;
+ }
+ }
}
if (o->hasOverflowClip())
@@ -1892,9 +1902,6 @@ LayoutSize RenderBox::offsetFromContainer(RenderObject* o, const LayoutPoint& po
if (style()->position() == AbsolutePosition && o->isInFlowPositioned() && o->isRenderInline())
offset += toRenderInline(o)->offsetForInFlowPositionedInline(*this);
- if (offsetDependsOnPoint)
- *offsetDependsOnPoint |= o->isRenderFlowThread();
-
return offset;
}
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698