<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>14171</bug_id>
          
          <creation_ts>2007-06-15 09:33:36 -0700</creation_ts>
          <short_desc>DOM not always available in didFinishLoadForFrame if multiple WebViews are busy loading (Colloquy doesn&apos;t display chat messages)</short_desc>
          <delta_ts>2016-09-20 09:51:57 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://colloquy.info/project/ticket/576</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Kempgen">alex</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>dev+webkit</cc>
    
    <cc>edcrfv</cc>
    
    <cc>ismail</cc>
    
    <cc>jeff</cc>
    
    <cc>pnasrat</cc>
    
    <cc>tofu.linden</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7428</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Kempgen">alex</who>
    <bug_when>2007-06-15 09:33:36 -0700</bug_when>
    <thetext>Sometimes Colloquy&apos;s webviews are just blank when loading (= when joining a chat room).

And also this problem is appearing a lot more often (not all the time though) for everyone with the Safari 3 beta than with Tiger&apos;s original WebKit. Colloquy&apos;s trac ticket on this bug is in the URL field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7344</commentid>
    <comment_count>1</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2007-06-16 09:22:22 -0700</bug_when>
    <thetext>a workaround, in the meantime, is to type &quot;/reload style&quot; in one of these blank webviews.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4562</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-07-17 00:47:17 -0700</bug_when>
    <thetext>A workaround was landed in Colloquy&apos;s SVN in r3708.  It mentions that there is likely something that needs fixed in WebKit, but doesn&apos;t provide any specifics...  Does anyone know what the issue is here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4500</commentid>
    <comment_count>3</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2007-07-17 11:23:17 -0700</bug_when>
    <thetext>I am working on the WebKit issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4464</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2007-07-17 16:02:32 -0700</bug_when>
    <thetext>The issue here is that Colloquy is trying to access the DOM from the didFinishLoadForFrame: delegate call. In cases where there are many WebViews loading at once, the HTML parser and tokenizer doesn&apos;t finish making the DOM until after didFinishLoadForFrame: is called.

This design has always been the case in WebKit. It is never guaranteed  that the DOM will be ready when didFinishLoadForFrame is called.

Colloquy does a workaround and will release an update sometime. We should rethink this API and decide what didFinishLoadForFrame really means and make that clear in the API docs also.

The attached patch almost fixes this completely but it broke the fast/dom/Document/document-reopen.html layout test. This test never closes the document, so with this patch didFinishLoadForFrame never fires. We need to rework the loader to fire the didFinishLoadForFrame when the main resource and sub-resource loads finish and the parser is done. But this test re-opens the document and makes the page seem like it never finishes. The explicit document.open with no document.close should not affect this delegate call.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4461</commentid>
    <comment_count>5</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2007-07-17 16:03:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/5036833&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4460</commentid>
    <comment_count>6</comment_count>
      <attachid>15556</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2007-07-17 16:03:48 -0700</bug_when>
    <thetext>Created attachment 15556
Almost working patch</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>15556</attachid>
            <date>2007-07-17 16:03:48 -0700</date>
            <delta_ts>2010-06-10 15:42:20 -0700</delta_ts>
            <desc>Almost working patch</desc>
            <filename>almost.patch</filename>
            <type>text/plain</type>
            <size>516</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">SW5kZXg6IGxvYWRlci9GcmFtZUxvYWRlci5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbG9hZGVyL0ZyYW1l
TG9hZGVyLmNwcCAgICAgIChyZXZpc2lvbiAyNDM2OSkKKysrIGxvYWRlci9GcmFtZUxvYWRlci5j
cHAgICAgICAod29ya2luZyBjb3B5KQpAQCAtMjc4Nyw3ICsyNzg3LDcgQEAKICAgICAgICAgCiAg
ICAgICAgIGNhc2UgRnJhbWVTdGF0ZUNvbW1pdHRlZFBhZ2U6IHsKICAgICAgICAgICAgIERvY3Vt
ZW50TG9hZGVyKiBkbCA9IG1fZG9jdW1lbnRMb2FkZXIuZ2V0KCk7ICAgICAgICAgICAgCi0gICAg
ICAgICAgICBpZiAoIWRsIHx8IGRsLT5pc0xvYWRpbmdJbkFQSVNlbnNlKCkpCisgICAgICAgICAg
ICBpZiAoIWRsIHx8IGRsLT5pc0xvYWRpbmdJbkFQSVNlbnNlKCkgfHwgIW1faXNDb21wbGV0ZSkK
ICAgICAgICAgICAgICAgICByZXR1cm47CiAKICAgICAgICAgICAgIG1hcmtMb2FkQ29tcGxldGUo
KTsK
</data>

          </attachment>
      

    </bug>

</bugzilla>