Changeset 192810 in webkit
- Timestamp:
- Nov 30, 2015 11:27:26 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r192806 r192810 1 2015-11-30 Chris Dumez <cdumez@apple.com> 2 3 location.origin is undefined in a web worker 4 https://bugs.webkit.org/show_bug.cgi?id=151614 5 6 Reviewed by Darin Adler. 7 8 Update existing layout test to confirm the existence of location.origin when in a 9 WorkerGlobalScope. 10 11 * fast/workers/resources/worker-location.js: 12 * fast/workers/worker-location-expected.txt: 13 1 14 2015-11-30 Brady Eidson <beidson@apple.com> 2 15 -
trunk/LayoutTests/fast/workers/resources/worker-location.js
r124680 r192810 31 31 worker.postMessage("eval location.search"); 32 32 worker.postMessage("eval location.hash"); 33 worker.postMessage("eval location.origin"); 33 34 worker.postMessage("eval foo//bar"); 34 35 -
trunk/LayoutTests/fast/workers/worker-location-expected.txt
r39289 r192810 12 12 location.search: 13 13 location.hash: 14 location.origin: file:// 14 15 DONE 15 16 -
trunk/Source/WebCore/ChangeLog
r192806 r192810 1 2015-11-30 Chris Dumez <cdumez@apple.com> 2 3 location.origin is undefined in a web worker 4 https://bugs.webkit.org/show_bug.cgi?id=151614 5 6 Reviewed by Darin Adler. 7 8 Expose location.origin to web workers, as per: 9 https://html.spec.whatwg.org/multipage/workers.html#workerlocation 10 11 This behavior is consistent with the behavior of Firefox and Chrome. 12 13 Test: fast/workers/worker-location.html 14 15 * workers/WorkerLocation.cpp: 16 (WebCore::WorkerLocation::origin): 17 * workers/WorkerLocation.h: 18 * workers/WorkerLocation.idl: 19 1 20 2015-11-30 Brady Eidson <beidson@apple.com> 2 21 -
trunk/Source/WebCore/workers/WorkerLocation.cpp
r165676 r192810 26 26 27 27 #include "config.h" 28 29 28 #include "WorkerLocation.h" 30 29 30 #include "SecurityOrigin.h" 31 31 #include <wtf/text/WTFString.h> 32 32 … … 73 73 } 74 74 75 String WorkerLocation::origin() const 76 { 77 return SecurityOrigin::create(m_url)->toString(); 78 } 75 79 76 80 } // namespace WebCore -
trunk/Source/WebCore/workers/WorkerLocation.h
r177733 r192810 55 55 String search() const; 56 56 String hash() const; 57 String origin() const; 57 58 58 59 String toString() const { return href(); } -
trunk/Source/WebCore/workers/WorkerLocation.idl
r171824 r192810 40 40 readonly attribute DOMString search; 41 41 readonly attribute DOMString hash; 42 readonly attribute DOMString origin; 42 43 43 44 [NotEnumerable] DOMString toString();
Note: See TracChangeset
for help on using the changeset viewer.