OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // If this FrameSelection has a logical range which is still valid, this | 64 // If this FrameSelection has a logical range which is still valid, this |
65 // function return its clone. Otherwise, the return value from underlying | 65 // function return its clone. Otherwise, the return value from underlying |
66 // |VisibleSelection|'s |firstRange()| is returned. | 66 // |VisibleSelection|'s |firstRange()| is returned. |
67 Range* firstRange() const; | 67 Range* firstRange() const; |
68 | 68 |
69 // There functions are exposed for |FrameSelection|. | 69 // There functions are exposed for |FrameSelection|. |
70 void resetLogicalRange(); | 70 void resetLogicalRange(); |
71 void setLogicalRange(Range*); | 71 void setLogicalRange(Range*); |
72 | 72 |
73 // Updates |m_selection| and |m_selectionInFlatTree| with up-to-date | |
74 // layout if needed. | |
75 void updateIfNeeded(); | |
76 | |
77 void cacheRangeOfDocument(Range*); | 73 void cacheRangeOfDocument(Range*); |
78 Range* documentCachedRange() const; | 74 Range* documentCachedRange() const; |
79 void clearDocumentCachedRange(); | 75 void clearDocumentCachedRange(); |
80 | 76 |
81 DECLARE_TRACE(); | 77 DECLARE_TRACE(); |
82 | 78 |
83 private: | 79 private: |
84 explicit SelectionEditor(LocalFrame&); | 80 explicit SelectionEditor(LocalFrame&); |
85 | 81 |
86 Document& document() const; | 82 Document& document() const; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 125 |
130 mutable VisibleSelection m_cachedVisibleSelectionInDOMTree; | 126 mutable VisibleSelection m_cachedVisibleSelectionInDOMTree; |
131 mutable VisibleSelectionInFlatTree m_cachedVisibleSelectionInFlatTree; | 127 mutable VisibleSelectionInFlatTree m_cachedVisibleSelectionInFlatTree; |
132 mutable uint64_t m_styleVersion = static_cast<uint64_t>(-1); | 128 mutable uint64_t m_styleVersion = static_cast<uint64_t>(-1); |
133 mutable bool m_cacheIsDirty = false; | 129 mutable bool m_cacheIsDirty = false; |
134 }; | 130 }; |
135 | 131 |
136 } // namespace blink | 132 } // namespace blink |
137 | 133 |
138 #endif // SelectionEditor_h | 134 #endif // SelectionEditor_h |
OLD | NEW |