Bug 115906

Summary: Disallow a window to focus itself via javascript URLs or using target _self
Product: WebKit Reporter: jochen
Component: New BugsAssignee: jochen
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, ggaren, japhet, kling, mjs, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description jochen 2013-05-10 06:55:48 PDT
Disallow a window to focus itself via javascript URLs or using target _self
Comment 1 jochen 2013-05-10 06:57:09 PDT
Created attachment 201342 [details]
Patch
Comment 2 Geoffrey Garen 2013-05-10 14:08:51 PDT
What's the rationale for this change? Is this some sort of popup blocking, or something else?
Comment 3 jochen 2013-05-11 03:24:53 PDT
In http://trac.webkit.org/changeset/118916, I added a restriction to window.focus() that disallows a window to focus itself. Apparently, some popunder scripts are using this workaround to get around the window.focus() restriction.
Comment 4 Geoffrey Garen 2013-05-11 10:22:06 PDT
Comment on attachment 201342 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2013-05-11 12:08:21 PDT
Comment on attachment 201342 [details]
Patch

Clearing flags on attachment: 201342

Committed r149936: <http://trac.webkit.org/changeset/149936>
Comment 6 WebKit Commit Bot 2013-05-11 12:08:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Anne van Kesteren 2017-07-27 04:56:42 PDT
*** Bug 115706 has been marked as a duplicate of this bug. ***