Changeset 266151 in webkit
- Timestamp:
- Aug 25, 2020, 3:46:16 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r266149 r266151 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 17 2020-08-25 Per Arne Vollan <pvollan@apple.com> 2 18 -
trunk/LayoutTests/fast/web-share/share-transient-activation-expired.html
r264834 r266151 24 24 // Cause the transient activation to expire with a setTimeout. 25 25 setTimeout(() => { 26 navigator.share({ title: "Example Page", url: " url", text: "text" }).then((result) => {26 navigator.share({ title: "Example Page", url: "", text: "text" }).then((result) => { 27 27 write("FAIL: Share sheet invoked."); 28 28 testRunner.notifyDone(); -
trunk/LayoutTests/fast/web-share/share-transient-activation.html
r264834 r266151 19 19 document.getElementById("target").addEventListener("click", () => { 20 20 fetch("../files/resources/abe.png").then(() => { 21 navigator.share({ title: "Example Page", url: " url", text: "text" }).then((result) => {21 navigator.share({ title: "Example Page", url: "", text: "text" }).then((result) => { 22 22 write("PASS: Share sheet invoked."); 23 23 testRunner.notifyDone(); -
trunk/LayoutTests/fast/web-share/share.html
r264834 r266151 18 18 { 19 19 document.getElementById("target").addEventListener("click", () => { 20 navigator.share({ title: "Example Page", url: " url", text: "text" }).then((result) => {20 navigator.share({ title: "Example Page", url: "", text: "text" }).then((result) => { 21 21 write("PASS: Share sheet invoked."); 22 22 testRunner.notifyDone(); -
trunk/Source/WebCore/ChangeLog
r266148 r266151 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 18 2020-08-25 Brady Eidson <beidson@apple.com> 2 19 -
trunk/Source/WebCore/page/Navigator.cpp
r263017 r266151 111 111 } 112 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 113 127 bool Navigator::canShare(ScriptExecutionContext& context, const ShareData& data) 114 128 { … … 127 141 } 128 142 129 Optional<URL> url; 130 if (!data.url.isNull()) { 131 url = context.completeURL(data.url); 132 if (!url->isValid()) 133 return false; 134 } 143 if (!data.url.isNull() && !shareableURLForShareData(context, data)) 144 return false; 145 135 146 return true; 136 147 } … … 142 153 return; 143 154 } 144 145 Optional<URL> url; 146 if (!data.url.isEmpty()) 147 url = context.completeURL(data.url); 148 155 149 156 auto* window = this->window(); 150 157 // Note that the specification does not indicate we should consume user activation. We are intentionally stricter here. … … 153 160 return; 154 161 } 155 162 163 Optional<URL> url = shareableURLForShareData(context, data); 156 164 ShareDataWithParsedURL shareData = { 157 165 data, -
trunk/Source/WebKit/ChangeLog
r266143 r266151 1 2 3 4 5 6 7 8 9 10 11 12 1 13 2020-08-25 Megan Gardner <megan_gardner@apple.com> 2 14 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r266063 r266151 5945 5945 void WebPageProxy::showShareSheet(const ShareDataWithParsedURL& shareData, CompletionHandler<void(bool)>&& completionHandler) 5946 5946 { 5947 5947 5948 pageClient().showShareSheet(shareData, WTFMove(completionHandler)); 5948 5949 }
Note:
See TracChangeset
for help on using the changeset viewer.