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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 void removeMarkers(Node*, DocumentMarker::MarkerTypes = DocumentMarker::AllM
arkers()); | 69 void removeMarkers(Node*, DocumentMarker::MarkerTypes = DocumentMarker::AllM
arkers()); |
70 void repaintMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers
()); | 70 void repaintMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers
()); |
71 void invalidateRenderedRectsForMarkersInRect(const LayoutRect&); | 71 void invalidateRenderedRectsForMarkersInRect(const LayoutRect&); |
72 void shiftMarkers(Node*, unsigned startOffset, int delta); | 72 void shiftMarkers(Node*, unsigned startOffset, int delta); |
73 void setMarkersActive(Range*, bool); | 73 void setMarkersActive(Range*, bool); |
74 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool)
; | 74 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool)
; |
75 | 75 |
76 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::Ma
rkerType); | 76 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::Ma
rkerType); |
77 Vector<DocumentMarker*> markersFor(Node*, DocumentMarker::MarkerTypes = Docu
mentMarker::AllMarkers()); | 77 Vector<DocumentMarker*> markersFor(Node*, DocumentMarker::MarkerTypes = Docu
mentMarker::AllMarkers()); |
78 Vector<DocumentMarker*> markersInRange(Range*, DocumentMarker::MarkerTypes); | 78 Vector<DocumentMarker*> markersInRange(Range*, DocumentMarker::MarkerTypes); |
79 Vector<DocumentMarker> markersForNode(Node*); | |
80 Vector<DocumentMarker*> markers(); | 79 Vector<DocumentMarker*> markers(); |
81 Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType); | 80 Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType); |
82 | 81 |
83 #ifndef NDEBUG | 82 #ifndef NDEBUG |
84 void showMarkers() const; | 83 void showMarkers() const; |
85 #endif | 84 #endif |
86 | 85 |
87 private: | 86 private: |
88 void addMarker(Node*, const DocumentMarker&); | 87 void addMarker(Node*, const DocumentMarker&); |
89 | 88 |
90 typedef Vector<RenderedDocumentMarker> MarkerList; | 89 typedef Vector<RenderedDocumentMarker> MarkerList; |
91 typedef HashMap<RefPtr<Node>, OwnPtr<MarkerList> > MarkerMap; | 90 typedef HashMap<RefPtr<Node>, OwnPtr<MarkerList> > MarkerMap; |
92 bool possiblyHasMarkers(DocumentMarker::MarkerTypes); | 91 bool possiblyHasMarkers(DocumentMarker::MarkerTypes); |
93 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes)
; | 92 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes)
; |
94 | 93 |
95 MarkerMap m_markers; | 94 MarkerMap m_markers; |
96 // Provide a quick way to determine whether a particular marker type is abse
nt without going through the map. | 95 // Provide a quick way to determine whether a particular marker type is abse
nt without going through the map. |
97 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; | 96 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; |
98 }; | 97 }; |
99 | 98 |
100 } // namespace WebCore | 99 } // namespace WebCore |
101 | 100 |
102 #ifndef NDEBUG | 101 #ifndef NDEBUG |
103 void showDocumentMarkers(const WebCore::DocumentMarkerController*); | 102 void showDocumentMarkers(const WebCore::DocumentMarkerController*); |
104 #endif | 103 #endif |
105 | 104 |
106 #endif // DocumentMarkerController_h | 105 #endif // DocumentMarkerController_h |
OLD | NEW |