Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(30)

Issue 2325553002: Restore a collapsed leading space of text used for line break (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 months, 3 weeks ago by joone
Modified:
9 months, 2 weeks ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Restore a collapsed leading space of text used for line break When a text is wrapped during layout, the leading space of the text can be collapsed and a line break is inserted instead of the space. In this case, we need to restore the collapsed space when we copy the text. This CL handles the case that the below CL didn't cover: https://codereview.chromium.org/2320533002/ In addition, while iterating through the DOM range, the below case with the TextIteratorBehavior flag don't need to restore the leading space. * Running DumpRenderTree : TextIteratorForInnerText * Searching text : TextIteratorDoesNotBreakAtReplacedElement * Getting a plain text for copy & paste: TextIteratorEmitsImageAltText BUG=318925 TEST=editing/pasteboard/restore-collapsed-space-for-copy.html Committed: https://crrev.com/131df048e7e445a03706078367285112e6b3467d Cr-Commit-Position: refs/heads/master@{#418557}

Patch Set 1 #

Patch Set 2 : fix test fails #

Patch Set 3 : update test case #

Patch Set 4 : Make editing/selection/doubleclick-beside-cr-span.html pass #

Patch Set 5 : Make FindInPageControllerTest.SpanAndListsSearchable pass #

Total comments: 8

Patch Set 6 : Remove the additional space when restoring the leading space for getting plain text #

Total comments: 2

Patch Set 7 : Add gtests #

Total comments: 2

Patch Set 8 : Use plainText() #

Messages

Total messages: 56 (45 generated)
joone
Hi yosin@ As you mentioned, there is a little difference in the clipboard data between ...
9 months, 3 weeks ago (2016-09-09 19:07:41 UTC) #21
yosin_UTC9
https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html#newcode39 third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html:39: selection.document.execCommand('copy'); We can use internals.selectedTextForClipboard() to verify what we'll ...
9 months, 2 weeks ago (2016-09-12 04:09:11 UTC) #24
joone
https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html#newcode39 third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html:39: selection.document.execCommand('copy'); On 2016/09/12 04:09:10, Yosi_UTC9 wrote: > We can ...
9 months, 2 weeks ago (2016-09-12 21:33:02 UTC) #26
yosin_UTC9
https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html#newcode39 third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html:39: selection.document.execCommand('copy'); On 2016/09/12 at 21:33:02, joone wrote: > On ...
9 months, 2 weeks ago (2016-09-13 02:00:30 UTC) #35
joone
Please review the CL. Thanks! https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html#newcode39 third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html:39: selection.document.execCommand('copy'); On 2016/09/13 02:00:30, ...
9 months, 2 weeks ago (2016-09-14 04:04:35 UTC) #41
yosin_UTC9
https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode218 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:218: VisibleSelection validSelection(Position(sample->firstChild()->firstChild()->firstChild(), 0), Position(sample->lastChild(), 4)); Please use |plainText()| instead ...
9 months, 2 weeks ago (2016-09-14 05:13:52 UTC) #42
joone
I've updated the CL. Thanks! https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode218 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:218: VisibleSelection validSelection(Position(sample->firstChild()->firstChild()->firstChild(), 0), Position(sample->lastChild(), ...
9 months, 2 weeks ago (2016-09-14 07:09:13 UTC) #47
yosin_UTC9
lgtm Thanks!
9 months, 2 weeks ago (2016-09-14 07:49:44 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2325553002/220001
9 months, 2 weeks ago (2016-09-14 14:28:41 UTC) #52
commit-bot: I haz the power
Committed patchset #8 (id:220001)
9 months, 2 weeks ago (2016-09-14 14:33:28 UTC) #54
commit-bot: I haz the power
9 months, 2 weeks ago (2016-09-14 14:35:31 UTC) #56
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/131df048e7e445a03706078367285112e6b3467d
Cr-Commit-Position: refs/heads/master@{#418557}
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 23e94e589