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

Justin justing at opensource.apple.com
Tue Dec 20 13:18:28 PST 2005


justing     05/12/20 13:18:28

  Modified:    .        ChangeLog
               khtml/xml dom_elementimpl.cpp
  Log:
          <rdar://problem/4387270> editing/deleting/delete-3800834-fix failing
          <http://bugzilla.opendarwin.org/show_bug.cgi?id=6160> REGRESSION: Crash when running editing/deleting/delete-3800834-fix.html
          <http://bugzilla.opendarwin.org/show_bug.cgi?id=6161> REGRESSION: crash when pressing tab in editable WebHTMLView
  
          Reviewed by darin
  
          Some callers call setAttribute on a floating element.  So, using
          a RefPtr for the element inside addAttribute can destroy
          it.
  
          * khtml/xml/dom_elementimpl.cpp:
          (NamedAttrMapImpl::addAttribute):
  
  Revision  Changes    Path
  1.13      +15 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ChangeLog	20 Dec 2005 20:40:42 -0000	1.12
  +++ ChangeLog	20 Dec 2005 21:18:27 -0000	1.13
  @@ -1,3 +1,18 @@
  +2005-12-20  Justin Garcia  <justin.garcia at apple.com>
  +
  +        <rdar://problem/4387270> editing/deleting/delete-3800834-fix failing
  +        <http://bugzilla.opendarwin.org/show_bug.cgi?id=6160> REGRESSION: Crash when running editing/deleting/delete-3800834-fix.html
  +        <http://bugzilla.opendarwin.org/show_bug.cgi?id=6161> REGRESSION: crash when pressing tab in editable WebHTMLView
  +
  +        Reviewed by darin
  +    
  +        Some callers call setAttribute on a floating element.  So, using 
  +        a RefPtr for the element inside addAttribute can destroy
  +        it.
  +
  +        * khtml/xml/dom_elementimpl.cpp:
  +        (NamedAttrMapImpl::addAttribute):
  +
   2005-12-20  Maciej Stachowiak  <mjs at apple.com>
   
           Reviewed by Darin.
  
  
  
  1.103     +4 -4      WebCore/khtml/xml/dom_elementimpl.cpp
  
  Index: dom_elementimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_elementimpl.cpp,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- dom_elementimpl.cpp	20 Dec 2005 20:40:43 -0000	1.102
  +++ dom_elementimpl.cpp	20 Dec 2005 21:18:28 -0000	1.103
  @@ -1029,11 +1029,11 @@
   
       // Notify the element that the attribute has been added, and dispatch appropriate mutation events
       // Note that element may be null here if we are called from insertAttr() during parsing
  -    if (RefPtr<ElementImpl> e = element) {
  +    if (element) {
           RefPtr<AttributeImpl> a = attr;
  -        e->attributeChanged(a.get());
  -        e->dispatchAttrAdditionEvent(a.get());
  -        e->dispatchSubtreeModifiedEvent(false);
  +        element->attributeChanged(a.get());
  +        element->dispatchAttrAdditionEvent(a.get());
  +        element->dispatchSubtreeModifiedEvent(false);
       }
   }
   
  
  
  



More information about the webkit-changes mailing list