<?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>16727</bug_id>
          
          <creation_ts>2008-01-03 22:24:40 -0800</creation_ts>
          <short_desc>Different frame navigation policy in various browsers.</short_desc>
          <delta_ts>2008-07-28 14:08:19 -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>Frames</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Yuzhu Shen">yuzhu.shen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>bdakin</cc>
    
    <cc>collinj</cc>
    
    <cc>sam</cc>
    
    <cc>webkit</cc>
    
    <cc>yuzhu.shen</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66173</commentid>
    <comment_count>0</comment_count>
    <who name="Yuzhu Shen">yuzhu.shen</who>
    <bug_when>2008-01-03 22:24:40 -0800</bug_when>
    <thetext>According to the policy discussed in bug 15936, I&apos;ve created a scenario
in which various browsers act differently.

Assume that the following files are located at http://aaa.bbb.com/
Note: If you want to try out this example, change the value of document.domain
accordingly in these files! It should be a suffix of the real domain in which
these files reside.
====================================
&lt;!-- navigation.htm --&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script language=&quot;javascript&quot;&gt;document.domain=&apos;bbb.com&apos;;&lt;/script&gt;
&lt;/head&gt;
&lt;frameset name=&quot;main&quot; cols=&quot;503,*&quot;&gt;
        &lt;frame name=&quot;left&quot; src=&quot;left.htm&quot; /&gt;
        &lt;frame name=&quot;right&quot; src=&quot;right.htm&quot; /&gt;
&lt;/frameset&gt;
&lt;/html&gt;
================================
&lt;!-- left.htm --&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;base target=&apos;right&apos;&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;a href=&apos;helloWorld.htm&apos;&gt;HelloWorld&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;
=================================
&lt;!-- right.htm --&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;script language=&quot;javascript&quot;&gt;document.domain=&apos;bbb.com&apos;;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
=================================
&lt;!-- helloWorld.htm --&gt;
&lt;html&gt;
&lt;body&gt;
    &lt;h1&gt;Hello World!&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;
=================================

Open navigation.htm, and then click the &quot;HelloWorld&quot; link:
IE7: will open the link in a new tab instead of the target frame.
IE6, Firefox2/3, Safari 3.0.3: will open the link in the target frame.
Current WebKit: will do nothing.

This problem affects a popular forum in China: http://dzh.mop.com
In this forum, if you click a link in the left panel, current WebKit will not
open the link. (Due to some other reasons, IE7 works fine with this site.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66177</commentid>
    <comment_count>1</comment_count>
    <who name="Collin Jackson">collinj</who>
    <bug_when>2008-01-03 22:49:44 -0800</bug_when>
    <thetext>When the browser&apos;s frame navigation policy wants to prevent a frame from being navigated, the most user-friendly behavior is to open a new window, as in IE7. I think the patch for bug 16522 will provide this behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66181</commentid>
    <comment_count>2</comment_count>
    <who name="Yuzhu Shen">yuzhu.shen</who>
    <bug_when>2008-01-03 23:31:39 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; When the browser&apos;s frame navigation policy wants to prevent a frame from being
&gt; navigated, the most user-friendly behavior is to open a new window, as in IE7.
&gt; I think the patch for bug 16522 will provide this behavior.
&gt; 

I have no right to access bug 16522. Has the patch been submitted into the WebKit code base? I compiled WebKit 2 or 3 hours ago, and ran safari with it. And it did exactly what I described in previous post.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66242</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2008-01-04 18:26:48 -0800</bug_when>
    <thetext>I tried using http://dzh.mop.com in IE7.  Clicking on links in the left-hand frame opens a new tab with the content.  WebKit should have the same behavior after the patch for Bug 16522 lands.

&gt; I have no right to access bug 16522. Has the patch been submitted into the
&gt; WebKit code base?

The patch has not been committed yet, but hopefully it will be soon.  I don&apos;t have authorization to add you to the bug, but it&apos;s a bug about this and one other issue with frame navigation.

If you&apos;d like the links to open in the right-hand frame instead of in new tabs in IE7 (and future-Safari), you can put the left-hand frame in the same origin as either the top or right-hand frame (or both).  The simplest way to do this is to set document.domain = &quot;mop.com&quot; in the left-hand frame.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66847</commentid>
    <comment_count>4</comment_count>
    <who name="Collin Jackson">collinj</who>
    <bug_when>2008-01-10 17:13:07 -0800</bug_when>
    <thetext>The behavior in WebKit (as of r29380) now matches the IE7 behavior. Clicking links in the left frame now causes a new window to be opened.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87217</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-07-28 14:08:19 -0700</bug_when>
    <thetext>After testing the reported issue I can report that WebKit, Firefox 3 and IE7 matches the same behavior - they open links in new tab/window. Only Opera 9.5 behaves differently, but I think they changes his behavior in a future.

I think we can close the report now since three major browsers behave identically now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>