Skip to content

Commit 45152af

Browse files
Strip fragment identifier from ServiceWorker's scriptURL
https://bugs.webkit.org/show_bug.cgi?id=180887 Reviewed by Darin Adler. LayoutTests/imported/w3c: Rebaseline WPT test now that one more check is passing. * web-platform-tests/service-workers/service-worker/serviceworkerobject-scripturl.https-expected.txt: Source/WebCore: Strip fragment identifier from ServiceWorker's scriptURL to match Firefox and Chrome. This behavior does not appear to be specified so I filed: - w3c/ServiceWorker#1249 No new tests, rebaselined existing test. * workers/service/server/SWServerWorker.cpp: (WebCore::m_script): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@226014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 66d850a commit 45152af

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

LayoutTests/imported/w3c/ChangeLog

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2017-12-17 Chris Dumez <[email protected]>
2+
3+
Strip fragment identifier from ServiceWorker's scriptURL
4+
https://bugs.webkit.org/show_bug.cgi?id=180887
5+
6+
Reviewed by Darin Adler.
7+
8+
Rebaseline WPT test now that one more check is passing.
9+
10+
* web-platform-tests/service-workers/service-worker/serviceworkerobject-scripturl.https-expected.txt:
11+
112
2017-12-16 Romain Bellessort <[email protected]>
213

314
[Readable Streams API] Fix filling of descriptor from queue
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
PASS Verify the scriptURL property: relative
3-
FAIL Verify the scriptURL property: with-fragment assert_equals: Returned ServiceWorker object should have scriptURL expected "https://localhost:9443/service-workers/service-worker/resources/empty-worker.js" but got "https://localhost:9443/service-workers/service-worker/resources/empty-worker.js#ref"
3+
PASS Verify the scriptURL property: with-fragment
44
PASS Verify the scriptURL property: absolute
55

Source/WebCore/ChangeLog

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2017-12-17 Chris Dumez <[email protected]>
2+
3+
Strip fragment identifier from ServiceWorker's scriptURL
4+
https://bugs.webkit.org/show_bug.cgi?id=180887
5+
6+
Reviewed by Darin Adler.
7+
8+
Strip fragment identifier from ServiceWorker's scriptURL to match Firefox and Chrome.
9+
This behavior does not appear to be specified so I filed:
10+
- https://github.com/w3c/ServiceWorker/issues/1249
11+
12+
No new tests, rebaselined existing test.
13+
14+
* workers/service/server/SWServerWorker.cpp:
15+
(WebCore::m_script):
16+
117
2017-12-17 Antti Koivisto <[email protected]>
218

319
Move render tree updating related files under rendering/updating/

Source/WebCore/workers/service/server/SWServerWorker.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ SWServerWorker::SWServerWorker(SWServer& server, SWServerRegistration& registrat
5050
, m_data { identifier, scriptURL, ServiceWorkerState::Redundant, type, registration.identifier() }
5151
, m_script(script)
5252
{
53+
m_data.scriptURL.removeFragmentIdentifier();
54+
5355
auto result = allWorkers().add(identifier, this);
5456
ASSERT_UNUSED(result, result.isNewEntry);
5557
}

0 commit comments

Comments
 (0)