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

Vicki vicki at opensource.apple.com
Fri Oct 21 16:11:05 PDT 2005


vicki       05/10/21 16:11:04

  Modified:    .        ChangeLog
               khtml    khtml_part.cpp
  Log:
          Reviewed by John.
  
  	- fixed <rdar://problem/4304213> sometimes have to click twice to jump to top, on href=""
  
          * manual-tests/linkjump-1.html: Added.
          * khtml/khtml_part.cpp:
          (KHTMLPart::gotoAnchor): remove check for m_url.hasRef() - encodedHtmlRef and gotoAnchor handle empty
  	strings for scrolling to the top of the document
  
  Revision  Changes    Path
  1.258     +11 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.257
  retrieving revision 1.258
  diff -u -r1.257 -r1.258
  --- ChangeLog	21 Oct 2005 22:49:18 -0000	1.257
  +++ ChangeLog	21 Oct 2005 23:11:03 -0000	1.258
  @@ -1,3 +1,14 @@
  +2005-10-21  Vicki Murley  <vicki at apple.com>
  +
  +        Reviewed by John.
  + 
  +	- fixed <rdar://problem/4304213> sometimes have to click twice to jump to top, on href=""
  +
  +        * manual-tests/linkjump-1.html: Added.
  +        * khtml/khtml_part.cpp:
  +        (KHTMLPart::gotoAnchor): remove check for m_url.hasRef() - encodedHtmlRef and gotoAnchor handle empty 
  +	strings for scrolling to the top of the document
  +
   2005-10-21  John Sullivan  <sullivan at apple.com>
   
           No test cases added.
  
  
  
  1.347     +8 -10     WebCore/khtml/khtml_part.cpp
  
  Index: khtml_part.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/khtml_part.cpp,v
  retrieving revision 1.346
  retrieving revision 1.347
  diff -u -r1.346 -r1.347
  --- khtml_part.cpp	7 Oct 2005 01:21:40 -0000	1.346
  +++ khtml_part.cpp	21 Oct 2005 23:11:04 -0000	1.347
  @@ -1802,19 +1802,17 @@
   
   void KHTMLPart::gotoAnchor()
   {
  -    if (m_url.hasRef()) {
  -        QString ref = m_url.encodedHtmlRef();
  -        if (!gotoAnchor(ref)) {
  -            // Can't use htmlRef() here because it doesn't know which encoding to use to decode.
  -            // Decoding here has to match encoding in completeURL, which means it has to use the
  -            // page's encoding rather than UTF-8.
  -            if (d->m_decoder)
  +    QString ref = m_url.encodedHtmlRef();
  +    if (!gotoAnchor(ref)) {
  +        // Can't use htmlRef() here because it doesn't know which encoding to use to decode.
  +        // Decoding here has to match encoding in completeURL, which means it has to use the
  +        // page's encoding rather than UTF-8.
  +        if (d->m_decoder)
   #if !APPLE_CHANGES
  -                gotoAnchor(KURL::decode_string(ref, d->m_decoder->codec()->mibEnum()));
  +            gotoAnchor(KURL::decode_string(ref, d->m_decoder->codec()->mibEnum()));
   #else
  -                gotoAnchor(KURL::decode_string(ref, d->m_decoder->codec()));
  +            gotoAnchor(KURL::decode_string(ref, d->m_decoder->codec()));
   #endif
  -        }
       }
   }
   
  
  
  



More information about the webkit-changes mailing list