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 13 matching lines...) Expand all Loading... |
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/TextPath.h" | 33 #include "platform/text/TextPath.h" |
| 34 #include "wtf/Allocator.h" |
34 #include "wtf/RefCounted.h" | 35 #include "wtf/RefCounted.h" |
35 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
36 | 37 |
37 class SkTextBlob; | 38 class SkTextBlob; |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 enum TextJustify { | 42 enum TextJustify { |
42 TextJustifyAuto = 0x0, | 43 TextJustifyAuto = 0x0, |
43 TextJustifyNone = 0x1, | 44 TextJustifyNone = 0x1, |
44 TextJustifyInterWord = 0x2, | 45 TextJustifyInterWord = 0x2, |
45 TextJustifyDistribute = 0x3 | 46 TextJustifyDistribute = 0x3 |
46 }; | 47 }; |
47 | 48 |
48 class PLATFORM_EXPORT TextRun { | 49 class PLATFORM_EXPORT TextRun final { |
49 USING_FAST_MALLOC(TextRun); | 50 DISALLOW_NEW(); |
50 public: | 51 public: |
51 enum ExpansionBehaviorFlags { | 52 enum ExpansionBehaviorFlags { |
52 ForbidTrailingExpansion = 0 << 0, | 53 ForbidTrailingExpansion = 0 << 0, |
53 AllowTrailingExpansion = 1 << 0, | 54 AllowTrailingExpansion = 1 << 0, |
54 ForbidLeadingExpansion = 0 << 1, | 55 ForbidLeadingExpansion = 0 << 1, |
55 AllowLeadingExpansion = 1 << 1, | 56 AllowLeadingExpansion = 1 << 1, |
56 }; | 57 }; |
57 | 58 |
58 enum TextCodePath { | 59 enum TextCodePath { |
59 Auto = 0, | 60 Auto = 0, |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 268 |
268 const TextRun& run; | 269 const TextRun& run; |
269 int from; | 270 int from; |
270 int to; | 271 int to; |
271 FloatRect bounds; | 272 FloatRect bounds; |
272 RefPtr<const SkTextBlob>* cachedTextBlob; | 273 RefPtr<const SkTextBlob>* cachedTextBlob; |
273 }; | 274 }; |
274 | 275 |
275 } | 276 } |
276 #endif | 277 #endif |
OLD | NEW |