| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 void ShowMarkers() const; | 104 void ShowMarkers() const; |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 // SynchronousMutationObserver | 107 // SynchronousMutationObserver |
| 108 void DidUpdateCharacterData(CharacterData*, | 108 void DidUpdateCharacterData(CharacterData*, |
| 109 unsigned offset, | 109 unsigned offset, |
| 110 unsigned old_length, | 110 unsigned old_length, |
| 111 unsigned new_length) final; | 111 unsigned new_length) final; |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 void AddMarker(Node*, DocumentMarker*); | 114 void AddMarkerInternal( |
| 115 const EphemeralRange&, |
| 116 std::function<DocumentMarker*(int, int)> create_marker_from_offsets); |
| 117 void AddMarkerToNode(Node*, DocumentMarker*); |
| 115 void AddSpellCheckMarker(const Position& start, | 118 void AddSpellCheckMarker(const Position& start, |
| 116 const Position& end, | 119 const Position& end, |
| 117 DocumentMarker::MarkerType, | 120 DocumentMarker::MarkerType, |
| 118 const String& description = g_empty_string); | 121 const String& description = g_empty_string); |
| 119 | 122 |
| 120 using MarkerLists = HeapVector<Member<DocumentMarkerList>, | 123 using MarkerLists = HeapVector<Member<DocumentMarkerList>, |
| 121 DocumentMarker::kMarkerTypeIndexesCount>; | 124 DocumentMarker::kMarkerTypeIndexesCount>; |
| 122 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; | 125 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; |
| 123 static Member<DocumentMarkerList>& ListForType(MarkerLists*, | 126 static Member<DocumentMarkerList>& ListForType(MarkerLists*, |
| 124 DocumentMarker::MarkerType); | 127 DocumentMarker::MarkerType); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 137 const Member<const Document> document_; | 140 const Member<const Document> document_; |
| 138 }; | 141 }; |
| 139 | 142 |
| 140 } // namespace blink | 143 } // namespace blink |
| 141 | 144 |
| 142 #ifndef NDEBUG | 145 #ifndef NDEBUG |
| 143 void showDocumentMarkers(const blink::DocumentMarkerController*); | 146 void showDocumentMarkers(const blink::DocumentMarkerController*); |
| 144 #endif | 147 #endif |
| 145 | 148 |
| 146 #endif // DocumentMarkerController_h | 149 #endif // DocumentMarkerController_h |
| OLD | NEW |