[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
tony at chromium.org
tony at chromium.org
Sun Feb 20 23:55:54 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit c94d9b36f224bdac93d0ad114dad10fb06d1b343
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 26 22:52:28 2011 +0000
2011-01-26 Tony Chang <tony at chromium.org>
Reviewed by Ryosuke Niwa.
[gtk] strip NUL characters when copying text/html on GTK+
https://bugs.webkit.org/show_bug.cgi?id=52508
* editing/pasteboard/copy-null-characters.html: Make sure we didn't
change innerHTML (it should still contain the null)
* platform/gtk/Skipped: Re-enable the test
2011-01-26 Tony Chang <tony at chromium.org>
Reviewed by Ryosuke Niwa.
[gtk] strip NUL characters when copying text/html on GTK+
https://bugs.webkit.org/show_bug.cgi?id=52508
Putting NUL characters in the text/html clipboard doesn't work in
WebKit GTK+ (the pasted value is truncated at the NUL). Since we're
already stripping this character for plain text (for Windows), strip
it in text/html too.
* editing/MarkupAccumulator.h: mark function as virtual
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendString):
(WebCore::StyledMarkupAccumulator::takeResults): strip nulls
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index fc7f947..5056bae 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-26 Tony Chang <tony at chromium.org>
+
+ Reviewed by Ryosuke Niwa.
+
+ [gtk] strip NUL characters when copying text/html on GTK+
+ https://bugs.webkit.org/show_bug.cgi?id=52508
+
+ * editing/pasteboard/copy-null-characters.html: Make sure we didn't
+ change innerHTML (it should still contain the null)
+ * platform/gtk/Skipped: Re-enable the test
+
2011-01-26 Martin Robinson <mrobinson at igalia.com>
Add the next set of CSS 2.1 baselines for GTK+.
diff --git a/LayoutTests/editing/pasteboard/copy-null-characters.html b/LayoutTests/editing/pasteboard/copy-null-characters.html
index b908dc1..396a7b3 100644
--- a/LayoutTests/editing/pasteboard/copy-null-characters.html
+++ b/LayoutTests/editing/pasteboard/copy-null-characters.html
@@ -11,6 +11,18 @@ function runTest()
var source = document.getElementById("source");
var textWithNull = "Copy\0 paste me";
source.textContent = textWithNull;
+
+ var results = document.getElementById("results");
+ // Make sure innerHTML still has the NULL.
+ if (source.innerHTML != textWithNull) {
+ results.innerText = "source.innerHTML has the wrong value (expected " +
+ JSON.stringify(textWithNull) + " but found " +
+ JSON.stringify(source.innerHTML) + ").";
+ Markup.dump(document.body);
+ Markup.notifyDone();
+ return;
+ }
+
sel.setPosition(source, 0);
document.execCommand("SelectAll");
document.execCommand("Copy");
@@ -23,7 +35,6 @@ function runTest()
destinationPlainText.focus();
document.execCommand("Paste");
- var results = document.getElementById("results");
var expectedPlainTextValue = "Copy paste me";
if (expectedPlainTextValue != destinationPlainText.value) {
results.innerText = "Plain text field has the wrong value (expected " +
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 12652eb..159b22a 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5272,9 +5272,6 @@ editing/input/page-up-down-scrolls.html
# DRT does not obey layoutTestController.addURLToRedirect()
http/tests/loading/cross-origin-XHR-willLoadRequest.html
-# https://bugs.webkit.org/show_bug.cgi?id=52508
-editing/pasteboard/copy-null-characters.html
-
# https://bugs.webkit.org/show_bug.cgi?id=52798
http/tests/security/local-CSS-from-remote.html
http/tests/security/local-JavaScript-from-remote.html
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 3863068..fbffa8b 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-26 Tony Chang <tony at chromium.org>
+
+ Reviewed by Ryosuke Niwa.
+
+ [gtk] strip NUL characters when copying text/html on GTK+
+ https://bugs.webkit.org/show_bug.cgi?id=52508
+
+ Putting NUL characters in the text/html clipboard doesn't work in
+ WebKit GTK+ (the pasted value is truncated at the NUL). Since we're
+ already stripping this character for plain text (for Windows), strip
+ it in text/html too.
+
+ * editing/MarkupAccumulator.h: mark function as virtual
+ * editing/markup.cpp:
+ (WebCore::StyledMarkupAccumulator::appendString):
+ (WebCore::StyledMarkupAccumulator::takeResults): strip nulls
+
2011-01-26 Mario Sanchez Prada <msanchez at igalia.com>
Reviewed by Martin Robinson.
diff --git a/Source/WebCore/editing/MarkupAccumulator.h b/Source/WebCore/editing/MarkupAccumulator.h
index 5a9c884..0bfc6e6 100644
--- a/Source/WebCore/editing/MarkupAccumulator.h
+++ b/Source/WebCore/editing/MarkupAccumulator.h
@@ -72,7 +72,7 @@ public:
String serializeNodes(Node* node, Node* nodeToSkip, EChildrenOnly childrenOnly);
protected:
- void appendString(const String&);
+ virtual void appendString(const String&);
void appendStartTag(Node*, Namespaces* = 0);
void appendEndTag(Node*);
static size_t totalLength(const Vector<String>&);
diff --git a/Source/WebCore/editing/markup.cpp b/Source/WebCore/editing/markup.cpp
index 549c816..baf4e04 100644
--- a/Source/WebCore/editing/markup.cpp
+++ b/Source/WebCore/editing/markup.cpp
@@ -124,7 +124,7 @@ public:
}
Node* serializeNodes(Node* startNode, Node* pastEnd);
- void appendString(const String& s) { return MarkupAccumulator::appendString(s); }
+ virtual void appendString(const String& s) { return MarkupAccumulator::appendString(s); }
void wrapWithNode(Node*, bool convertBlocksToInlines = false, RangeFullySelectsNode = DoesFullySelectNode);
void wrapWithStyleNode(CSSStyleDeclaration*, Document*, bool isBlock = false);
String takeResults();
@@ -184,7 +184,8 @@ String StyledMarkupAccumulator::takeResults()
concatenateMarkup(result);
- return String::adopt(result);
+ // We remove '\0' characters because they are not visibly rendered to the user.
+ return String::adopt(result).replace(0, "");
}
void StyledMarkupAccumulator::appendText(Vector<UChar>& out, Text* text)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list