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

Unified Diff: sky/engine/core/rendering/shapes/Shape.cpp

Issue 688213002: First pass at removing dead vertical writing mode code. (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/rendering/shapes/Shape.h ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/shapes/Shape.cpp
diff --git a/sky/engine/core/rendering/shapes/Shape.cpp b/sky/engine/core/rendering/shapes/Shape.cpp
index 1289c8893c7b9cec6774ee26243074bea449ecb4..c1cf0f961d9454da0aa8624ab2fd112cbac575be 100644
--- a/sky/engine/core/rendering/shapes/Shape.cpp
+++ b/sky/engine/core/rendering/shapes/Shape.cpp
@@ -72,36 +72,25 @@ static PassOwnPtr<Shape> createPolygonShape(PassOwnPtr<Vector<FloatPoint> > vert
static inline FloatRect physicalRectToLogical(const FloatRect& rect, float logicalBoxHeight)
{
- if (isHorizontalWritingMode())
- return rect;
- if (isFlippedBlocksWritingMode())
- return FloatRect(rect.y(), logicalBoxHeight - rect.maxX(), rect.height(), rect.width());
- return rect.transposedRect();
+ return rect;
}
static inline FloatPoint physicalPointToLogical(const FloatPoint& point, float logicalBoxHeight)
{
- if (isHorizontalWritingMode())
- return point;
- if (isFlippedBlocksWritingMode())
- return FloatPoint(point.y(), logicalBoxHeight - point.x());
- return point.transposedPoint();
+ return point;
}
static inline FloatSize physicalSizeToLogical(const FloatSize& size)
{
- if (isHorizontalWritingMode())
- return size;
- return size.transposedSize();
+ return size;
}
PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutSize& logicalBoxSize, float margin)
{
ASSERT(basicShape);
- bool horizontalWritingMode = isHorizontalWritingMode();
- float boxWidth = horizontalWritingMode ? logicalBoxSize.width().toFloat() : logicalBoxSize.height().toFloat();
- float boxHeight = horizontalWritingMode ? logicalBoxSize.height().toFloat() : logicalBoxSize.width().toFloat();
+ float boxWidth = logicalBoxSize.width().toFloat();
+ float boxHeight = logicalBoxSize.height().toFloat();
OwnPtr<Shape> shape;
switch (basicShape->type()) {
« no previous file with comments | « sky/engine/core/rendering/shapes/Shape.h ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698