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

Issue 1325563002: Avoid style clobbering in setCompositionFromExistingText. (2nd land) (Closed)

Created:
5 years, 3 months ago by aelias_OOO_until_Jul13
Modified:
5 years, 3 months ago
Reviewers:
pdr., yosin_UTC9
CC:
blink-reviews, blink-reviews-paint_chromium.org, Changwan Ryu, dshwang, Seigo Nonaka, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Avoid 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -367 lines) Patch
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -3 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
D Source/core/editing/CompositionUnderlineRangeFilter.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -82 lines 0 comments Download
D Source/core/editing/CompositionUnderlineRangeFilter.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -39 lines 0 comments Download
D Source/core/editing/CompositionUnderlineRangeFilterTest.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -88 lines 0 comments Download
M Source/core/editing/FrameSelection.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/editing/InputMethodController.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -14 lines 0 comments Download
M Source/core/editing/InputMethodController.cpp View 1 2 3 4 5 6 7 8 12 chunks +84 lines, -66 lines 0 comments Download
M Source/core/editing/markers/DocumentMarker.h View 1 2 3 7 chunks +11 lines, -2 lines 0 comments Download
M Source/core/editing/markers/DocumentMarker.cpp View 1 2 3 4 5 6 6 chunks +69 lines, -4 lines 0 comments Download
M Source/core/editing/markers/DocumentMarkerController.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/editing/markers/DocumentMarkerController.cpp View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M Source/core/editing/markers/DocumentMarkerControllerTest.cpp View 1 2 3 4 5 3 chunks +28 lines, -0 lines 0 comments Download
M Source/core/paint/InlineTextBoxPainter.cpp View 1 2 3 4 5 6 7 8 10 chunks +25 lines, -44 lines 0 comments Download
M Source/web/WebViewImpl.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -3 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -14 lines 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 8 5 chunks +16 lines, -7 lines 0 comments Download
A Source/web/tests/data/content_editable_rich_text.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 27 (7 generated)
aelias_OOO_until_Jul13
Hi yosin@, PTAL. This is the patch that was posted on the bug with a ...
5 years, 3 months ago (2015-08-29 03:07:27 UTC) #2
yosin_UTC9
I'm concern about speed of text painting. Before this patch, text painter decides whether painting ...
5 years, 3 months ago (2015-08-31 01:35:41 UTC) #3
aelias_OOO_until_Jul13
Hi yosin@, PTAL. I went ahead and rewrote the underline code to use DocumentMarkers as ...
5 years, 3 months ago (2015-09-04 04:03:24 UTC) #4
yosin_UTC9
Awesome! Could you split this patch into three patches? 1. DocumentMarker changes with a test ...
5 years, 3 months ago (2015-09-04 06:20:43 UTC) #5
aelias_OOO_until_Jul13
OK, I fixed/added tests and applied the requested changes, except for: On 2015/09/04 at 06:20:43, ...
5 years, 3 months ago (2015-09-08 03:20:04 UTC) #6
yosin_UTC9
+pdr@ for core/paint chagnes. Please add TEST= in description. TEST=webkit_unit_tests --gtest_filter=DocumentMarkerControllerTest.UpdateRenderedRectsForComposition TEST=webkit_unit_tests --gtest_filter=WebViewTest.SetCompositionFromExistingTextInRichText https://codereview.chromium.org/1325563002/diff/100001/Source/core/editing/InputMethodController.cpp File ...
5 years, 3 months ago (2015-09-08 06:34:05 UTC) #8
aelias_OOO_until_Jul13
OK, I applied all of those nits to the latest patch set, please take another ...
5 years, 3 months ago (2015-09-09 02:30:53 UTC) #9
yosin_UTC9
lgtm Thanks for using DocumentMarker for painting text composition! You make me my life easier. ...
5 years, 3 months ago (2015-09-09 03:47:06 UTC) #10
pdr.
On 2015/09/09 at 03:47:06, yosin wrote: > lgtm > > Thanks for using DocumentMarker for ...
5 years, 3 months ago (2015-09-09 18:35:50 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1325563002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1325563002/140001
5 years, 3 months ago (2015-09-09 18:48:54 UTC) #13
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://src.chromium.org/viewvc/blink?view=rev&revision=201994
5 years, 3 months ago (2015-09-09 19:44:30 UTC) #14
Mike West
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/1330233003/ by mkwst@chromium.org. ...
5 years, 3 months ago (2015-09-10 09:01:30 UTC) #15
yosin_UTC9
Try to add --enable-leak-detection to content_shell. We can see what objects are leaked. https://codereview.chromium.org/1325563002/diff/140001/Source/core/editing/InputMethodController.cpp File ...
5 years, 3 months ago (2015-09-10 09:42:28 UTC) #16
aelias_OOO_until_Jul13
The leak was caused by the RefPtr<Document> inside the Range. I fixed it in the ...
5 years, 3 months ago (2015-09-10 19:59:29 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1325563002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1325563002/160001
5 years, 3 months ago (2015-09-10 20:25:40 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/105542)
5 years, 3 months ago (2015-09-10 21:33:42 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1325563002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1325563002/160001
5 years, 3 months ago (2015-09-10 22:17:11 UTC) #24
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://src.chromium.org/viewvc/blink?view=rev&revision=202084
5 years, 3 months ago (2015-09-11 01:14:15 UTC) #25
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/c74bb6390ae0eae4fa55c30e40732e5f0e7035a1
5 years, 3 months ago (2015-09-23 12:02:20 UTC) #26
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:17:19 UTC) #27
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/81808f5a2947e0a2c6d895fe59438ac7e3af04c8

Powered by Google App Engine
This is Rietveld 408576698