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

Side by Side Diff: third_party/WebKit/Source/platform/text/hyphenation/HyphenationMinikin.h

Issue 2713553007: Merge 2987: Fix hyphenated words not to overflow on Android (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "platform/text/Hyphenation.h"
6
7 #include "base/files/memory_mapped_file.h"
8 #include "platform/PlatformExport.h"
9
10 namespace base {
11 class File;
12 } // namespace base
13
14 namespace android {
15 class Hyphenator;
16 } // namespace andorid
17
18 namespace blink {
19
20 class PLATFORM_EXPORT HyphenationMinikin : public Hyphenation {
21 public:
22 bool openDictionary(const AtomicString& locale);
23
24 size_t lastHyphenLocation(const StringView& text,
25 size_t beforeIndex) const override;
26 Vector<size_t, 8> hyphenLocations(const StringView&) const override;
27
28 static PassRefPtr<HyphenationMinikin> fromFileForTesting(base::File);
29
30 private:
31 bool openDictionary(base::File);
32
33 std::vector<uint8_t> hyphenate(const StringView&) const;
34
35 base::MemoryMappedFile m_file;
36 std::unique_ptr<android::Hyphenator> m_hyphenator;
37 };
38
39 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698