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

Unified Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h

Issue 2940153002: [LayoutNG] Implement more text-align values and BiDi base direction (Closed)
Patch Set: eae review Created 3 years, 6 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/core/layout/ng/inline/ng_inline_item.h
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h
index 39ae2ebb8bff50411d5a8e7f1f16f6dc7310f806..27ce82d00c2a7b743e28d5c4f342617ec6be68a7 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h
@@ -75,9 +75,7 @@ class NGInlineItem {
unsigned StartOffset() const { return start_offset_; }
unsigned EndOffset() const { return end_offset_; }
unsigned Length() const { return end_offset_ - start_offset_; }
- TextDirection Direction() const {
- return BidiLevel() & 1 ? TextDirection::kRtl : TextDirection::kLtr;
- }
+ TextDirection Direction() const { return DirectionFromLevel(BidiLevel()); }
UBiDiLevel BidiLevel() const { return static_cast<UBiDiLevel>(bidi_level_); }
UScriptCode GetScript() const { return script_; }
const ComputedStyle* Style() const { return style_.Get(); }

Powered by Google App Engine
This is Rietveld 408576698