[webkit-reviews] review granted: [Bug 209548] ScopeRuleSets::initializeUserStyle() should not add console logging if there are no injected user style sheets : [Attachment 394616] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 26 10:23:46 PDT 2020
Darin Adler <darin at apple.com> has granted katherine_cheney at apple.com's request
for review:
Bug 209548: ScopeRuleSets::initializeUserStyle() should not add console logging
if there are no injected user style sheets
https://bugs.webkit.org/show_bug.cgi?id=209548
Attachment 394616: Patch
https://bugs.webkit.org/attachment.cgi?id=394616&action=review
--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 394616
--> https://bugs.webkit.org/attachment.cgi?id=394616
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=394616&action=review
> Source/WebCore/ChangeLog:12
> + ScopeRuleSets::initializeUserStyle() should not add console logging
if there are no injected user style sheets
> + https://bugs.webkit.org/show_bug.cgi?id=209548
> + <rdar://problem/60851745>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + Logging when there are no injected user style sheets is unnecessary
and confusing.
> +
> + * style/StyleScopeRuleSets.cpp:
> + (WebCore::Style::ScopeRuleSets::initializeUserStyle):
Strange indenting
> Source/WebCore/style/StyleScopeRuleSets.cpp:96
> - if (page &&
page->mainFrame().loader().client().hasNavigatedAwayFromAppBoundDomain())
> + if (page &&
page->mainFrame().loader().client().hasNavigatedAwayFromAppBoundDomain() &&
!extensionStyleSheets.injectedUserStyleSheets().isEmpty())
>
m_styleResolver.document().addConsoleMessage(MessageSource::Security,
MessageLevel::Warning, "Ignoring user style sheet for non-app bound
domain."_s);
Besides not logging, this now means we’ll call collectRulesFromUserStyleSheets
on the empty vector. No harm to that I suppose.
More information about the webkit-reviews
mailing list