OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 #ifndef TextRun_h | 24 #ifndef TextRun_h |
25 #define TextRun_h | 25 #define TextRun_h |
26 | 26 |
27 #include "platform/PlatformExport.h" | 27 #include "platform/PlatformExport.h" |
28 #include "platform/fonts/Glyph.h" | 28 #include "platform/fonts/Glyph.h" |
29 #include "platform/geometry/FloatRect.h" | 29 #include "platform/geometry/FloatRect.h" |
30 #include "platform/heap/Heap.h" | 30 #include "platform/heap/Heap.h" |
31 #include "platform/text/TabSize.h" | 31 #include "platform/text/TabSize.h" |
32 #include "platform/text/TextDirection.h" | 32 #include "platform/text/TextDirection.h" |
| 33 #include "platform/text/TextJustify.h" |
33 #include "platform/wtf/Allocator.h" | 34 #include "platform/wtf/Allocator.h" |
34 #include "platform/wtf/text/StringView.h" | 35 #include "platform/wtf/text/StringView.h" |
35 #include "platform/wtf/text/WTFString.h" | 36 #include "platform/wtf/text/WTFString.h" |
36 | 37 |
37 #include <SkRefCnt.h> | 38 #include <SkRefCnt.h> |
38 #include <unicode/utf16.h> | 39 #include <unicode/utf16.h> |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 enum TextJustify { | |
43 kTextJustifyAuto = 0x0, | |
44 kTextJustifyNone = 0x1, | |
45 kTextJustifyInterWord = 0x2, | |
46 kTextJustifyDistribute = 0x3 | |
47 }; | |
48 | |
49 class PLATFORM_EXPORT TextRun final { | 43 class PLATFORM_EXPORT TextRun final { |
50 DISALLOW_NEW(); | 44 DISALLOW_NEW(); |
51 | 45 |
52 public: | 46 public: |
53 enum ExpansionBehaviorFlags { | 47 enum ExpansionBehaviorFlags { |
54 kForbidTrailingExpansion = 0 << 0, | 48 kForbidTrailingExpansion = 0 << 0, |
55 kAllowTrailingExpansion = 1 << 0, | 49 kAllowTrailingExpansion = 1 << 0, |
56 kForbidLeadingExpansion = 0 << 1, | 50 kForbidLeadingExpansion = 0 << 1, |
57 kAllowLeadingExpansion = 1 << 1, | 51 kAllowLeadingExpansion = 1 << 1, |
58 }; | 52 }; |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 : run(r), from(0), to(r.length()) {} | 309 : run(r), from(0), to(r.length()) {} |
316 | 310 |
317 const TextRun& run; | 311 const TextRun& run; |
318 unsigned from; | 312 unsigned from; |
319 unsigned to; | 313 unsigned to; |
320 FloatRect bounds; | 314 FloatRect bounds; |
321 }; | 315 }; |
322 | 316 |
323 } // namespace blink | 317 } // namespace blink |
324 #endif | 318 #endif |
OLD | NEW |