OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 static LayoutSelection* Create(FrameSelection& frame_selection) { | 71 static LayoutSelection* Create(FrameSelection& frame_selection) { |
72 return new LayoutSelection(frame_selection); | 72 return new LayoutSelection(frame_selection); |
73 } | 73 } |
74 | 74 |
75 bool HasPendingSelection() const { return has_pending_selection_; } | 75 bool HasPendingSelection() const { return has_pending_selection_; } |
76 void SetHasPendingSelection() { has_pending_selection_ = true; } | 76 void SetHasPendingSelection() { has_pending_selection_ = true; } |
77 void Commit(); | 77 void Commit(); |
78 | 78 |
79 IntRect SelectionBounds(); | 79 IntRect SelectionBounds(); |
80 void InvalidatePaintForSelection(); | 80 void InvalidatePaintForSelection(); |
81 enum SelectionPaintInvalidationMode { | 81 |
82 kPaintInvalidationNewXOROld, | |
83 kPaintInvalidationNewMinusOld | |
84 }; | |
85 void SetSelection( | |
86 const SelectionPaintRange&, | |
87 SelectionPaintInvalidationMode = kPaintInvalidationNewXOROld); | |
88 void ClearSelection(); | 82 void ClearSelection(); |
89 std::pair<int, int> SelectionStartEnd(); | 83 std::pair<int, int> SelectionStartEnd(); |
90 void OnDocumentShutdown(); | 84 void OnDocumentShutdown(); |
91 | 85 |
92 DECLARE_TRACE(); | 86 DECLARE_TRACE(); |
93 | 87 |
94 private: | 88 private: |
95 LayoutSelection(FrameSelection&); | 89 LayoutSelection(FrameSelection&); |
96 | 90 |
97 SelectionInFlatTree CalcVisibleSelection( | 91 SelectionInFlatTree CalcVisibleSelection( |
98 const VisibleSelectionInFlatTree&) const; | 92 const VisibleSelectionInFlatTree&) const; |
99 | 93 |
100 Member<FrameSelection> frame_selection_; | 94 Member<FrameSelection> frame_selection_; |
101 bool has_pending_selection_ : 1; | 95 bool has_pending_selection_ : 1; |
102 | 96 |
103 SelectionPaintRange paint_range_; | 97 SelectionPaintRange paint_range_; |
104 }; | 98 }; |
105 | 99 |
106 } // namespace blink | 100 } // namespace blink |
107 | 101 |
108 #endif | 102 #endif |
OLD | NEW |