Changeset 280909 in webkit


Ignore:
Timestamp:
Aug 11, 2021 8:39:04 AM (11 months ago)
Author:
Chris Dumez
Message:

Dynamically changing HTMLStyleElement.type should change the rendering accordingly
https://bugs.webkit.org/show_bug.cgi?id=228980

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

  • web-platform-tests/html/semantics/document-metadata/the-style-element/style_type_change-expected.txt:

Source/WebCore:

Dynamically changing HTMLStyleElement.type should change the rendering accordingly.

This is causing the following WPT test to fail in WebKit:

  • html/semantics/document-metadata/the-style-element/style_type_change.html

This test is passing in both Firefox and Chrome.

No new tests, rebaselined existing test.

  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::parseAttribute):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r280907 r280909  
     12021-08-11  Chris Dumez  <cdumez@apple.com>
     2
     3        Dynamically changing HTMLStyleElement.type should change the rendering accordingly
     4        https://bugs.webkit.org/show_bug.cgi?id=228980
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Rebaseline WPT test that is now passing.
     9
     10        * web-platform-tests/html/semantics/document-metadata/the-style-element/style_type_change-expected.txt:
     11
    1122021-08-11  Lauro Moura  <lmoura@igalia.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_type_change-expected.txt

    r267646 r280909  
    22
    33PASS Check initial styleSheets length type
    4 FAIL Change type from invalid type to valid type assert_equals: expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)"
    5 FAIL Change type from valid type to invalid type assert_equals: expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)"
     4PASS Change type from invalid type to valid type
     5PASS Change type from valid type to invalid type
    66
  • trunk/Source/WebCore/ChangeLog

    r280890 r280909  
     12021-08-11  Chris Dumez  <cdumez@apple.com>
     2
     3        Dynamically changing HTMLStyleElement.type should change the rendering accordingly
     4        https://bugs.webkit.org/show_bug.cgi?id=228980
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Dynamically changing HTMLStyleElement.type should change the rendering accordingly.
     9
     10        This is causing the following WPT test to fail in WebKit:
     11        - html/semantics/document-metadata/the-style-element/style_type_change.html
     12
     13        This test is passing in both Firefox and Chrome.
     14
     15        No new tests, rebaselined existing test.
     16
     17        * html/HTMLStyleElement.cpp:
     18        (WebCore::HTMLStyleElement::parseAttribute):
     19
    1202021-08-11  Adrian Perez de Castro  <aperez@igalia.com>
    221
  • trunk/Source/WebCore/html/HTMLStyleElement.cpp

    r262003 r280909  
    8888        } else
    8989            m_styleSheetOwner.childrenChanged(*this);
    90     } else if (name == typeAttr)
     90    } else if (name == typeAttr) {
    9191        m_styleSheetOwner.setContentType(value);
    92     else
     92        m_styleSheetOwner.childrenChanged(*this);
     93        if (auto* scope = m_styleSheetOwner.styleScope())
     94            scope->didChangeStyleSheetContents();
     95    } else
    9396        HTMLElement::parseAttribute(name, value);
    9497}
Note: See TracChangeset for help on using the changeset viewer.