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

Side by Side Diff: Source/core/dom/DocumentMarkerController.h

Issue 23728006: addMarker() optimizations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 #ifndef NDEBUG 82 #ifndef NDEBUG
83 void showMarkers() const; 83 void showMarkers() const;
84 #endif 84 #endif
85 85
86 private: 86 private:
87 void addMarker(Node*, const DocumentMarker&); 87 void addMarker(Node*, const DocumentMarker&);
88 88
89 typedef Vector<RenderedDocumentMarker> MarkerList; 89 typedef Vector<RenderedDocumentMarker> MarkerList;
90 typedef HashMap<RefPtr<Node>, OwnPtr<MarkerList> > MarkerMap; 90 typedef HashMap<RefPtr<Node>, OwnPtr<MarkerList> > MarkerMap;
91 void mergeOverlapping(MarkerList*, DocumentMarker&);
91 bool possiblyHasMarkers(DocumentMarker::MarkerTypes); 92 bool possiblyHasMarkers(DocumentMarker::MarkerTypes);
92 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ; 93 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ;
93 94
94 MarkerMap m_markers; 95 MarkerMap m_markers;
95 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map. 96 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map.
96 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; 97 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes;
97 }; 98 };
98 99
99 } // namespace WebCore 100 } // namespace WebCore
100 101
101 #ifndef NDEBUG 102 #ifndef NDEBUG
102 void showDocumentMarkers(const WebCore::DocumentMarkerController*); 103 void showDocumentMarkers(const WebCore::DocumentMarkerController*);
103 #endif 104 #endif
104 105
105 #endif // DocumentMarkerController_h 106 #endif // DocumentMarkerController_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/DocumentMarkerController.cpp » ('j') | Source/core/dom/DocumentMarkerController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698