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

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: Update patch following review comments Created 6 years 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..c9f7b5845a26dd10fa3950f577d41b7f10b1f88a 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;
@@ -349,6 +351,14 @@ public:
void clearContainingBlockOverrideSize();
void clearOverrideContainingBlockContentLogicalHeight();
+ LayoutUnit extraInlineOffset() const;
+ LayoutUnit extraBlockOffset() const;
+ bool hasExtraInlineOffset() const;
+ bool hasExtraBlockOffset() const;
+ void setExtraInlineOffset(LayoutUnit inlineOffest);
+ void setExtraBlockOffset(LayoutUnit blockOffest);
+ void clearExtraInlineAndBlockOffests();
+
virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const override;
LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
@@ -774,11 +784,27 @@ inline RenderBox* RenderBox::previousSiblingBox() const
return toRenderBox(previousSibling());
}
+inline RenderBox* RenderBox::previousInFlowSiblingBox() const
+{
+ RenderBox* previous = previousSiblingBox();
+ while (previous && previous->isOutOfFlowPositioned())
+ previous = previous->previousSiblingBox();
+ return previous;
+}
+
inline RenderBox* RenderBox::nextSiblingBox() const
{
return toRenderBox(nextSibling());
}
+inline RenderBox* RenderBox::nextInFlowSiblingBox() const
+{
+ RenderBox* next = nextSiblingBox();
+ while (next && next->isOutOfFlowPositioned())
+ next = next->nextSiblingBox();
+ return next;
+}
+
inline RenderBox* RenderBox::parentBox() const
{
return toRenderBox(parent());

Powered by Google App Engine
This is Rietveld 408576698