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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.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 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 LayoutRect flowThreadPortionOverflowRect() const; 116 LayoutRect flowThreadPortionOverflowRect() const;
117 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort ionRect, bool isFirstPortion, bool isLastPortion) const; 117 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort ionRect, bool isFirstPortion, bool isLastPortion) const;
118 118
119 // The used CSS value of column-count, i.e. how many columns there are room for without overflowing. 119 // The used CSS value of column-count, i.e. how many columns there are room for without overflowing.
120 unsigned usedColumnCount() const { return multiColumnFlowThread()->columnCou nt(); } 120 unsigned usedColumnCount() const { return multiColumnFlowThread()->columnCou nt(); }
121 121
122 bool heightIsAuto() const; 122 bool heightIsAuto() const;
123 123
124 // Find the column that contains the given block offset, and return the tran slation needed to 124 // Find the column that contains the given block offset, and return the tran slation needed to
125 // get from flow thread coordinates to visual coordinates. 125 // get from flow thread coordinates to visual coordinates.
126 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; 126 LayoutSize flowThreadTranslationAtOffset(LayoutUnit, CoordinateSpaceConversi on) const;
127 127
128 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st; 128 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st;
129 129
130 // (Re-)calculate the column height if it's auto. This is first and foremost needed by sets that 130 // (Re-)calculate the column height if it's auto. This is first and foremost needed by sets that
131 // are to balance the column height, but even when it isn't to be balanced, this is necessary if 131 // are to balance the column height, but even when it isn't to be balanced, this is necessary if
132 // the multicol container's height is constrained. 132 // the multicol container's height is constrained.
133 bool recalculateColumnHeight(); 133 bool recalculateColumnHeight();
134 134
135 // Reset previously calculated column height. Will mark for layout if needed . 135 // Reset previously calculated column height. Will mark for layout if needed .
136 void resetColumnHeight(); 136 void resetColumnHeight();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 bool m_initialHeightCalculated; 205 bool m_initialHeightCalculated;
206 }; 206 };
207 207
208 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); 208 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet());
209 209
210 } // namespace blink 210 } // namespace blink
211 211
212 #endif // LayoutMultiColumnSet_h 212 #endif // LayoutMultiColumnSet_h
213 213
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698