Index: third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp b/third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp |
index 5eae393e2aa636d4e15d5605d726220a4a2fb9e6..3002b95552d8e3b2389fee4d20dee9fd8c2df18d 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp |
@@ -187,6 +187,24 @@ LayoutRect LayoutFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundin |
return result; |
} |
+void LayoutFlowThread::flowThreadToContainingCoordinateSpace(LayoutUnit& blockPosition, LayoutUnit& inlinePosition) const |
+{ |
+ LayoutPoint position(inlinePosition, blockPosition); |
+ // First we have to make |position| physical, because that's what offsetLeft() expects and returns. |
+ if (!isHorizontalWritingMode()) |
+ position = position.transposedPoint(); |
+ position = flipForWritingMode(position); |
+ |
+ position.move(columnOffset(position)); |
+ |
+ // Make |position| logical again, and read out the values. |
+ position = flipForWritingMode(position); |
+ if (!isHorizontalWritingMode()) |
+ position = position.transposedPoint(); |
+ blockPosition = position.y(); |
+ inlinePosition = position.x(); |
+} |
+ |
void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiColumnSetInterval& interval) |
{ |
if (m_result) |