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

Unified Diff: Source/core/layout/MultiColumnFragmentainerGroup.h

Issue 978603003: [New Multicolumn] Make positionForPoint() work. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase master Created 5 years, 9 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
Index: Source/core/layout/MultiColumnFragmentainerGroup.h
diff --git a/Source/core/layout/MultiColumnFragmentainerGroup.h b/Source/core/layout/MultiColumnFragmentainerGroup.h
index 5c87287e77e580bbca8bbd5062090b3b33d737f8..71f8714e7f8fd73683bab116aec6f4b1a918feb6 100644
--- a/Source/core/layout/MultiColumnFragmentainerGroup.h
+++ b/Source/core/layout/MultiColumnFragmentainerGroup.h
@@ -60,6 +60,7 @@ public:
LayoutSize flowThreadTranslationAtOffset(LayoutUnit offsetInFlowThread) const;
LayoutUnit columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const;
+ LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) const;
void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect) const;
LayoutRect calculateOverflow() const;
@@ -83,6 +84,7 @@ private:
LayoutUnit calculateColumnHeight(BalancedColumnHeightCalculation) const;
LayoutRect columnRectAt(unsigned columnIndex) const;
+ LayoutUnit logicalTopInFlowThreadAt(unsigned columnIndex) const { return m_logicalTopInFlowThread + columnIndex * m_columnHeight; }
LayoutRect flowThreadPortionRectAt(unsigned columnIndex) const;
LayoutRect flowThreadPortionOverflowRect(const LayoutRect& flowThreadPortion, unsigned columnIndex, unsigned columnCount, LayoutUnit columnGap) const;
@@ -92,6 +94,11 @@ private:
};
unsigned columnIndexAtOffset(LayoutUnit offsetInFlowThread, ColumnIndexCalculationMode = ClampToExistingColumns) const;
+ // Return the column that the specified visual point belongs to. Only the coordinate on the
+ // column progression axis is relevant. Every point belongs to a column, even if said point is
+ // not inside any of the columns.
+ unsigned columnIndexAtVisualPoint(const LayoutPoint& visualPoint) const;
Julien - ping for review 2015/03/09 15:49:03 It's clunky that we need to convert the point into
mstensho (USE GERRIT) 2015/03/12 11:43:27 This method doesn't convert to flow-thread coordin
+
LayoutMultiColumnSet& m_columnSet;
LayoutUnit m_logicalTop;

Powered by Google App Engine
This is Rietveld 408576698