[webkit-reviews] review granted: [Bug 52236] Strip NUL character when copying text on Windows : [Attachment 78856] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 13 19:39:02 PST 2011
Ryosuke Niwa <rniwa at webkit.org> has granted Tony Chang <tony at chromium.org>'s
request for review:
Bug 52236: Strip NUL character when copying text on Windows
https://bugs.webkit.org/show_bug.cgi?id=52236
Attachment 78856: Patch
https://bugs.webkit.org/attachment.cgi?id=78856&action=review
------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=78856&action=review
r=me provided the answers to the following two questions are both yes.
> LayoutTests/editing/pasteboard/copy-null-characters.html:27
> + var source = document.getElementById("source");
> + var textWithNull = "Copy\0 paste me";
> + source.textContent = textWithNull;
> + sel.setPosition(source, 0);
> + document.execCommand("SelectAll");
> + document.execCommand("Copy");
> + // Remove the source text so we don't end up with a null character in
the
> + // expected output file.
> + source.parentNode.removeChild(source);
> +
> + var destinationRichText =
document.getElementById("destination-rich-text");
> + sel.setPosition(destinationRichText, 0);
> + document.execCommand("Paste");
> +
> + var destinationPlainText =
document.getElementById("destination-plain-text");
> + destinationPlainText.focus();
> + document.execCommand("Paste");
Could you also add a test case where the copied contents are richly formatted?
> Source/WebCore/platform/mac/PasteboardMac.mm:194
> - String text = selectedRange->text();
> + String text = frame->editor()->selectedText();
If I'm understanding this right, you'd expect expect Range::text() to include
null char because it's a DOM API. Am I right?
More information about the webkit-reviews
mailing list