OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 bool isTextEmpty() const { return text().isEmpty(); } | 52 bool isTextEmpty() const { return text().isEmpty(); } |
53 bool isRangeEmpty() const { return checkingStart() >= checkingEnd(); } | 53 bool isRangeEmpty() const { return checkingStart() >= checkingEnd(); } |
54 | 54 |
55 int checkingStart() const; | 55 int checkingStart() const; |
56 int checkingEnd() const; | 56 int checkingEnd() const; |
57 int checkingLength() const; | 57 int checkingLength() const; |
58 String checkingSubstring() const { return textSubstring(checkingStart(), che
ckingLength()); } | 58 String checkingSubstring() const { return textSubstring(checkingStart(), che
ckingLength()); } |
59 | 59 |
60 bool checkingRangeCovers(int location, int length) const { return location <
checkingEnd() && location + length > checkingStart(); } | 60 bool checkingRangeCovers(int location, int length) const { return location <
checkingEnd() && location + length > checkingStart(); } |
61 PassRefPtr<Range> paragraphRange() const; | 61 PassRefPtr<Range> paragraphRange() const; |
| 62 PassRefPtr<Range> checkingRange() const { return m_checkingRange; } |
62 | 63 |
63 private: | 64 private: |
64 void invalidateParagraphRangeValues(); | 65 void invalidateParagraphRangeValues(); |
65 PassRefPtr<Range> checkingRange() const { return m_checkingRange; } | |
66 PassRefPtr<Range> offsetAsRange() const; | 66 PassRefPtr<Range> offsetAsRange() const; |
67 | 67 |
68 RefPtr<Range> m_checkingRange; | 68 RefPtr<Range> m_checkingRange; |
69 mutable RefPtr<Range> m_paragraphRange; | 69 mutable RefPtr<Range> m_paragraphRange; |
70 mutable RefPtr<Range> m_offsetAsRange; | 70 mutable RefPtr<Range> m_offsetAsRange; |
71 mutable String m_text; | 71 mutable String m_text; |
72 mutable int m_checkingStart; | 72 mutable int m_checkingStart; |
73 mutable int m_checkingEnd; | 73 mutable int m_checkingEnd; |
74 mutable int m_checkingLength; | 74 mutable int m_checkingLength; |
75 }; | 75 }; |
(...skipping 18 matching lines...) Expand all Loading... |
94 bool unifiedTextCheckerEnabled() const; | 94 bool unifiedTextCheckerEnabled() const; |
95 }; | 95 }; |
96 | 96 |
97 void checkTextOfParagraph(TextCheckerClient&, const String&, TextCheckingTypeMas
k, Vector<TextCheckingResult>&); | 97 void checkTextOfParagraph(TextCheckerClient&, const String&, TextCheckingTypeMas
k, Vector<TextCheckingResult>&); |
98 | 98 |
99 bool unifiedTextCheckerEnabled(const Frame*); | 99 bool unifiedTextCheckerEnabled(const Frame*); |
100 | 100 |
101 } // namespace WebCore | 101 } // namespace WebCore |
102 | 102 |
103 #endif // TextCheckingHelper_h | 103 #endif // TextCheckingHelper_h |
OLD | NEW |