<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>59877</bug_id>
          
          <creation_ts>2011-05-01 10:05:22 -0700</creation_ts>
          <short_desc>[chromium]: Scroll position not restored on navigation back for in-page links</short_desc>
          <delta_ts>2022-02-27 23:35:49 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/2011/WD-css3-text-20110412/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nico Weber">thakis</reporter>
          <assigned_to name="Nate Chapin">japhet</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>bdakin</cc>
    
    <cc>eric</cc>
    
    <cc>mihaip</cc>
    
    <cc>progame+wk</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>395935</commentid>
    <comment_count>0</comment_count>
    <who name="Nico Weber">thakis</who>
    <bug_when>2011-05-01 10:05:22 -0700</bug_when>
    <thetext>1. Go to a page with in-page links, e.g. http://www.w3.org/TR/2011/WD-css3-text-20110412/
2. Scroll down to table of contens
3. Click any topic
4. Click &quot;Back&quot;

Expected: Scroll position from after step 2 is restored
Actual: Back button jumps to top of page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396250</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-05-01 23:18:45 -0700</bug_when>
    <thetext>&lt;rdar://problem/9366060&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396650</commentid>
    <comment_count>2</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2011-05-02 14:13:35 -0700</bug_when>
    <thetext>I believe this has been fixed already by http://trac.webkit.org/changeset/84604. I&apos;m not able to reproduce this with the most recent WebKit nightly (at r85429), but it does happen with one at r84547.

*** This bug has been marked as a duplicate of bug 57898 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396653</commentid>
    <comment_count>3</comment_count>
    <who name="Nico Weber">thakis</who>
    <bug_when>2011-05-02 14:15:43 -0700</bug_when>
    <thetext>Mihai: The problem repros for me in the chrome canary, which uses webkit r85369.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396659</commentid>
    <comment_count>4</comment_count>
    <who name="Nico Weber">thakis</who>
    <bug_when>2011-05-02 14:20:25 -0700</bug_when>
    <thetext>Turns out this doesn&apos;t repro in a webkit nightly. Sorry.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>397719</commentid>
    <comment_count>5</comment_count>
    <who name="Yair Yogev">progame+wk</who>
    <bug_when>2011-05-03 23:50:34 -0700</bug_when>
    <thetext>reproducible using 
Google Chrome	13.0.754.0 (Official Build 83837) canary
WebKit	534.33 (trunk@85565)

with the steps:
1. visit
http://ruby.railstutorial.org/chapters/rails-flavored-ruby#sec:strings
2. click on another in page link in that page (to a different location, for example &quot;4.2.1 Comments&quot; which is just above the original link position)
3. clicking back will bring you back to &quot;4.2.2 Strings&quot; instead of the location you viewed when clicking on  that other link</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>398221</commentid>
    <comment_count>6</comment_count>
      <attachid>92312</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2011-05-04 13:47:25 -0700</bug_when>
    <thetext>Created attachment 92312
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>398246</commentid>
    <comment_count>7</comment_count>
      <attachid>92312</attachid>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2011-05-04 14:13:08 -0700</bug_when>
    <thetext>Comment on attachment 92312
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=92312&amp;action=review

&gt; Source/WebKit/chromium/src/WebFrameImpl.cpp:1045
&gt; +    if (!m_inSameDocumentHistoryLoad &amp;&amp; (m_frame-&gt;loader()-&gt;loadType() == FrameLoadTypeStandard

Any ideas as to why we save the scroll state in a getter in the first place? As far as I can tell, that&apos;s been there since this code was upstreamed, but it still seems odd.

I would be curious what breaks if we remove this altogether, but that can be done separately, since I believe this is blocking a Chromium release. Maybe just a FIXME?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>398250</commentid>
    <comment_count>8</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2011-05-04 14:18:07 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (From update of attachment 92312 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=92312&amp;action=review
&gt; 
&gt; &gt; Source/WebKit/chromium/src/WebFrameImpl.cpp:1045
&gt; &gt; +    if (!m_inSameDocumentHistoryLoad &amp;&amp; (m_frame-&gt;loader()-&gt;loadType() == FrameLoadTypeStandard
&gt; 
&gt; Any ideas as to why we save the scroll state in a getter in the first place? As far as I can tell, that&apos;s been there since this code was upstreamed, but it still seems odd.
&gt; 
&gt; I would be curious what breaks if we remove this altogether, but that can be done separately, since I believe this is blocking a Chromium release. Maybe just a FIXME?

I don&apos;t know the full story, but I assume the comment is correct in that we can clobber HistoryItems otherwise.  I&apos;ve got a rare null-deref crash outstanding in this function, so I&apos;ll look into it more carefully in the near-ish future.  I&apos;ll add a FIXME before landing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>398257</commentid>
    <comment_count>9</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2011-05-04 14:32:53 -0700</bug_when>
    <thetext>Landed: http://trac.webkit.org/changeset/85787</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>398303</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-05-04 15:21:50 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/85787 might have broken Leopard Intel Debug (Tests)
The following tests are not passing:
svg/text/text-block-child-crash.xhtml</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>92312</attachid>
            <date>2011-05-04 13:47:25 -0700</date>
            <delta_ts>2022-02-27 23:35:49 -0800</delta_ts>
            <desc>patch</desc>
            <filename>hi.txt</filename>
            <type>text/plain</type>
            <size>2937</size>
            <attacher name="Nate Chapin">japhet</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvY2hyb21pdW0vc3JjL1dlYkZyYW1lSW1wbC5jcHAKPT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PQotLS0gU291cmNlL1dlYktpdC9jaHJvbWl1bS9zcmMvV2ViRnJhbWVJbXBsLmNwcAkocmV2
aXNpb24gODU3NjYpCisrKyBTb3VyY2UvV2ViS2l0L2Nocm9taXVtL3NyYy9XZWJGcmFtZUltcGwu
Y3BwCSh3b3JraW5nIGNvcHkpCkBAIC05NDUsOCArOTQ1LDEwIEBACiAgICAgICAgIG1fZnJhbWUt
PnBhZ2UoKS0+YmFja0ZvcndhcmQoKS0+c2V0Q3VycmVudEl0ZW0oY3VycmVudEl0ZW0uZ2V0KCkp
OwogICAgIH0KIAorICAgIG1faW5TYW1lRG9jdW1lbnRIaXN0b3J5TG9hZCA9IGN1cnJlbnRJdGVt
LT5zaG91bGREb1NhbWVEb2N1bWVudE5hdmlnYXRp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0wNS0wNCAgSmF5IENpdmVsbGkgIDxqY2l2ZWxsaUBjaHJvbWl1bS5vcmc+CiAKICAg
ICAgICAgUmV2aWV3ZWQgYnkgT2phbiBWYWZhaS4K
</data>
<flag name="review"
          id="85264"
          type_id="1"
          status="+"
          setter="mihaip"
    />
          </attachment>
      

    </bug>

</bugzilla>