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
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 class CORE_EXPORT DocumentMarkerController final : public NoBaseWillBeGarbageCol
lected<DocumentMarkerController> { | 56 class CORE_EXPORT DocumentMarkerController final : public NoBaseWillBeGarbageCol
lected<DocumentMarkerController> { |
57 WTF_MAKE_NONCOPYABLE(DocumentMarkerController); WTF_MAKE_FAST_ALLOCATED_WILL
_BE_REMOVED(DocumentMarkerController); | 57 WTF_MAKE_NONCOPYABLE(DocumentMarkerController); WTF_MAKE_FAST_ALLOCATED_WILL
_BE_REMOVED(DocumentMarkerController); |
58 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentMarkerController); | 58 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentMarkerController); |
59 public: | 59 public: |
60 | 60 |
61 DocumentMarkerController(); | 61 DocumentMarkerController(); |
62 | 62 |
63 void clear(); | 63 void clear(); |
64 void addMarker(const Position& start, const Position& end, DocumentMarker::M
arkerType, const String& description = emptyString(), uint32_t hash = 0); | 64 void addMarker(const Position& start, const Position& end, DocumentMarker::M
arkerType, const String& description = emptyString(), uint32_t hash = 0); |
65 void addTextMatchMarker(const Range*, bool activeMatch); | 65 void addTextMatchMarker(const Range*, bool activeMatch); |
| 66 void addCompositionMarker(const Position& start, const Position& end, Color
underlineColor, bool thick, Color backgroundColor); |
66 | 67 |
67 void copyMarkers(Node* srcNode, unsigned startOffset, int length, Node* dstN
ode, int delta); | 68 void copyMarkers(Node* srcNode, unsigned startOffset, int length, Node* dstN
ode, int delta); |
68 | 69 |
69 void prepareForDestruction(); | 70 void prepareForDestruction(); |
70 // When a marker partially overlaps with range, if removePartiallyOverlappin
gMarkers is true, we completely | 71 // When a marker partially overlaps with range, if removePartiallyOverlappin
gMarkers is true, we completely |
71 // remove the marker. If the argument is false, we will adjust the span of t
he marker so that it retains | 72 // remove the marker. If the argument is false, we will adjust the span of t
he marker so that it retains |
72 // the portion that is outside of the range. | 73 // the portion that is outside of the range. |
73 enum RemovePartiallyOverlappingMarkerOrNot { DoNotRemovePartiallyOverlapping
Marker, RemovePartiallyOverlappingMarker }; | 74 enum RemovePartiallyOverlappingMarkerOrNot { DoNotRemovePartiallyOverlapping
Marker, RemovePartiallyOverlappingMarker }; |
74 void removeMarkers(const EphemeralRange&, DocumentMarker::MarkerTypes = Docu
mentMarker::AllMarkers(), RemovePartiallyOverlappingMarkerOrNot = DoNotRemovePar
tiallyOverlappingMarker); | 75 void removeMarkers(const EphemeralRange&, DocumentMarker::MarkerTypes = Docu
mentMarker::AllMarkers(), RemovePartiallyOverlappingMarkerOrNot = DoNotRemovePar
tiallyOverlappingMarker); |
75 void removeMarkers(Node*, unsigned startOffset, int length, DocumentMarker::
MarkerTypes = DocumentMarker::AllMarkers(), RemovePartiallyOverlappingMarkerOrN
ot = DoNotRemovePartiallyOverlappingMarker); | 76 void removeMarkers(Node*, unsigned startOffset, int length, DocumentMarker::
MarkerTypes = DocumentMarker::AllMarkers(), RemovePartiallyOverlappingMarkerOrN
ot = DoNotRemovePartiallyOverlappingMarker); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; | 113 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; |
113 }; | 114 }; |
114 | 115 |
115 } // namespace blink | 116 } // namespace blink |
116 | 117 |
117 #ifndef NDEBUG | 118 #ifndef NDEBUG |
118 void showDocumentMarkers(const blink::DocumentMarkerController*); | 119 void showDocumentMarkers(const blink::DocumentMarkerController*); |
119 #endif | 120 #endif |
120 | 121 |
121 #endif // DocumentMarkerController_h | 122 #endif // DocumentMarkerController_h |
OLD | NEW |