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

Unified Diff: sky/engine/platform/geometry/LayoutBoxExtent.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/platform/LengthBox.cpp ('k') | sky/engine/platform/text/WritingMode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/geometry/LayoutBoxExtent.cpp
diff --git a/sky/engine/platform/geometry/LayoutBoxExtent.cpp b/sky/engine/platform/geometry/LayoutBoxExtent.cpp
index 3348f90f6688a10c8ad90a001a7ce9004dc682a1..c6180dde7165ef88315e27f1a3fdc2b993642d5f 100644
--- a/sky/engine/platform/geometry/LayoutBoxExtent.cpp
+++ b/sky/engine/platform/geometry/LayoutBoxExtent.cpp
@@ -57,33 +57,13 @@ LayoutUnit LayoutBoxExtent::logicalRight(WritingMode writingMode) const
LayoutUnit LayoutBoxExtent::before(WritingMode writingMode) const
{
- switch (writingMode) {
- case TopToBottomWritingMode:
- return m_top;
- case BottomToTopWritingMode:
- return m_bottom;
- case LeftToRightWritingMode:
- return m_left;
- case RightToLeftWritingMode:
- return m_right;
- }
- ASSERT_NOT_REACHED();
+ // FIXME(sky): Remove
return m_top;
}
LayoutUnit LayoutBoxExtent::after(WritingMode writingMode) const
{
- switch (writingMode) {
- case TopToBottomWritingMode:
- return m_bottom;
- case BottomToTopWritingMode:
- return m_top;
- case LeftToRightWritingMode:
- return m_right;
- case RightToLeftWritingMode:
- return m_left;
- }
- ASSERT_NOT_REACHED();
+ // FIXME(sky): Remove
return m_bottom;
}
@@ -103,44 +83,14 @@ LayoutUnit LayoutBoxExtent::end(WritingMode writingMode, TextDirection direction
void LayoutBoxExtent::setBefore(WritingMode writingMode, LayoutUnit value)
{
- switch (writingMode) {
- case TopToBottomWritingMode:
- m_top = value;
- break;
- case BottomToTopWritingMode:
- m_bottom = value;
- break;
- case LeftToRightWritingMode:
- m_left = value;
- break;
- case RightToLeftWritingMode:
- m_right = value;
- break;
- default:
- ASSERT_NOT_REACHED();
- m_top = value;
- }
+ // FIXME(sky): Remove
+ m_top = value;
}
void LayoutBoxExtent::setAfter(WritingMode writingMode, LayoutUnit value)
{
- switch (writingMode) {
- case TopToBottomWritingMode:
- m_bottom = value;
- break;
- case BottomToTopWritingMode:
- m_top = value;
- break;
- case LeftToRightWritingMode:
- m_right = value;
- break;
- case RightToLeftWritingMode:
- m_left = value;
- break;
- default:
- ASSERT_NOT_REACHED();
- m_bottom = value;
- }
+ // FIXME(sky): Remove
+ m_bottom = value;
}
void LayoutBoxExtent::setStart(WritingMode writingMode, TextDirection direction, LayoutUnit value)
« no previous file with comments | « sky/engine/platform/LengthBox.cpp ('k') | sky/engine/platform/text/WritingMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698