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

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

Issue 684383002: Delete a ton more dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@writingmode1
Patch Set: Created 6 years, 2 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
« no previous file with comments | « sky/engine/core/rendering/RenderCombineText.cpp ('k') | sky/engine/core/rendering/RenderGeometryMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderFlexibleBox.cpp
diff --git a/sky/engine/core/rendering/RenderFlexibleBox.cpp b/sky/engine/core/rendering/RenderFlexibleBox.cpp
index 27def738a96d55c297cecf8967e6d713fe1d92ef..a5ff46abfd5054aca6f31db17fc7e79e5ca0452a 100644
--- a/sky/engine/core/rendering/RenderFlexibleBox.cpp
+++ b/sky/engine/core/rendering/RenderFlexibleBox.cpp
@@ -101,9 +101,8 @@ void RenderFlexibleBox::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidt
continue;
LayoutUnit margin = marginIntrinsicLogicalWidthForChild(child);
- bool hasOrthogonalWritingMode = child->isHorizontalWritingMode() != isHorizontalWritingMode();
- LayoutUnit minPreferredLogicalWidth = hasOrthogonalWritingMode ? child->logicalHeight() : child->minPreferredLogicalWidth();
- LayoutUnit maxPreferredLogicalWidth = hasOrthogonalWritingMode ? child->logicalHeight() : child->maxPreferredLogicalWidth();
+ LayoutUnit minPreferredLogicalWidth = child->minPreferredLogicalWidth();
+ LayoutUnit maxPreferredLogicalWidth = child->maxPreferredLogicalWidth();
minPreferredLogicalWidth += margin;
maxPreferredLogicalWidth += margin;
if (!isColumnFlow()) {
@@ -310,7 +309,7 @@ LayoutUnit RenderFlexibleBox::clientLogicalBottomAfterRepositioning()
bool RenderFlexibleBox::hasOrthogonalFlow(RenderBox* child) const
{
// FIXME: If the child is a flexbox, then we need to check isHorizontalFlow.
- return isHorizontalFlow() != child->isHorizontalWritingMode();
+ return !isHorizontalFlow();
}
bool RenderFlexibleBox::isColumnFlow() const
@@ -320,9 +319,7 @@ bool RenderFlexibleBox::isColumnFlow() const
bool RenderFlexibleBox::isHorizontalFlow() const
{
- if (isHorizontalWritingMode())
- return !isColumnFlow();
- return isColumnFlow();
+ return !isColumnFlow();
}
bool RenderFlexibleBox::isLeftToRightFlow() const
@@ -358,15 +355,14 @@ static inline LayoutUnit constrainedChildIntrinsicContentLogicalHeight(RenderBox
LayoutUnit RenderFlexibleBox::childIntrinsicHeight(RenderBox* child) const
{
- if (child->isHorizontalWritingMode() && needToStretchChildLogicalHeight(child))
+ if (needToStretchChildLogicalHeight(child))
return constrainedChildIntrinsicContentLogicalHeight(child);
return child->height();
}
LayoutUnit RenderFlexibleBox::childIntrinsicWidth(RenderBox* child) const
{
- if (!child->isHorizontalWritingMode() && needToStretchChildLogicalHeight(child))
- return constrainedChildIntrinsicContentLogicalHeight(child);
+ // FIXME(sky): Remove
return child->width();
}
@@ -701,11 +697,6 @@ bool RenderFlexibleBox::updateAutoMarginsInCrossAxis(RenderBox* child, LayoutUni
// so that flipForRightToLeftColumn will do the right thing.
shouldAdjustTopOrLeft = false;
}
- if (!isColumnFlow() && child->style()->isFlippedBlocksWritingMode()) {
- // If we are a flipped writing mode, we need to adjust the opposite side. This is only needed
- // for row flows because this only affects the block-direction axis.
- shouldAdjustTopOrLeft = false;
- }
if (topOrLeft.isAuto()) {
if (shouldAdjustTopOrLeft)
« no previous file with comments | « sky/engine/core/rendering/RenderCombineText.cpp ('k') | sky/engine/core/rendering/RenderGeometryMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698