| Index: third_party/WebKit/Source/platform/text/Hyphenation.cpp
|
| diff --git a/third_party/WebKit/Source/platform/text/Hyphenation.cpp b/third_party/WebKit/Source/platform/text/Hyphenation.cpp
|
| index 563b60f101c31bf096436336029030a7dfc7ab43..b636494c99e008b86f30b02fe60ab432e2195081 100644
|
| --- a/third_party/WebKit/Source/platform/text/Hyphenation.cpp
|
| +++ b/third_party/WebKit/Source/platform/text/Hyphenation.cpp
|
| @@ -34,4 +34,18 @@ void Hyphenation::clearForTesting()
|
| getHyphenationMap().clear();
|
| }
|
|
|
| +Vector<size_t, 8> Hyphenation::hyphenLocations(const StringView& text) const
|
| +{
|
| + Vector<size_t, 8> hyphenLocations;
|
| + size_t hyphenLocation = text.length();
|
| + if (hyphenLocation <= minimumSuffixLength)
|
| + return hyphenLocations;
|
| + hyphenLocation -= minimumSuffixLength;
|
| +
|
| + while ((hyphenLocation = lastHyphenLocation(text, hyphenLocation)) >= minimumPrefixLength)
|
| + hyphenLocations.append(hyphenLocation);
|
| +
|
| + return hyphenLocations;
|
| +}
|
| +
|
| } // namespace blink
|
|
|