Index: Source/core/layout/LayoutMultiColumnSet.cpp |
diff --git a/Source/core/layout/LayoutMultiColumnSet.cpp b/Source/core/layout/LayoutMultiColumnSet.cpp |
index 54f8af4520021e936bdacd86e8d0b160f55c23ce..d8c8f0fe9092b401a37856ee530d11e3bbbcf4aa 100644 |
--- a/Source/core/layout/LayoutMultiColumnSet.cpp |
+++ b/Source/core/layout/LayoutMultiColumnSet.cpp |
@@ -26,6 +26,7 @@ |
#include "config.h" |
#include "core/layout/LayoutMultiColumnSet.h" |
+#include "core/editing/PositionWithAffinity.h" |
#include "core/layout/LayoutMultiColumnFlowThread.h" |
#include "core/layout/MultiColumnFragmentainerGroup.h" |
#include "core/paint/MultiColumnSetPainter.h" |
@@ -59,6 +60,12 @@ const MultiColumnFragmentainerGroup& LayoutMultiColumnSet::fragmentainerGroupAtF |
return m_fragmentainerGroups.first(); |
} |
+const MultiColumnFragmentainerGroup& LayoutMultiColumnSet::fragmentainerGroupAtVisualPoint(const LayoutPoint&) const |
+{ |
+ // FIXME: implement this, once we have support for multiple rows. |
+ return m_fragmentainerGroups.first(); |
+} |
+ |
LayoutUnit LayoutMultiColumnSet::pageLogicalHeight() const |
{ |
// FIXME: pageLogicalHeight() needs to take a flow thread offset parameter, so that we can |
@@ -185,6 +192,15 @@ void LayoutMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTo |
computedValues.m_position = logicalTop; |
} |
+PositionWithAffinity LayoutMultiColumnSet::positionForPoint(const LayoutPoint& point) |
+{ |
+ // Convert the visual point to a flow thread point. |
+ const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtVisualPoint(point); |
+ LayoutPoint flowThreadPoint = row.visualPointToFlowThreadPoint(point + row.offsetFromColumnSet()); |
+ // Then drill into the flow thread, where we'll find the actual content. |
+ return flowThread()->positionForPoint(flowThreadPoint); |
+} |
+ |
LayoutUnit LayoutMultiColumnSet::columnGap() const |
{ |
LayoutBlockFlow* parentBlock = multiColumnBlockFlow(); |