From 3955facf0716123162ccd43a8deefcbce258bfc1 Mon Sep 17 00:00:00 2001 From: mjs Date: Sun, 9 Jan 2005 04:09:49 +0000 Subject: [PATCH] Reviewed by Darin. REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com) * Khtml/khtml_part.cpp: (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has not started loading yet so it could not possibly be finishing here... (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still no document, in this case we must have hit an error or been loading a non-HTML frame. * khtml/khtml_part.h: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8323 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog-2005-08-23 | 14 ++++++++++++++ WebCore/khtml/khtml_part.cpp | 16 ++++++++++++---- WebCore/khtml/khtml_part.h | 2 +- WebKit/WebView.subproj/WebHTMLView.m | 8 ++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23 index 00280d44dd0b..ecc2824ea4e7 100644 --- a/WebCore/ChangeLog-2005-08-23 +++ b/WebCore/ChangeLog-2005-08-23 @@ -1,3 +1,17 @@ +2005-01-07 Maciej Stachowiak + + Reviewed by Darin. + + REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com) + + * Khtml/khtml_part.cpp: + (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has + not started loading yet so it could not possibly be finishing here... + (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still + no document, in this case we must have hit an error or been loading a non-HTML + frame. + * khtml/khtml_part.h: + 2005-01-08 David Harrison Reviewed by Maciej. diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp index c956605fdef4..fc9301f9c494 100644 --- a/WebCore/khtml/khtml_part.cpp +++ b/WebCore/khtml/khtml_part.cpp @@ -1677,7 +1677,7 @@ void KHTMLPart::stop() // WebCore is enough involved that we need to checkCompleted() in order for m_bComplete to // become true. An example is when a subframe is a pure text doc, and that subframe is the // last one to complete. - checkCompleted(); + checkCompleted(true); } #if !APPLE_CHANGES @@ -1807,7 +1807,7 @@ void KHTMLPart::slotJobPercent( KIO::Job* /*job*/, unsigned long percent ) #endif -void KHTMLPart::checkCompleted() +void KHTMLPart::checkCompleted(bool ignoreDoc) { // kdDebug( 6050 ) << "KHTMLPart::checkCompleted() parsing: " << d->m_doc->parsing() << endl; // kdDebug( 6050 ) << " complete: " << d->m_bComplete << endl; @@ -1831,8 +1831,16 @@ void KHTMLPart::checkCompleted() if ( !(*it).m_bCompleted ) return; - // Are we still parsing - or have we done the completed stuff already ? - if ( d->m_bComplete || (d->m_doc && d->m_doc->parsing()) ) + // Have we completed before? + if ( d->m_bComplete ) + return; + + // Are we still parsing? + if ( d->m_doc && d->m_doc->parsing() ) + return; + + // Have we not even started getting data for the main resource yet? + if ( !d->m_doc && !ignoreDoc) return; // Still waiting for images/scripts from the loader ? diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h index dcc56bbce01b..61fad7e2d9a7 100644 --- a/WebCore/khtml/khtml_part.h +++ b/WebCore/khtml/khtml_part.h @@ -1153,7 +1153,7 @@ private slots: void slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* obj); void slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *obj ); - void checkCompleted(); + void checkCompleted(bool ignoreDoc = false); /** * @internal diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m index e507c6135c7e..a392c484c3b8 100644 --- a/WebKit/WebView.subproj/WebHTMLView.m +++ b/WebKit/WebView.subproj/WebHTMLView.m @@ -4464,6 +4464,14 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b) if ([string isKindOfClass:[NSAttributedString class]]) { ERROR("TEXTINPUT: requested insert of attributed string"); text = [string string]; + int length = [text length]; + int i = 0; + while (i < length) { + NSRange effectiveRange; + NSDictionary *attrs = [string attributesAtIndex:i longestEffectiveRange:&effectiveRange inRange:NSMakeRange(i,length - i)]; + i = effectiveRange.location + effectiveRange.length; + NSLog(@"attribute chunk: %@ from %d length %d\n", attrs, effectiveRange.location, effectiveRange.length); + } } else { text = string; } -- 2.36.0