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

Side by Side Diff: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h

Issue 1907443003: Translate flow thread coords to the nearest enclosing coord space when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a unit test too. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MultiColumnFragmentainerGroup_h 5 #ifndef MultiColumnFragmentainerGroup_h
6 #define MultiColumnFragmentainerGroup_h 6 #define MultiColumnFragmentainerGroup_h
7 7
8 #include "core/layout/LayoutMultiColumnFlowThread.h" 8 #include "core/layout/LayoutMultiColumnFlowThread.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // The bottom of our flow thread portion 55 // The bottom of our flow thread portion
56 LayoutUnit logicalBottomInFlowThread() const { return m_logicalBottomInFlowT hread; } 56 LayoutUnit logicalBottomInFlowThread() const { return m_logicalBottomInFlowT hread; }
57 void setLogicalBottomInFlowThread(LayoutUnit logicalBottomInFlowThread) { AS SERT(logicalBottomInFlowThread >= m_logicalTopInFlowThread); m_logicalBottomInFl owThread = logicalBottomInFlowThread; } 57 void setLogicalBottomInFlowThread(LayoutUnit logicalBottomInFlowThread) { AS SERT(logicalBottomInFlowThread >= m_logicalTopInFlowThread); m_logicalBottomInFl owThread = logicalBottomInFlowThread; }
58 58
59 // The height of our flow thread portion 59 // The height of our flow thread portion
60 LayoutUnit logicalHeightInFlowThread() const { return m_logicalBottomInFlowT hread - m_logicalTopInFlowThread; } 60 LayoutUnit logicalHeightInFlowThread() const { return m_logicalBottomInFlowT hread - m_logicalTopInFlowThread; }
61 61
62 void resetColumnHeight(); 62 void resetColumnHeight();
63 bool recalculateColumnHeight(); 63 bool recalculateColumnHeight();
64 64
65 LayoutSize flowThreadTranslationAtOffset(LayoutUnit offsetInFlowThread) cons t; 65 LayoutSize flowThreadTranslationAtOffset(LayoutUnit, CoordinateSpaceConversi on) const;
66 LayoutUnit columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const; 66 LayoutUnit columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const;
67 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st; 67 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st;
68 LayoutRect fragmentsBoundingBox(const LayoutRect& boundingBoxInFlowThread) c onst; 68 LayoutRect fragmentsBoundingBox(const LayoutRect& boundingBoxInFlowThread) c onst;
69 69
70 void collectLayerFragments(PaintLayerFragments&, const LayoutRect& layerBoun dingBox, const LayoutRect& dirtyRect) const; 70 void collectLayerFragments(PaintLayerFragments&, const LayoutRect& layerBoun dingBox, const LayoutRect& dirtyRect) const;
71 LayoutRect calculateOverflow() const; 71 LayoutRect calculateOverflow() const;
72 72
73 enum ColumnIndexCalculationMode { 73 enum ColumnIndexCalculationMode {
74 ClampToExistingColumns, // Stay within the range of already existing col umns. 74 ClampToExistingColumns, // Stay within the range of already existing col umns.
75 AssumeNewColumns // Allow column indices outside the range of already ex isting columns. 75 AssumeNewColumns // Allow column indices outside the range of already ex isting columns.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 private: 152 private:
153 LayoutMultiColumnSet& m_columnSet; 153 LayoutMultiColumnSet& m_columnSet;
154 154
155 Vector<MultiColumnFragmentainerGroup, 1> m_groups; 155 Vector<MultiColumnFragmentainerGroup, 1> m_groups;
156 }; 156 };
157 157
158 } // namespace blink 158 } // namespace blink
159 159
160 #endif // MultiColumnFragmentainerGroup_h 160 #endif // MultiColumnFragmentainerGroup_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698