summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/editing/markers
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/editing/markers')
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker_list_impl.h6
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/composition_marker.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/composition_marker_list_impl.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/document_marker.h8
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc112
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.h9
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/document_marker_list.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/grammar_marker.h4
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/grammar_marker_list_impl.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.cc28
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.h44
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.cc71
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.h48
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker.h4
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker_list_impl.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/spelling_marker.h4
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/spelling_marker_list_impl.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/styleable_marker.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker.h4
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.cc1
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.h4
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.cc4
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.h7
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_replacement_scope.h7
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker_list_impl.h6
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/text_marker_base.h5
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/text_marker_base_list_impl.h6
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/text_match_marker.h4
-rw-r--r--chromium/third_party/blink/renderer/core/editing/markers/text_match_marker_list_impl.h5
31 files changed, 359 insertions, 77 deletions
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker.h
index fdffb8129c7..06c6380684a 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker.h
@@ -21,12 +21,11 @@ class CORE_EXPORT ActiveSuggestionMarker final : public StyleableMarker {
ui::mojom::ImeTextSpanUnderlineStyle underline_style,
Color text_color,
Color background_color);
+ ActiveSuggestionMarker(const ActiveSuggestionMarker&) = delete;
+ ActiveSuggestionMarker& operator=(const ActiveSuggestionMarker&) = delete;
// DocumentMarker implementations
MarkerType GetType() const final;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ActiveSuggestionMarker);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker_list_impl.h
index d4e3665f7ee..438a6361abe 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/active_suggestion_marker_list_impl.h
@@ -19,6 +19,10 @@ class CORE_EXPORT ActiveSuggestionMarkerListImpl final
: public DocumentMarkerList {
public:
ActiveSuggestionMarkerListImpl() = default;
+ ActiveSuggestionMarkerListImpl(const ActiveSuggestionMarkerListImpl&) =
+ delete;
+ ActiveSuggestionMarkerListImpl& operator=(
+ const ActiveSuggestionMarkerListImpl&) = delete;
// DocumentMarkerList implementations
DocumentMarker::MarkerType MarkerType() const final;
@@ -46,8 +50,6 @@ class CORE_EXPORT ActiveSuggestionMarkerListImpl final
private:
HeapVector<Member<DocumentMarker>> markers_;
-
- DISALLOW_COPY_AND_ASSIGN(ActiveSuggestionMarkerListImpl);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/composition_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/composition_marker.h
index b3ff246a3c8..de40c9a156e 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/composition_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/composition_marker.h
@@ -23,12 +23,11 @@ class CORE_EXPORT CompositionMarker final : public StyleableMarker {
ui::mojom::ImeTextSpanUnderlineStyle,
Color text_color,
Color background_color);
+ CompositionMarker(const CompositionMarker&) = delete;
+ CompositionMarker& operator=(const CompositionMarker&) = delete;
// DocumentMarker implementations
MarkerType GetType() const final;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CompositionMarker);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/composition_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/composition_marker_list_impl.h
index a47b6e05559..155ee0e0031 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/composition_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/composition_marker_list_impl.h
@@ -16,6 +16,9 @@ namespace blink {
class CORE_EXPORT CompositionMarkerListImpl final : public DocumentMarkerList {
public:
CompositionMarkerListImpl() = default;
+ CompositionMarkerListImpl(const CompositionMarkerListImpl&) = delete;
+ CompositionMarkerListImpl& operator=(const CompositionMarkerListImpl&) =
+ delete;
// DocumentMarkerList implementations
DocumentMarker::MarkerType MarkerType() const final;
@@ -43,8 +46,6 @@ class CORE_EXPORT CompositionMarkerListImpl final : public DocumentMarkerList {
private:
HeapVector<Member<DocumentMarker>> markers_;
-
- DISALLOW_COPY_AND_ASSIGN(CompositionMarkerListImpl);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/document_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/document_marker.h
index cf25dce4d00..a0523366bc0 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/document_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/document_marker.h
@@ -25,7 +25,6 @@
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/renderer/core/core_export.h"
-#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
@@ -46,6 +45,7 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
kActiveSuggestionMarkerIndex,
kSuggestionMarkerIndex,
kTextFragmentMarkerIndex,
+ kHighlightMarkerIndex,
kMarkerTypeIndexesCount
};
@@ -57,6 +57,7 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
kActiveSuggestion = 1 << kActiveSuggestionMarkerIndex,
kSuggestion = 1 << kSuggestionMarkerIndex,
kTextFragment = 1 << kTextFragmentMarkerIndex,
+ kHighlight = 1 << kHighlightMarkerIndex
};
class MarkerTypesIterator
@@ -125,6 +126,7 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
static MarkerTypes TextMatch() { return MarkerTypes(kTextMatch); }
static MarkerTypes Suggestion() { return MarkerTypes(kSuggestion); }
static MarkerTypes TextFragment() { return MarkerTypes(kTextFragment); }
+ static MarkerTypes Highlight() { return MarkerTypes(kHighlight); }
bool Contains(MarkerType type) const { return mask_ & type; }
bool Intersects(const MarkerTypes& types) const {
@@ -145,6 +147,8 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
unsigned mask_;
};
+ DocumentMarker(const DocumentMarker&) = delete;
+ DocumentMarker& operator=(const DocumentMarker&) = delete;
virtual ~DocumentMarker();
virtual MarkerType GetType() const = 0;
@@ -175,8 +179,6 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
private:
unsigned start_offset_;
unsigned end_offset_;
-
- DISALLOW_COPY_AND_ASSIGN(DocumentMarker);
};
using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>;
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc b/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc
index e567784ccc6..b4786b5a3c3 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc
+++ b/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc
@@ -41,6 +41,8 @@
#include "third_party/blink/renderer/core/editing/markers/composition_marker_list_impl.h"
#include "third_party/blink/renderer/core/editing/markers/grammar_marker.h"
#include "third_party/blink/renderer/core/editing/markers/grammar_marker_list_impl.h"
+#include "third_party/blink/renderer/core/editing/markers/highlight_marker.h"
+#include "third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.h"
#include "third_party/blink/renderer/core/editing/markers/sorted_document_marker_list_editor.h"
#include "third_party/blink/renderer/core/editing/markers/spelling_marker.h"
#include "third_party/blink/renderer/core/editing/markers/spelling_marker_list_impl.h"
@@ -53,7 +55,9 @@
#include "third_party/blink/renderer/core/editing/position.h"
#include "third_party/blink/renderer/core/editing/visible_position.h"
#include "third_party/blink/renderer/core/editing/visible_units.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
+#include "third_party/blink/renderer/core/highlight/highlight_registry.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
@@ -78,6 +82,8 @@ DocumentMarker::MarkerTypeIndex MarkerTypeToMarkerIndex(
return DocumentMarker::kSuggestionMarkerIndex;
case DocumentMarker::kTextFragment:
return DocumentMarker::kTextFragmentMarkerIndex;
+ case DocumentMarker::kHighlight:
+ return DocumentMarker::kHighlightMarkerIndex;
}
NOTREACHED();
@@ -100,6 +106,8 @@ DocumentMarkerList* CreateListForType(DocumentMarker::MarkerType type) {
return MakeGarbageCollected<TextMatchMarkerListImpl>();
case DocumentMarker::kTextFragment:
return MakeGarbageCollected<TextFragmentMarkerListImpl>();
+ case DocumentMarker::kHighlight:
+ return MakeGarbageCollected<HighlightMarkerListImpl>();
}
NOTREACHED();
@@ -252,6 +260,18 @@ void DocumentMarkerController::AddTextFragmentMarker(
});
}
+void DocumentMarkerController::AddHighlightMarker(
+ const EphemeralRange& range,
+ const String& highlight_name,
+ const Member<Highlight> highlight) {
+ DCHECK(!document_->NeedsLayoutTreeUpdate());
+ AddMarkerInternal(
+ range, [highlight_name, highlight](int start_offset, int end_offset) {
+ return MakeGarbageCollected<HighlightMarker>(start_offset, end_offset,
+ highlight_name, highlight);
+ });
+}
+
void DocumentMarkerController::PrepareForDestruction() {
Clear();
}
@@ -352,7 +372,7 @@ void DocumentMarkerController::MoveMarkers(const Text& src_node,
return;
DCHECK(!markers_.IsEmpty());
- MarkerLists* const src_markers = markers_.at(&src_node);
+ MarkerLists* const src_markers = markers_.DeprecatedAtOrEmptyValue(&src_node);
if (!src_markers)
return;
@@ -396,7 +416,7 @@ void DocumentMarkerController::RemoveMarkersInternal(
return;
DCHECK(!(markers_.IsEmpty()));
- MarkerLists* const markers = markers_.at(&text);
+ MarkerLists* const markers = markers_.DeprecatedAtOrEmptyValue(&text);
if (!markers)
return;
@@ -522,7 +542,7 @@ DocumentMarker* DocumentMarkerController::FirstMarkerIntersectingOffsetRange(
if (start_offset == node_length && end_offset == node_length)
return nullptr;
- MarkerLists* const markers = markers_.at(&node);
+ MarkerLists* const markers = markers_.DeprecatedAtOrEmptyValue(&node);
if (!markers)
return nullptr;
@@ -572,7 +592,8 @@ DocumentMarkerController::MarkersAroundPosition(
if (!text_node)
continue;
- MarkerLists* const marker_lists = markers_.at(text_node);
+ MarkerLists* const marker_lists =
+ markers_.DeprecatedAtOrEmptyValue(text_node);
if (!marker_lists)
continue;
@@ -625,7 +646,7 @@ DocumentMarkerController::MarkersIntersectingRange(
auto* text_node = DynamicTo<Text>(node);
if (!text_node)
continue;
- MarkerLists* const markers = markers_.at(text_node);
+ MarkerLists* const markers = markers_.DeprecatedAtOrEmptyValue(text_node);
if (!markers)
continue;
@@ -664,7 +685,7 @@ DocumentMarkerVector DocumentMarkerController::MarkersFor(
if (!PossiblyHasMarkers(marker_types))
return result;
- MarkerLists* markers = markers_.at(&text);
+ MarkerLists* markers = markers_.DeprecatedAtOrEmptyValue(&text);
if (!markers)
return result;
@@ -705,6 +726,69 @@ DocumentMarkerVector DocumentMarkerController::Markers() const {
DocumentMarkerVector DocumentMarkerController::ComputeMarkersToPaint(
const Text& text) const {
+ DocumentMarkerVector markers_to_paint;
+
+ // Fix overlapping HighlightMarkers that share the same highlight name so
+ // their intersections are not painted twice.
+ // Note: DocumentMarkerController::MarkersFor() returns markers sorted by
+ // start offset.
+ DocumentMarkerVector highlight_markers =
+ MarkersFor(text, DocumentMarker::MarkerTypes(DocumentMarker::kHighlight));
+ HeapVector<Member<HighlightMarker>> highlight_markers_not_overlapping;
+ using NameToHighlightMarkerMap =
+ HashMap<String, Member<HighlightMarker>, StringHash>;
+ NameToHighlightMarkerMap name_to_last_highlight_marker_seen;
+
+ for (const auto& current_marker : highlight_markers) {
+ HighlightMarker* current_highlight_marker =
+ To<HighlightMarker>(current_marker.Get());
+
+ NameToHighlightMarkerMap::AddResult insert_result =
+ name_to_last_highlight_marker_seen.insert(
+ current_highlight_marker->GetHighlightName(),
+ current_highlight_marker);
+
+ if (!insert_result.is_new_entry) {
+ HighlightMarker* stored_highlight_marker =
+ insert_result.stored_value->value;
+ if (current_highlight_marker->StartOffset() >=
+ stored_highlight_marker->EndOffset()) {
+ // Markers don't intersect, so the stored one is fine to be painted.
+ highlight_markers_not_overlapping.push_back(stored_highlight_marker);
+ insert_result.stored_value->value = current_highlight_marker;
+ } else {
+ // Markers overlap, so expand the stored marker to cover both and
+ // discard the current one.
+ stored_highlight_marker->SetEndOffset(
+ std::max(stored_highlight_marker->EndOffset(),
+ current_highlight_marker->EndOffset()));
+ }
+ }
+ }
+
+ for (const auto& name_to_highlight_marker_iterator :
+ name_to_last_highlight_marker_seen) {
+ highlight_markers_not_overlapping.push_back(
+ name_to_highlight_marker_iterator.value.Get());
+ }
+
+ HighlightRegistry* highlight_registry =
+ document_->domWindow()->Supplementable<LocalDOMWindow>::
+ RequireSupplement<HighlightRegistry>();
+ std::sort(highlight_markers_not_overlapping.begin(),
+ highlight_markers_not_overlapping.end(),
+ [highlight_registry](const Member<HighlightMarker>& marker1,
+ const Member<HighlightMarker>& marker2) {
+ return highlight_registry->CompareOverlayStackingPosition(
+ marker1->GetHighlightName(), marker1->GetHighlight(),
+ marker2->GetHighlightName(),
+ marker2->GetHighlight()) ==
+ HighlightRegistry::OverlayStackingPosition::
+ kOverlayStackingPositionBelow;
+ });
+
+ markers_to_paint.AppendVector(highlight_markers_not_overlapping);
+
// We don't render composition or spelling markers that overlap suggestion
// markers.
// Note: DocumentMarkerController::MarkersFor() returns markers sorted by
@@ -714,9 +798,10 @@ DocumentMarkerVector DocumentMarkerController::ComputeMarkersToPaint(
if (suggestion_markers.IsEmpty()) {
// If there are no suggestion markers, we can return early as a minor
// performance optimization.
- return MarkersFor(
- text, DocumentMarker::MarkerTypes::AllBut(
- DocumentMarker::MarkerTypes(DocumentMarker::kSuggestion)));
+ markers_to_paint.AppendVector(MarkersFor(
+ text, DocumentMarker::MarkerTypes::AllBut(DocumentMarker::MarkerTypes(
+ DocumentMarker::kSuggestion | DocumentMarker::kHighlight))));
+ return markers_to_paint;
}
const DocumentMarkerVector& markers_overridden_by_suggestion_markers =
@@ -738,7 +823,6 @@ DocumentMarkerVector DocumentMarkerController::ComputeMarkersToPaint(
unsigned suggestion_ends_index = 0;
unsigned number_suggestions_currently_inside = 0;
- DocumentMarkerVector markers_to_paint;
for (DocumentMarker* marker : markers_overridden_by_suggestion_markers) {
while (suggestion_starts_index < suggestion_starts.size() &&
suggestion_starts[suggestion_starts_index] <=
@@ -773,7 +857,7 @@ DocumentMarkerVector DocumentMarkerController::ComputeMarkersToPaint(
markers_to_paint.AppendVector(MarkersFor(
text, DocumentMarker::MarkerTypes::AllBut(DocumentMarker::MarkerTypes(
DocumentMarker::kComposition | DocumentMarker::kSpelling |
- DocumentMarker::kSuggestion))));
+ DocumentMarker::kSuggestion | DocumentMarker::kHighlight))));
return markers_to_paint;
}
@@ -818,7 +902,7 @@ static void InvalidatePaintForTickmarks(const Node& node) {
void DocumentMarkerController::InvalidateRectsForTextMatchMarkersInNode(
const Text& node) {
- MarkerLists* markers = markers_.at(&node);
+ MarkerLists* markers = markers_.DeprecatedAtOrEmptyValue(&node);
const DocumentMarkerList* const marker_list =
ListForType(markers, DocumentMarker::kTextMatch);
@@ -1081,7 +1165,7 @@ bool DocumentMarkerController::SetTextMatchMarkersActive(const Text& text,
unsigned start_offset,
unsigned end_offset,
bool active) {
- MarkerLists* markers = markers_.at(&text);
+ MarkerLists* markers = markers_.DeprecatedAtOrEmptyValue(&text);
if (!markers)
return false;
@@ -1141,7 +1225,7 @@ void DocumentMarkerController::DidUpdateCharacterData(CharacterData* node,
auto* text_node = DynamicTo<Text>(node);
if (!text_node)
return;
- MarkerLists* markers = markers_.at(text_node);
+ MarkerLists* markers = markers_.DeprecatedAtOrEmptyValue(text_node);
if (!markers)
return;
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.h b/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.h
index 8f5d104efd4..4f50d427fcc 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/document_marker_controller.h
@@ -32,7 +32,6 @@
#include <utility>
#include "base/dcheck_is_on.h"
-#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/synchronous_mutation_observer.h"
#include "third_party/blink/renderer/core/editing/forward.h"
@@ -49,6 +48,7 @@
namespace blink {
class DocumentMarkerList;
+class Highlight;
class SuggestionMarkerProperties;
class CORE_EXPORT DocumentMarkerController final
@@ -56,6 +56,8 @@ class CORE_EXPORT DocumentMarkerController final
public SynchronousMutationObserver {
public:
explicit DocumentMarkerController(Document&);
+ DocumentMarkerController(const DocumentMarkerController&) = delete;
+ DocumentMarkerController& operator=(const DocumentMarkerController&) = delete;
void Clear();
void AddSpellingMarker(const EphemeralRange&,
@@ -78,6 +80,9 @@ class CORE_EXPORT DocumentMarkerController final
void AddSuggestionMarker(const EphemeralRange&,
const SuggestionMarkerProperties&);
void AddTextFragmentMarker(const EphemeralRange&);
+ void AddHighlightMarker(const EphemeralRange&,
+ const String& highlight_name,
+ const Member<Highlight> highlight);
void MoveMarkers(const Text& src_node, int length, const Text& dst_node);
@@ -210,8 +215,6 @@ class CORE_EXPORT DocumentMarkerController final
// without going through the map.
DocumentMarker::MarkerTypes possibly_existing_marker_types_;
const Member<Document> document_;
-
- DISALLOW_COPY_AND_ASSIGN(DocumentMarkerController);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/document_marker_list.h b/chromium/third_party/blink/renderer/core/editing/markers/document_marker_list.h
index 3ca83a282ac..81da5a79160 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/document_marker_list.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/document_marker_list.h
@@ -21,6 +21,8 @@ class DocumentMarker;
class CORE_EXPORT DocumentMarkerList
: public GarbageCollected<DocumentMarkerList> {
public:
+ DocumentMarkerList(const DocumentMarkerList&) = delete;
+ DocumentMarkerList& operator=(const DocumentMarkerList&) = delete;
virtual ~DocumentMarkerList();
// Returns the single marker type supported by the list implementation.
@@ -65,9 +67,6 @@ class CORE_EXPORT DocumentMarkerList
protected:
DocumentMarkerList();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker.h
index a195077d662..77d4e133e37 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker.h
@@ -18,12 +18,12 @@ class CORE_EXPORT GrammarMarker final : public SpellCheckMarker {
GrammarMarker(unsigned start_offset,
unsigned end_offset,
const String& description);
+ GrammarMarker(const GrammarMarker&) = delete;
+ GrammarMarker& operator=(const GrammarMarker&) = delete;
private:
// DocumentMarker implementations
MarkerType GetType() const final;
-
- DISALLOW_COPY_AND_ASSIGN(GrammarMarker);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker_list_impl.h
index 26e7ef8e57d..82714ba20b9 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/grammar_marker_list_impl.h
@@ -14,11 +14,10 @@ class CORE_EXPORT GrammarMarkerListImpl final
: public SpellCheckMarkerListImpl {
public:
GrammarMarkerListImpl() = default;
+ GrammarMarkerListImpl(const GrammarMarkerListImpl&) = delete;
+ GrammarMarkerListImpl& operator=(const GrammarMarkerListImpl&) = delete;
DocumentMarker::MarkerType MarkerType() const final;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GrammarMarkerListImpl);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.cc b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.cc
new file mode 100644
index 00000000000..d65cb1f324c
--- /dev/null
+++ b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.cc
@@ -0,0 +1,28 @@
+// Copyright 2021 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/renderer/core/editing/markers/highlight_marker.h"
+
+#include "third_party/blink/renderer/core/highlight/highlight.h"
+
+namespace blink {
+
+HighlightMarker::HighlightMarker(unsigned start_offset,
+ unsigned end_offset,
+ const String& highlight_name,
+ const Member<Highlight> highlight)
+ : DocumentMarker(start_offset, end_offset),
+ highlight_name_(highlight_name),
+ highlight_(highlight) {}
+
+DocumentMarker::MarkerType HighlightMarker::GetType() const {
+ return DocumentMarker::kHighlight;
+}
+
+void HighlightMarker::Trace(blink::Visitor* visitor) const {
+ visitor->Trace(highlight_);
+ DocumentMarker::Trace(visitor);
+}
+
+} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.h
new file mode 100644
index 00000000000..8ed97be20b9
--- /dev/null
+++ b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker.h
@@ -0,0 +1,44 @@
+// Copyright 2021 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_HIGHLIGHT_MARKER_H_
+#define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_HIGHLIGHT_MARKER_H_
+
+#include "third_party/blink/renderer/core/editing/markers/document_marker.h"
+#include "third_party/blink/renderer/platform/wtf/casting.h"
+
+namespace blink {
+
+class Highlight;
+
+class CORE_EXPORT HighlightMarker final : public DocumentMarker {
+ public:
+ HighlightMarker(unsigned start_offset,
+ unsigned end_offset,
+ const String& highlight_name,
+ const Member<Highlight> highlight);
+ HighlightMarker(const HighlightMarker&) = delete;
+ HighlightMarker& operator=(const HighlightMarker&) = delete;
+
+ MarkerType GetType() const final;
+ const Highlight* GetHighlight() const { return highlight_; }
+ const AtomicString& GetHighlightName() const { return highlight_name_; }
+
+ void Trace(blink::Visitor*) const override;
+
+ private:
+ const AtomicString highlight_name_;
+ const Member<Highlight> highlight_;
+};
+
+template <>
+struct DowncastTraits<HighlightMarker> {
+ static bool AllowFrom(const DocumentMarker& document_marker) {
+ return document_marker.GetType() == DocumentMarker::kHighlight;
+ }
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_HIGHLIGHT_MARKER_H_
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.cc b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.cc
new file mode 100644
index 00000000000..522b3b57b56
--- /dev/null
+++ b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.cc
@@ -0,0 +1,71 @@
+// Copyright 2021 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.h"
+
+#include "third_party/blink/renderer/core/editing/markers/unsorted_document_marker_list_editor.h"
+
+namespace blink {
+
+DocumentMarker::MarkerType HighlightMarkerListImpl::MarkerType() const {
+ return DocumentMarker::kHighlight;
+}
+
+bool HighlightMarkerListImpl::IsEmpty() const {
+ return markers_.IsEmpty();
+}
+
+void HighlightMarkerListImpl::Add(DocumentMarker* marker) {
+ DCHECK_EQ(DocumentMarker::kHighlight, marker->GetType());
+ markers_.push_back(marker);
+}
+
+void HighlightMarkerListImpl::Clear() {
+ markers_.clear();
+}
+
+const HeapVector<Member<DocumentMarker>>& HighlightMarkerListImpl::GetMarkers()
+ const {
+ return markers_;
+}
+
+DocumentMarker* HighlightMarkerListImpl::FirstMarkerIntersectingRange(
+ unsigned start_offset,
+ unsigned end_offset) const {
+ return UnsortedDocumentMarkerListEditor::FirstMarkerIntersectingRange(
+ markers_, start_offset, end_offset);
+}
+
+HeapVector<Member<DocumentMarker>>
+HighlightMarkerListImpl::MarkersIntersectingRange(unsigned start_offset,
+ unsigned end_offset) const {
+ return UnsortedDocumentMarkerListEditor::MarkersIntersectingRange(
+ markers_, start_offset, end_offset);
+}
+
+bool HighlightMarkerListImpl::MoveMarkers(int length,
+ DocumentMarkerList* dst_markers_) {
+ return UnsortedDocumentMarkerListEditor::MoveMarkers(&markers_, length,
+ dst_markers_);
+}
+
+bool HighlightMarkerListImpl::RemoveMarkers(unsigned start_offset, int length) {
+ return UnsortedDocumentMarkerListEditor::RemoveMarkers(&markers_,
+ start_offset, length);
+}
+
+bool HighlightMarkerListImpl::ShiftMarkers(const String&,
+ unsigned offset,
+ unsigned old_length,
+ unsigned new_length) {
+ return UnsortedDocumentMarkerListEditor::ShiftMarkersContentIndependent(
+ &markers_, offset, old_length, new_length);
+}
+
+void HighlightMarkerListImpl::Trace(blink::Visitor* visitor) const {
+ visitor->Trace(markers_);
+ DocumentMarkerList::Trace(visitor);
+}
+
+} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.h
new file mode 100644
index 00000000000..9c9c40df772
--- /dev/null
+++ b/chromium/third_party/blink/renderer/core/editing/markers/highlight_marker_list_impl.h
@@ -0,0 +1,48 @@
+// Copyright 2021 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_HIGHLIGHT_MARKER_LIST_IMPL_H_
+#define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_HIGHLIGHT_MARKER_LIST_IMPL_H_
+
+#include "third_party/blink/renderer/core/editing/markers/document_marker_list.h"
+
+namespace blink {
+
+// Implementation of HighlightMarkerList for Highlight markers.
+class CORE_EXPORT HighlightMarkerListImpl final : public DocumentMarkerList {
+ public:
+ HighlightMarkerListImpl() = default;
+ HighlightMarkerListImpl(const HighlightMarkerListImpl&) = delete;
+ HighlightMarkerListImpl& operator=(const HighlightMarkerListImpl&) = delete;
+
+ DocumentMarker::MarkerType MarkerType() const final;
+
+ bool IsEmpty() const final;
+
+ void Add(DocumentMarker*) final;
+ void Clear() final;
+
+ const HeapVector<Member<DocumentMarker>>& GetMarkers() const final;
+ DocumentMarker* FirstMarkerIntersectingRange(unsigned start_offset,
+ unsigned end_offset) const final;
+ HeapVector<Member<DocumentMarker>> MarkersIntersectingRange(
+ unsigned start_offset,
+ unsigned end_offset) const final;
+
+ bool MoveMarkers(int length, DocumentMarkerList* dst_list) final;
+ bool RemoveMarkers(unsigned start_offset, int length) final;
+ bool ShiftMarkers(const String& node_text,
+ unsigned offset,
+ unsigned old_length,
+ unsigned new_length) final;
+
+ void Trace(blink::Visitor*) const override;
+
+ private:
+ HeapVector<Member<DocumentMarker>> markers_;
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_HIGHLIGHT_MARKER_LIST_IMPL_H_
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker.h
index 09bdfc43b8e..7aff42079f1 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker.h
@@ -19,13 +19,13 @@ class CORE_EXPORT SpellCheckMarker : public DocumentMarker {
SpellCheckMarker(unsigned start_offset,
unsigned end_offset,
const String& description);
+ SpellCheckMarker(const SpellCheckMarker&) = delete;
+ SpellCheckMarker& operator=(const SpellCheckMarker&) = delete;
const String& Description() const { return description_; }
private:
const String description_;
-
- DISALLOW_COPY_AND_ASSIGN(SpellCheckMarker);
};
bool CORE_EXPORT IsSpellCheckMarker(const DocumentMarker&);
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker_list_impl.h
index e795b9c1b34..eb31ae9aff7 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/spell_check_marker_list_impl.h
@@ -17,6 +17,9 @@ namespace blink {
// to do this efficiently.
class CORE_EXPORT SpellCheckMarkerListImpl : public DocumentMarkerList {
public:
+ SpellCheckMarkerListImpl(const SpellCheckMarkerListImpl&) = delete;
+ SpellCheckMarkerListImpl& operator=(const SpellCheckMarkerListImpl&) = delete;
+
// DocumentMarkerList implementations
bool IsEmpty() const final;
@@ -49,8 +52,6 @@ class CORE_EXPORT SpellCheckMarkerListImpl : public DocumentMarkerList {
private:
HeapVector<Member<DocumentMarker>> markers_;
-
- DISALLOW_COPY_AND_ASSIGN(SpellCheckMarkerListImpl);
};
template <>
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker.h
index efe0bfa63a1..e59f09d8acc 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker.h
@@ -18,12 +18,12 @@ class CORE_EXPORT SpellingMarker final : public SpellCheckMarker {
SpellingMarker(unsigned start_offset,
unsigned end_offset,
const String& description);
+ SpellingMarker(const SpellingMarker&) = delete;
+ SpellingMarker& operator=(const SpellingMarker&) = delete;
private:
// DocumentMarker implementations
MarkerType GetType() const final;
-
- DISALLOW_COPY_AND_ASSIGN(SpellingMarker);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker_list_impl.h
index 3462d86d79f..4a5ffda2880 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/spelling_marker_list_impl.h
@@ -14,11 +14,10 @@ class CORE_EXPORT SpellingMarkerListImpl final
: public SpellCheckMarkerListImpl {
public:
SpellingMarkerListImpl() = default;
+ SpellingMarkerListImpl(const SpellingMarkerListImpl&) = delete;
+ SpellingMarkerListImpl& operator=(const SpellingMarkerListImpl&) = delete;
DocumentMarker::MarkerType MarkerType() const final;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SpellingMarkerListImpl);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/styleable_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/styleable_marker.h
index e5e94cac0b6..d860da2d5ec 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/styleable_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/styleable_marker.h
@@ -6,6 +6,7 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_STYLEABLE_MARKER_H_
#include "third_party/blink/renderer/core/editing/markers/document_marker.h"
+#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"
#include "ui/base/ime/mojom/ime_types.mojom-blink.h"
@@ -22,6 +23,8 @@ class CORE_EXPORT StyleableMarker : public DocumentMarker {
ui::mojom::ImeTextSpanUnderlineStyle,
Color text_color,
Color background_color);
+ StyleableMarker(const StyleableMarker&) = delete;
+ StyleableMarker& operator=(const StyleableMarker&) = delete;
// StyleableMarker-specific
Color UnderlineColor() const;
@@ -39,8 +42,6 @@ class CORE_EXPORT StyleableMarker : public DocumentMarker {
const ui::mojom::ImeTextSpanThickness thickness_;
const ui::mojom::ImeTextSpanUnderlineStyle underline_style_;
const Color text_color_;
-
- DISALLOW_COPY_AND_ASSIGN(StyleableMarker);
};
bool CORE_EXPORT IsStyleableMarker(const DocumentMarker&);
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker.h
index 87fe667fd92..cfbde3410be 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker.h
@@ -32,6 +32,8 @@ class CORE_EXPORT SuggestionMarker final : public StyleableMarker {
SuggestionMarker(unsigned start_offset,
unsigned end_offset,
const SuggestionMarkerProperties&);
+ SuggestionMarker(const SuggestionMarker&) = delete;
+ SuggestionMarker& operator=(const SuggestionMarker&) = delete;
// DocumentMarker implementations
MarkerType GetType() const final;
@@ -59,8 +61,6 @@ class CORE_EXPORT SuggestionMarker final : public StyleableMarker {
const SuggestionType suggestion_type_;
const RemoveOnFinishComposing remove_on_finish_composing_;
const Color suggestion_highlight_color_;
-
- DISALLOW_COPY_AND_ASSIGN(SuggestionMarker);
};
template <>
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.cc b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.cc
index 685ab9c6204..dd998f61f12 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.cc
+++ b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.cc
@@ -6,6 +6,7 @@
#include "third_party/blink/renderer/core/editing/markers/suggestion_marker_replacement_scope.h"
#include "third_party/blink/renderer/core/editing/markers/unsorted_document_marker_list_editor.h"
+#include "third_party/blink/renderer/platform/wtf/text/unicode.h"
namespace blink {
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.h
index 8b1931e790d..f08badfb869 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_list_impl.h
@@ -19,6 +19,8 @@ namespace blink {
class CORE_EXPORT SuggestionMarkerListImpl final : public DocumentMarkerList {
public:
SuggestionMarkerListImpl() = default;
+ SuggestionMarkerListImpl(const SuggestionMarkerListImpl&) = delete;
+ SuggestionMarkerListImpl& operator=(const SuggestionMarkerListImpl&) = delete;
// DocumentMarkerList implementations
DocumentMarker::MarkerType MarkerType() const final;
@@ -58,8 +60,6 @@ class CORE_EXPORT SuggestionMarkerListImpl final : public DocumentMarkerList {
unsigned new_length);
HeapVector<Member<DocumentMarker>> markers_;
-
- DISALLOW_COPY_AND_ASSIGN(SuggestionMarkerListImpl);
};
template <>
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.cc b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.cc
index 95e2fff765b..ad2a58b620e 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.cc
+++ b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.cc
@@ -6,9 +6,11 @@
namespace blink {
+SuggestionMarkerProperties::SuggestionMarkerProperties() = default;
SuggestionMarkerProperties::SuggestionMarkerProperties(
const SuggestionMarkerProperties& other) = default;
-SuggestionMarkerProperties::SuggestionMarkerProperties() = default;
+SuggestionMarkerProperties& SuggestionMarkerProperties::operator=(
+ const SuggestionMarkerProperties& other) = default;
SuggestionMarkerProperties::Builder::Builder() = default;
SuggestionMarkerProperties::Builder::Builder(
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.h b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.h
index e6d9d229be0..cf82e8fc957 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.h
@@ -22,8 +22,9 @@ class CORE_EXPORT SuggestionMarkerProperties final {
public:
class CORE_EXPORT Builder;
- SuggestionMarkerProperties(const SuggestionMarkerProperties&);
SuggestionMarkerProperties();
+ SuggestionMarkerProperties(const SuggestionMarkerProperties&);
+ SuggestionMarkerProperties& operator=(const SuggestionMarkerProperties&);
SuggestionMarker::SuggestionType Type() const { return type_; }
SuggestionMarker::RemoveOnFinishComposing RemoveOnFinishComposing() const {
@@ -59,6 +60,8 @@ class CORE_EXPORT SuggestionMarkerProperties::Builder final {
public:
explicit Builder(const SuggestionMarkerProperties&);
Builder();
+ Builder(const Builder&) = delete;
+ Builder& operator=(const Builder&) = delete;
SuggestionMarkerProperties Build() const;
@@ -74,8 +77,6 @@ class CORE_EXPORT SuggestionMarkerProperties::Builder final {
private:
SuggestionMarkerProperties data_;
-
- DISALLOW_COPY_AND_ASSIGN(Builder);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_replacement_scope.h b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_replacement_scope.h
index 3eb3b711398..f629fc74482 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_replacement_scope.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/suggestion_marker_replacement_scope.h
@@ -5,7 +5,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_SUGGESTION_MARKER_REPLACEMENT_SCOPE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_MARKERS_SUGGESTION_MARKER_REPLACEMENT_SCOPE_H_
-#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
@@ -16,14 +15,16 @@ class CORE_EXPORT SuggestionMarkerReplacementScope {
public:
SuggestionMarkerReplacementScope();
+ SuggestionMarkerReplacementScope(const SuggestionMarkerReplacementScope&) =
+ delete;
+ SuggestionMarkerReplacementScope& operator=(
+ const SuggestionMarkerReplacementScope&) = delete;
~SuggestionMarkerReplacementScope();
static bool CurrentlyInScope();
private:
static bool currently_in_scope_;
-
- DISALLOW_COPY_AND_ASSIGN(SuggestionMarkerReplacementScope);
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker.h
index 0e4e3631813..4934f507464 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker.h
@@ -15,15 +15,14 @@ namespace blink {
class CORE_EXPORT TextFragmentMarker final : public TextMarkerBase {
public:
TextFragmentMarker(unsigned start_offset, unsigned end_offset);
+ TextFragmentMarker(const TextFragmentMarker&) = delete;
+ TextFragmentMarker& operator=(const TextFragmentMarker&) = delete;
// DocumentMarker implementations
MarkerType GetType() const final;
// TextMarkerBase implementations
bool IsActiveMatch() const final;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TextFragmentMarker);
};
template <>
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker_list_impl.h
index 33f8058c381..26936a8c98d 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/text_fragment_marker_list_impl.h
@@ -15,12 +15,12 @@ class CORE_EXPORT TextFragmentMarkerListImpl final
: public TextMarkerBaseListImpl {
public:
TextFragmentMarkerListImpl() = default;
+ TextFragmentMarkerListImpl(const TextFragmentMarkerListImpl&) = delete;
+ TextFragmentMarkerListImpl& operator=(const TextFragmentMarkerListImpl&) =
+ delete;
// DocumentMarkerList implementations
DocumentMarker::MarkerType MarkerType() const final;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TextFragmentMarkerListImpl);
};
template <>
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base.h b/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base.h
index 4e0b3558277..c6f9b590316 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base.h
@@ -15,11 +15,10 @@ namespace blink {
class CORE_EXPORT TextMarkerBase : public DocumentMarker {
public:
TextMarkerBase(unsigned start_offset, unsigned end_offset);
+ TextMarkerBase(const TextMarkerBase&) = delete;
+ TextMarkerBase& operator=(const TextMarkerBase&) = delete;
virtual bool IsActiveMatch() const = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TextMarkerBase);
};
bool CORE_EXPORT IsTextMarker(const DocumentMarker&);
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base_list_impl.h
index 466585300c9..6e3a4d4bc2c 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/text_marker_base_list_impl.h
@@ -15,6 +15,9 @@ namespace blink {
// TextFragmentMarkerListImpl to implement the MarkerType() method).
class CORE_EXPORT TextMarkerBaseListImpl : public DocumentMarkerList {
public:
+ TextMarkerBaseListImpl(const TextMarkerBaseListImpl&) = delete;
+ TextMarkerBaseListImpl& operator=(const TextMarkerBaseListImpl&) = delete;
+
// DocumentMarkerList implementations
bool IsEmpty() const final;
@@ -40,9 +43,6 @@ class CORE_EXPORT TextMarkerBaseListImpl : public DocumentMarkerList {
protected:
TextMarkerBaseListImpl() = default;
HeapVector<Member<DocumentMarker>> markers_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TextMarkerBaseListImpl);
};
template <>
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker.h b/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker.h
index 519f9953b40..0577ab9ef47 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker.h
@@ -46,6 +46,8 @@ class CORE_EXPORT TextMatchMarker final : public TextMarkerBase {
enum class MatchStatus { kInactive, kActive };
TextMatchMarker(unsigned start_offset, unsigned end_offset, MatchStatus);
+ TextMatchMarker(const TextMatchMarker&) = delete;
+ TextMatchMarker& operator=(const TextMatchMarker&) = delete;
// DocumentMarker implementations
MarkerType GetType() const final;
@@ -69,8 +71,6 @@ class CORE_EXPORT TextMatchMarker final : public TextMarkerBase {
MatchStatus match_status_;
LayoutStatus layout_status_ = LayoutStatus::kInvalid;
PhysicalRect rect_;
-
- DISALLOW_COPY_AND_ASSIGN(TextMatchMarker);
};
template <>
diff --git a/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker_list_impl.h b/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker_list_impl.h
index df8e2edb25d..6a1b6d9b72a 100644
--- a/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker_list_impl.h
+++ b/chromium/third_party/blink/renderer/core/editing/markers/text_match_marker_list_impl.h
@@ -20,6 +20,8 @@ class CORE_EXPORT TextMatchMarkerListImpl final
: public TextMarkerBaseListImpl {
public:
TextMatchMarkerListImpl() = default;
+ TextMatchMarkerListImpl(const TextMatchMarkerListImpl&) = delete;
+ TextMatchMarkerListImpl& operator=(const TextMatchMarkerListImpl&) = delete;
// DocumentMarkerList implementations
DocumentMarker::MarkerType MarkerType() const final;
@@ -31,9 +33,6 @@ class CORE_EXPORT TextMatchMarkerListImpl final
bool SetTextMatchMarkersActive(unsigned start_offset,
unsigned end_offset,
bool);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TextMatchMarkerListImpl);
};
template <>