In preloader etc.
<rdar://problem/102853711>
Created attachment 463831 [details] Patch
Created attachment 463832 [details] Patch
Comment on attachment 463832 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463832&action=review What a great moment! > Source/WebCore/style/StyleScope.cpp:702 > > + Extra blank line here. > Source/WebKitLegacy/mac/DOM/DOM.mm:710 > HTMLLinkElement& link = *static_cast<HTMLLinkElement*>(core(self)); > - > - auto& media = link.attributeWithoutSynchronization(HTMLNames::mediaAttr); > - if (media.isEmpty()) > - return true; > - > - Document& document = link.document(); > - auto mediaQuerySet = MediaQuerySet::create(media, MediaQueryParserContext(document)); > - return LegacyMediaQueryEvaluator { "screen"_s, document, document.renderView() ? &document.renderView()->style() : nullptr }.evaluate(mediaQuerySet.get()); > + return link.mediaAttributeMatches(); I think we should just one-line this: return static_cast<HTMLLinkElement*>(core(self))->mediaAttributeMatches(); Also wondering why we need static_cast here, maybe it should be downcast, or maybe we need to overload core so we don’t need a typecast. But since this is legacy WebKit, I guess we can just leave it as-is.
Created attachment 463833 [details] Patch for landing
Created attachment 463834 [details] Patch
Created attachment 463836 [details] Patch for landing
Committed 257252@main (be64fdb44bd3): <https://commits.webkit.org/257252@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463836 [details].