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

Adele adele at opensource.apple.com
Fri Sep 9 10:49:27 PDT 2005


adele       05/09/09 10:49:27

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               khtml/xml Tag: Safari-2-0-branch dom_nodeimpl.cpp
  Log:
          Merged fix from TOT to Safari-2-0-branch
  
      2005-09-07 Vicki Murley  <vicki at apple.com>
  
          Reviewed by Justin.
  
          - fix <rdar://problem/4246096> REGRESSION links to named anchors don't scroll to the right place (4825)
  
          This is really just a better fix for 4233844. Also consolidated manual-tests/scrollToAnchorWithNewline.html
  	and the test case from Bugzilla bug 4825 into manual-tests/scrollToAnchor.html.
  
          Test cases added:
          * manual-tests/scrollToAnchor.html: Added.
  
          * khtml/xml/dom_nodeimpl.cpp:
          (DOM::ContainerNodeImpl::getUpperLeftCorner): when calculating scroll position, skip child nodes of the anchor
          if they do not have text boxes.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.22  +20 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.1.2.21
  retrieving revision 1.1.2.22
  diff -u -r1.1.2.21 -r1.1.2.22
  --- ChangeLog	9 Sep 2005 17:17:07 -0000	1.1.2.21
  +++ ChangeLog	9 Sep 2005 17:49:25 -0000	1.1.2.22
  @@ -1,3 +1,23 @@
  +2005-09-09  Adele Peterson  <adele at apple.com>
  +
  +        Merged fix from TOT to Safari-2-0-branch
  +
  +    2005-09-07 Vicki Murley  <vicki at apple.com>
  +
  +        Reviewed by Justin.
  + 
  +        - fix <rdar://problem/4246096> REGRESSION links to named anchors don't scroll to the right place (4825)
  +
  +        This is really just a better fix for 4233844. Also consolidated manual-tests/scrollToAnchorWithNewline.html
  +	and the test case from Bugzilla bug 4825 into manual-tests/scrollToAnchor.html.
  +
  +        Test cases added:
  +        * manual-tests/scrollToAnchor.html: Added.
  +
  +        * khtml/xml/dom_nodeimpl.cpp:
  +        (DOM::ContainerNodeImpl::getUpperLeftCorner): when calculating scroll position, skip child nodes of the anchor
  +        if they do not have text boxes.
  +
   2005-09-08  Adele Peterson  <adele at apple.com>
   
           Merged fix from TOT to Safari-2-0-branch
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.140.8.8 +4 -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.140.8.7
  retrieving revision 1.140.8.8
  diff -u -r1.140.8.7 -r1.140.8.8
  --- dom_nodeimpl.cpp	1 Sep 2005 01:01:51 -0000	1.140.8.7
  +++ dom_nodeimpl.cpp	9 Sep 2005 17:49:26 -0000	1.140.8.8
  @@ -2146,7 +2146,10 @@
               }
               o = next;
           }
  -        if((o->isText() && !o->isBR() && static_cast<RenderText*>(o)->firstTextBox()) || o->isReplaced()) {
  +        if (o->parent()->element() == this && !static_cast<RenderText*>(o)->firstTextBox() ) {
  +            // do nothing - skip child node of the named anchor if it doesn't have a text box rdar://problems/4233844&4246096
  +        }
  +        else if((o->isText() && !o->isBR()) || o->isReplaced()) {
               o->container()->absolutePosition( xPos, yPos );
               if (o->isText())
                   xPos += static_cast<RenderText *>(o)->minXPos();
  
  
  



More information about the webkit-changes mailing list