Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1039)

Issue 777483004: Bind Window focus ability to the ExecutionContext instead of the process. (Closed)

Created:
6 years ago by mlamouri (slow - plz ping)
Modified:
6 years ago
CC:
jochen (gone - plz use gerrit), blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, falken, horo+watch_chromium.org, jsbell+serviceworker_chromium.org, kinuko+serviceworker, michaeln, nhiroki, rwlbuis, serviceworker-reviews, sof, tzik
Base URL:
https://chromium.googlesource.com/chromium/blink.git@sw_client_focus
Project:
blink
Visibility:
Public.

Description

Bind Window focus ability to the ExecutionContext instead of the process. WindowFocusAllowedIndicator is using a static variable that allows the entire process to focus a window. In addition, it is entirely stack based which prevents asynchronous methods to use it properly. By binding the window focus ability to the ExecutionContext, we can allow asynchronous methods but also, reduces the chances of unrelated scripts to focus windows when they should not be able to. Those two concerns are slightly related because an ExecutionContext will now be able to focus a window for a long period of time, thus, we do not want other ExecutionContext to be able to do that in the meantime. This is part of a three-sided CL: Part 1: <this> Part 2: https://codereview.chromium.org/786403003 Part 3: https://codereview.chromium.org/722423004 BUG=440740 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186849 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187285

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : review comments #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -15 lines) Patch
M LayoutTests/http/tests/serviceworker/client-focus.html View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/core.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/ExecutionContext.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/dom/ExecutionContext.cpp View 1 2 3 4 3 chunks +22 lines, -0 lines 0 comments Download
A Source/core/dom/ScopedWindowFocusAllowedIndicator.h View 1 1 chunk +24 lines, -0 lines 0 comments Download
A Source/core/dom/ScopedWindowFocusAllowedIndicator.cpp View 1 1 chunk +26 lines, -0 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 2 1 chunk +7 lines, -8 lines 0 comments Download
M Source/modules/notifications/Notification.cpp View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerClient.cpp View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M Source/modules/serviceworkers/WaitUntilObserver.cpp View 1 2 chunks +11 lines, -0 lines 0 comments Download
M Source/web/WebScopedWindowFocusAllowedIndicator.cpp View 1 2 chunks +11 lines, -0 lines 0 comments Download
M Source/web/tests/WebScopedWindowFocusAllowedIndicatorTest.cpp View 1 2 chunks +20 lines, -1 line 0 comments Download
M public/web/WebScopedWindowFocusAllowedIndicator.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (14 generated)
mlamouri (slow - plz ping)
Jochen, can you have a look? I wasn't able to test this more strongly in ...
6 years ago (2014-12-09 18:21:26 UTC) #2
mlamouri (slow - plz ping)
+mkwst@, if you want to have a look.
6 years ago (2014-12-09 18:22:09 UTC) #4
mlamouri (slow - plz ping)
FWIW, parts 2 and 3 are uploaded.
6 years ago (2014-12-10 12:32:10 UTC) #5
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/777483004/diff/20001/public/web/WebScopedWindowFocusAllowedIndicator.h File public/web/WebScopedWindowFocusAllowedIndicator.h (right): https://codereview.chromium.org/777483004/diff/20001/public/web/WebScopedWindowFocusAllowedIndicator.h#newcode45 public/web/WebScopedWindowFocusAllowedIndicator.h:45: WebScopedWindowFocusAllowedIndicator() { initialize(); } this constructor is now ...
6 years ago (2014-12-10 14:00:55 UTC) #6
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/777483004/diff/20001/public/web/WebScopedWindowFocusAllowedIndicator.h File public/web/WebScopedWindowFocusAllowedIndicator.h (right): https://codereview.chromium.org/777483004/diff/20001/public/web/WebScopedWindowFocusAllowedIndicator.h#newcode45 public/web/WebScopedWindowFocusAllowedIndicator.h:45: WebScopedWindowFocusAllowedIndicator() { initialize(); } this constructor is now ...
6 years ago (2014-12-10 14:00:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777483004/40001
6 years ago (2014-12-10 14:08:48 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://src.chromium.org/viewvc/blink?view=rev&revision=186849
6 years ago (2014-12-10 15:30:07 UTC) #10
amineer_google
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/803253003/ by amineer@google.com. ...
6 years ago (2014-12-15 22:57:47 UTC) #11
mlamouri (slow - plz ping)
On 2014/12/15 22:57:47, amineer wrote: > A revert of this CL (patchset #3 id:40001) has ...
6 years ago (2014-12-16 11:15:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777483004/40001
6 years ago (2014-12-16 11:16:01 UTC) #14
commit-bot: I haz the power
Failed to apply patch for Source/core/dom/ExecutionContext.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years ago (2014-12-16 11:16:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777483004/60001
6 years ago (2014-12-16 11:38:04 UTC) #18
commit-bot: I haz the power
Failed to apply patch for Source/core/dom/ExecutionContext.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years ago (2014-12-16 11:38:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777483004/60001
6 years ago (2014-12-16 15:13:25 UTC) #22
commit-bot: I haz the power
Failed to apply patch for Source/core/dom/ExecutionContext.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years ago (2014-12-16 15:13:50 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777483004/80001
6 years ago (2014-12-16 15:28:35 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/42078)
6 years ago (2014-12-16 16:18:58 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777483004/80001
6 years ago (2014-12-16 16:19:50 UTC) #30
commit-bot: I haz the power
Failed to apply patch for Source/modules/notifications/Notification.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years ago (2014-12-16 16:20:32 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777483004/100001
6 years ago (2014-12-16 17:47:48 UTC) #34
commit-bot: I haz the power
6 years ago (2014-12-16 19:17:47 UTC) #35
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=187285

Powered by Google App Engine
This is Rietveld 408576698