[webkit-changes] [WebKit/WebKit] 9494ab: cssText setter should change style attribute when ...

Anne van Kesteren noreply at github.com
Fri Mar 15 11:10:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9494ab07d911afea7e49aff95c0105ab8b8bce6c
      https://github.com/WebKit/WebKit/commit/9494ab07d911afea7e49aff95c0105ab8b8bce6c
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2024-03-15 (Fri, 15 Mar 2024)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-invalidation-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-invalidation.html
    A LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-setter.window-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-setter.window.html
    A LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-setter.window.js
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom/w3c-import.log
    M Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
    M Source/WebCore/css/PropertySetCSSStyleDeclaration.h
    M Source/WebCore/dom/StyledElement.cpp
    M Source/WebCore/dom/StyledElement.h
    M Source/WebCore/style/StyleScopeRuleSets.cpp
    M Source/WebCore/style/StyleScopeRuleSets.h

  Log Message:
  -----------
  cssText setter should change style attribute when the serialization differs
https://bugs.webkit.org/show_bug.cgi?id=166716
rdar://29861252

Reviewed by Antti Koivisto.

173663 at main regressed our behavior with regards to the standard. This
attempts to correct it while preserving as much of the optimization as
possible.

WPT css/cssom is synchronized up to and including:
https://github.com/web-platform-tests/wpt/pull/45019

* LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-invalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-invalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-setter.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-setter.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-setter.window.js: Added.
(document.createElement.string_appeared_here.forEach.element.cssText.setter.should.set style):
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/w3c-import.log:
* Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::setCssText):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::removeProperty):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
(WebCore::StyleRuleCSSStyleDeclaration::didMutate):
(WebCore::InlineCSSStyleDeclaration::didMutate):
* Source/WebCore/css/PropertySetCSSStyleDeclaration.h:
* Source/WebCore/dom/StyledElement.cpp:
(WebCore::StyledElement::dirtyStyleAttribute):
* Source/WebCore/dom/StyledElement.h:
* Source/WebCore/style/StyleScopeRuleSets.cpp:
(WebCore::Style::ScopeRuleSets::hasSimpleSelectorsForStyleAttribute const):
* Source/WebCore/style/StyleScopeRuleSets.h:

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



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


More information about the webkit-changes mailing list