| Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
|
| diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
|
| index 43d151fa64183945ec214c728c0d8a230ec5a63b..05a111718b7d39b02404da3c695cd4f57ea6f131 100644
|
| --- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
|
| +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
|
| @@ -677,20 +677,22 @@ static inline TextDirection toTextDirection(
|
| *computedStyle = style;
|
| switch (direction) {
|
| case CanvasRenderingContext2DState::DirectionInherit:
|
| - return style ? style->direction() : LTR;
|
| + return style ? style->direction() : TextDirection::Ltr;
|
| case CanvasRenderingContext2DState::DirectionRTL:
|
| - return RTL;
|
| + return TextDirection::Rtl;
|
| case CanvasRenderingContext2DState::DirectionLTR:
|
| - return LTR;
|
| + return TextDirection::Ltr;
|
| }
|
| ASSERT_NOT_REACHED();
|
| - return LTR;
|
| + return TextDirection::Ltr;
|
| }
|
|
|
| String CanvasRenderingContext2D::direction() const {
|
| if (state().getDirection() == CanvasRenderingContext2DState::DirectionInherit)
|
| canvas()->document().updateStyleAndLayoutTreeForNode(canvas());
|
| - return toTextDirection(state().getDirection(), canvas()) == RTL ? rtl : ltr;
|
| + return toTextDirection(state().getDirection(), canvas()) == TextDirection::Rtl
|
| + ? rtl
|
| + : ltr;
|
| }
|
|
|
| void CanvasRenderingContext2D::setDirection(const String& directionString) {
|
| @@ -844,7 +846,7 @@ void CanvasRenderingContext2D::drawTextInternal(
|
| const ComputedStyle* computedStyle = 0;
|
| TextDirection direction =
|
| toTextDirection(state().getDirection(), canvas(), &computedStyle);
|
| - bool isRTL = direction == RTL;
|
| + bool isRTL = direction == TextDirection::Rtl;
|
| bool override =
|
| computedStyle ? isOverride(computedStyle->unicodeBidi()) : false;
|
|
|
|
|