Add SuggestionMarkerReplacementScope and related behavior

Desktop / Chromium - Ryan Landay [chromium.org] - 10 August 2017 18:51 EDT

This CL adds a class SuggestionMarkerReplacementScope for controlling how suggestion DocumentMarkers are updated in response to edits. When a scope object is active, the markers are updated to properly respond to a suggestion being applied. When a scope object is not active, the markers are updated to properly respond to any other sort of edit.

Bug: 672259 Change-Id: I60aca1cafbcc93658c04c4f867196514a30fe56f Reviewed-on: https://chromium-review.googlesource.com/609097 Commit-Queue: Ryan Landay

bd3df55 Add SuggestionMarkerReplacementScope and related behavior
third_party/WebKit/Source/core/editing/BUILD.gn | 2 +
.../editing/markers/SuggestionMarkerListImpl.cpp | 106 +++++++++-
.../editing/markers/SuggestionMarkerListImpl.h | 14 ++
.../markers/SuggestionMarkerListImplTest.cpp | 234 ++++++++++++++++++++-
.../markers/SuggestionMarkerReplacementScope.cpp | 25 +++
.../markers/SuggestionMarkerReplacementScope.h | 30 +++
6 files changed, 400 insertions(+), 11 deletions(-)

Upstream: git.chromium.org


  • Share