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

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: 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
« no previous file with comments | « LayoutTests/fast/css-grid-layout/resources/grid.css ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.h
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h
index 5e551191cb4ca5685868fe2d7991c6210897bb9a..6e162e22bb9b4dfc4983ba80316ef6371ed7658d 100644
--- a/Source/core/rendering/RenderBox.h
+++ b/Source/core/rendering/RenderBox.h
@@ -186,7 +186,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;
@@ -354,6 +356,12 @@ public:
void clearContainingBlockOverrideSize();
void clearOverrideContainingBlockContentLogicalHeight();
+ LayoutUnit extraInlineOffset() const;
+ LayoutUnit extraBlockOffset() 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;
@@ -458,6 +466,7 @@ public:
virtual int verticalScrollbarWidth() const;
int horizontalScrollbarHeight() const;
int intrinsicScrollbarLogicalWidth() const;
+ int scrollbarLogicalWidth() const { return style()->isHorizontalWritingMode() ? verticalScrollbarWidth() : horizontalScrollbarHeight(); }
int scrollbarLogicalHeight() const { return style()->isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }
virtual bool scroll(ScrollDirection, ScrollGranularity, float delta = 1);
bool canBeScrolledAndHasScrollableArea() const;
@@ -784,11 +793,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());
« no previous file with comments | « LayoutTests/fast/css-grid-layout/resources/grid.css ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698