Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bff7571e1974aeb72cf9f7e426debd4092504508
      
https://github.com/WebKit/WebKit/commit/bff7571e1974aeb72cf9f7e426debd4092504508
  Author: Yusuke Suzuki <ysuz...@apple.com>
  Date:   2024-05-13 (Mon, 13 May 2024)

  Changed paths:
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/dom/SpaceSplitString.h
    M Source/WebCore/svg/SVGElement.cpp

  Log Message:
  -----------
  Skip class modification if possible
https://bugs.webkit.org/show_bug.cgi?id=274048
rdar://127948676

Reviewed by Ryosuke Niwa.

When changing class attribute via parserSetAttributes,

1. We may be able to skip SpaceSplitString creation. If the ElementData is 
shareable one,
   it is possible that it already has SpaceSplitString materialized before. We 
check the keyString,
   and if it is true, then skip the creation.
2. Cache / style invalidation is not necessary at this point yet since it is 
not attached to the tree,
   and never rendered before.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::classAttributeChanged):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/SpaceSplitString.h:
(WebCore::SpaceSplitStringData::keyString const):
(WebCore::SpaceSplitString::keyString const):
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::SVGElement::svgAttributeChanged):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to