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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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
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 e8e968a6c6e0af6d11280a839b9b996b10f7ca21..dd593643c0445858307bb6679fb902a8497e9598 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -676,20 +676,21 @@ static inline TextDirection toTextDirection(
*computedStyle = style;
switch (direction) {
case CanvasRenderingContext2DState::DirectionInherit:
- return style ? style->direction() : TextDirection::Ltr;
+ return style ? style->direction() : TextDirection::kLtr;
case CanvasRenderingContext2DState::DirectionRTL:
- return TextDirection::Rtl;
+ return TextDirection::kRtl;
case CanvasRenderingContext2DState::DirectionLTR:
- return TextDirection::Ltr;
+ return TextDirection::kLtr;
}
ASSERT_NOT_REACHED();
- return TextDirection::Ltr;
+ return TextDirection::kLtr;
}
String CanvasRenderingContext2D::direction() const {
if (state().getDirection() == CanvasRenderingContext2DState::DirectionInherit)
canvas()->document().updateStyleAndLayoutTreeForNode(canvas());
- return toTextDirection(state().getDirection(), canvas()) == TextDirection::Rtl
+ return toTextDirection(state().getDirection(), canvas()) ==
+ TextDirection::kRtl
? rtlDirectionString
: ltrDirectionString;
}
@@ -845,7 +846,7 @@ void CanvasRenderingContext2D::drawTextInternal(
const ComputedStyle* computedStyle = 0;
TextDirection direction =
toTextDirection(state().getDirection(), canvas(), &computedStyle);
- bool isRTL = direction == TextDirection::Rtl;
+ bool isRTL = direction == TextDirection::kRtl;
bool override =
computedStyle ? isOverride(computedStyle->unicodeBidi()) : false;

Powered by Google App Engine
This is Rietveld 408576698