Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: sky/engine/core/dom/DocumentMarkerController.h

Issue 830273006: Delete document marker related invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/engine/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // 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
72 // 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
73 // the portion that is outside of the range. 73 // the portion that is outside of the range.
74 enum RemovePartiallyOverlappingMarkerOrNot { DoNotRemovePartiallyOverlapping Marker, RemovePartiallyOverlappingMarker }; 74 enum RemovePartiallyOverlappingMarkerOrNot { DoNotRemovePartiallyOverlapping Marker, RemovePartiallyOverlappingMarker };
75 void removeMarkers(Range*, DocumentMarker::MarkerTypes = DocumentMarker::All Markers(), RemovePartiallyOverlappingMarkerOrNot = DoNotRemovePartiallyOverlappi ngMarker); 75 void removeMarkers(Range*, DocumentMarker::MarkerTypes = DocumentMarker::All Markers(), RemovePartiallyOverlappingMarkerOrNot = DoNotRemovePartiallyOverlappi ngMarker);
76 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);
77 77
78 void removeMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers( )); 78 void removeMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers( ));
79 void removeMarkers(Node*, DocumentMarker::MarkerTypes = DocumentMarker::AllM arkers()); 79 void removeMarkers(Node*, DocumentMarker::MarkerTypes = DocumentMarker::AllM arkers());
80 void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker); 80 void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker);
81 void invalidateRenderedRectsForMarkersInRect(const LayoutRect&);
82 void shiftMarkers(Node*, unsigned startOffset, int delta); 81 void shiftMarkers(Node*, unsigned startOffset, int delta);
83 void setMarkersActive(Range*, bool); 82 void setMarkersActive(Range*, bool);
84 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool) ; 83 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool) ;
85 84
86 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::Ma rkerType);
87 DocumentMarkerVector markersFor(Node*, DocumentMarker::MarkerTypes = Documen tMarker::AllMarkers()); 85 DocumentMarkerVector markersFor(Node*, DocumentMarker::MarkerTypes = Documen tMarker::AllMarkers());
88 DocumentMarkerVector markersInRange(Range*, DocumentMarker::MarkerTypes); 86 DocumentMarkerVector markersInRange(Range*, DocumentMarker::MarkerTypes);
89 DocumentMarkerVector markers(); 87 DocumentMarkerVector markers();
90 Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
91 88
92 #ifndef NDEBUG 89 #ifndef NDEBUG
93 void showMarkers() const; 90 void showMarkers() const;
94 #endif 91 #endif
95 92
96 private: 93 private:
97 void addMarker(Node*, const DocumentMarker&); 94 void addMarker(Node*, const DocumentMarker&);
98 95
99 typedef Vector<OwnPtr<RenderedDocumentMarker> > MarkerList; 96 typedef Vector<OwnPtr<RenderedDocumentMarker> > MarkerList;
100 typedef Vector<OwnPtr<MarkerList>, DocumentMarker::MarkerTypeIndexesCount> M arkerLists; 97 typedef Vector<OwnPtr<MarkerList>, DocumentMarker::MarkerTypeIndexesCount> M arkerLists;
101 typedef HashMap<RawPtr<const Node>, OwnPtr<MarkerLists> > MarkerMap; 98 typedef HashMap<RawPtr<const Node>, OwnPtr<MarkerLists> > MarkerMap;
102 void mergeOverlapping(MarkerList*, DocumentMarker&); 99 void mergeOverlapping(MarkerList*, DocumentMarker&);
103 bool possiblyHasMarkers(DocumentMarker::MarkerTypes); 100 bool possiblyHasMarkers(DocumentMarker::MarkerTypes);
104 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ; 101 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ;
105 102
106 MarkerMap m_markers; 103 MarkerMap m_markers;
107 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map. 104 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map.
108 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; 105 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes;
109 }; 106 };
110 107
111 } // namespace blink 108 } // namespace blink
112 109
113 #ifndef NDEBUG 110 #ifndef NDEBUG
114 void showDocumentMarkers(const blink::DocumentMarkerController*); 111 void showDocumentMarkers(const blink::DocumentMarkerController*);
115 #endif 112 #endif
116 113
117 #endif // SKY_ENGINE_CORE_DOM_DOCUMENTMARKERCONTROLLER_H_ 114 #endif // SKY_ENGINE_CORE_DOM_DOCUMENTMARKERCONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698