| Index: third_party/WebKit/Source/platform/text/TextDirection.h
|
| diff --git a/third_party/WebKit/Source/platform/text/TextDirection.h b/third_party/WebKit/Source/platform/text/TextDirection.h
|
| index 62448c7380f133833a273429ff97141ddeb25866..5d33442be96ad91de36119c70fa37b97d4f55fcb 100644
|
| --- a/third_party/WebKit/Source/platform/text/TextDirection.h
|
| +++ b/third_party/WebKit/Source/platform/text/TextDirection.h
|
| @@ -26,13 +26,28 @@
|
| #ifndef TextDirection_h
|
| #define TextDirection_h
|
|
|
| +#include <cstdint>
|
| +
|
| namespace blink {
|
|
|
| -enum class TextDirection : unsigned { kRtl, kLtr };
|
| +// The direction of text in bidirectional scripts such as Arabic or Hebrew.
|
| +//
|
| +// Used for explicit directions such as in the HTML dir attribute or the CSS
|
| +// 'direction' property.
|
| +// https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute
|
| +// https://drafts.csswg.org/css-writing-modes/#direction
|
| +//
|
| +// Also used for resolved directions by UAX#9 UNICODE BIDIRECTIONAL ALGORITHM.
|
| +// http://unicode.org/reports/tr9/
|
| +enum class TextDirection : uint8_t { kLtr = 0, kRtl = 1 };
|
|
|
| -inline bool IsLeftToRightDirection(TextDirection direction) {
|
| +inline bool IsLtr(TextDirection direction) {
|
| return direction == TextDirection::kLtr;
|
| }
|
| +
|
| +inline bool IsRtl(TextDirection direction) {
|
| + return direction != TextDirection::kLtr;
|
| +}
|
| }
|
|
|
| #endif
|
|
|