? khtml_stack.diff
? khtml_tostring.diff
? patches
? ecma/xmlhttprequest.lut.h
Index: dom/dom_doc.h
===================================================================
RCS file: /home/kde/kdelibs/khtml/dom/dom_doc.h,v
retrieving revision 1.40
diff -u -3 -p -b -B -r1.40 dom_doc.h
Index: html/htmltokenizer.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/html/htmltokenizer.cpp,v
retrieving revision 1.287
diff -u -3 -p -b -B -r1.287 htmltokenizer.cpp
--- html/htmltokenizer.cpp 8 Jun 2004 19:08:57 -0000 1.287
+++ html/htmltokenizer.cpp 8 Jun 2004 20:58:59 -0000
@@ -416,9 +415,9 @@ void HTMLTokenizer::scriptHandler()
newStr += pendingSrc;
setSrc(newStr);
pendingSrc = QString::null;
- }
- else if ( !prependingSrc.isEmpty() )
+ } else if ( !prependingSrc.isEmpty() ) {
write( prependingSrc, false );
+ }
}
void HTMLTokenizer::scriptExecution( const QString& str, const QString& scriptURL,
@@ -1649,6 +1648,11 @@ void HTMLTokenizer::notifyFinished(Cache
}
}
+bool HTMLTokenizer::isWaitingForScripts() const
+{
+ return cachedScript.count();
+}
+
void HTMLTokenizer::setSrc(const QString& source)
{
lineno += src.lineCount();
Index: html/htmltokenizer.h
===================================================================
RCS file: /home/kde/kdelibs/khtml/html/htmltokenizer.h,v
retrieving revision 1.79
diff -u -3 -p -b -B -r1.79 htmltokenizer.h
--- html/htmltokenizer.h 23 Jan 2004 21:44:11 -0000 1.79
+++ html/htmltokenizer.h 8 Jun 2004 20:58:59 -0000
@@ -169,6 +169,8 @@ protected:
// from CachedObjectClient
void notifyFinished(khtml::CachedObject *finishedObj);
+
+ virtual bool isWaitingForScripts() const;
protected:
// Internal buffers
///////////////////
Index: xml/dom_docimpl.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/xml/dom_docimpl.cpp,v
retrieving revision 1.276
diff -u -3 -p -b -B -r1.276 dom_docimpl.cpp
--- xml/dom_docimpl.cpp 6 Jun 2004 19:40:51 -0000 1.276
+++ xml/dom_docimpl.cpp 8 Jun 2004 20:59:00 -0000
@@ -1167,8 +1167,13 @@ void DocumentImpl::close( )
if ( m_render )
m_render->close();
+ // on an explicit document.close(), the tokenizer might still be waiting on scripts,
+ // and in that case we don't want to destroy it because that will prevent the
+ // scripts from getting processed.
+ if (m_tokenizer && !m_tokenizer->isWaitingForScripts()) {
delete m_tokenizer;
m_tokenizer = 0;
+ }
if (m_view)
m_view->part()->checkEmitLoadEvent();
Index: xml/dom_textimpl.h
===================================================================
RCS file: /home/kde/kdelibs/khtml/xml/dom_textimpl.h,v
retrieving revision 1.58
diff -u -3 -p -b -B -r1.58 dom_textimpl.h
Index: xml/xml_tokenizer.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/xml/xml_tokenizer.cpp,v
retrieving revision 1.54
diff -u -3 -p -b -B -r1.54 xml_tokenizer.cpp
--- xml/xml_tokenizer.cpp 6 Jun 2004 19:31:40 -0000 1.54
+++ xml/xml_tokenizer.cpp 8 Jun 2004 20:59:02 -0000
@@ -569,5 +569,10 @@ void XMLTokenizer::notifyFinished(Cached
}
}
+bool XMLTokenizer::isWaitingForScripts() const
+{
+ return m_cachedScript != 0;
+}
+
#include "xml_tokenizer.moc"
Index: xml/xml_tokenizer.h
===================================================================
RCS file: /home/kde/kdelibs/khtml/xml/xml_tokenizer.h,v
retrieving revision 1.21
diff -u -3 -p -b -B -r1.21 xml_tokenizer.h
--- xml/xml_tokenizer.h 2 Jun 2004 17:47:52 -0000 1.21
+++ xml/xml_tokenizer.h 8 Jun 2004 20:59:02 -0000
@@ -121,6 +121,7 @@ public:
virtual void end() = 0;
virtual void finish() = 0;
virtual void setOnHold(bool /*_onHold*/) {}
+ virtual bool isWaitingForScripts() const = 0;
signals:
void finishedParsing();
@@ -160,6 +161,8 @@ public:
// from CachedObjectClient
void notifyFinished(khtml::CachedObject *finishedObj);
+ virtual bool isWaitingForScripts() const;
+
protected:
DOM::DocumentPtr *m_doc;
KHTMLView *m_view;