OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
7 * reserved. | 7 * reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 void DocumentMarkerController::AddTextMatchMarker( | 155 void DocumentMarkerController::AddTextMatchMarker( |
156 const EphemeralRange& range, | 156 const EphemeralRange& range, |
157 DocumentMarker::MatchStatus match_status) { | 157 DocumentMarker::MatchStatus match_status) { |
158 DCHECK(!document_->NeedsLayoutTreeUpdate()); | 158 DCHECK(!document_->NeedsLayoutTreeUpdate()); |
159 | 159 |
160 // Use a TextIterator to visit the potentially multiple nodes the range | 160 // Use a TextIterator to visit the potentially multiple nodes the range |
161 // covers. | 161 // covers. |
162 for (TextIterator marked_text(range.StartPosition(), range.EndPosition()); | 162 for (TextIterator marked_text(range.StartPosition(), range.EndPosition()); |
163 !marked_text.AtEnd(); marked_text.Advance()) { | 163 !marked_text.AtEnd(); marked_text.Advance()) { |
164 AddMarker(marked_text.CurrentContainer(), | 164 AddMarker(marked_text.CurrentContainer(), |
165 new DocumentMarker(marked_text.StartOffsetInCurrentContainer(), | 165 new TextMatchMarker(marked_text.StartOffsetInCurrentContainer(), |
166 marked_text.EndOffsetInCurrentContainer(), | 166 marked_text.EndOffsetInCurrentContainer(), |
167 match_status)); | 167 match_status)); |
168 } | 168 } |
169 // Don't invalidate tickmarks here. TextFinder invalidates tickmarks using a | 169 // Don't invalidate tickmarks here. TextFinder invalidates tickmarks using a |
170 // throttling algorithm. crbug.com/6819. | 170 // throttling algorithm. crbug.com/6819. |
171 } | 171 } |
172 | 172 |
173 void DocumentMarkerController::AddCompositionMarker(const EphemeralRange& range, | 173 void DocumentMarkerController::AddCompositionMarker(const EphemeralRange& range, |
174 Color underline_color, | 174 Color underline_color, |
175 bool thick, | 175 bool thick, |
176 Color background_color) { | 176 Color background_color) { |
177 DCHECK(!document_->NeedsLayoutTreeUpdate()); | 177 DCHECK(!document_->NeedsLayoutTreeUpdate()); |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 } | 705 } |
706 | 706 |
707 } // namespace blink | 707 } // namespace blink |
708 | 708 |
709 #ifndef NDEBUG | 709 #ifndef NDEBUG |
710 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { | 710 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { |
711 if (controller) | 711 if (controller) |
712 controller->ShowMarkers(); | 712 controller->ShowMarkers(); |
713 } | 713 } |
714 #endif | 714 #endif |
OLD | NEW |