[Webkit-unassigned] [Bug 51387] when open a link with empty target frame, always create a new window

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 5 01:12:00 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=51387





--- Comment #3 from ZhangYong <leonzy at gmail.com>  2011-01-05 01:12:00 PST ---
sorry, the patch need a fix
 @@ -288,8 +288,11 @@ void FrameLoader::urlSelected(const ResourceRequest& request, const String& pass
          return;

      String target = passedTarget;
 -    if (target.isEmpty())
 +    if (target.isEmpty()) {
          target = m_frame->document()->baseTarget();
 +        if (target.isEmpty())
 +            target = "_self";
 +    }

      FrameLoadRequest frameRequest(request, target);

(In reply to comment #2)
> try this:
> http://club3.kdnet.net/dispbbs.asp?boardid=1&id=6659651
> (note it is in Chinese!)
> 
> Click the page number (at the bottom of the page), it will open a new tab while IE&firefox will open in current tab.
> 
> I've fix this problem, code as below:
> 
> @@ -288,8 +288,11 @@ void FrameLoader::urlSelected(const ResourceRequest& request, const String& pass
>          return;
> 
>      String target = passedTarget;
> -    if (target.isEmpty())
> +    if (target.isEmpty()) {
>          target = m_frame->document()->baseTarget();
> +        if (target == "_blank")
> +            target = "_self";
> +    }
> 
>      FrameLoadRequest frameRequest(request, target);

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list