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

Issue 2905593002: Clients.matchAll() should return ordered clients by type/focus time/creation time (Closed)

Created:
3 years, 7 months ago by xiaofengzhang
Modified:
3 years, 6 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, blink-reviews, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Clients.matchAll() should return ordered clients by type/focus time/creation time According to current service worker specification, sort matchedClients such that: 1) WindowClient objects are always placed before worker clients. 2) WindowClient objects that have been focused are placed first sorted in the most recently focused order, and WindowClient objects that have never been focused are placed in their creation order. 3) WorkerClients are placed in their creation order. Current implementation only considers the focus time. BUG=701233 Review-Url: https://codereview.chromium.org/2905593002 Cr-Commit-Position: refs/heads/master@{#476935} Committed: https://chromium.googlesource.com/chromium/src/+/5c3497c94f604dee3cfe64ca84a7828a7b9bec04

Patch Set 1 #

Total comments: 3

Patch Set 2 : Totally follow the matchAll specification #

Total comments: 11

Patch Set 3 : Address shimazu's comments #16 #

Total comments: 25

Patch Set 4 : Address shimazu's comments #24 and leon's #21 #

Total comments: 8

Patch Set 5 : Address shimazu's comments #31 #

Patch Set 6 : for test failure #

Patch Set 7 : Address shimazu's comments #31 and fix the test failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -90 lines) Patch
M content/browser/service_worker/service_worker_client_utils.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_client_utils.cc View 1 2 3 4 5 6 14 chunks +62 lines, -35 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M content/common/service_worker/service_worker_client_info.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_client_info.cc View 3 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 2 chunks +0 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-order.https-expected.txt View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac-mac10.10/external/wpt/service-workers/service-worker/clients-matchall-order.https-expected.txt View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/service-workers/service-worker/clients-matchall-order.https-expected.txt View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download
D third_party/WebKit/LayoutTests/platform/mac/external/wpt/service-workers/service-worker/clients-matchall-order.https-expected.txt View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/service-workers/service-worker/clients-matchall-order.https-expected.txt View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download
D third_party/WebKit/LayoutTests/platform/win7/external/wpt/service-workers/service-worker/clients-matchall-order.https-expected.txt View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 58 (37 generated)
xiaofengzhang
https://codereview.chromium.org/2905593002/diff/1/content/browser/service_worker/service_worker_client_utils.cc File content/browser/service_worker/service_worker_client_utils.cc (right): https://codereview.chromium.org/2905593002/diff/1/content/browser/service_worker/service_worker_client_utils.cc#newcode372 content/browser/service_worker/service_worker_client_utils.cc:372: // Find the subgroud that ever been focused subgroud ...
3 years, 7 months ago (2017-05-24 06:07:33 UTC) #3
leonhsl(Using Gerrit)
https://codereview.chromium.org/2905593002/diff/1/content/browser/service_worker/service_worker_client_utils.cc File content/browser/service_worker/service_worker_client_utils.cc (right): https://codereview.chromium.org/2905593002/diff/1/content/browser/service_worker/service_worker_client_utils.cc#newcode317 content/browser/service_worker/service_worker_client_utils.cc:317: base::TimeTicks(), host_client_type); Use host->create_time() ? https://codereview.chromium.org/2905593002/diff/1/content/browser/service_worker/service_worker_client_utils.cc#newcode513 content/browser/service_worker/service_worker_client_utils.cc:513: base::TimeTicks(), base::TimeTicks(), ...
3 years, 7 months ago (2017-05-24 07:26:31 UTC) #4
xiaofengzhang
Hi shimazu, PTAL, thanks :-)
3 years, 7 months ago (2017-05-24 08:46:58 UTC) #9
shimazu
Thanks for working on this:) For the nested iframe test, I'm guessing the problem is ...
3 years, 7 months ago (2017-05-25 08:56:26 UTC) #16
xiaofengzhang
And do you think we should modify the clients-matchall-order.https-expected.txt in other platforms like ./third_party/WebKit/LayoutTests/platform/win7/, etc.. ...
3 years, 7 months ago (2017-05-26 04:01:28 UTC) #17
leonhsl(Using Gerrit)
https://codereview.chromium.org/2905593002/diff/40001/content/browser/service_worker/service_worker_client_utils.cc File content/browser/service_worker/service_worker_client_utils.cc (right): https://codereview.chromium.org/2905593002/diff/40001/content/browser/service_worker/service_worker_client_utils.cc#newcode357 content/browser/service_worker/service_worker_client_utils.cc:357: if (a.last_focus_time != b.last_focus_time) I suggest we keep the ...
3 years, 7 months ago (2017-05-26 05:48:38 UTC) #21
shimazu
> And do you think we should modify the clients-matchall-order.https-expected.txt in other platforms like ./third_party/WebKit/LayoutTests/platform/win7/, ...
3 years, 7 months ago (2017-05-26 08:10:08 UTC) #24
xiaofengzhang
https://codereview.chromium.org/2905593002/diff/40001/content/browser/service_worker/service_worker_client_utils.cc File content/browser/service_worker/service_worker_client_utils.cc (right): https://codereview.chromium.org/2905593002/diff/40001/content/browser/service_worker/service_worker_client_utils.cc#newcode357 content/browser/service_worker/service_worker_client_utils.cc:357: if (a.last_focus_time != b.last_focus_time) On 2017/05/26 05:48:38, leonhsl wrote: ...
3 years, 7 months ago (2017-05-26 13:57:48 UTC) #25
xiaofengzhang
Hi shimazu, please help to review again, thanks :-) https://codereview.chromium.org/2905593002/diff/40001/content/browser/service_worker/service_worker_client_utils.cc File content/browser/service_worker/service_worker_client_utils.cc (right): https://codereview.chromium.org/2905593002/diff/40001/content/browser/service_worker/service_worker_client_utils.cc#newcode357 content/browser/service_worker/service_worker_client_utils.cc:357: ...
3 years, 7 months ago (2017-05-27 05:27:43 UTC) #30
shimazu
Thanks for updating! The patch looks mostly good. Let me add only a few comments. ...
3 years, 6 months ago (2017-05-29 01:45:13 UTC) #31
xiaofengzhang
Hi shimazu, please help review patch set #7, thanks. https://codereview.chromium.org/2905593002/diff/60001/content/browser/service_worker/service_worker_client_utils.cc File content/browser/service_worker/service_worker_client_utils.cc (right): https://codereview.chromium.org/2905593002/diff/60001/content/browser/service_worker/service_worker_client_utils.cc#newcode360 content/browser/service_worker/service_worker_client_utils.cc:360: ...
3 years, 6 months ago (2017-06-01 01:00:42 UTC) #45
shimazu
Thanks! Let me confirm the test failure just in case... I expect the change is ...
3 years, 6 months ago (2017-06-01 09:50:49 UTC) #46
xiaofengzhang
On 2017/06/01 09:50:49, shimazu wrote: > Thanks! Let me confirm the test failure just in ...
3 years, 6 months ago (2017-06-02 01:39:13 UTC) #47
xiaofengzhang
On 2017/06/02 01:39:13, xiaofengzhang wrote: > On 2017/06/01 09:50:49, shimazu wrote: > > Thanks! Let ...
3 years, 6 months ago (2017-06-02 01:41:10 UTC) #48
xiaofengzhang
On 2017/06/02 01:41:10, xiaofengzhang wrote: > On 2017/06/02 01:39:13, xiaofengzhang wrote: > > On 2017/06/01 ...
3 years, 6 months ago (2017-06-02 01:48:04 UTC) #49
xiaofengzhang
On 2017/06/01 09:50:49, shimazu wrote: > Thanks! Let me confirm the test failure just in ...
3 years, 6 months ago (2017-06-05 01:18:59 UTC) #50
shimazu
On 2017/06/05 01:18:59, xiaofengzhang wrote: > On 2017/06/01 09:50:49, shimazu wrote: > > Thanks! Let ...
3 years, 6 months ago (2017-06-05 01:22:03 UTC) #51
shimazu
Really thanks, lgtm :) https://codereview.chromium.org/2905593002/diff/60001/content/browser/service_worker/service_worker_client_utils.cc File content/browser/service_worker/service_worker_client_utils.cc (right): https://codereview.chromium.org/2905593002/diff/60001/content/browser/service_worker/service_worker_client_utils.cc#newcode364 content/browser/service_worker/service_worker_client_utils.cc:364: return a.create_time < b.create_time; On ...
3 years, 6 months ago (2017-06-05 01:48:43 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2905593002/210001
3 years, 6 months ago (2017-06-05 01:50:50 UTC) #54
leonhsl(Using Gerrit)
Hi, Thanks for mail. I'm on vacation so may respond slowly. Will get back office ...
3 years, 6 months ago (2017-06-05 01:51:00 UTC) #55
commit-bot: I haz the power
3 years, 6 months ago (2017-06-05 03:30:07 UTC) #58
Message was sent while issue was closed.
Committed patchset #7 (id:210001) as
https://chromium.googlesource.com/chromium/src/+/5c3497c94f604dee3cfe64ca84a7...

Powered by Google App Engine
This is Rietveld 408576698