| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 void DocumentMarkerController::AddTextMatchMarker( | 152 void DocumentMarkerController::AddTextMatchMarker( |
| 153 const EphemeralRange& range, | 153 const EphemeralRange& range, |
| 154 DocumentMarker::MatchStatus match_status) { | 154 DocumentMarker::MatchStatus match_status) { |
| 155 DCHECK(!document_->NeedsLayoutTreeUpdate()); | 155 DCHECK(!document_->NeedsLayoutTreeUpdate()); |
| 156 | 156 |
| 157 // Use a TextIterator to visit the potentially multiple nodes the range | 157 // Use a TextIterator to visit the potentially multiple nodes the range |
| 158 // covers. | 158 // covers. |
| 159 for (TextIterator marked_text(range.StartPosition(), range.EndPosition()); | 159 for (TextIterator marked_text(range.StartPosition(), range.EndPosition()); |
| 160 !marked_text.AtEnd(); marked_text.Advance()) { | 160 !marked_text.AtEnd(); marked_text.Advance()) { |
| 161 AddMarker(marked_text.CurrentContainer(), | 161 AddMarker(marked_text.CurrentContainer(), |
| 162 new DocumentMarker(marked_text.StartOffsetInCurrentContainer(), | 162 new TextMatchMarker(marked_text.StartOffsetInCurrentContainer(), |
| 163 marked_text.EndOffsetInCurrentContainer(), | 163 marked_text.EndOffsetInCurrentContainer(), |
| 164 match_status)); | 164 match_status)); |
| 165 } | 165 } |
| 166 // Don't invalidate tickmarks here. TextFinder invalidates tickmarks using a | 166 // Don't invalidate tickmarks here. TextFinder invalidates tickmarks using a |
| 167 // throttling algorithm. crbug.com/6819. | 167 // throttling algorithm. crbug.com/6819. |
| 168 } | 168 } |
| 169 | 169 |
| 170 void DocumentMarkerController::AddCompositionMarker(const EphemeralRange& range, | 170 void DocumentMarkerController::AddCompositionMarker(const EphemeralRange& range, |
| 171 Color underline_color, | 171 Color underline_color, |
| 172 bool thick, | 172 bool thick, |
| 173 Color background_color) { | 173 Color background_color) { |
| 174 DCHECK(!document_->NeedsLayoutTreeUpdate()); | 174 DCHECK(!document_->NeedsLayoutTreeUpdate()); |
| (...skipping 530 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 |