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

Unified Diff: sky/engine/core/rendering/RenderFlexibleBox.cpp

Issue 1061163002: Remove all uses of display:block and display:inline-block. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update one more usage Created 5 years, 8 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: sky/engine/core/rendering/RenderFlexibleBox.cpp
diff --git a/sky/engine/core/rendering/RenderFlexibleBox.cpp b/sky/engine/core/rendering/RenderFlexibleBox.cpp
index afd8a76ac4521c612676de6bfc3f135d3aacad4c..d98680541caf6f4aa2cfe1325b622ef7c7383982 100644
--- a/sky/engine/core/rendering/RenderFlexibleBox.cpp
+++ b/sky/engine/core/rendering/RenderFlexibleBox.cpp
@@ -418,14 +418,12 @@ LayoutUnit RenderFlexibleBox::flowAwareBorderEnd() const
LayoutUnit RenderFlexibleBox::flowAwareBorderBefore() const
{
- // FIXME(sky): Remove
- return borderTop();
+ return isHorizontalFlow() ? borderTop() : borderLeft();
}
LayoutUnit RenderFlexibleBox::flowAwareBorderAfter() const
{
- // FIXME(sky): Remove
- return borderBottom();
+ return isHorizontalFlow() ? borderBottom() : borderRight();
}
LayoutUnit RenderFlexibleBox::flowAwarePaddingStart() const
@@ -444,14 +442,12 @@ LayoutUnit RenderFlexibleBox::flowAwarePaddingEnd() const
LayoutUnit RenderFlexibleBox::flowAwarePaddingBefore() const
{
- // FIXME(sky): Remove
- return paddingTop();
+ return isHorizontalFlow() ? paddingTop() : paddingLeft();
}
LayoutUnit RenderFlexibleBox::flowAwarePaddingAfter() const
{
- // FIXME(sky): Remove
- return paddingBottom();
+ return isHorizontalFlow() ? paddingBottom() : paddingRight();
}
LayoutUnit RenderFlexibleBox::flowAwareMarginStartForChild(RenderBox* child) const
@@ -470,8 +466,7 @@ LayoutUnit RenderFlexibleBox::flowAwareMarginEndForChild(RenderBox* child) const
LayoutUnit RenderFlexibleBox::flowAwareMarginBeforeForChild(RenderBox* child) const
{
- // FIXME(sky): Remove
- return child->marginTop();
+ return isHorizontalFlow() ? child->marginTop() : child->marginLeft();
}
LayoutUnit RenderFlexibleBox::crossAxisMarginExtentForChild(RenderBox* child) const

Powered by Google App Engine
This is Rietveld 408576698