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

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

Issue 2321333002: Translate the clip rect correctly when iterating over fragmentainers. (Closed)
Patch Set: Created 4 years, 3 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/LayoutTests/fast/multicol/nested-with-clipped-first-column-expected.html ('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/FragmentainerIterator.cpp
diff --git a/third_party/WebKit/Source/core/layout/FragmentainerIterator.cpp b/third_party/WebKit/Source/core/layout/FragmentainerIterator.cpp
index e7c13ea161b85452edd09e09699de83cc08d91b5..884c70a7fa2b6e93a3446fda02d3cb8518a3c14c 100644
--- a/third_party/WebKit/Source/core/layout/FragmentainerIterator.cpp
+++ b/third_party/WebKit/Source/core/layout/FragmentainerIterator.cpp
@@ -99,10 +99,14 @@ bool FragmentainerIterator::setFragmentainersOfInterest()
// might not have to walk the entire fragmentainer group.
group.columnIntervalForBlockRangeInFlowThread(m_logicalTopInFlowThread, m_logicalBottomInFlowThread, m_currentFragmentainerIndex, m_endFragmentainerIndex);
- // Now intersect with the fragmentainers that actually intersect with the clip rect, to narrow
- // it down even further.
+ // Now intersect with the fragmentainers that actually intersect with the visual clip rect, to
+ // narrow it down even further. The clip rect needs to be relative to the current fragmentainer
+ // group.
+ LayoutRect clipRect = m_clipRectInMulticolContainer;
+ LayoutSize offset = group.flowThreadTranslationAtOffset(group.logicalTopInFlowThread(), CoordinateSpaceConversion::Visual);
+ clipRect.move(-offset);
unsigned firstFragmentainerInClipRect, lastFragmentainerInClipRect;
- group.columnIntervalForVisualRect(m_clipRectInMulticolContainer, firstFragmentainerInClipRect, lastFragmentainerInClipRect);
+ group.columnIntervalForVisualRect(clipRect, firstFragmentainerInClipRect, lastFragmentainerInClipRect);
// If the two fragmentainer intervals are disjoint, there's nothing of interest in this
// fragmentainer group.
if (firstFragmentainerInClipRect > m_endFragmentainerIndex || lastFragmentainerInClipRect < m_currentFragmentainerIndex)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/nested-with-clipped-first-column-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698