[webkit-changes] cvs commit: WebCore/khtml/xml dom_docimpl.cpp dom_docimpl.h

Adele adele at opensource.apple.com
Tue Jul 12 21:52:04 PDT 2005


adele       05/07/12 21:52:03

  Modified:    .        Tag: Safari-1-3-branch ChangeLog
               khtml/xml Tag: Safari-1-3-branch dom_docimpl.cpp
                        dom_docimpl.h
  Log:
          Merged fix from TOT to Safari-1-3-branch
          <rdar://problem/4165000>
  
      2005-05-05  David Hyatt  <hyatt at apple.com>
  
          Fix for 4109667, sIFR flash replacement technique often malfunctions.  This bug occurs when the plugin
          widget update causes the onload for the document to fire.  Because you can be in the middle of a style
          recalc when doing an attach (in response to a stylesheet load), the onload fires in the middle of the attach
          process when the tree is in a bogus state.
  
          The fix is to add a bit to the document that tells style recalc that the implicitClose() method was invoked
          during the style recalc process and the code has been patched so that when this situation occurs, the close is
          deferred until after the style recalc has finished.
  
          Reviewed by John Sullivan
  
          * khtml/xml/dom_docimpl.cpp:
          (DocumentImpl::DocumentImpl):
          (DocumentImpl::recalcStyle):
          (DocumentImpl::implicitClose):
          * khtml/xml/dom_docimpl.h:
          * layout-tests/fast/dynamic/flash-replacement-test.html: Added.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4108.4.39 +25 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4108.4.38
  retrieving revision 1.4108.4.39
  diff -u -r1.4108.4.38 -r1.4108.4.39
  --- ChangeLog	13 Jul 2005 04:25:52 -0000	1.4108.4.38
  +++ ChangeLog	13 Jul 2005 04:51:56 -0000	1.4108.4.39
  @@ -1,6 +1,31 @@
   2005-07-12  Adele Peterson  <adele at apple.com>
   
           Merged fix from TOT to Safari-1-3-branch
  +        <rdar://problem/4165000>
  +     
  +    2005-05-05  David Hyatt  <hyatt at apple.com>
  +
  +	Fix for 4109667, sIFR flash replacement technique often malfunctions.  This bug occurs when the plugin
  +	widget update causes the onload for the document to fire.  Because you can be in the middle of a style
  +	recalc when doing an attach (in response to a stylesheet load), the onload fires in the middle of the attach
  +	process when the tree is in a bogus state.
  +
  +	The fix is to add a bit to the document that tells style recalc that the implicitClose() method was invoked
  +	during the style recalc process and the code has been patched so that when this situation occurs, the close is
  +	deferred until after the style recalc has finished.
  +	
  +        Reviewed by John Sullivan
  +
  +        * khtml/xml/dom_docimpl.cpp:
  +        (DocumentImpl::DocumentImpl):
  +        (DocumentImpl::recalcStyle):
  +        (DocumentImpl::implicitClose):
  +        * khtml/xml/dom_docimpl.h:
  +        * layout-tests/fast/dynamic/flash-replacement-test.html: Added.
  +
  +2005-07-12  Adele Peterson  <adele at apple.com>
  +
  +        Merged fix from TOT to Safari-1-3-branch
           <rdar://problem/4164993>
   
       2005-05-02  Darin Adler  <darin at apple.com>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.211.4.7 +13 -0     WebCore/khtml/xml/dom_docimpl.cpp
  
  Index: dom_docimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.cpp,v
  retrieving revision 1.211.4.6
  retrieving revision 1.211.4.7
  diff -u -r1.211.4.6 -r1.211.4.7
  --- dom_docimpl.cpp	13 Jul 2005 01:01:24 -0000	1.211.4.6
  +++ dom_docimpl.cpp	13 Jul 2005 04:52:02 -0000	1.211.4.7
  @@ -345,6 +345,7 @@
       m_inDocument = true;
       m_styleSelectorDirty = false;
       m_inStyleRecalc = false;
  +    m_closeAfterStyleRecalc = false;
       m_usesDescendantRules = false;
       m_usesSiblingRules = false;
   
  @@ -1150,6 +1151,12 @@
       setDocumentChanged( false );
       
       m_inStyleRecalc = false;
  +    
  +    // If we wanted to emit the implicitClose() during recalcStyle, do so now that we're finished.
  +    if (m_closeAfterStyleRecalc) {
  +        m_closeAfterStyleRecalc = false;
  +        implicitClose();
  +    }
   }
   
   void DocumentImpl::updateRendering()
  @@ -1460,6 +1467,12 @@
   
   void DocumentImpl::implicitClose()
   {
  +    // If we're in the middle of recalcStyle, we need to defer the close until the style information is accurate and all elements are re-attached.
  +    if (m_inStyleRecalc) {
  +        m_closeAfterStyleRecalc = true;
  +        return;
  +    }
  +
       // First fire the onload.
       
       bool wasLocationChangePending = part() && part()->isScheduledLocationChangePending();
  
  
  
  1.104.4.4 +1 -0      WebCore/khtml/xml/dom_docimpl.h
  
  Index: dom_docimpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.h,v
  retrieving revision 1.104.4.3
  retrieving revision 1.104.4.4
  diff -u -r1.104.4.3 -r1.104.4.4
  --- dom_docimpl.h	12 Jul 2005 20:58:49 -0000	1.104.4.3
  +++ dom_docimpl.h	13 Jul 2005 04:52:03 -0000	1.104.4.4
  @@ -671,6 +671,7 @@
       bool m_docChanged;
       bool m_styleSelectorDirty;
       bool m_inStyleRecalc;
  +    bool m_closeAfterStyleRecalc;
       bool m_usesDescendantRules;
       bool m_usesSiblingRules;
   
  
  
  



More information about the webkit-changes mailing list