OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2009, 2010 Apple Inc. All right reserve
d. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2009, 2010 Apple Inc. All right reserve
d. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 11 matching lines...) Expand all Loading... |
22 #ifndef BidiContext_h | 22 #ifndef BidiContext_h |
23 #define BidiContext_h | 23 #define BidiContext_h |
24 | 24 |
25 #include "platform/PlatformExport.h" | 25 #include "platform/PlatformExport.h" |
26 #include "wtf/Assertions.h" | 26 #include "wtf/Assertions.h" |
27 #include "wtf/PassRefPtr.h" | 27 #include "wtf/PassRefPtr.h" |
28 #include "wtf/RefCounted.h" | 28 #include "wtf/RefCounted.h" |
29 #include "wtf/RefPtr.h" | 29 #include "wtf/RefPtr.h" |
30 #include "wtf/unicode/Unicode.h" | 30 #include "wtf/unicode/Unicode.h" |
31 | 31 |
32 namespace WebCore { | 32 namespace blink { |
33 | 33 |
34 enum BidiEmbeddingSource { | 34 enum BidiEmbeddingSource { |
35 FromStyleOrDOM, | 35 FromStyleOrDOM, |
36 FromUnicode | 36 FromUnicode |
37 }; | 37 }; |
38 | 38 |
39 // Used to keep track of explicit embeddings. | 39 // Used to keep track of explicit embeddings. |
40 class PLATFORM_EXPORT BidiContext : public RefCounted<BidiContext> { | 40 class PLATFORM_EXPORT BidiContext : public RefCounted<BidiContext> { |
41 public: | 41 public: |
42 static PassRefPtr<BidiContext> create(unsigned char level, WTF::Unicode::Dir
ection, bool override = false, BidiEmbeddingSource = FromStyleOrDOM, BidiContext
* parent = 0); | 42 static PassRefPtr<BidiContext> create(unsigned char level, WTF::Unicode::Dir
ection, bool override = false, BidiEmbeddingSource = FromStyleOrDOM, BidiContext
* parent = 0); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 return (level + 1) | 1; | 79 return (level + 1) | 1; |
80 } | 80 } |
81 | 81 |
82 inline unsigned char nextGreaterEvenLevel(unsigned char level) | 82 inline unsigned char nextGreaterEvenLevel(unsigned char level) |
83 { | 83 { |
84 return (level + 2) & ~1; | 84 return (level + 2) & ~1; |
85 } | 85 } |
86 | 86 |
87 PLATFORM_EXPORT bool operator==(const BidiContext&, const BidiContext&); | 87 PLATFORM_EXPORT bool operator==(const BidiContext&, const BidiContext&); |
88 | 88 |
89 } // namespace WebCore | 89 } // namespace blink |
90 | 90 |
91 #endif // BidiContext_h | 91 #endif // BidiContext_h |
OLD | NEW |