Commit 812d9e3e authored by mitz@apple.com's avatar mitz@apple.com

Reviewed by Dave Hyatt.

        - fix <rdar://problem/5816522> REGRESSION (r30111-30112): Tahoe web cam website has some text in Chinese or japanese

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::insertNode): Added call to beginParsingChildren()
        on the new node.
        (WebCore::HTMLParser::handleError): Ditto.
        (WebCore::HTMLParser::reopenResidualStyleTags): Ditto.
        (WebCore::HTMLParser::pushBlock): Removed incorrect call to
        beginParsingChildren() on the current node.
        * manual-tests/applet-finish-parsing-children.html: Added.
        * manual-tests/resources/DrawMessage.class: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a4fb38f9
2008-03-26 Dan Bernstein <mitz@apple.com>
Reviewed by Dave Hyatt.
- fix <rdar://problem/5816522> REGRESSION (r30111-30112): Tahoe web cam website has some text in Chinese or japanese
* html/HTMLParser.cpp:
(WebCore::HTMLParser::insertNode): Added call to beginParsingChildren()
on the new node.
(WebCore::HTMLParser::handleError): Ditto.
(WebCore::HTMLParser::reopenResidualStyleTags): Ditto.
(WebCore::HTMLParser::pushBlock): Removed incorrect call to
beginParsingChildren() on the current node.
* manual-tests/applet-finish-parsing-children.html: Added.
* manual-tests/resources/DrawMessage.class: Added.
2008-03-26 Brady Eidson <beidson@apple.com>
Reviewed by Darin
......@@ -329,6 +329,7 @@ bool HTMLParser::insertNode(Node* n, bool flat)
// optimized version of setCurrent that takes advantage of that fact and also
// assumes that newNode is neither 0 nor a pointer to the document.
pushBlock(localName, tagPriority);
newNode->beginParsingChildren();
ASSERT(!didRefCurrent);
newNode->ref();
current = newNode;
......@@ -417,6 +418,7 @@ bool HTMLParser::handleError(Node* n, bool flat, const AtomicString& localName,
reportError(MisplacedHeadContentError, &localName, &current->localName());
pushBlock(localName, tagPriority);
newNode->beginParsingChildren();
setCurrent(newNode);
if (!n->attached() && !m_isParsingFragment)
n->attach();
......@@ -560,6 +562,7 @@ bool HTMLParser::handleError(Node* n, bool flat, const AtomicString& localName,
!flat && static_cast<HTMLElement*>(n)->endTagRequirement() != TagStatusForbidden)
{
pushBlock(localName, tagPriority);
n->beginParsingChildren();
setCurrent(n);
inStrayTableContent++;
blockStack->strayTableContent = true;
......@@ -1203,6 +1206,7 @@ void HTMLParser::reopenResidualStyleTags(HTMLStackElem* elem, Node* malformedTab
// Now push a new stack element for this node we just created.
pushBlock(elem->tagName, elem->level);
newNode->beginParsingChildren();
// Set our strayTableContent boolean if needed, so that the reopened tag also knows
// that it is inside a malformed table.
......@@ -1226,7 +1230,6 @@ void HTMLParser::reopenResidualStyleTags(HTMLStackElem* elem, Node* malformedTab
void HTMLParser::pushBlock(const AtomicString& tagName, int level)
{
current->beginParsingChildren();
blockStack = new HTMLStackElem(tagName, level, current, didRefCurrent, blockStack);
didRefCurrent = false;
}
......
<p>
Test for <i><a href="rdar://problem/5816522">Bug 5816522</a> REGRESSION (r30111-30112): Tahoe web cam website has some text in Chinese or japanese</i>.
</p>
<p>
You should see the word PASS below.
</p>
<applet codebase="resources" code="DrawMessage.class" width=534 height=50>
<param name=text value="FAIL">
<script src="data:text/javascript,document.body.offsetTop;"/>
<param name=text value="PASS">
</applet>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment