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

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h

Issue 2034363002: Update document marker rects lazily in frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
index b84296ed93307d9e7f95ad87cd5cf2d19a01e51f..603b17eff081628130e628f4e07828a0b5aeca6f 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
@@ -57,7 +57,7 @@ class CORE_EXPORT DocumentMarkerController final : public GarbageCollected<Docum
WTF_MAKE_NONCOPYABLE(DocumentMarkerController);
public:
- DocumentMarkerController();
+ explicit DocumentMarkerController(const Document&);
void clear();
void addMarker(const Position& start, const Position& end, DocumentMarker::MarkerType, const String& description = emptyString(), uint32_t hash = 0);
@@ -90,7 +90,9 @@ public:
DocumentMarkerVector markersInRange(const EphemeralRange&, DocumentMarker::MarkerTypes);
DocumentMarkerVector markers();
Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
- void updateRenderedRectsForMarkers();
+ void updateMarkerRenderedRectIfNeeded(const Node&, RenderedDocumentMarker&);
+ void invalidateRectsForAllMarkers();
+ void invalidateRectsForMarkersInNode(const Node&);
DECLARE_TRACE();
@@ -112,6 +114,7 @@ private:
MarkerMap m_markers;
// Provide a quick way to determine whether a particular marker type is absent without going through the map.
DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes;
+ const Member<const Document> m_document;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698