From cc5fd88be313142d3996c81f8bdfc1290485858c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 2 Oct 2014 18:38:22 -0500 Subject: Don't use insane (negative) layout values if layout engine does not allocate sufficient space for a text string This resolves Bug 1950 Make most debugging statements work again Add new debugging statements Fix several annoying build warnings --- tdehtml/html/htmltokenizer.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tdehtml/html/htmltokenizer.cpp') diff --git a/tdehtml/html/htmltokenizer.cpp b/tdehtml/html/htmltokenizer.cpp index 292d1773d..edf44d84f 100644 --- a/tdehtml/html/htmltokenizer.cpp +++ b/tdehtml/html/htmltokenizer.cpp @@ -1385,11 +1385,11 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData ) else if ( startTag ) { startTag = false; - bool endTag = false; + // bool endTag = false; switch(cc) { case '/': - endTag = true; + // endTag = true; break; case '!': { @@ -1440,11 +1440,14 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData ) // immediately before an endtag should be ignored. // ### Gecko and MSIE though only ignores LF immediately after // starttags and only for PRE elements -- asj (28/06-2005) - if ( pending ) - if (!select) + if ( pending ) { + if (!select) { addPending(); - else + } + else { pending = NonePending; + } + } // Cancel unused discards discard = NoneDiscard; -- cgit v1.2.1