Changeset 76723 in webkit
- Timestamp:
- Jan 26, 2011 2:52:28 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r76720 r76723 1 2011-01-26 Tony Chang <tony@chromium.org> 2 3 Reviewed by Ryosuke Niwa. 4 5 [gtk] strip NUL characters when copying text/html on GTK+ 6 https://bugs.webkit.org/show_bug.cgi?id=52508 7 8 * editing/pasteboard/copy-null-characters.html: Make sure we didn't 9 change innerHTML (it should still contain the null) 10 * platform/gtk/Skipped: Re-enable the test 11 1 12 2011-01-26 Martin Robinson <mrobinson@igalia.com> 2 13 -
trunk/LayoutTests/editing/pasteboard/copy-null-characters.html
r76097 r76723 12 12 var textWithNull = "Copy\0 paste me"; 13 13 source.textContent = textWithNull; 14 15 var results = document.getElementById("results"); 16 // Make sure innerHTML still has the NULL. 17 if (source.innerHTML != textWithNull) { 18 results.innerText = "source.innerHTML has the wrong value (expected " + 19 JSON.stringify(textWithNull) + " but found " + 20 JSON.stringify(source.innerHTML) + ")."; 21 Markup.dump(document.body); 22 Markup.notifyDone(); 23 return; 24 } 25 14 26 sel.setPosition(source, 0); 15 27 document.execCommand("SelectAll"); … … 24 36 document.execCommand("Paste"); 25 37 26 var results = document.getElementById("results");27 38 var expectedPlainTextValue = "Copy paste me"; 28 39 if (expectedPlainTextValue != destinationPlainText.value) { -
trunk/LayoutTests/platform/gtk/Skipped
r76720 r76723 5273 5273 http/tests/loading/cross-origin-XHR-willLoadRequest.html 5274 5274 5275 # https://bugs.webkit.org/show_bug.cgi?id=525085276 editing/pasteboard/copy-null-characters.html5277 5278 5275 # https://bugs.webkit.org/show_bug.cgi?id=52798 5279 5276 http/tests/security/local-CSS-from-remote.html -
trunk/Source/WebCore/ChangeLog
r76721 r76723 1 2011-01-26 Tony Chang <tony@chromium.org> 2 3 Reviewed by Ryosuke Niwa. 4 5 [gtk] strip NUL characters when copying text/html on GTK+ 6 https://bugs.webkit.org/show_bug.cgi?id=52508 7 8 Putting NUL characters in the text/html clipboard doesn't work in 9 WebKit GTK+ (the pasted value is truncated at the NUL). Since we're 10 already stripping this character for plain text (for Windows), strip 11 it in text/html too. 12 13 * editing/MarkupAccumulator.h: mark function as virtual 14 * editing/markup.cpp: 15 (WebCore::StyledMarkupAccumulator::appendString): 16 (WebCore::StyledMarkupAccumulator::takeResults): strip nulls 17 1 18 2011-01-26 Mario Sanchez Prada <msanchez@igalia.com> 2 19 -
trunk/Source/WebCore/editing/MarkupAccumulator.h
r69994 r76723 73 73 74 74 protected: 75 v oid appendString(const String&);75 virtual void appendString(const String&); 76 76 void appendStartTag(Node*, Namespaces* = 0); 77 77 void appendEndTag(Node*); -
trunk/Source/WebCore/editing/markup.cpp
r76560 r76723 125 125 126 126 Node* serializeNodes(Node* startNode, Node* pastEnd); 127 v oid appendString(const String& s) { return MarkupAccumulator::appendString(s); }127 virtual void appendString(const String& s) { return MarkupAccumulator::appendString(s); } 128 128 void wrapWithNode(Node*, bool convertBlocksToInlines = false, RangeFullySelectsNode = DoesFullySelectNode); 129 129 void wrapWithStyleNode(CSSStyleDeclaration*, Document*, bool isBlock = false); … … 185 185 concatenateMarkup(result); 186 186 187 return String::adopt(result); 187 // We remove '\0' characters because they are not visibly rendered to the user. 188 return String::adopt(result).replace(0, ""); 188 189 } 189 190
Note: See TracChangeset
for help on using the changeset viewer.