<?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>13933</bug_id>
          
          <creation_ts>2007-05-30 11:00:23 -0700</creation_ts>
          <short_desc>REGRESSION: fast/history/clicked-link-is-visited is failing</short_desc>
          <delta_ts>2007-06-10 15:30:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>History</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://build.webkit.org/results/post-commit-powerpc-mac-os-x/6871/fast/history/clicked-link-is-visited-diffs.txt</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, LayoutTestFailure, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Beth Dakin">bdakin</assigned_to>
          <cc>adele</cc>
    
    <cc>bdakin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8733</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-05-30 11:00:23 -0700</bug_when>
    <thetext>fast/history/clicked-link-is-visited is failing on the buildbot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8738</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-05-30 11:02:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/5237078&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8095</commentid>
    <comment_count>2</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-08 15:15:09 -0700</bug_when>
    <thetext>This does not seem to reproduce outside of DumpRenderTree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8093</commentid>
    <comment_count>3</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-08 16:17:52 -0700</bug_when>
    <thetext>Looks like this was caused by http://trac.webkit.org/projects/webkit/changeset/21649</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8086</commentid>
    <comment_count>4</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-08 16:54:27 -0700</bug_when>
    <thetext>Working on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8087</commentid>
    <comment_count>5</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-08 19:09:37 -0700</bug_when>
    <thetext>This is difficult to debug because it only happens within DRT and only when you run the entire fast directory, but I have re-arranged the code a bit to get some clues, and I think that this is failing because of the reliance on having a page in the  EventHandler::focusDocumentView(), which does seems a bit hard to believe, but it seems like that is the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8088</commentid>
    <comment_count>6</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-08 20:33:59 -0700</bug_when>
    <thetext>Actually, that last assessment was incorrect, but what is actually going on is even crazier. This failure has nothing to do with Adele&apos;s code change. Instead, it has to do with the test that she added! Deleting that test makes this test pass every time! One I discovered this, I tried to run the two tests back-to-back to see if the failure would reproduce, and it would not. After a lot of testing and reducing, I cam up with a reduced case, which is to run the following three tests in DRT in order:

fast/frames/empty.html
fast/frames/frame-display-none-focus.html (This is the test Adele added)
fast/history/clicked-link-is-visited.html

fast/frames/empty.html is not a real test. And it really is empty. For some reason, though, some test, any test!, needs to run before Adele&apos;s test to see the bug. 

So, with THIS reduction, I discovered that the problematic part of Adele&apos;s test is:

                if (parent.location.href.indexOf(&apos;?&apos;) == -1) {
                    parent.location.href= parent.location.href + &quot;?&quot;;
                }

Removing that part of the test, also makes this other test succeed.

I have NO idea how adding a &quot;?&quot; to the parent href would end up affecting history in a later test. I have not figured this out yet at all. 

But I am also curious about why that is needed for the test anyway. I may test if removing those lines will still make the test a valid layout test for the original issue, but I doubt that Adele would have left it in if it were not necessary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8066</commentid>
    <comment_count>7</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2007-06-08 21:14:25 -0700</bug_when>
    <thetext>The whole &apos;?&apos; thing is to avoid getting in an infinite loop of reloading the page.  You need to change the href to trigger a reload, but you only want to do it once.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7996</commentid>
    <comment_count>8</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-10 12:33:46 -0700</bug_when>
    <thetext>I re-wrote the test to reload in a different way, and it still caused the other test to fail. So there is something about reloading this page that causes the history/link-coloring test to fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7994</commentid>
    <comment_count>9</comment_count>
      <attachid>14926</attachid>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-10 15:06:52 -0700</bug_when>
    <thetext>Created attachment 14926
Fix Adele&apos;s test to reload through DRT

I have a fix! Having the test reload through DRT&apos;s queueReload mechanism fixes the problem. I confirmed that this is still a valid test for the bug it originally fixed by rolling Adele&apos;s patch out of my tree. And sure enough, with Adele&apos;s patch gone, this new test also crashes. (Meaning it&apos;s valid!) My totally-pulled-out-of-my-ass threory is that reloading through JS got DRT&apos;s history all messed up. Maybe off-by-one? So DRT did not color the link the visited color because it did not make it into the history list yet. Or something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7993</commentid>
    <comment_count>10</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-10 15:08:13 -0700</bug_when>
    <thetext>By the way, we should probably fix this problem in DRT. But right now, it is more important to have a green bot. And this is the fastest path to a green bot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7988</commentid>
    <comment_count>11</comment_count>
      <attachid>14926</attachid>
    <who name="Adele Peterson">adele</who>
    <bug_when>2007-06-10 15:20:55 -0700</bug_when>
    <thetext>Comment on attachment 14926
Fix Adele&apos;s test to reload through DRT

dear beth,

you rock.

from, adele</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7989</commentid>
    <comment_count>12</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2007-06-10 15:30:14 -0700</bug_when>
    <thetext>Dear Adele, 

YOU TOOOO!

From, Beth

p.s. Fixed with r22087
p.p.s. adeleandbethrock.com</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>14926</attachid>
            <date>2007-06-10 15:06:52 -0700</date>
            <delta_ts>2007-06-10 15:20:55 -0700</delta_ts>
            <desc>Fix Adele&apos;s test to reload through DRT</desc>
            <filename>lastLT.txt</filename>
            <type>text/plain</type>
            <size>1416</size>
            <attacher name="Beth Dakin">bdakin</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDIyMDc2
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTUgQEAKKzIwMDctMDYt
MTAgIGRldGhiYWtpbiAgPGJkYWtpbkBhcHBsZS5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkg
Tk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgRml4IGZvciBodHRwOi8vYnVncy53ZWJraXQub3Jn
L3Nob3dfYnVnLmNnaT9pZD0xMzkzMyBSRUdSRVNTSU9OOiAKKyAgICAgICAgZmF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5ocmVmICsgIj8iOwotICAgICAgICAgICAgICAgIH0KKyAgICAgICAg
ICAgICAgICBpZiAoIWxheW91dFRlc3RDb250cm9sbGVyLmJvbykKKyAgICAgICAgICAgICAgICAg
ICAgcmV0dXJuOworCisgICAgICAgICAgICAgICAgbGF5b3V0VGVzdENvbnRyb2xsZXIuYm9vID0g
ZmFsc2U7CisgICAgICAgICAgICAgICAgbGF5b3V0VGVzdENvbnRyb2xsZXIucXVldWVSZWxvYWQ7
CiAgICAgICAgICAgICB9CiAgICAgICAgIDwvc2NyaXB0PgogICAgIDwvaGVhZD4K
</data>
<flag name="review"
          id="6167"
          type_id="1"
          status="+"
          setter="adele"
    />
          </attachment>
      

    </bug>

</bugzilla>