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

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

Issue 2755013004: Improve how DocumentMarkerController updates markers in response to text edits (Closed)
Patch Set: Rebase (Vector::remove() => Vector::erase()) 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 d759b830964c19c5772b67eb272b1d8a3637541b..7d56b8a499759acaa533cd738a4fb483e50e3220 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
@@ -30,6 +30,7 @@
#define DocumentMarkerController_h
#include "core/CoreExport.h"
+#include "core/dom/SynchronousMutationObserver.h"
#include "core/editing/iterators/TextIterator.h"
#include "core/editing/markers/DocumentMarker.h"
#include "platform/geometry/IntRect.h"
@@ -107,7 +108,6 @@ class CORE_EXPORT DocumentMarkerController final
void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker);
void repaintMarkers(
DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
- void shiftMarkers(Node*, unsigned startOffset, int delta);
// Returns true if markers within a range are found.
bool setMarkersActive(const EphemeralRange&, bool);
// Returns true if markers within a range defined by a node, |startOffset| and
@@ -147,6 +147,10 @@ class CORE_EXPORT DocumentMarkerController final
using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>;
void mergeOverlapping(MarkerList*, RenderedDocumentMarker*);
bool possiblyHasMarkers(DocumentMarker::MarkerTypes);
+ bool relocateMarkerIfNeeded(RenderedDocumentMarker*,
+ unsigned offset,
+ unsigned oldLength,
+ unsigned newLength);
void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes);
void removeMarkers(TextIterator&,
DocumentMarker::MarkerTypes,

Powered by Google App Engine
This is Rietveld 408576698