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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp

Issue 1817693002: Support edge-inclusive intersections in mapToVisibleRectInAncestorSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer-idle-callback
Patch Set: more tests Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 m_columnSetsInvalidated = true; 90 m_columnSetsInvalidated = true;
91 } 91 }
92 92
93 void LayoutFlowThread::validateColumnSets() 93 void LayoutFlowThread::validateColumnSets()
94 { 94 {
95 m_columnSetsInvalidated = false; 95 m_columnSetsInvalidated = false;
96 updateLogicalWidth(); // Called to get the maximum logical width for the col umnSet. 96 updateLogicalWidth(); // Called to get the maximum logical width for the col umnSet.
97 generateColumnSetIntervalTree(); 97 generateColumnSetIntervalTree();
98 } 98 }
99 99
100 void LayoutFlowThread::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObjec t* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationSt ate) const 100 bool LayoutFlowThread::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObjec t* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationSt ate, VisibleRectFlags visibleRectFlags) const
101 { 101 {
102 ASSERT(ancestor != this); // A flow thread should never be an invalidation c ontainer. 102 ASSERT(ancestor != this); // A flow thread should never be an invalidation c ontainer.
103 // |rect| is a layout rectangle, where the block direction coordinate is fli pped for writing 103 // |rect| is a layout rectangle, where the block direction coordinate is fli pped for writing
104 // mode. fragmentsBoundingBox(), on the other hand, works on physical rectan gles, so we need to 104 // mode. fragmentsBoundingBox(), on the other hand, works on physical rectan gles, so we need to
105 // flip the rectangle before and after calling it. 105 // flip the rectangle before and after calling it.
106 flipForWritingMode(rect); 106 flipForWritingMode(rect);
107 rect = fragmentsBoundingBox(rect); 107 rect = fragmentsBoundingBox(rect);
108 flipForWritingMode(rect); 108 flipForWritingMode(rect);
109 LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvali dationState); 109 return LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, rect, pain tInvalidationState, visibleRectFlags);
110 } 110 }
111 111
112 void LayoutFlowThread::layout() 112 void LayoutFlowThread::layout()
113 { 113 {
114 m_pageLogicalSizeChanged = m_columnSetsInvalidated && everHadLayout(); 114 m_pageLogicalSizeChanged = m_columnSetsInvalidated && everHadLayout();
115 LayoutBlockFlow::layout(); 115 LayoutBlockFlow::layout();
116 m_pageLogicalSizeChanged = false; 116 m_pageLogicalSizeChanged = false;
117 } 117 }
118 118
119 void LayoutFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L ogicalExtentComputedValues& computedValues) const 119 void LayoutFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L ogicalExtentComputedValues& computedValues) const
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval) 196 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval)
197 { 197 {
198 if (m_result) 198 if (m_result)
199 return; 199 return;
200 if (interval.low() <= m_offset && interval.high() > m_offset) 200 if (interval.low() <= m_offset && interval.high() > m_offset)
201 m_result = interval.data(); 201 m_result = interval.data();
202 } 202 }
203 203
204 } // namespace blink 204 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlowThread.h ('k') | third_party/WebKit/Source/core/layout/LayoutInline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698