Patch by David Kilzer, reviewed by Darin.
[WebKit-https.git] / WebCore / khtml / html / htmlparser.cpp
index 4fb7a5936b3d85cef969cae0eb49b459a6b2b64a..35582d233c218154c77be4cd11045885fc2b5fd4 100644 (file)
@@ -467,7 +467,8 @@ bool HTMLParser::handleError(NodeImpl* n, bool flat, const AtomicString& localNa
                     handled = true;
                 }
             }
-        } else if (h->hasLocalName(titleTag)) {
+        } else if (h->hasLocalName(addressTag) || h->hasLocalName(dlTag) || h->hasLocalName(dtTag)
+                   || h->hasLocalName(fontTag) || h->hasLocalName(titleTag)) {
             popBlock(currentTagName);
             handled = true;
         } else if (h->hasLocalName(captionTag)) {
@@ -542,9 +543,6 @@ bool HTMLParser::handleError(NodeImpl* n, bool flat, const AtomicString& localNa
             e = new HTMLDivElementImpl(document);
             insertNode(e);
             handled = true;
-        } else if (h->hasLocalName(dlTag) || h->hasLocalName(dtTag)) {
-            popBlock(currentTagName);
-            handled = true;
         } else if (h->hasLocalName(selectTag)) {
             if (isInline(n))
                 return false;
@@ -561,17 +559,11 @@ bool HTMLParser::handleError(NodeImpl* n, bool flat, const AtomicString& localNa
                 // IE treats a nested select as </select>. Let's do the same
                 popBlock(localName);
             }
-        } else if (h->hasLocalName(addressTag)) {
-            popBlock(currentTagName);
-            handled = true;
         } else if (h->hasLocalName(colgroupTag)) {
             if (!n->isTextNode()) {
                 popBlock(currentTagName);
                 handled = true;
             }
-        } else if (h->hasLocalName(fontTag)) {
-            popBlock(currentTagName);
-            handled = true;
         } else if (!h->hasLocalName(bodyTag)) {
             if (isInline(current)) {
                 popInlineBlocks();