| Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| index bd1254aea0376522dce5fbd9ccdcf9b8c047e93c..963a6c85b7c5e2a1bf99f8b344144628580ce295 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
|
| @@ -183,6 +183,17 @@ size_t ShapeResult::ByteSize() const {
|
| return self_byte_size;
|
| }
|
|
|
| +unsigned ShapeResult::CharacterStartIndex() const {
|
| + return !Rtl() ? runs_.front()->start_index_ : runs_.back()->start_index_;
|
| +}
|
| +
|
| +unsigned ShapeResult::OffsetForPosition(float target_x,
|
| + OffsetOptions options) const {
|
| + if (options == kOutsideAsStartOrEnd && target_x <= 0)
|
| + return Rtl() ? num_characters_ : 0;
|
| + return OffsetForPosition(target_x, false);
|
| +}
|
| +
|
| unsigned ShapeResult::OffsetForPosition(float target_x,
|
| bool include_partial_glyphs) const {
|
| unsigned characters_so_far = 0;
|
|
|