Changeset 247361 in webkit
- Timestamp:
- Jul 11, 2019 1:52:06 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247358 r247361 1 2019-07-11 Chris Dumez <cdumez@apple.com> 2 3 Pages using Google Tag Manager Google's anti-flicker optimization may take ~5 seconds to do initial paint 4 https://bugs.webkit.org/show_bug.cgi?id=199704 5 <rdar://problem/52966461> 6 7 Reviewed by Geoffrey Garen. 8 9 Apply the same fix as r246764 for when "https://www.googletagmanager.com/gtm.js" load is blocked by a content 10 extension to avoid delaying initial paint by ~5 seconds. This was tested on https://www.formula1.com/en.html. 11 12 * contentextensions/ContentExtensionsBackend.cpp: 13 (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad): 14 1 15 2019-07-11 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
r247186 r247361 238 238 // Quirk for content-blocker interference with Google's anti-flicker optimization (rdar://problem/45968770). 239 239 // https://developers.google.com/optimize/ 240 if (currentDocument->settings().googleAntiFlickerOptimizationQuirkEnabled() && url == "https://www.google-analytics.com/analytics.js"_str) { 240 if (currentDocument->settings().googleAntiFlickerOptimizationQuirkEnabled() 241 && ((equalLettersIgnoringASCIICase(url.host(), "www.google-analytics.com") && equalLettersIgnoringASCIICase(url.path(), "/analytics.js")) 242 || (equalLettersIgnoringASCIICase(url.host(), "www.googletagmanager.com") && equalLettersIgnoringASCIICase(url.path(), "/gtm.js")))) { 241 243 if (auto* frame = currentDocument->frame()) 242 244 frame->script().evaluate(ScriptSourceCode { "try { window.dataLayer.hide.end(); console.log('Called window.dataLayer.hide.end() in frame ' + document.URL + ' because the content blocker blocked the load of the https://www.google-analytics.com/analytics.js script'); } catch (e) { }"_s });
Note: See TracChangeset
for help on using the changeset viewer.