Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 353f068cb24637277e325ab7610ef33b3d794486
      
https://github.com/WebKit/WebKit/commit/353f068cb24637277e325ab7610ef33b3d794486
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-21 (Tue, 21 Apr 2026)

  Changed paths:
    M Source/WebCore/dom/StyledElement.cpp
    M Source/WebCore/dom/StyledElement.h

  Log Message:
  -----------
  Clean up and apply minor optimizations to StyledElement
https://bugs.webkit.org/show_bug.cgi?id=312855

Reviewed by Anne van Kesteren and Rupin Mittal.

- Extract synchronizeStyleAttributeForSelectorInvalidation() to eliminate
  duplicated style attribute synchronization logic between dirtyStyleAttribute()
  and invalidateStyleAttribute().
- Remove redundant isSVGElement() guard around dynamicDowncast<SVGElement>,
  which already performs the same type check.
- Avoid unnecessary inlineStyleChanged() in setInlineStyleCustomProperty()
  when addParsedProperty() reports no changes were made.
- Cache inlineStyle() in inlineStyleCSSOMWrapper() to avoid double lookup,
  and use nullptr instead of 0.

* Source/WebCore/dom/StyledElement.cpp:
(WebCore::StyledElement::inlineStyleCSSOMWrapper):
(WebCore::StyledElement::synchronizeStyleAttributeForSelectorInvalidation):
(WebCore::StyledElement::dirtyStyleAttribute):
(WebCore::StyledElement::invalidateStyleAttribute):
(WebCore::StyledElement::setInlineStyleCustomProperty):
* Source/WebCore/dom/StyledElement.h:

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



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

Reply via email to