[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
eric at webkit.org
eric at webkit.org
Wed Dec 22 12:07:07 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7812c689b1b8d95ec2eba248d6078b2a18409da9
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Aug 14 23:29:39 2010 +0000
2010-08-14 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
XSLTProcessor.transformToFragment should not pass contextElement to html/xml document parsers
https://bugs.webkit.org/show_bug.cgi?id=44017
This fixes two tests which otherwise would fail when the
HTML5 TreeBuilder is enabled for fragment parsing.
This revealed a bug in HTMLTreeBuilder() which I fixed as well.
* html/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
* xml/XSLTProcessor.cpp:
(WebCore::createFragmentFromSource):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 97997e4..f337f12 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-08-14 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ XSLTProcessor.transformToFragment should not pass contextElement to html/xml document parsers
+ https://bugs.webkit.org/show_bug.cgi?id=44017
+
+ This fixes two tests which otherwise would fail when the
+ HTML5 TreeBuilder is enabled for fragment parsing.
+
+ This revealed a bug in HTMLTreeBuilder() which I fixed as well.
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
+ * xml/XSLTProcessor.cpp:
+ (WebCore::createFragmentFromSource):
+
2010-08-14 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Ariya Hidayat.
diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/HTMLTreeBuilder.cpp
index 1d23539..fd0b62e 100644
--- a/WebCore/html/HTMLTreeBuilder.cpp
+++ b/WebCore/html/HTMLTreeBuilder.cpp
@@ -412,13 +412,14 @@ HTMLTreeBuilder::HTMLTreeBuilder(HTMLTokenizer* tokenizer, DocumentFragment* fra
{
if (shouldUseLegacyTreeBuilder(fragment->document()))
return;
- // This is steps 2-6 of the HTML5 Fragment Case parsing algorithm:
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#fragment-case
- if (contextElement)
+ if (contextElement) {
+ // Steps 4.2-4.6 of the HTML5 Fragment Case parsing algorithm:
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#fragment-case
m_document->setParseMode(contextElement->document()->parseMode());
- processFakeStartTag(htmlTag);
- resetInsertionModeAppropriately();
- m_tree.setForm(closestFormAncestor(contextElement));
+ processFakeStartTag(htmlTag);
+ resetInsertionModeAppropriately();
+ m_tree.setForm(closestFormAncestor(contextElement));
+ }
}
HTMLTreeBuilder::~HTMLTreeBuilder()
diff --git a/WebCore/xml/XSLTProcessor.cpp b/WebCore/xml/XSLTProcessor.cpp
index 7e07ee3..6e149a1 100644
--- a/WebCore/xml/XSLTProcessor.cpp
+++ b/WebCore/xml/XSLTProcessor.cpp
@@ -100,11 +100,11 @@ static inline RefPtr<DocumentFragment> createFragmentFromSource(const String& so
RefPtr<DocumentFragment> fragment = outputDoc->createDocumentFragment();
if (sourceMIMEType == "text/html")
- fragment->parseHTML(sourceString, outputDoc->documentElement());
+ fragment->parseHTML(sourceString, 0);
else if (sourceMIMEType == "text/plain")
- fragment->legacyParserAddChild(Text::create(outputDoc, sourceString));
+ fragment->parserAddChild(Text::create(outputDoc, sourceString));
else {
- bool successfulParse = fragment->parseXML(sourceString, outputDoc->documentElement());
+ bool successfulParse = fragment->parseXML(sourceString, 0);
if (!successfulParse)
return 0;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list