Changeset 280910 in webkit


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

HTMLStyleElement should create its style sheet even if its media attribute is invalid
https://bugs.webkit.org/show_bug.cgi?id=228977

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_non_matching_media-expected.txt:

Source/WebCore:

HTMLStyleElement should create its style sheet even if its media attribute is invalid.

WebKit currently didn't and this was causing us to fail the following WPT test:

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

This WPT test is passing in both Firefox and Chrome.

No new tests, rebaselined existing tests.

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::createSheet):

Location:
trunk
Files:
4 edited

Legend:

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

    r280909 r280910  
     12021-08-11  Chris Dumez  <cdumez@apple.com>
     2
     3        HTMLStyleElement should create its style sheet even if its media attribute is invalid
     4        https://bugs.webkit.org/show_bug.cgi?id=228977
     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_non_matching_media-expected.txt:
     11
    1122021-08-11  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_non_matching_media-expected.txt

    r222307 r280910  
    11
    2 FAIL HTML Test: Non-matching media type should have stylesheet assert_equals: expected 1 but got 0
     2PASS HTML Test: Non-matching media type should have stylesheet
    33
  • trunk/Source/WebCore/ChangeLog

    r280909 r280910  
     12021-08-11  Chris Dumez  <cdumez@apple.com>
     2
     3        HTMLStyleElement should create its style sheet even if its media attribute is invalid
     4        https://bugs.webkit.org/show_bug.cgi?id=228977
     5
     6        Reviewed by Antti Koivisto.
     7
     8        HTMLStyleElement should create its style sheet even if its media attribute is invalid.
     9
     10        WebKit currently didn't and this was causing us to fail the following WPT test:
     11        - html/semantics/document-metadata/the-style-element/style_non_matching_media.html
     12
     13        This WPT test is passing in both Firefox and Chrome.
     14
     15        No new tests, rebaselined existing tests.
     16
     17        * dom/InlineStyleSheetOwner.cpp:
     18        (WebCore::InlineStyleSheetOwner::createSheet):
     19
    1202021-08-11  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp

    r278253 r280910  
    175175    auto mediaQueries = MediaQuerySet::create(m_media, MediaQueryParserContext(document));
    176176
    177     MediaQueryEvaluator screenEval("screen"_s, true);
    178     MediaQueryEvaluator printEval("print"_s, true);
    179     LOG(MediaQueries, "InlineStyleSheetOwner::createSheet evaluating queries");
    180     if (!screenEval.evaluate(mediaQueries.get()) && !printEval.evaluate(mediaQueries.get()))
    181         return;
    182 
    183177    if (m_styleScope)
    184178        m_styleScope->addPendingSheet(element);
Note: See TracChangeset for help on using the changeset viewer.