Changeset 266151 in webkit for trunk/Source/WebCore/page/Navigator.cpp
- Timestamp:
- Aug 25, 2020, 3:46:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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,
Note:
See TracChangeset
for help on using the changeset viewer.