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

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

Issue 2360913004: Support for multiple block fragments in getClientRects(). (Closed)
Patch Set: fast/overflow/overflow-height-float-not-removed-crash3.html crashed because saturated LayoutUnits caused zero height 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
Index: third_party/WebKit/Source/core/layout/FragmentainerIterator.h
diff --git a/third_party/WebKit/Source/core/layout/FragmentainerIterator.h b/third_party/WebKit/Source/core/layout/FragmentainerIterator.h
index 43a6a07ccc94193f048801b527345f671c109204..e5afcff87b2d5591e1ea15e920f2b5c0c2ddde33 100644
--- a/third_party/WebKit/Source/core/layout/FragmentainerIterator.h
+++ b/third_party/WebKit/Source/core/layout/FragmentainerIterator.h
@@ -16,7 +16,11 @@ class MultiColumnFragmentainerGroup;
// in block direction order.
class FragmentainerIterator {
public:
- FragmentainerIterator(const LayoutFlowThread&, const LayoutRect& physicalBoundingBoxInFlowThread, const LayoutRect& clipRectInMulticolContainer);
+ // Initialize the iterator, and move to the first fragmentainer of interest.
+ // The clip rectangle is optional. If it's empty, it means that no clipping will be performed,
+ // and that the only thing that can limit the set of fragmentainers to visit is
+ // |physicalBoundingBox|.
+ FragmentainerIterator(const LayoutFlowThread&, const LayoutRect& physicalBoundingBoxInFlowThread, const LayoutRect& clipRectInMulticolContainer = LayoutRect());
// Advance to the next fragmentainer. Not allowed to call this if atEnd() is true.
void advance();
@@ -26,10 +30,13 @@ public:
// The physical translation to apply to shift the box when converting from flowthread to visual
// coordinates.
- LayoutSize paginationOffset() const { DCHECK(!atEnd()); return m_paginationOffset; }
+ LayoutSize paginationOffset() const;
+
+ // Return the physical content box of the current fragmentainer, relative to the flow thread.
+ LayoutRect fragmentainerInFlowThread() const;
// Return the physical clip rectangle of the current fragmentainer, relative to the flow thread.
- LayoutRect clipRectInFlowThread() const { DCHECK(!atEnd()); return m_clipRectInFlowThread; }
+ LayoutRect clipRectInFlowThread() const;
private:
const LayoutFlowThread& m_flowThread;
@@ -43,14 +50,11 @@ private:
LayoutUnit m_logicalTopInFlowThread;
LayoutUnit m_logicalBottomInFlowThread;
- LayoutSize m_paginationOffset;
- LayoutRect m_clipRectInFlowThread;
-
const MultiColumnFragmentainerGroup& currentGroup() const;
void moveToNextFragmentainerGroup();
bool setFragmentainersOfInterest();
- void updateOutput();
void setAtEnd() { m_currentColumnSet = nullptr; }
+ bool hasClipRect() const { return !m_clipRectInMulticolContainer.isEmpty(); }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698