Bug 259979 - Fail to extend update a `style` block algorithm to non-HTML documents
Summary: Fail to extend update a `style` block algorithm to non-HTML documents
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
: 261117 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-08-09 09:21 PDT by Ahmad Saleem
Modified: 2023-09-11 15:31 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-08-09 09:21:52 PDT
Hi Team,

Currently we have following FIXME, which leads to WPT Test failure:

FIXME Source: https://github.com/WebKit/WebKit/blob/3604d4d6c245c0eb8a7c5f3fae77acadf31dabe0/Source/WebCore/dom/InlineStyleSheetOwner.cpp#L152

"FIXME: Should MIME types really be case sensitive in XML documet..."

WPT Test Case (Live Link): http://wpt.live/html/semantics/document-metadata/the-style-element/style_type_svg.svg

^ We fail third test case: "With a mixed-case type attribute, the style should apply" and Chrome also fail this test case. Only Firefox passes all test cases.

Web-Spec: https://html.spec.whatwg.org/multipage/semantics.html#update-a-style-block

___

By modifying return and removing unused 'element' in above function, I get 'PASS' on WPT Test case.

inline bool isValidCSSContentType(const AtomString& type)
{
    // https://html.spec.whatwg.org/multipage/semantics.html#update-a-style-block
    if (type.isEmpty())
        return true;
    return equalLettersIgnoringASCIICase(type, "text/css"_s);
}

____

Any input or any concern before I try doing PR?

Thanks!
Comment 1 EWS 2023-08-09 16:00:20 PDT
Committed 266744@main (c9ef47f60cc9): <https://commits.webkit.org/266744@main>

Reviewed commits have been landed. Closing PR #16533 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-08-09 16:01:18 PDT
<rdar://problem/113654826>
Comment 3 Said Abou-Hallawa 2023-09-11 15:31:17 PDT
*** Bug 261117 has been marked as a duplicate of this bug. ***