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 can handle the following case:
<div style="width: 2em;"><b><i>foo</i></b> bar</div>

BUG=318925
TEST=editing/pasteboard/restore-collapsed-space-for-copy.html

Review-Url: https://codereview.chromium.org/2320533002
Cr-Commit-Position: refs/heads/master@{#417155}
2 files changed