[webkit-changes] cvs commit: WebCore/manual-tests wordXML-selectall.xml

David harrison at opensource.apple.com
Sat Aug 27 17:58:42 PDT 2005


harrison    05/08/27 17:58:42

  Modified:    .        ChangeLog
               khtml/xml dom_nodeimpl.cpp
  Added:       manual-tests wordXML-selectall.xml
  Log:
          Reviewed by Adele and John.
  
          - fixes <rdar://problem/4214259> (REGRESSION: DENVER )Safari app will crash when pressing Command + a to select all (Word XML format)
  
          Problem is that NodeImpl::maxDeepOffset() was using the wrong test for being able to call the
          TextImpl length() function, so it was being called on a ProcessingInstruction node.
  
          Test cases added:
          * manual-tests/wordXML-selectall.xml: Added.
  
          * khtml/xml/dom_nodeimpl.cpp:
          (NodeImpl::maxDeepOffset): use isTextNode() instead of offsetInCharacters().
  
  Revision  Changes    Path
  1.24      +15 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ChangeLog	27 Aug 2005 18:54:59 -0000	1.23
  +++ ChangeLog	28 Aug 2005 00:58:41 -0000	1.24
  @@ -1,3 +1,18 @@
  +2005-08-27  David Harrison  <harrison at apple.com>
  +
  +        Reviewed by Adele and John.
  +
  +        - fixes <rdar://problem/4214259> (REGRESSION: DENVER )Safari app will crash when pressing Command + a to select all (Word XML format)
  +
  +        Problem is that NodeImpl::maxDeepOffset() was using the wrong test for being able to call the
  +        TextImpl length() function, so it was being called on a ProcessingInstruction node.
  + 
  +        Test cases added:
  +        * manual-tests/wordXML-selectall.xml: Added.
  +
  +        * khtml/xml/dom_nodeimpl.cpp:
  +        (NodeImpl::maxDeepOffset): use isTextNode() instead of offsetInCharacters(). 
  +
   2005-08-27  Mitz Pettel  <opendarwin.org at mitzpettel.com>
   
           Reviewed and landed by Darin.
  
  
  
  1.178     +1 -1      WebCore/khtml/xml/dom_nodeimpl.cpp
  
  Index: dom_nodeimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.cpp,v
  retrieving revision 1.177
  retrieving revision 1.178
  diff -u -r1.177 -r1.178
  --- dom_nodeimpl.cpp	25 Aug 2005 23:13:55 -0000	1.177
  +++ dom_nodeimpl.cpp	28 Aug 2005 00:58:41 -0000	1.178
  @@ -1488,7 +1488,7 @@
   // method for editing madness, which allows BR,1 as a position, though that is incorrect
   long NodeImpl::maxDeepOffset() const
   {
  -    if (offsetInCharacters(nodeType()))
  +    if (isTextNode())
           return static_cast<const TextImpl*>(this)->length();
           
       if (hasTagName(brTag) || (renderer() && renderer()->isReplaced()))
  
  
  
  1.1                  WebCore/manual-tests/wordXML-selectall.xml
  
  Index: wordXML-selectall.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <?mso-application progid="Word.Document"?>
  <w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/2/wordml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:SL="http://schemas.microsoft.com/schemaLibrary/2003/2/core" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:wx="http://schemas.microsoft.com/office/word/2003/2/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xml:space="preserve"><o:DocumentProperties></o:DocumentProperties><w:fonts><w:defaultFonts w:ascii="Times New Roman" w:fareast="Times New Roman" w:h-ansi="Times New Roman" w:cs="Times New Roman"/></w:fonts><w:docPr></w:docPr><w:body><wx:sect><w:p><w:pPr></w:pPr><w:r><w:rPr><w:rFonts w:ascii="Helvetica" w:h-ansi="Helvetica" w:cs="Helvetica"/><wx:font wx:val="Helvetica"/><w:sz w:val="24"/><w:sz-cs w:val="24"/></w:rPr><w:t>Simply open this document and "Select all" (cmd
 -a).  That was enough to crash.   See &lt;rdar://problem/4214259&gt;.</w:t></w:r></w:p><w:sectPr><w:pgSz w:w="12240" w:h="15840"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440"/></w:sectPr></wx:sect></w:body></w:wordDocument>
  
  



More information about the webkit-changes mailing list