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

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

Issue 2037383002: [css-grid] Fix definite/indefinite size detection on block axis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-percentage-widths
Patch Set: Use firstInFlowChildBox() Created 4 years, 6 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/LayoutBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index db613b53a1d742b4be8e9188a40ea2c221530ef9..da79f2cdaca866e52e19c5649a52ccb1a412194e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -199,6 +199,7 @@ public:
// Use this with caution! No type checking is done!
LayoutBox* firstChildBox() const;
+ LayoutBox* firstInFlowChildBox() const;
LayoutBox* lastChildBox() const;
int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); }
@@ -740,7 +741,6 @@ public:
bool hasDefiniteLogicalWidth() const;
bool percentageLogicalHeightIsResolvable() const;
- bool hasDefiniteLogicalHeight() const;
LayoutUnit computePercentageLogicalHeight(const Length& height) const;
// Block flows subclass availableWidth/Height to handle multi column layout (shrinking the width/height available to children when laying out.)
@@ -1170,6 +1170,14 @@ inline LayoutBox* LayoutBox::firstChildBox() const
return toLayoutBox(slowFirstChild());
}
+inline LayoutBox* LayoutBox::firstInFlowChildBox() const
+{
+ LayoutBox* child = firstChildBox();
+ while (child && child->isOutOfFlowPositioned())
+ child = child->nextSiblingBox();
+ return child;
+}
+
inline LayoutBox* LayoutBox::lastChildBox() const
{
return toLayoutBox(slowLastChild());

Powered by Google App Engine
This is Rietveld 408576698