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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 void DocumentMarkerController::addCompositionMarker(const Position& start, | 96 void DocumentMarkerController::addCompositionMarker(const Position& start, |
97 const Position& end, | 97 const Position& end, |
98 Color underlineColor, | 98 Color underlineColor, |
99 bool thick, | 99 bool thick, |
100 Color backgroundColor) { | 100 Color backgroundColor) { |
101 DCHECK(!m_document->needsLayoutTreeUpdate()); | 101 DCHECK(!m_document->needsLayoutTreeUpdate()); |
102 | 102 |
103 for (TextIterator markedText(start, end); !markedText.atEnd(); | 103 for (TextIterator markedText(start, end); !markedText.atEnd(); |
104 markedText.advance()) { | 104 markedText.advance()) { |
105 addMarker(markedText.currentContainer(), | 105 addMarker(markedText.currentContainer(), |
106 new DocumentMarker(markedText.startOffsetInCurrentContainer(), | 106 DocumentMarker::createCompositionMarker( |
107 markedText.endOffsetInCurrentContainer(), | 107 markedText.startOffsetInCurrentContainer(), |
108 underlineColor, thick, backgroundColor)); | 108 markedText.endOffsetInCurrentContainer(), underlineColor, |
| 109 thick, backgroundColor)); |
109 } | 110 } |
110 } | 111 } |
111 | 112 |
112 void DocumentMarkerController::prepareForDestruction() { | 113 void DocumentMarkerController::prepareForDestruction() { |
113 clear(); | 114 clear(); |
114 } | 115 } |
115 | 116 |
116 void DocumentMarkerController::removeMarkers( | 117 void DocumentMarkerController::removeMarkers( |
117 const EphemeralRange& range, | 118 const EphemeralRange& range, |
118 DocumentMarker::MarkerTypes markerTypes, | 119 DocumentMarker::MarkerTypes markerTypes, |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 } | 586 } |
586 | 587 |
587 } // namespace blink | 588 } // namespace blink |
588 | 589 |
589 #ifndef NDEBUG | 590 #ifndef NDEBUG |
590 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { | 591 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { |
591 if (controller) | 592 if (controller) |
592 controller->showMarkers(); | 593 controller->showMarkers(); |
593 } | 594 } |
594 #endif | 595 #endif |
OLD | NEW |