Changeset 281126 in webkit
- Timestamp:
- Aug 16, 2021 9:32:23 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/Navigator.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r281125 r281126 1 2021-08-16 Devin Rousso <drousso@apple.com> 2 3 Web Share CanShare() should be called after transient activation check 4 https://bugs.webkit.org/show_bug.cgi?id=229132 5 6 Reviewed by Tim Horton. 7 8 * web-platform-tests/web-share/share-consume-activation.https-expected.txt: 9 1 10 2021-08-16 Alex Christensen <achristensen@webkit.org> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-share/share-consume-activation.https-expected.txt
r264564 r281126 1 1 2 FAIL Calling share consumes user activation promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException NotAllowedError: property "code" is equal to undefined, expected 0 2 PASS Calling share consumes user activation 3 3 -
trunk/Source/WebCore/ChangeLog
r281125 r281126 1 2021-08-16 Devin Rousso <drousso@apple.com> 2 3 Web Share CanShare() should be called after transient activation check 4 https://bugs.webkit.org/show_bug.cgi?id=229132 5 6 Reviewed by Tim Horton. 7 8 Test: web-platform-tests/web-share/share-consume-activation.https.html 9 10 * page/Navigator.cpp: 11 (WebCore::Navigator::share): 12 1 13 2021-08-16 Alex Christensen <achristensen@webkit.org> 2 14 -
trunk/Source/WebCore/page/Navigator.cpp
r278253 r281126 144 144 void Navigator::share(Document& document, const ShareData& data, Ref<DeferredPromise>&& promise) 145 145 { 146 if (m_hasPendingShare) { 147 promise->reject(NotAllowedError); 148 return; 149 } 150 151 auto* window = this->window(); 152 if (!window || !window->consumeTransientActivation()) { 153 promise->reject(NotAllowedError); 154 return; 155 } 156 146 157 if (!canShare(document, data)) { 147 158 promise->reject(TypeError); 148 return;149 }150 151 auto* window = this->window();152 // Note that the specification does not indicate we should consume user activation. We are intentionally stricter here.153 if (!window || !window->consumeTransientActivation() || m_hasPendingShare) {154 promise->reject(NotAllowedError);155 159 return; 156 160 }
Note: See TracChangeset
for help on using the changeset viewer.