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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 bool isContentRichlyEditable() const; | 54 bool isContentRichlyEditable() const; |
55 | 55 |
56 const SelectionInDOMTree& selectionInDOMTree() const; | 56 const SelectionInDOMTree& selectionInDOMTree() const; |
57 | 57 |
58 const VisibleSelection& computeVisibleSelectionInDOMTree() const; | 58 const VisibleSelection& computeVisibleSelectionInDOMTree() const; |
59 const VisibleSelectionInFlatTree& computeVisibleSelectionInFlatTree() const; | 59 const VisibleSelectionInFlatTree& computeVisibleSelectionInFlatTree() const; |
60 void setSelection(const SelectionInDOMTree&); | 60 void setSelection(const SelectionInDOMTree&); |
61 | 61 |
62 void documentAttached(Document*); | 62 void documentAttached(Document*); |
63 | 63 |
64 // If this FrameSelection has a logical range which is still valid, this | |
65 // function return its clone. Otherwise, the return value from underlying | |
66 // |VisibleSelection|'s |firstRange()| is returned. | |
67 Range* firstRange() const; | |
68 | |
69 // There functions are exposed for |FrameSelection|. | 64 // There functions are exposed for |FrameSelection|. |
70 void cacheRangeOfDocument(Range*); | 65 void cacheRangeOfDocument(Range*); |
71 Range* documentCachedRange() const; | 66 Range* documentCachedRange() const; |
72 void clearDocumentCachedRange(); | 67 void clearDocumentCachedRange(); |
73 | 68 |
74 DECLARE_TRACE(); | 69 DECLARE_TRACE(); |
75 | 70 |
76 private: | 71 private: |
77 explicit SelectionEditor(LocalFrame&); | 72 explicit SelectionEditor(LocalFrame&); |
78 | 73 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 110 |
116 mutable VisibleSelection m_cachedVisibleSelectionInDOMTree; | 111 mutable VisibleSelection m_cachedVisibleSelectionInDOMTree; |
117 mutable VisibleSelectionInFlatTree m_cachedVisibleSelectionInFlatTree; | 112 mutable VisibleSelectionInFlatTree m_cachedVisibleSelectionInFlatTree; |
118 mutable uint64_t m_styleVersion = static_cast<uint64_t>(-1); | 113 mutable uint64_t m_styleVersion = static_cast<uint64_t>(-1); |
119 mutable bool m_cacheIsDirty = false; | 114 mutable bool m_cacheIsDirty = false; |
120 }; | 115 }; |
121 | 116 |
122 } // namespace blink | 117 } // namespace blink |
123 | 118 |
124 #endif // SelectionEditor_h | 119 #endif // SelectionEditor_h |
OLD | NEW |