This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=52236. The test editing/pasteboard/copy-null-characters.html tries to copy a text node with a null character and paste it into a content editable field. On the GTK+ port, the pasted text is truncated at the null character. I'm going to skip the test for now and investigate next week.
Created attachment 80218 [details] Patch
Comment on attachment 80218 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80218&action=review > Source/WebCore/ChangeLog:7 > + Please elaborate on what caused the bug and what fix you're doing. > Source/WebCore/editing/markup.cpp:188 > - return String::adopt(result); > + // We remove '\0' characters because they are not visibly rendered to the user. > + return String::adopt(result).replace(0, ""); I don't think this is an efficient way of removing nulls but I don't have an alternative offer. Also, replace doesn't replicate the string when there's no match so this doesn't regress the performance when there are no null characters. In addition, any algorithm to strip null characters will require traversing through the entire string so I'd say r+.
Committed r76723: <http://trac.webkit.org/changeset/76723>
http://trac.webkit.org/changeset/76723 might have broken Leopard Intel Release (Tests)