DescriptionCopy and paste sometimes removes spaces between words.
The problem is StyledMarkupAccumulator uses renderedText and the space at the end of the text has been stripped when the tag after the text was wrapped.
BUG=318925
In the DOM tree, the copied content is represented by two nodes, one is "Copy this text " and the 2nd one is the anchor. When the code tries to convert the 1st node to plain text, it uses a text iterator to scan through the text. However, the spaces at the ending of the 1st node were lost because they were collapsed during rendering. This patch restores the missing space if it detects there is a non-text node following the last text node. This information has to be passed into the textIterator when it was constructed in StyledMarkupAccumulator::renderedText.
Patch Set 1 #
Total comments: 4
Messages
Total messages: 11 (6 generated)
|