|
|
Created:
4 years, 3 months ago by joone Modified:
4 years, 3 months ago Reviewers:
yosin_UTC9 CC:
blink-reviews, chromium-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionRestore 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)
Description was changed from ========== WIP ========== to ========== 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 more cases that the below CL didn't cover: https://codereview.chromium.org/2320533002/ BUG=318925 TEST=editing/pasteboard/restore-collapsed-space-for-copy.html ==========
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Exceeded global retry quota
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #4 (id:60001) has been deleted
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Hi yosin@ As you mentioned, there is a little difference in the clipboard data between the old test case and new test case: https://codereview.chromium.org/2320023003/ So we need to run the old test case and fix the test fail. Please take a look at this CL. Thanks! https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp:623: && m_textBox->root().prevRootBox() && m_textBox->root().firstChild() == m_textBox) { * DumpRenderTree doesn't trim the leading space so we don't run this code for TextIteratorForInnerText. * Searching text also doesn't need to restore the leading space so we need to check TextIteratorDoesNotBreakAtReplacedElement. https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp:627: if (runStart > 0 && str[0] == ' ' && str[1] != ' ') We need to check double leading spaces like checking double trailing spaces.
Description was changed from ========== 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 more cases that the below CL didn't cover: https://codereview.chromium.org/2320533002/ BUG=318925 TEST=editing/pasteboard/restore-collapsed-space-for-copy.html ========== to ========== 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/ BUG=318925 TEST=editing/pasteboard/restore-collapsed-space-for-copy.html ==========
joone.hur@intel.com changed reviewers: + yosin@chromium.org
https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... 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 put text/plain into clipboard. https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp:623: && m_textBox->root().prevRootBox() && m_textBox->root().firstChild() == m_textBox) { On 2016/09/09 at 19:07:40, joone wrote: > * DumpRenderTree doesn't trim the leading space so we don't run this code for TextIteratorForInnerText. > * Searching text also doesn't need to restore the leading space so we need to check TextIteratorDoesNotBreakAtReplacedElement. Could you put this explanation in code as comment?
Description was changed from ========== 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/ BUG=318925 TEST=editing/pasteboard/restore-collapsed-space-for-copy.html ========== to ========== 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, the TextIteratorBehavior flags don't need 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 ==========
https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... 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 use internals.selectedTextForClipboard() to verify what we'll put > text/plain into clipboard. html = <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><i>foo</i></b><span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;"><span class="Apple-converted-space"> </span>bar</span> text = foo bar The plain text has the additional space so I will fixed it. https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp:623: && m_textBox->root().prevRootBox() && m_textBox->root().firstChild() == m_textBox) { On 2016/09/12 04:09:10, Yosi_UTC9 wrote: > On 2016/09/09 at 19:07:40, joone wrote: > > * DumpRenderTree doesn't trim the leading space so we don't run this code for > TextIteratorForInnerText. > > * Searching text also doesn't need to restore the leading space so we need to > check TextIteratorDoesNotBreakAtReplacedElement. > > Could you put this explanation in code as comment? Done.
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== 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, the TextIteratorBehavior flags don't need 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 ========== to ========== 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, when Iterating through the DOM range, the below TextIteratorBehavior flags don't need 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 ==========
Description was changed from ========== 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, when Iterating through the DOM range, the below TextIteratorBehavior flags don't need 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 ========== to ========== 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 TextIteratorBehavior flags don't need 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 ==========
Description was changed from ========== 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 TextIteratorBehavior flags don't need 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 ========== to ========== 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 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 ==========
Description was changed from ========== 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 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 ========== to ========== 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 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... 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 2016/09/12 04:09:10, Yosi_UTC9 wrote: > > We can use internals.selectedTextForClipboard() to verify what we'll put > > text/plain into clipboard. > > html = <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><i>foo</i></b><span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;"><span class="Apple-converted-space"> </span>bar</span> > text = foo bar > > The plain text has the additional space so I will fixed it. Since StyledMarkupAccumulator::renderedText() calls plainText(), it is better to have gTest rather than layout test. The benefit of layout tests is that they can run at all browsers. But this layout test runs only on Blink based browsers. Also, "paste" command does some magic at inserting HTML fragment, we want to isolate "copy" issue and "paste" issue. https://codereview.chromium.org/2325553002/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/2325553002/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp:622: if (!(m_behavior & TextIteratorEmitsImageAltText) && !(m_behavior & TextIteratorDoesNotBreakAtReplacedElement) && !(m_behavior & TextIteratorForInnerText) Could you use |emitsImageAltText()| and introduce private inline functions for others like others?
Patchset #7 (id:140001) has been deleted
Patchset #7 (id:160001) has been deleted
Patchset #7 (id:180001) has been deleted
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Please review the CL. Thanks! https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html (right): https://codereview.chromium.org/2325553002/diff/100001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/editing/pasteboard/restore-collapsed-space-for-copy.html:39: selection.document.execCommand('copy'); On 2016/09/13 02:00:30, Yosi_UTC9 wrote: > On 2016/09/12 at 21:33:02, joone wrote: > > On 2016/09/12 04:09:10, Yosi_UTC9 wrote: > > > We can use internals.selectedTextForClipboard() to verify what we'll put > > > text/plain into clipboard. > > > > html = <b style="color: rgb(0, 0, 0); font-family: "Times New > Roman"; font-size: medium; font-style: normal; font-variant-ligatures: > normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; > text-align: start; text-indent: 0px; text-transform: none; white-space: normal; > widows: 2; word-spacing: 0px; -webkit-text-stroke-width: > 0px;"><i>foo</i></b><span style="color: rgb(0, 0, 0); font-family: "Times > New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: > normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; > orphans: 2; text-align: start; text-indent: 0px; text-transform: none; > white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: > 0px; display: inline !important; float: none;"><span > class="Apple-converted-space"> </span>bar</span> > > text = foo bar > > > > The plain text has the additional space so I will fixed it. > > Since StyledMarkupAccumulator::renderedText() calls plainText(), it is better to > have gTest rather than layout test. > The benefit of layout tests is that they can run at all browsers. But this > layout test runs only on Blink based browsers. > Also, "paste" command does some magic at inserting HTML fragment, we want to > isolate "copy" issue and "paste" issue. Done. https://codereview.chromium.org/2325553002/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/2325553002/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp:622: if (!(m_behavior & TextIteratorEmitsImageAltText) && !(m_behavior & TextIteratorDoesNotBreakAtReplacedElement) && !(m_behavior & TextIteratorForInnerText) On 2016/09/13 02:00:30, Yosi_UTC9 wrote: > Could you use |emitsImageAltText()| and introduce private inline functions for > others like others? Done.
https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Sou... 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 of |FrameSelection::selectedHTMLForClipboard()| which calls |plainText()| in |StyledMarkupAccumulator::renderedText()| to narrow test target.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by joone.hur@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
I've updated the CL. Thanks! https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2325553002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:218: VisibleSelection validSelection(Position(sample->firstChild()->firstChild()->firstChild(), 0), Position(sample->lastChild(), 4)); On 2016/09/14 05:13:52, Yosi_UTC9 wrote: > Please use |plainText()| instead of |FrameSelection::selectedHTMLForClipboard()| > which calls |plainText()| in |StyledMarkupAccumulator::renderedText()| to narrow > test target. Done.
lgtm Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by joone.hur@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 ==========
Message was sent while issue was closed.
Committed patchset #8 (id:220001)
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/131df048e7e445a03706078367285112e6b3467d Cr-Commit-Position: refs/heads/master@{#418557} |