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

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

Issue 689743002: First past at removing writing mode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
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/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index 25cc78ef7b3e2a8c6720bac79e919a51f2aea224..be952031391d95e62ba2a38a34f510acdcdf6d3a 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -3862,20 +3862,8 @@ LayoutRect RenderBox::logicalVisualOverflowRectForPropagation(RenderStyle* paren
LayoutRect RenderBox::visualOverflowRectForPropagation(RenderStyle* parentStyle) const
{
- // If the writing modes of the child and parent match, then we don't have to
- // do anything fancy. Just return the result.
- LayoutRect rect = visualOverflowRect();
- if (parentStyle->writingMode() == style()->writingMode())
- return rect;
-
- // We are putting ourselves into our parent's coordinate space. If there is a flipped block mismatch
- // in a particular axis, then we have to flip the rect along that axis.
- if (style()->writingMode() == RightToLeftWritingMode || parentStyle->writingMode() == RightToLeftWritingMode)
- rect.setX(width() - rect.maxX());
- else if (style()->writingMode() == BottomToTopWritingMode || parentStyle->writingMode() == BottomToTopWritingMode)
- rect.setY(height() - rect.maxY());
-
- return rect;
+ // FIXME(sky): Remove
+ return visualOverflowRect();
}
LayoutRect RenderBox::logicalLayoutOverflowRectForPropagation(RenderStyle* parentStyle) const
@@ -3915,18 +3903,6 @@ LayoutRect RenderBox::layoutOverflowRectForPropagation(RenderStyle* parentStyle)
flipForWritingMode(rect);
}
- // If the writing modes of the child and parent match, then we don't have to
- // do anything fancy. Just return the result.
- if (parentStyle->writingMode() == style()->writingMode())
- return rect;
-
- // We are putting ourselves into our parent's coordinate space. If there is a flipped block mismatch
- // in a particular axis, then we have to flip the rect along that axis.
- if (style()->writingMode() == RightToLeftWritingMode || parentStyle->writingMode() == RightToLeftWritingMode)
- rect.setX(width() - rect.maxX());
- else if (style()->writingMode() == BottomToTopWritingMode || parentStyle->writingMode() == BottomToTopWritingMode)
- rect.setY(height() - rect.maxY());
-
return rect;
}
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698