Changeset 234953 in webkit


Ignore:
Timestamp:
Aug 16, 2018 1:50:01 PM (6 years ago)
Author:
rniwa@webkit.org
Message:

Custom element doesn't invalidate its style when :defined rule starts to apply
https://bugs.webkit.org/show_bug.cgi?id=188637

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined the test now that all relevant test cases pass. The only remaining test failures
are for customized builtins which we do not and shall not implement.

  • web-platform-tests/custom-elements/pseudo-class-defined-expected.txt:

Source/WebCore:

Fixed the bug by invalidating the subtree when a custom element gets defined.

Test: fast/custom-elements/defined-update-style.html

  • dom/Element.cpp:

(WebCore::Element::setIsDefinedCustomElement):

LayoutTests:

Added a regression test.

  • fast/custom-elements/defined-update-style-expected.html: Added.
  • fast/custom-elements/defined-update-style.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r234950 r234953  
     12018-08-16  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Custom element doesn't invalidate its style when :defined rule starts to apply
     4        https://bugs.webkit.org/show_bug.cgi?id=188637
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Added a regression test.
     9
     10        * fast/custom-elements/defined-update-style-expected.html: Added.
     11        * fast/custom-elements/defined-update-style.html: Added.
     12
    1132018-08-16  Basuke Suzuki  <Basuke.Suzuki@sony.com>
    214
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r234940 r234953  
     12018-08-16  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Custom element doesn't invalidate its style when :defined rule starts to apply
     4        https://bugs.webkit.org/show_bug.cgi?id=188637
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Rebaselined the test now that all relevant test cases pass. The only remaining test failures
     9        are for customized builtins which we do not and shall not implement.
     10
     11        * web-platform-tests/custom-elements/pseudo-class-defined-expected.txt:
     12
    1132018-08-15  Jer Noble  <jer.noble@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-expected.txt

    r234039 r234953  
    1212PASS createElementNS("http://www.w3.org/1999/xhtml", "a-a") should not be :defined
    1313PASS createElementNS("http://www.w3.org/2000/svg", "a-a") should be :defined
    14 FAIL Upgraded createElement("a-a") should be :defined assert_equals: getComputedStyle expected "rgb(255, 165, 0)" but got "rgb(0, 0, 255)"
    15 FAIL Upgraded createElementNS("http://www.w3.org/1999/xhtml", "a-a") should be :defined assert_equals: getComputedStyle expected "rgb(255, 165, 0)" but got "rgb(0, 0, 255)"
     14PASS Upgraded createElement("a-a") should be :defined
     15PASS Upgraded createElementNS("http://www.w3.org/1999/xhtml", "a-a") should be :defined
    1616PASS Without browsing context: createElement("a-a") should not be :defined
    1717PASS Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "a-a") should not be :defined
  • trunk/Source/WebCore/ChangeLog

    r234949 r234953  
     12018-08-16  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Custom element doesn't invalidate its style when :defined rule starts to apply
     4        https://bugs.webkit.org/show_bug.cgi?id=188637
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Fixed the bug by invalidating the subtree when a custom element gets defined.
     9
     10        Test: fast/custom-elements/defined-update-style.html
     11
     12        * dom/Element.cpp:
     13        (WebCore::Element::setIsDefinedCustomElement):
     14
    1152018-08-16  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebCore/dom/Element.cpp

    r234884 r234953  
    19791979    if (!data.customElementReactionQueue())
    19801980        data.setCustomElementReactionQueue(std::make_unique<CustomElementReactionQueue>(elementInterface));
     1981    invalidateStyleForSubtree();
    19811982    InspectorInstrumentation::didChangeCustomElementState(*this);
    19821983}
Note: See TracChangeset for help on using the changeset viewer.