Changeset 254970 in webkit
- Timestamp:
- Jan 23, 2020 1:51:58 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r254966 r254970 1 2020-01-23 Yusuke Suzuki <ysuzuki@apple.com> 2 3 nomodule scripts are fetched in some cases (with empty cache or in new tab) 4 https://bugs.webkit.org/show_bug.cgi?id=194337 5 <rdar://problem/49700924> 6 7 Reviewed by Ryosuke Niwa. 8 9 * http/wpt/preload/classic-script-with-nomodule-expected.txt: Added. 10 * http/wpt/preload/classic-script-with-nomodule.html: Added. 11 * http/wpt/preload/resources/classic.js: Added. 12 * http/wpt/preload/resources/module.js: Added. 13 1 14 2020-01-22 Lauro Moura <lmoura@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r254965 r254970 1 2020-01-23 Yusuke Suzuki <ysuzuki@apple.com> 2 3 nomodule scripts are fetched in some cases (with empty cache or in new tab) 4 https://bugs.webkit.org/show_bug.cgi?id=194337 5 <rdar://problem/49700924> 6 7 Reviewed by Ryosuke Niwa. 8 9 The preloader attempt to preload "src" of script tags. However, script tag attributed with "nomodule" 10 will never be executed by WebKit since it already supports modules. Avoid loading this content in 11 the preloader. 12 13 Test: http/wpt/preload/classic-script-with-nomodule.html 14 15 * html/parser/HTMLPreloadScanner.cpp: 16 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): 17 (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload): 18 1 19 2020-01-22 Fujii Hironori <Hironori.Fujii@sony.com> 2 20 -
trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp
r251708 r254970 243 243 m_referrerPolicy = parseReferrerPolicy(attributeValue, ReferrerPolicySource::ReferrerPolicyAttribute).valueOr(ReferrerPolicy::EmptyString); 244 244 break; 245 } else if (match(attributeName, nomoduleAttr)) { 246 m_scriptIsNomodule = true; 247 break; 245 248 } 246 249 processImageAndScriptAttribute(attributeName, attributeValue); … … 353 356 return false; 354 357 358 if (m_tagId == TagId::Script && m_moduleScript == PreloadRequest::ModuleScript::No && m_scriptIsNomodule) 359 return false; 360 355 361 return true; 356 362 } … … 374 380 bool m_metaIsDisabledAdaptations; 375 381 bool m_inputIsImage; 382 bool m_scriptIsNomodule { false }; 376 383 float m_deviceScaleFactor; 377 384 PreloadRequest::ModuleScript m_moduleScript { PreloadRequest::ModuleScript::No };
Note: See TracChangeset
for help on using the changeset viewer.