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

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

Issue 2755953004: Refactor DocumentMarkerController to use SynchronousMutationObserver (Closed)
Patch Set: Created 3 years, 9 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 08b2e64320847b16760d3d3654e6b97e170044b2..d759b830964c19c5772b67eb272b1d8a3637541b 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
@@ -53,11 +53,13 @@ class MarkerRemoverPredicate final {
};
class CORE_EXPORT DocumentMarkerController final
- : public GarbageCollected<DocumentMarkerController> {
+ : public GarbageCollected<DocumentMarkerController>,
+ public SynchronousMutationObserver {
WTF_MAKE_NONCOPYABLE(DocumentMarkerController);
+ USING_GARBAGE_COLLECTED_MIXIN(DocumentMarkerController);
public:
- explicit DocumentMarkerController(const Document&);
+ explicit DocumentMarkerController(Document&);
void clear();
void addMarker(const Position& start,
@@ -130,6 +132,12 @@ class CORE_EXPORT DocumentMarkerController final
void showMarkers() const;
#endif
+ // SynchronousMutationObserver
+ void didUpdateCharacterData(CharacterData*,
+ unsigned offset,
+ unsigned oldLength,
+ unsigned newLength) final;
+
private:
void addMarker(Node*, const DocumentMarker&);

Powered by Google App Engine
This is Rietveld 408576698