RESOLVED FIXED 199173
Pages using Google's anti-flicker optimization may take ~5 seconds to do initial paint
https://bugs.webkit.org/show_bug.cgi?id=199173
Summary Pages using Google's anti-flicker optimization may take ~5 seconds to do init...
Chris Dumez
Reported 2019-06-24 13:26:23 PDT
Pages using Google's anti-flicker optimization [1] take ~5 seconds to do initial paint when analytics.js load is blocked by a content blocker. [1] https://developers.google.com/optimize/
Attachments
Patch (5.62 KB, patch)
2019-06-24 13:31 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2019-06-24 13:26:39 PDT
Chris Dumez
Comment 2 2019-06-24 13:31:00 PDT
Geoffrey Garen
Comment 3 2019-06-24 14:48:32 PDT
Comment on attachment 372794 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=372794&action=review r=me > Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:240 > + if (currentDocument->settings().googleAntiFlickerOptimizationQuirkEnabled() && url == "https://www.google-analytics.com/analytics.js"_str) { Should we also check site-specific quirks enabled here? Would be nice to enable a developer to test a fix in this area with our quirk turned off.
Chris Dumez
Comment 4 2019-06-24 14:49:37 PDT
(In reply to Geoffrey Garen from comment #3) > Comment on attachment 372794 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=372794&action=review > > r=me > > > Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:240 > > + if (currentDocument->settings().googleAntiFlickerOptimizationQuirkEnabled() && url == "https://www.google-analytics.com/analytics.js"_str) { > > Should we also check site-specific quirks enabled here? Would be nice to > enable a developer to test a fix in this area with our quirk turned off. Did we fix the fact that site-specific quirks are enabled on macOS or iOS (do not remember which one of the 2). This applies to both platforms, which is why I did not do that.
Chris Dumez
Comment 5 2019-06-24 14:50:01 PDT
(In reply to Geoffrey Garen from comment #3) > Comment on attachment 372794 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=372794&action=review > > r=me > > > Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:240 > > + if (currentDocument->settings().googleAntiFlickerOptimizationQuirkEnabled() && url == "https://www.google-analytics.com/analytics.js"_str) { > > Should we also check site-specific quirks enabled here? Would be nice to > enable a developer to test a fix in this area with our quirk turned off. They can test that using the experimental feature flag.
Geoffrey Garen
Comment 6 2019-06-24 14:51:24 PDT
> Did we fix the fact that site-specific quirks are enabled on macOS or iOS > (do not remember which one of the 2). This applies to both platforms, which > is why I did not do that. I *think* we did, but I didn't confirm. Anyway, you're right that the experimental feature flag is enough.
WebKit Commit Bot
Comment 7 2019-06-24 15:22:48 PDT
Comment on attachment 372794 [details] Patch Clearing flags on attachment: 372794 Committed r246764: <https://trac.webkit.org/changeset/246764>
WebKit Commit Bot
Comment 8 2019-06-24 15:22:50 PDT
All reviewed patches have been landed. Closing bug.
Michael Catanzaro
Comment 9 2019-07-05 16:32:49 PDT
I guess you wanted it inside the results.summary.blockedLoad condition: [2134/3055] Building CXX object Source/WebCore/CMakeFiles...es/WebCore/unified-sources/UnifiedSource-5037b3e8-2.cpp.o In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-5037b3e8-2.cpp:2: ../../Source/WebCore/contentextensions/ContentExtensionsBackend.cpp: In member function ‘WebCore::ContentRuleListResults WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad(const WTF::URL&, WTF::OptionSet<WebCore::ContentExtensions::ResourceType>, WebCore::DocumentLoader&)’: ../../Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:235:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 235 | if (results.summary.blockedLoad) | ^~ ../../Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:240:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 240 | if (currentDocument->settings().googleAntiFlickerOptimizationQuirkEnabled() && url == "https://www.google-analytics.com/analytics.js"_str) { | ^~
Michael Catanzaro
Comment 10 2019-07-05 16:35:58 PDT
Note You need to log in before you can comment on or make changes to this bug.