DescriptionAvoid style clobbering in setCompositionFromExistingText. (2nd land)
This patch extends compositions to be able to span multiple nodes. This involves
two main changes: first, compositions are switched to being stored as a Range, not
a Node plus two offsets. Second, the underline painting now uses DocumentMarkerController
(which is already multi-node) instead of a custom composition-specific path.
As a result, we can remove the hack in setCompositionFromExistingText that clobbered
the text to shoehorn it into a single node, which would cause style loss. This
is now able to span the existing text regardless of how complicated it is.
TEST=webkit_unit_tests --gtest_filter=DocumentMarkerControllerTest.UpdateRenderedRectsForComposition
TEST=webkit_unit_tests --gtest_filter=WebViewTest.SetCompositionFromExistingTextInRichText
BUG=488628
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201994
Committed: https://crrev.com/81808f5a2947e0a2c6d895fe59438ac7e3af04c8
git-svn-id: svn://svn.chromium.org/blink/trunk@202084 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Patch Set 1 #Patch Set 2 : Add m_isExistingText to suppress confirmComposition style clobber #Patch Set 3 : Fix end to refer to endPosition #
Total comments: 6
Patch Set 4 : Use DocumentMarker for underlines #
Total comments: 11
Patch Set 5 : Apply code review comments and fix tests #Patch Set 6 : Add new DocumentMarkerController test #
Total comments: 10
Patch Set 7 : Apply code review nits from comment #8 #Patch Set 8 : Delete CompositionUnderlinesRangeFilter (it's now dead code) #
Total comments: 5
Patch Set 9 : Release Range on document detach and remove selectionStart/End #Messages
Total messages: 27 (7 generated)
|