WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
61484
When copying a wrapped block of text, all whitespace before a word may be eaten
https://bugs.webkit.org/show_bug.cgi?id=61484
Summary
When copying a wrapped block of text, all whitespace before a word may be eaten
Bartosz Brachaczek
Reported
2011-05-25 16:56:12 PDT
To be precise: When copying a wrapped block of text, all whitespace before a word is eaten in resulting rich text if that word is the first word in line and is in different HTML tag than the last word in previous line. Plain text is correct. Example HTML code: <span>text text text text text text text text</span> <span>text text text text text text text text</span> text text text text text text text text <span>text text text text text text text text</span> If you set WebKit's widget width so that it can hold exactly eight "text" words in each line, then select all and copy it, you'll get incorrect rich text in clipboard. When pasting to OpenOffice.org Writer, you'll get no space between each 8*n'th and 8*n+1'st word. On a side note, if that text block is wrapped in a different way, whitespace isn't eaten but in those places I get non-breaking spaces in OO.o Writer and '<span class="Apple-converted-space"> </span>' in HTML clipboard data retrieved using Qt and Qt-WebKit. Reproduced on Chromium 12.0.742.53 and on Qt-WebKit shipped with Qt 4.7.3 on Linux. Might be related to or even a dupe of
Bug 31073
.
Attachments
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2011-05-25 23:36:05 PDT
This is probably a duplicate of the
bug 54598
.
Bartosz Brachaczek
Comment 2
2011-05-26 05:46:25 PDT
Hmm, you figured out that
bug 54598
reproduces iff word-wrap is set to break-word. But I figured out that this bug reproduces iff white-space is set to normal or pre-line (doesn't reproduce with pre-wrap and obviously with pre and nowrap as well as they disable wrapping at all) and word-wrap doesn't affect it. It reproduces with: <div style="word-wrap: normal; white-space: normal;"><span>text text text text text text text text</span> <span>text text text text text text text text</span></div> as well as with: <div style="word-wrap: break-word; white-space: normal;"><span>text text text text text text text text</span> <span>text text text text text text text text</span></div> But doesn't reproduce with: <div style="word-wrap: break-word; white-space: pre-wrap;"><span>text text text text text text text text</span> <span>text text text text text text text text</span></div> Though, I haven't tried your patch from
bug 54598
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug