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

Unified Diff: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp

Issue 2750153002: getClientRects() shouldn't clip against any ancestors. (Closed)
Patch Set: Document tests. Use width/height instead of right/bottom, since that's easier to follow. Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
diff --git a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
index e747f429b52b2dfdcda8970d6557a6ce4fc75676..11c9a64140b026fbf938342706f5ae18163e43b9 100644
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
@@ -416,7 +416,8 @@ LayoutRect MultiColumnFragmentainerGroup::flowThreadPortionRectAt(
}
LayoutRect MultiColumnFragmentainerGroup::flowThreadPortionOverflowRectAt(
- unsigned columnIndex) const {
+ unsigned columnIndex,
+ ClipRectAxesSelector axesSelector) const {
// This function determines the portion of the flow thread that paints for the
// column. Along the inline axis, columns are unclipped at outside edges
// (i.e., the first and last column in the set), and they clip to half the
@@ -454,21 +455,27 @@ LayoutRect MultiColumnFragmentainerGroup::flowThreadPortionOverflowRectAt(
overflowRect.shiftYEdgeTo(portionRect.y());
if (!isLastColumnInMulticolContainer)
overflowRect.shiftMaxYEdgeTo(portionRect.maxY());
- if (!isLeftmostColumn)
- overflowRect.shiftXEdgeTo(portionRect.x() - columnGap / 2);
- if (!isRightmostColumn)
- overflowRect.shiftMaxXEdgeTo(portionRect.maxX() + columnGap -
- columnGap / 2);
+ if (axesSelector == BothAxes) {
+ if (!isLeftmostColumn)
+ overflowRect.shiftXEdgeTo(portionRect.x() - columnGap / 2);
+ if (!isRightmostColumn) {
+ overflowRect.shiftMaxXEdgeTo(portionRect.maxX() + columnGap -
+ columnGap / 2);
+ }
+ }
} else {
if (!isFirstColumnInMulticolContainer)
overflowRect.shiftXEdgeTo(portionRect.x());
if (!isLastColumnInMulticolContainer)
overflowRect.shiftMaxXEdgeTo(portionRect.maxX());
- if (!isLeftmostColumn)
- overflowRect.shiftYEdgeTo(portionRect.y() - columnGap / 2);
- if (!isRightmostColumn)
- overflowRect.shiftMaxYEdgeTo(portionRect.maxY() + columnGap -
- columnGap / 2);
+ if (axesSelector == BothAxes) {
+ if (!isLeftmostColumn)
+ overflowRect.shiftYEdgeTo(portionRect.y() - columnGap / 2);
+ if (!isRightmostColumn) {
+ overflowRect.shiftMaxYEdgeTo(portionRect.maxY() + columnGap -
+ columnGap / 2);
+ }
+ }
}
return overflowRect;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698