[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:21:42 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4d31a78446464c90df5f94c8316a95ac3a972f95
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 24 17:46:31 2003 +0000
Reviewed by John.
- fixed null view and hang part of 3153612 -- REGRESSION: null view and hang loading cycleworld.com
* khtml/xml/xml_tokenizer.cpp: (XMLHandler::XMLHandler): Initialize the line number
to 0 so we can detect the case where we didn't get a fatal error callback.
(XMLTokenizer::finish): Construct an error page without an XML excerpt if the line
number if 0.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index eac979a..7cfcc94 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -2,6 +2,17 @@
Reviewed by John.
+ - fixed null view and hang part of 3153612 -- REGRESSION: null view and hang loading cycleworld.com
+
+ * khtml/xml/xml_tokenizer.cpp: (XMLHandler::XMLHandler): Initialize the line number
+ to 0 so we can detect the case where we didn't get a fatal error callback.
+ (XMLTokenizer::finish): Construct an error page without an XML excerpt if the line
+ number if 0.
+
+2003-01-24 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
- fixed 3140945 -- crash viewing www.nextthing.org
* khtml/rendering/render_container.cpp: (RenderContainer::removeLeftoverAnonymousBoxes):
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index eac979a..7cfcc94 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,17 @@
Reviewed by John.
+ - fixed null view and hang part of 3153612 -- REGRESSION: null view and hang loading cycleworld.com
+
+ * khtml/xml/xml_tokenizer.cpp: (XMLHandler::XMLHandler): Initialize the line number
+ to 0 so we can detect the case where we didn't get a fatal error callback.
+ (XMLTokenizer::finish): Construct an error page without an XML excerpt if the line
+ number if 0.
+
+2003-01-24 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
- fixed 3140945 -- crash viewing www.nextthing.org
* khtml/rendering/render_container.cpp: (RenderContainer::removeLeftoverAnonymousBoxes):
diff --git a/WebCore/khtml/xml/xml_tokenizer.cpp b/WebCore/khtml/xml/xml_tokenizer.cpp
index 4063eb5..8fed46c 100644
--- a/WebCore/khtml/xml/xml_tokenizer.cpp
+++ b/WebCore/khtml/xml/xml_tokenizer.cpp
@@ -41,6 +41,7 @@ using namespace DOM;
using namespace khtml;
XMLHandler::XMLHandler(DocumentPtr *_doc, KHTMLView *_view)
+ : errorLine(0)
{
m_doc = _doc;
if ( m_doc ) m_doc->ref();
@@ -341,17 +342,18 @@ void XMLTokenizer::finish()
while (m_doc->document()->hasChildNodes())
static_cast<NodeImpl*>(m_doc->document())->removeChild(m_doc->document()->firstChild(),exceptioncode);
- QTextIStream stream(&m_xmlCode);
- unsigned long lineno;
- for (lineno = 0; lineno < handler.errorLine-1; lineno++)
- stream.readLine();
- QString line = stream.readLine();
-
- unsigned long colno;
- QString errorLocPtr = "";
- for (colno = 0; colno < handler.errorCol-1; colno++)
- errorLocPtr += " ";
- errorLocPtr += "^";
+ QString line;
+ QString errorLocPtr;
+ if (handler.errorLine) {
+ QTextIStream stream(&m_xmlCode);
+ for (unsigned long lineno = 0; lineno < handler.errorLine-1; lineno++)
+ stream.readLine();
+ line = stream.readLine();
+
+ for (unsigned long colno = 0; colno < handler.errorCol-1; colno++)
+ errorLocPtr += " ";
+ errorLocPtr += "^";
+ }
// Create elements for display
DocumentImpl *doc = m_doc->document();
@@ -365,10 +367,16 @@ void XMLTokenizer::finish()
NodeImpl *headingText = doc->createTextNode(i18n("XML parsing error"));
#endif
NodeImpl *errorText = doc->createTextNode(handler.errorProtocol());
- NodeImpl *hr = doc->createElementNS(XHTML_NAMESPACE,"hr");
- NodeImpl *pre = doc->createElementNS(XHTML_NAMESPACE,"pre");
- NodeImpl *lineText = doc->createTextNode(line+"\n");
- NodeImpl *errorLocText = doc->createTextNode(errorLocPtr);
+ NodeImpl *hr = 0;
+ NodeImpl *pre = 0;
+ NodeImpl *lineText = 0;
+ NodeImpl *errorLocText = 0;
+ if (!line.isNull()) {
+ hr = doc->createElementNS(XHTML_NAMESPACE,"hr");
+ pre = doc->createElementNS(XHTML_NAMESPACE,"pre");
+ lineText = doc->createTextNode(line+"\n");
+ errorLocText = doc->createTextNode(errorLocPtr);
+ }
// Construct DOM tree. We ignore exceptions as we assume they will not be thrown here (due to the
// fact we are using a known tag set)
@@ -377,15 +385,19 @@ void XMLTokenizer::finish()
body->appendChild(h1,exceptioncode);
h1->appendChild(headingText,exceptioncode);
body->appendChild(errorText,exceptioncode);
- body->appendChild(hr,exceptioncode);
- body->appendChild(pre,exceptioncode);
- pre->appendChild(lineText,exceptioncode);
- pre->appendChild(errorLocText,exceptioncode);
+ if (hr)
+ body->appendChild(hr,exceptioncode);
+ if (pre) {
+ body->appendChild(pre,exceptioncode);
+ pre->appendChild(lineText,exceptioncode);
+ pre->appendChild(errorLocText,exceptioncode);
+ }
// Close the renderers so that they update their display correctly
// ### this should not be necessary, but requires changes in the rendering code...
h1->closeRenderer();
- pre->closeRenderer();
+ if (pre)
+ pre->closeRenderer();
body->closeRenderer();
m_doc->document()->recalcStyle( NodeImpl::Inherit );
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list