[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdelibs/khtml
From: Maks Orlovich <maksim () kde ! org>
Date: 2008-08-25 21:53:59
Message-ID: 1219701239.566229.627.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 852471 by orlovich:
- Make sure the "create <html>" element recovery thing isn't confused by DTD nodes
- Allow construction of empty <head> things w/o <html>, doing proper recovery and
making the <html> as above.
- Properly reset documentElement when doing document.open()
M +3 -2 html/htmlparser.cpp
M +1 -0 xml/dom_docimpl.cpp
--- branches/KDE/4.1/kdelibs/khtml/html/htmlparser.cpp #852470:852471
@@ -855,7 +855,8 @@
default:
if(current->isDocumentNode())
{
- if(current->firstChild() == 0 || !current->firstChild()->isHTMLElement()) {
+ DocumentImpl* doc = static_cast<DocumentImpl*>(current);
+ if (!doc->documentElement()) {
e = new HTMLHtmlElementImpl(document);
insertNode(e);
handled = true;
@@ -890,7 +891,7 @@
n = new HTMLHtmlElementImpl(document);
break;
case ID_HEAD:
- if(!head && current->id() == ID_HTML) {
+ if(!head && (current->id() == ID_HTML || current->isDocumentNode())) {
head = new HTMLHeadElementImpl(document);
n = head;
}
--- branches/KDE/4.1/kdelibs/khtml/xml/dom_docimpl.cpp #852470:852471
@@ -1440,6 +1440,7 @@
detach();
removeChildren();
+ childrenChanged(); // Reset m_documentElement
delete m_styleSelector;
m_styleSelector = 0;
m_view = view;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic