[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:14:50 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4bbddd4fc3a3c696bc82342e3a7771340d7b0790
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Dec 14 01:02:24 2002 +0000
Fix for 3098045.
Do not treat XHTML-style tags e.g., <br/> or <table/> as
self-closing. This is absolutely wrong, and it does not
match the behavior of other browsers. According to the HTML4
spec for parsing, / is an erroneous character and should simply
be dropped, so <table/> should be treated like <table>.
Fixes for crashes on glazman's blog and on tantek's blog. Both
still mis-render, but at least they don't crash.
Reviewed by gramps (and darin too)
* khtml/html/htmltokenizer.cpp:
* khtml/rendering/render_container.cpp:
* khtml/rendering/render_style.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index add1a1b..3aec739 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2002-12-13 David Hyatt <hyatt at apple.com>
+
+ Fix for 3098045.
+
+ Do not treat XHTML-style tags e.g., <br/> or <table/> as
+ self-closing. This is absolutely wrong, and it does not
+ match the behavior of other browsers. According to the HTML4
+ spec for parsing, / is an erroneous character and should simply
+ be dropped, so <table/> should be treated like <table>.
+
+ Fixes for crashes on glazman's blog and on tantek's blog. Both
+ still mis-render, but at least they don't crash.
+
+ Reviewed by gramps (and darin too)
+
+ * khtml/html/htmltokenizer.cpp:
+ * khtml/rendering/render_container.cpp:
+ * khtml/rendering/render_style.cpp:
+
=== Alexander-37u1 ===
2002-12-13 David Hyatt <hyatt at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index add1a1b..3aec739 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2002-12-13 David Hyatt <hyatt at apple.com>
+
+ Fix for 3098045.
+
+ Do not treat XHTML-style tags e.g., <br/> or <table/> as
+ self-closing. This is absolutely wrong, and it does not
+ match the behavior of other browsers. According to the HTML4
+ spec for parsing, / is an erroneous character and should simply
+ be dropped, so <table/> should be treated like <table>.
+
+ Fixes for crashes on glazman's blog and on tantek's blog. Both
+ still mis-render, but at least they don't crash.
+
+ Reviewed by gramps (and darin too)
+
+ * khtml/html/htmltokenizer.cpp:
+ * khtml/rendering/render_container.cpp:
+ * khtml/rendering/render_style.cpp:
+
=== Alexander-37u1 ===
2002-12-13 David Hyatt <hyatt at apple.com>
diff --git a/WebCore/khtml/html/htmltokenizer.cpp b/WebCore/khtml/html/htmltokenizer.cpp
index 15a64e3..a7be86b 100644
--- a/WebCore/khtml/html/htmltokenizer.cpp
+++ b/WebCore/khtml/html/htmltokenizer.cpp
@@ -907,13 +907,10 @@ void HTMLTokenizer::parseTag(DOMStringIt &src)
else
// Start Tag
beginTag = true;
+
// Accept empty xml tags like <br/>
- if(len > 1 && ptr[len-1] == '/' ) {
+ if(len > 1 && ptr[len-1] == '/' )
ptr[--len] = '\0';
- // if its like <br/> and not like <input/ value=foo>, take it as flat
- if (*src == '>')
- currToken.flat = true;
- }
uint tagID = khtml::getTagID(ptr, len);
if (!tagID) {
@@ -992,9 +989,6 @@ void HTMLTokenizer::parseTag(DOMStringIt &src)
else
kdDebug( 6036 ) << "Known attribute: " << QCString(cBuffer, cBufferPos+1).data() << endl;
#endif
- // did we just get />
- if (!a && cBufferPos == 1 && *cBuffer == '/' && curchar == '>')
- currToken.flat = true;
tag = SearchEqual;
break;
diff --git a/WebCore/khtml/rendering/render_container.cpp b/WebCore/khtml/rendering/render_container.cpp
index f3b93f6..7dd4e46 100644
--- a/WebCore/khtml/rendering/render_container.cpp
+++ b/WebCore/khtml/rendering/render_container.cpp
@@ -211,16 +211,18 @@ void RenderContainer::insertPseudoChild(RenderStyle::PseudoId type, RenderObject
if (pseudo->contentType()==CONTENT_TEXT)
{
RenderObject* po = new (renderArena()) RenderFlow(0 /* anonymous box */);
+ po->setParent(this); // Set the parent now, so setStyle will be able to find a renderArena.
po->setStyle(pseudo);
-
+ po->setParent(0); // Unset the parent to avoid asserting in addChild.
addChild(po, beforeChild);
-
+
RenderText* t = new (renderArena()) RenderText(0 /*anonymous object */, pseudo->contentText());
+ t->setParent(po); // Set the parent now, so setStyle will be able to find a renderArena.
t->setStyle(pseudo);
-
-// kdDebug() << DOM::DOMString(pseudo->contentText()).string() << endl;
-
+ t->setParent(0); // Unset the parent to avoid asserting in addChild.
po->addChild(t);
+
+// kdDebug() << DOM::DOMString(pseudo->contentText()).string() << endl;
t->close();
po->close();
@@ -228,7 +230,9 @@ void RenderContainer::insertPseudoChild(RenderStyle::PseudoId type, RenderObject
else if (pseudo->contentType()==CONTENT_OBJECT)
{
RenderObject* po = new (renderArena()) RenderImage(0);
+ po->setParent(this); // Set the parent now, so setStyle will be able to find a renderArena.
po->setStyle(pseudo);
+ po->setParent(0); // Unset the parent to avoid asserting in addChild.
addChild(po, beforeChild);
po->close();
}
diff --git a/WebCore/khtml/rendering/render_style.cpp b/WebCore/khtml/rendering/render_style.cpp
index de87f0c..1696928 100644
--- a/WebCore/khtml/rendering/render_style.cpp
+++ b/WebCore/khtml/rendering/render_style.cpp
@@ -482,9 +482,12 @@ void RenderStyle::setContent(DOM::DOMStringImpl* s)
content = new ContentData;
else
content->clearContent();
-
+
+ if (!s)
+ s = new DOM::DOMStringImpl("");
content->_content.text = s;
content->_content.text->ref();
+
content->_contentType = CONTENT_TEXT;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list