[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
abarth at webkit.org
abarth at webkit.org
Wed Dec 22 13:23:07 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit abb9cd6804585131bbffb57240a6dabff8202a85
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 13 20:49:28 2010 +0000
2010-09-13 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
Implement EOF handling in TextMode
https://bugs.webkit.org/show_bug.cgi?id=45644
This patch is actually covered by a bunch of tests. We were just
magically passing the tests before because of some nutty code in
Document.cpp.
* dom/Document.cpp:
(WebCore::Document::implicitClose):
- This code was masking the notImplemented in the tree builder.
I also removed the use of the setting because it wasn't working
properly anyway. I'll implement a working version shortly.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processEndOfFile):
- Implement per the spec.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 14b8b28..dda8a6d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-13 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement EOF handling in TextMode
+ https://bugs.webkit.org/show_bug.cgi?id=45644
+
+ This patch is actually covered by a bunch of tests. We were just
+ magically passing the tests before because of some nutty code in
+ Document.cpp.
+
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+ - This code was masking the notImplemented in the tree builder.
+ I also removed the use of the setting because it wasn't working
+ properly anyway. I'll implement a working version shortly.
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processEndOfFile):
+ - Implement per the spec.
+
2010-09-13 Enrica Casucci <enrica at apple.com>
Reviewed by Sam Weining.
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index f630c98..2bb2d69 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -1959,26 +1959,6 @@ void Document::close()
}
}
-// FIXME: These settings probably don't work anymore. We should either remove
-// them or make them work properly.
-#ifdef BUILDING_ON_LEOPARD
-static bool shouldCreateImplicitHead(Document* document)
-{
- ASSERT(document);
- Settings* settings = document->page() ? document->page()->settings() : 0;
- return settings ? !settings->needsLeopardMailQuirks() : true;
-}
-#elif defined(BUILDING_ON_TIGER)
-static bool shouldCreateImplicitHead(Document* document)
-{
- ASSERT(document);
- Settings* settings = document->page() ? document->page()->settings() : 0;
- return settings ? !settings->needsTigerMailQuirks() : true;
-}
-#else
-inline bool shouldCreateImplicitHead(Document*) { return true; }
-#endif
-
void Document::implicitClose()
{
// If we're in the middle of recalcStyle, we need to defer the close until the style information is accurate and all elements are re-attached.
@@ -2005,21 +1985,6 @@ void Document::implicitClose()
// Parser should have picked up all preloads by now
m_cachedResourceLoader->clearPreloads();
- // Create a head and a body if we don't have those yet (e.g. for about:blank).
- if (!this->body() && isHTMLDocument()) {
- if (Node* documentElement = this->documentElement()) {
- ExceptionCode ec = 0;
-
- // The implicit <head> isn't expected in older versions of Mail - <rdar://problem/6863795>
- if (!head() && shouldCreateImplicitHead(this)) {
- documentElement->appendChild(HTMLHeadElement::create(this), ec);
- ASSERT(!ec);
- }
- documentElement->appendChild(HTMLBodyElement::create(this), ec);
- ASSERT(!ec);
- }
- }
-
// FIXME: We kick off the icon loader when the Document is done parsing.
// There are earlier opportunities we could start it:
// -When the <head> finishes parsing
diff --git a/WebCore/html/parser/HTMLTreeBuilder.cpp b/WebCore/html/parser/HTMLTreeBuilder.cpp
index f569036..2c2a574 100644
--- a/WebCore/html/parser/HTMLTreeBuilder.cpp
+++ b/WebCore/html/parser/HTMLTreeBuilder.cpp
@@ -2595,7 +2595,7 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
case InBodyMode:
case InCellMode:
ASSERT(insertionMode() == InBodyMode || insertionMode() == InCellMode);
- notImplemented(); // Emit parse error based on what elemtns are still open.
+ notImplemented(); // Emit parse error based on what elements are still open.
break;
case AfterBodyMode:
case AfterAfterBodyMode:
@@ -2646,6 +2646,13 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
processEndOfFile(token);
return;
case TextMode:
+ parseError(token);
+ if (m_tree.currentElement()->hasTagName(scriptTag))
+ notImplemented(); // mark the script element as "already started".
+ m_tree.openElements()->pop();
+ setInsertionMode(m_originalInsertionMode);
+ processEndOfFile(token);
+ return;
case InCaptionMode:
case InRowMode:
notImplemented();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list