Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 887cf9723b12a4a596aafcbc7f93c59178327532
      
https://github.com/WebKit/WebKit/commit/887cf9723b12a4a596aafcbc7f93c59178327532
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M Source/WebCore/style/StyleContainmentCheckerInlines.h

  Log Message:
  -----------
  Use ElementNames::SVG::foreignObject in Style::ContainmentChecker instead of 
hasTagName with QualifiedName cast
https://bugs.webkit.org/show_bug.cgi?id=315592
rdar://177977239

Reviewed by Darin Adler.

Follow-up to 313859@main. Replace `hasTagName(static_cast<const QualifiedName&>(
SVGNames::foreignObjectTag))` with `elementName() == 
ElementNames::SVG::foreignObject`.

Using elementName() might be slightly faster: a single uint16_t compare on the 
cached
NodeName, vs. QualifiedName::matches which compares three AtomStringImpl 
pointers.
Matches the idiom already used in SVGElement.cpp, SVGUseElement.cpp, and the 
HTML
tree builder.

* Source/WebCore/style/StyleContainmentCheckerInlines.h:
(WebCore::Style::ContainmentChecker::shouldApplySizeContainment const):
(WebCore::Style::ContainmentChecker::shouldApplyInlineSizeContainment const):

Canonical link: https://commits.webkit.org/313941@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to