[webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Jochen Eisinger
Hey,

in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing window.focus
and window.blur to match Firefox's behavior: window.blur does nothing, and
window.focus only works when invoked from the window that actually opened
the former.

The goal is to thwart so-called pop unders.

Does any port want to have this new behavior configurable by e.g. a setting?

Feel free to directly comment on the bug.

best
-jochen
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Eric Seidel
So this would just make pop-unders turn into pop-overs correct?

On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.org wrote:
 Hey,

 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing window.focus
 and window.blur to match Firefox's behavior: window.blur does nothing, and
 window.focus only works when invoked from the window that actually opened
 the former.

 The goal is to thwart so-called pop unders.

 Does any port want to have this new behavior configurable by e.g. a setting?

 Feel free to directly comment on the bug.

 best
 -jochen

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Eric Seidel
Resent from the correct account.

On Mon, May 21, 2012 at 4:16 AM, Eric Seidel esei...@google.com wrote:
 So this would just make pop-unders turn into pop-overs correct?

 On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.org wrote:
 Hey,

 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing window.focus
 and window.blur to match Firefox's behavior: window.blur does nothing, and
 window.focus only works when invoked from the window that actually opened
 the former.

 The goal is to thwart so-called pop unders.

 Does any port want to have this new behavior configurable by e.g. a setting?

 Feel free to directly comment on the bug.

 best
 -jochen

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Jochen Eisinger
On Mon, May 21, 2012 at 1:16 PM, Eric Seidel esei...@google.com wrote:

 So this would just make pop-unders turn into pop-overs correct?


Correct. Keep in mind that at this point, our logic already decided that
it's ok for the page to show a popup

-jochen



 On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.org
 wrote:
  Hey,
 
  in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing
 window.focus
  and window.blur to match Firefox's behavior: window.blur does nothing,
 and
  window.focus only works when invoked from the window that actually opened
  the former.
 
  The goal is to thwart so-called pop unders.
 
  Does any port want to have this new behavior configurable by e.g. a
 setting?
 
  Feel free to directly comment on the bug.
 
  best
  -jochen
 
  ___
  webkit-dev mailing list
  webkit-dev@lists.webkit.org
  http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Adele Peterson
I have a non-specific concern about compatibility here.  I think a setting 
would be good to allow ports to have bake time if they want it.

- Adele

On May 21, 2012, at 2:17 AM, Jochen Eisinger wrote:

 Hey,
 
 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing window.focus 
 and window.blur to match Firefox's behavior: window.blur does nothing, and 
 window.focus only works when invoked from the window that actually opened the 
 former.
 
 The goal is to thwart so-called pop unders.
 
 Does any port want to have this new behavior configurable by e.g. a setting?
 
 Feel free to directly comment on the bug.
 
 best
 -jochen
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Jochen Eisinger
On Mon, May 21, 2012 at 8:17 PM, Eric Seidel e...@webkit.org wrote:

 So the goal (FF's goal) is to guilt the site into not using pop-ups
 anymore? Since they don't want to take you away from their content (as
 pop-unders allow them to do?)



I don't think this changed a lot since FF started to do this (quite a while
ago). However, I think it's less annoying this just hit Cmd-W vs hunting
down the popup on my desktop before I can actually close it.



 My first thought was that we might as well just nuke/block the pop-up
 if it calls blur() (and log to the console somewhere).  But perhaps we
 can try that in a year if this fails to produce results. :)


I agree that popup blocking per se (even it's up or under doesn't really
matter) could be improved, and maybe calls to window.blur() are a good
signal.

-jochen




 On Mon, May 21, 2012 at 4:17 AM, Jochen Eisinger joc...@chromium.org
 wrote:
 
 
  On Mon, May 21, 2012 at 1:16 PM, Eric Seidel esei...@google.com wrote:
 
  So this would just make pop-unders turn into pop-overs correct?
 
 
  Correct. Keep in mind that at this point, our logic already decided that
  it's ok for the page to show a popup
 
  -jochen
 
 
 
  On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.org
  wrote:
   Hey,
  
   in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing
   window.focus
   and window.blur to match Firefox's behavior: window.blur does nothing,
   and
   window.focus only works when invoked from the window that actually
   opened
   the former.
  
   The goal is to thwart so-called pop unders.
  
   Does any port want to have this new behavior configurable by e.g. a
   setting?
  
   Feel free to directly comment on the bug.
  
   best
   -jochen
  
   ___
   webkit-dev mailing list
   webkit-dev@lists.webkit.org
   http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
  
 
 

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Andrew Wilson
On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.orgwrote:

 Hey,

 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing
 window.focus and window.blur to match Firefox's behavior: window.blur does
 nothing, and window.focus only works when invoked from the window that
 actually opened the former.

 The goal is to thwart so-called pop unders.


The new behavior you describe will break notifications, since many pages
will want to bring themselves to the front when someone clicks on their
notification, and your patch prevents this. I suspect that the Firefox
behavior will need to change when they add support for notifications.

I still think that a superior change would be to prevent applications from
calling window.focus() or window.blur() in the context of a user gesture
once they've opened a new window. This would address popunders, while still
allowing notifications to work.



 Does any port want to have this new behavior configurable by e.g. a
 setting?

 Feel free to directly comment on the bug.

 best
 -jochen

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Maciej Stachowiak

On May 21, 2012, at 12:16 PM, Andrew Wilson atwil...@google.com wrote:

 
 
 On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.org wrote:
 Hey,
 
 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing window.focus 
 and window.blur to match Firefox's behavior: window.blur does nothing, and 
 window.focus only works when invoked from the window that actually opened the 
 former.
 
 The goal is to thwart so-called pop unders.
 
 The new behavior you describe will break notifications, since many pages will 
 want to bring themselves to the front when someone clicks on their 
 notification,

Not necessarily for or against the change, but we could (and probably should) 
make notifications do this automatically. Is there any case where clicking a 
notifiicatin should not bring the relevant page to the front?

 - Maciej

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Jochen Eisinger
On Mon, May 21, 2012 at 9:16 PM, Andrew Wilson atwil...@google.com wrote:



 On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.orgwrote:

 Hey,

 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing
 window.focus and window.blur to match Firefox's behavior: window.blur does
 nothing, and window.focus only works when invoked from the window that
 actually opened the former.

 The goal is to thwart so-called pop unders.


 The new behavior you describe will break notifications, since many pages
 will want to bring themselves to the front when someone clicks on their
 notification, and your patch prevents this. I suspect that the Firefox
 behavior will need to change when they add support for notifications.

 I still think that a superior change would be to prevent applications from
 calling window.focus() or window.blur() in the context of a user gesture
 once they've opened a new window. This would address popunders, while still
 allowing notifications to work.


The web page could just use setTimeout your restriction to work around
this, no?

-jochen




 Does any port want to have this new behavior configurable by e.g. a
 setting?

 Feel free to directly comment on the bug.

 best
 -jochen

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Andrew Wilson
On Mon, May 21, 2012 at 12:21 PM, Maciej Stachowiak m...@apple.com wrote:


 On May 21, 2012, at 12:16 PM, Andrew Wilson atwil...@google.com wrote:



 On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.orgwrote:

 Hey,

 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing
 window.focus and window.blur to match Firefox's behavior: window.blur does
 nothing, and window.focus only works when invoked from the window that
 actually opened the former.

 The goal is to thwart so-called pop unders.


 The new behavior you describe will break notifications, since many pages
 will want to bring themselves to the front when someone clicks on their
 notification,


 Not necessarily for or against the change, but we could (and probably
 should) make notifications do this automatically. Is there any case where
 clicking a notifiicatin should not bring the relevant page to the front?


Yes. For example, in gmail, if you click on an email notification, we open
a new window and display that email. We don't want to bring the parent to
the front in that case.



  - Maciej


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Andrew Wilson
On Mon, May 21, 2012 at 12:21 PM, Jochen Eisinger joc...@chromium.orgwrote:



 On Mon, May 21, 2012 at 9:16 PM, Andrew Wilson atwil...@google.comwrote:



 On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.orgwrote:

 Hey,

 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing
 window.focus and window.blur to match Firefox's behavior: window.blur does
 nothing, and window.focus only works when invoked from the window that
 actually opened the former.

 The goal is to thwart so-called pop unders.


 The new behavior you describe will break notifications, since many pages
 will want to bring themselves to the front when someone clicks on their
 notification, and your patch prevents this. I suspect that the Firefox
 behavior will need to change when they add support for notifications.

 I still think that a superior change would be to prevent applications
 from calling window.focus() or window.blur() in the context of a user
 gesture once they've opened a new window. This would address popunders,
 while still allowing notifications to work.


 The web page could just use setTimeout your restriction to work around
 this, no?


No, because the setTimeout() callback would be executed outside the context
of a user gesture.



 -jochen




 Does any port want to have this new behavior configurable by e.g. a
 setting?

 Feel free to directly comment on the bug.

 best
 -jochen

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev




___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Maciej Stachowiak

On May 21, 2012, at 12:24 PM, Andrew Wilson atwil...@google.com wrote:

 
 
 On Mon, May 21, 2012 at 12:21 PM, Maciej Stachowiak m...@apple.com wrote:
 
 On May 21, 2012, at 12:16 PM, Andrew Wilson atwil...@google.com wrote:
 
 
 
 On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger joc...@chromium.org wrote:
 Hey,
 
 in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing window.focus 
 and window.blur to match Firefox's behavior: window.blur does nothing, and 
 window.focus only works when invoked from the window that actually opened 
 the former.
 
 The goal is to thwart so-called pop unders.
 
 The new behavior you describe will break notifications, since many pages 
 will want to bring themselves to the front when someone clicks on their 
 notification,
 
 Not necessarily for or against the change, but we could (and probably should) 
 make notifications do this automatically. Is there any case where clicking a 
 notifiicatin should not bring the relevant page to the front?
 
 Yes. For example, in gmail, if you click on an email notification, we open a 
 new window and display that email. We don't want to bring the parent to the 
 front in that case.

Fair enough. But it seems like we could find some way to handle notifications 
as a special case without giving windows the ability to alter the stacking 
order at any time, even if my first proposal is too crude.

Cheers,
Maciej


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Changes to window.focus/window.blur controlled by a setting?

2012-05-21 Thread Andy Estes

On May 21, 2012, at 12:25 PM, Andrew Wilson atwil...@google.com wrote:

 No, because the setTimeout() callback would be executed outside the context 
 of a user gesture.

This isn't always true. User gesture state is forwarded to the timeout's 
callback if the timeout was scheduled in the context of a user gesture and the 
interval is one second or less.

-Andy
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev