CSSStyleDeclaration should be annotated with CEReactions
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Oct 2016 21:47:30 +0000 (21:47 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Oct 2016 21:47:30 +0000 (21:47 +0000)
commit16541c4d75f5142be4bee1b6548b69e457443504
tree75a6ebf22bc46ab218d1053c244a29bc46b695be
parent2c593fde4935eda6f4c22e809aeede5aa7c3ea98
CSSStyleDeclaration should be annotated with CEReactions
https://bugs.webkit.org/show_bug.cgi?id=163968

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined the test now that all test cases pass.

* web-platform-tests/custom-elements/attribute-changed-callback-expected.txt:

Source/WebCore:

Added CEReactions to CSSStyleDeclaration.idl.

Test: fast/custom-elements/reactions/CSSStyleDeclaration.html

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::putDelegate):
* css/CSSStyleDeclaration.idl:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::StyleAttributeMutationScope::StyleAttributeMutationScope): Remember the old value when this is
an inline style declaration for a custom element. Also store m_oldValue and m_customElement instead of
a mutation record so that we don't create a superfluous mutation record for custom elements.
(WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope): Enqueue attributeChangedCallback
when m_customElement is not null.
* dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementReactionQueue::observesStyleAttribute):
* dom/CustomElementReactionQueue.h:

LayoutTests:

Added a W3C style testharness.js test.

* fast/custom-elements/reactions/CSSStyleDeclaration-expected.txt: Added.
* fast/custom-elements/reactions/CSSStyleDeclaration.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/custom-elements/reactions/CSSStyleDeclaration-expected.txt [new file with mode: 0644]
LayoutTests/fast/custom-elements/reactions/CSSStyleDeclaration.html [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/custom-elements/attribute-changed-callback-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
Source/WebCore/css/CSSStyleDeclaration.idl
Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
Source/WebCore/dom/CustomElementReactionQueue.cpp
Source/WebCore/dom/CustomElementReactionQueue.h