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

Unified Diff: Source/core/rendering/RenderBox.h

Issue 637033003: [CSS Grid Layout] Fix positioned grid children position and size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove "if else" Created 6 years, 1 month 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: Source/core/rendering/RenderBox.h
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h
index 0dc27147f21e9d0e97c9cd9a70a68b0612504eb4..012b4dac0a37fe4627ad2006a90d5a322f69ac64 100644
--- a/Source/core/rendering/RenderBox.h
+++ b/Source/core/rendering/RenderBox.h
@@ -183,7 +183,9 @@ public:
// Use this with caution! No type checking is done!
RenderBox* previousSiblingBox() const;
+ RenderBox* previousInFlowSiblingBox() const;
RenderBox* nextSiblingBox() const;
+ RenderBox* nextInFlowSiblingBox() const;
RenderBox* parentBox() const;
bool canResize() const;
@@ -774,11 +776,25 @@ inline RenderBox* RenderBox::previousSiblingBox() const
return toRenderBox(previousSibling());
}
+inline RenderBox* RenderBox::previousInFlowSiblingBox() const
+{
+ RenderBox* previous;
+ for (previous = previousSiblingBox(); previous && previous->isOutOfFlowPositioned(); previous = previous->previousSiblingBox()) { }
Julien - ping for review 2014/11/24 21:44:40 Nit: I prefer 2 lines to abide by Blink's 1 statem
Manuel Rego 2014/12/01 11:10:37 I've changed it for a while, which probably makes
+ return previous;
+}
+
inline RenderBox* RenderBox::nextSiblingBox() const
{
return toRenderBox(nextSibling());
}
+inline RenderBox* RenderBox::nextInFlowSiblingBox() const
+{
+ RenderBox* next;
+ for (next = nextSiblingBox(); next && next->isOutOfFlowPositioned(); next = next->nextSiblingBox()) { }
Julien - ping for review 2014/11/24 21:44:40 Ditto.
Manuel Rego 2014/12/01 11:10:37 Acknowledged.
+ return next;
+}
+
inline RenderBox* RenderBox::parentBox() const
{
return toRenderBox(parent());

Powered by Google App Engine
This is Rietveld 408576698