[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:37:51 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 2936a49a4224e0aa5edcb949484718944569c533
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Apr 29 21:30:47 2004 +0000
Fixed:
<rdar://problem/3631431>: web archive of .Mac welcome page renders has gaps in layout
<rdar://problem/3631470>: news.google.com web archive has a different font than the live site
Reviewed by kocienda.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::determineParseMode): don't set a name on the doc type when there is no doc type in the source
* khtml/xml/dom_docimpl.cpp:
(DocumentTypeImpl::toString): don't return "<!DOCTYPE>" when there is no doc type in the source
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::recursive_toHTMLWithOptions): don't escape STYLE text, don't include the end tags for document nodes just as we don't for start tags
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 386bcf1..ca75ac8 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2004-04-29 Chris Blumenberg <cblu at apple.com>
+
+ Fixed:
+ <rdar://problem/3631431>: web archive of .Mac welcome page renders has gaps in layout
+ <rdar://problem/3631470>: news.google.com web archive has a different font than the live site
+
+ Reviewed by kocienda.
+
+ * khtml/html/html_documentimpl.cpp:
+ (HTMLDocumentImpl::determineParseMode): don't set a name on the doc type when there is no doc type in the source
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentTypeImpl::toString): don't return "<!DOCTYPE>" when there is no doc type in the source
+ * khtml/xml/dom_nodeimpl.cpp:
+ (NodeImpl::recursive_toHTMLWithOptions): don't escape STYLE text, don't include the end tags for document nodes just as we don't for start tags
+
2004-04-29 Darin Adler <darin at apple.com>
Reviewed by Dave.
diff --git a/WebCore/khtml/html/html_documentimpl.cpp b/WebCore/khtml/html/html_documentimpl.cpp
index de4bb87..eeebfac 100644
--- a/WebCore/khtml/html/html_documentimpl.cpp
+++ b/WebCore/khtml/html/html_documentimpl.cpp
@@ -489,9 +489,11 @@ void HTMLDocumentImpl::determineParseMode( const QString &str )
QString systemID, publicID;
int resultFlags = 0;
if (parseDocTypeDeclaration(str, &resultFlags, publicID, systemID)) {
- m_doctype->setName("HTML");
- m_doctype->setPublicId(publicID);
- m_doctype->setSystemId(systemID);
+ if (resultFlags & PARSEMODE_HAVE_DOCTYPE) {
+ m_doctype->setName("HTML");
+ m_doctype->setPublicId(publicID);
+ m_doctype->setSystemId(systemID);
+ }
if (!(resultFlags & PARSEMODE_HAVE_DOCTYPE)) {
// No doctype found at all. Default to quirks mode and Html4.
pMode = Compat;
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 42a29af..464cbf4 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -2820,9 +2820,11 @@ void DocumentTypeImpl::copyFrom(const DocumentTypeImpl& other)
DOMString DocumentTypeImpl::toString() const
{
- DOMString result = "<!DOCTYPE";
- if (!m_qualifiedName.isEmpty()) {
- result += " ";
+ DOMString result;
+ if (m_qualifiedName.isEmpty()) {
+ return "";
+ } else {
+ result = "<!DOCTYPE ";
result += m_qualifiedName;
}
if (!m_publicId.isEmpty()) {
diff --git a/WebCore/khtml/xml/dom_nodeimpl.cpp b/WebCore/khtml/xml/dom_nodeimpl.cpp
index 01870c8..3d3508c 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.cpp
+++ b/WebCore/khtml/xml/dom_nodeimpl.cpp
@@ -341,7 +341,8 @@ QString NodeImpl::recursive_toHTMLWithOptions(bool start, const DOM::RangeImpl *
}
}
Id parentID = parentNode()->id();
- me += (parentID == ID_SCRIPT || parentID == ID_TEXTAREA) ? str.string() : escapeHTML(str.string());
+ bool dontEscape = (parentID == ID_SCRIPT || parentID == ID_TEXTAREA || parentID == ID_STYLE);
+ me += dontEscape ? str.string() : escapeHTML(str.string());
} else if (nodeType() != Node::DOCUMENT_NODE) {
// If I am an element, not a text
me += QChar('<') + nodeName().string();
@@ -364,7 +365,7 @@ QString NodeImpl::recursive_toHTMLWithOptions(bool start, const DOM::RangeImpl *
me += n->recursive_toHTMLWithOptions(false, range, nodes);
}
// Print my ending tag
- if (isNodeIncluded && nodeType() != Node::TEXT_NODE) {
+ if (isNodeIncluded && nodeType() != Node::TEXT_NODE && nodeType() != Node::DOCUMENT_NODE) {
me += "</" + nodeName().string() + ">";
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list