Skip to content

script: Implement deprecated CSSStyleSheet members - #36313

Merged
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:deprecated-CSSStyleSheet-members
Apr 3, 2025
Merged

Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:deprecated-CSSStyleSheet-members

Conversation

@Loirooriol

@Loirooriol Loirooriol commented Apr 3, 2025 •

Copy link
Copy Markdown
Contributor

Implements rules, addRule() and removeRule() for CSSStyleSheet.
https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members

This is part of #36162

Testing:

  • /css/css-cascade/at-scope-parsing.html
  • /css/css-conditional/at-supports-whitespace.html
  • /css/css-nesting/invalidation-004.html
  • /css/css-nesting/parsing.html
  • /css/css-nesting/serialize-group-rules-with-decls.html
  • /css/css-syntax/custom-property-rule-ambiguity.html
  • /css/css-syntax/invalid-nested-rules.html
  • /css/css-syntax/trailing-braces.html
  • /css/css-syntax/var-with-blocks.html
  • /css/css-transitions/parsing/starting-style-parsing.html
  • /css/cssom/CSSStyleSheet.html
  • /css/cssom/idlharness.html
  • /css/cssom/insertRule-across-context.html

@Loirooriol Loirooriol added A-content/bindings The DOM bindings A-content/script Related to the script thread T-linux-wpt Do a try run of the WPT labels Apr 3, 2025
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Apr 3, 2025
@github-actions

github-actions Bot commented Apr 3, 2025

Copy link
Copy Markdown

🔨 Triggering try run (#14245877250) for Linux (WPT)

@github-actions

github-actions Bot commented Apr 3, 2025

Copy link
Copy Markdown

Test results for linux-wpt from try job (#14245877250):

Flaky unexpected result (18)
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-weight: '500' should prefer '501 550' over '502 560'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

  • OK /css/css-grid/alignment/grid-content-alignment-with-abspos-001.html (#34339)
    • FAIL [expected PASS] subtest: .grid 1

      assert_equals: 
      <div class="grid" data-expected-width="800" data-expected-height="600">
          <div class="a" id="item" data-offset-x="329" data-offset-y="269" data-expected-width="142" data-expected-height="62" style="place-self: center;"></div>
        </div>
      offsetLeft expected 329 but got 0
      

  • FAIL [expected PASS] /css/css-sizing/dynamic-available-size-iframe.html (#31559)
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/005.html (#27062)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html (#34597)
    • FAIL [expected PASS] subtest: Same-Document Referrer from Refresh

      assert_equals: original page loads expected "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/refresh/resources/refresh-with-section.sub.html?url=%23section" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/refresh/resources/refresh-with-section.sub.html?url=%23section#section"
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_2.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK /html/browsers/history/the-history-interface/traverse_the_history_4.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted

      assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
      

  • PASS [expected FAIL] /html/canvas/element/manual/text/canvas.2d.disconnected.html (#30063)
  • OK [expected CRASH] /html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.worker.html (#30164)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
    • FAIL [expected TIMEOUT] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
      

  • CRASH [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
    • FAIL [expected NOTRUN] subtest: Check that popups from a sandboxed iframe do not escape the sandbox

      assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
      

  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • PASS [expected FAIL] subtest: multipart/form-data: 0x00 in value (normal form)
  • TIMEOUT [expected OK] /html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html (#29724)
    • TIMEOUT [expected PASS] subtest: reparent-form-during-planned-navigation-task

      Test timed out
      

  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: 0x00 in name (normal form)
  • OK /html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.html (#33948)
    • FAIL [expected PASS] subtest: Revoking a blob URL immediately after calling import will not fail

      promise_test: Unhandled rejection with value: object "TypeError: Dynamic import failed"
      

  • OK /html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.worker.html (#33909)
    • FAIL [expected PASS] subtest: Revoking a blob URL immediately after calling import will not fail

      promise_test: Unhandled rejection with value: object "TypeError: Dynamic import failed"
      

  • OK /resize-observer/change-layout-in-error.html (#32629)
    • PASS [expected FAIL] subtest: Changing layout in window error handler should not result in lifecyle loop when resize observer loop limit is reached.
Stable unexpected results that are known to be intermittent (13)
  • TIMEOUT /FileAPI/url/url-in-tags-revoke.window.html (#19978)
    • TIMEOUT [expected PASS] subtest: Fetching a blob URL immediately before revoking it works in <script> tags.

      Test timed out
      

  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • FAIL [expected PASS] subtest: WebGL test #44

      assert_true: could not create image (SVG) expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #60
  • FAIL [expected PASS] /css/compositing/mix-blend-mode/mix-blend-mode-video-sibling.html (#32849)
  • OK /fetch/metadata/generated/css-font-face.https.sub.tentative.html (#32732)
    • PASS [expected FAIL] subtest: sec-fetch-dest
    • FAIL [expected PASS] subtest: sec-fetch-user

      promise_test: Unhandled rejection with value: object "Error: Failed to query for recorded headers."
      

    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Cross-site
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Same site
  • OK /html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html (#29066)
    • FAIL [expected PASS] subtest: Check execution order from nested timeout

      assert_equals: Expected nested setTimeout to run second expected true but got false
      

    • FAIL [expected PASS] subtest: Check execution order on load handler

      assert_equals: Expected onload to run first expected false but got true
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • FAIL [expected PASS] subtest: Cross-origin navigation started from unload handler must be ignored

      promise_test: Unhandled rejection with value: object "SecurityError: The operation is insecure."
      

  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html (#29087)
    • TIMEOUT [expected FAIL] subtest: <dialog>-contained autofocus element gets focused when the dialog is shown

      Test timed out
      

  • OK /html/interaction/focus/the-autofocus-attribute/document-with-fragment-valid.html (#28259)
    • FAIL [expected PASS] subtest: Autofocus elements in top-level browsing context's documents with URL fragments should be skipped.

      assert_true: expected true got false
      

  • TIMEOUT /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Element with tabindex should support autofocus

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Non-HTMLElement should not support autofocus
    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus should support autofocus
    • NOTRUN [expected FAIL] subtest: Host element with delegatesFocus including no focusable descendants should be skipped
  • TIMEOUT /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
    • TIMEOUT [expected FAIL] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      Test timed out
      

  • TIMEOUT /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • TIMEOUT [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK /navigation-timing/test-navigation-type-reload.html (#33334)
    • FAIL [expected PASS] subtest: Reload domComplete > Original domComplete

      assert_true: Reload domComplete > Original domComplete expected true got false
      

    • FAIL [expected PASS] subtest: Reload loadEventEnd > Original loadEventEnd

      assert_true: Reload loadEventEnd > Original loadEventEnd expected true got false
      

    • FAIL [expected PASS] subtest: Reload loadEventStart > Original loadEventStart

      assert_true: Reload loadEventStart > Original loadEventStart expected true got false
      

Stable unexpected results (13)
  • OK /css/css-cascade/at-scope-parsing.html
    • PASS [expected FAIL] subtest: @scope () is not valid
    • PASS [expected FAIL] subtest: @scope to () is not valid
    • PASS [expected FAIL] subtest: @scope () to () is not valid
    • PASS [expected FAIL] subtest: @scope (.c <> .d) is not valid
    • PASS [expected FAIL] subtest: @scope (.a, .c <> .d) is not valid
    • PASS [expected FAIL] subtest: @scope (.a <> .b, .c) is not valid
    • PASS [expected FAIL] subtest: @scope (div::before) is not valid
    • PASS [expected FAIL] subtest: @scope (div::after) is not valid
    • PASS [expected FAIL] subtest: @scope (slotted(div)) is not valid
    • PASS [expected FAIL] subtest: @scope (.a) to (div::before) is not valid
    • And 18 more unexpected results...
  • OK /css/css-conditional/at-supports-whitespace.html
    • PASS [expected FAIL] subtest: @supports ((a)) {}
    • PASS [expected FAIL] subtest: @supports ((a) ) {}
    • PASS [expected FAIL] subtest: @supports ( (a)) {}
    • PASS [expected FAIL] subtest: @supports ( (a) ) {}
    • PASS [expected FAIL] subtest: @supports (not (a)) {}
    • PASS [expected FAIL] subtest: @supports (not (a) ) {}
    • PASS [expected FAIL] subtest: @supports ( not (a)) {}
    • PASS [expected FAIL] subtest: @supports ( not (a) ) {}
    • PASS [expected FAIL] subtest: @supports ((a) and (b)) {}
    • PASS [expected FAIL] subtest: @supports ((a) and (b) ) {}
    • And 6 more unexpected results...
  • OK /css/css-nesting/invalidation-004.html
    • PASS [expected FAIL] subtest: CSS Selectors nested invalidation through @media by selectorText
  • OK [expected ERROR] /css/css-nesting/parsing.html
  • OK /css/css-nesting/serialize-group-rules-with-decls.html
    • PASS [expected FAIL] subtest: Declarations are serialized on one line, rules on two.
    • PASS [expected FAIL] subtest: Mixed declarations/rules are on two lines.
    • PASS [expected FAIL] subtest: Implicit rule is serialized
    • PASS [expected FAIL] subtest: Implicit rule not removed
    • PASS [expected FAIL] subtest: Implicit + empty hover rule
    • PASS [expected FAIL] subtest: Implicit like rule not in first position
    • PASS [expected FAIL] subtest: Two implicit-like rules
    • PASS [expected FAIL] subtest: Implicit like rule after decls
    • PASS [expected FAIL] subtest: Implicit like rule after decls, missing closing braces
    • PASS [expected FAIL] subtest: Implicit like rule with other selectors
    • And 5 more unexpected results...
  • OK /css/css-syntax/custom-property-rule-ambiguity.html
    • PASS [expected FAIL] subtest: Rule that looks like a custom property declaration is ignored
    • PASS [expected FAIL] subtest: Rule that looks like an invalid custom property declaration is ignored
    • PASS [expected FAIL] subtest: Nested rule that looks like a custom property declaration
    • PASS [expected FAIL] subtest: Nested rule that looks like an invalid custom property declaration
  • OK /css/css-syntax/invalid-nested-rules.html
    • PASS [expected FAIL] subtest: Continues parsing after block on invalid rule error
  • OK /css/css-syntax/trailing-braces.html
    • PASS [expected FAIL] subtest: Trailing braces are not valid
  • OK /css/css-syntax/var-with-blocks.html
    • PASS [expected FAIL] subtest: Plain var()
    • PASS [expected FAIL] subtest: Whole-value block with var()
    • PASS [expected FAIL] subtest: Whole-value block with var() (spaces)
    • PASS [expected FAIL] subtest: Trailing block, leading var()
    • PASS [expected FAIL] subtest: Leading block, trailing var()
    • PASS [expected FAIL] subtest: In-block var() with trailing token
    • PASS [expected FAIL] subtest: In-block var() with leading token
    • PASS [expected FAIL] subtest: Plain var() (custom property)
    • PASS [expected FAIL] subtest: Whole-value block with var() (custom property)
    • PASS [expected FAIL] subtest: Whole-value block with var() (spaces, custom property)
    • And 4 more unexpected results...
  • OK /css/css-transitions/parsing/starting-style-parsing.html
    • PASS [expected FAIL] subtest: @starting-style div is not valid
    • PASS [expected FAIL] subtest: @starting-style () is not valid
    • PASS [expected FAIL] subtest: @starting-style ( {} is not valid
    • PASS [expected FAIL] subtest: @starting-style } is not valid
  • OK /css/cssom/CSSStyleSheet.html
    • PASS [expected FAIL] subtest: removeRule with no argument removes first rule
    • PASS [expected FAIL] subtest: removeRule on empty style sheet throws
    • PASS [expected FAIL] subtest: addRule with @media rule
    • PASS [expected FAIL] subtest: removeRule(1)
    • PASS [expected FAIL] subtest: addRule with #foo selectors
    • PASS [expected FAIL] subtest: addRule with no argument adds "undefined" selector
    • PASS [expected FAIL] subtest: addRule with index greater than length throws
    • PASS [expected FAIL] subtest: cssRules and rules are the same object
  • OK /css/cssom/idlharness.html
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: attribute rules
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: operation addRule(optional DOMString, optional DOMString, optional unsigned long)
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: operation removeRule(optional unsigned long)
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: sheet must inherit property "rules" with the proper type
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: sheet must inherit property "addRule(optional DOMString, optional DOMString, optional unsigned long)" with the proper type
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: calling addRule(optional DOMString, optional DOMString, optional unsigned long) on sheet with too few arguments must throw TypeError
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: sheet must inherit property "removeRule(optional unsigned long)" with the proper type
    • PASS [expected FAIL] subtest: CSSStyleSheet interface: calling removeRule(optional unsigned long) on sheet with too few arguments must throw TypeError
  • OK /css/cssom/insertRule-across-context.html
    • PASS [expected FAIL] subtest: The constructor of inserted rule object must be from iframe

@github-actions

github-actions Bot commented Apr 3, 2025

Copy link
Copy Markdown

⚠️ Try run (#14245877250) failed.

@Loirooriol
Loirooriol force-pushed the deprecated-CSSStyleSheet-members branch from c6e3aef to 69639a5 Compare April 3, 2025 15:25
@Loirooriol
Loirooriol marked this pull request as ready for review April 3, 2025 15:27
@Loirooriol
Loirooriol requested a review from gterzian as a code owner April 3, 2025 15:27
@Loirooriol
Loirooriol enabled auto-merge April 3, 2025 15:27
@Loirooriol
Loirooriol added this pull request to the merge queue Apr 3, 2025
Merged via the queue into servo:main with commit f29c182 Apr 3, 2025
@Loirooriol
Loirooriol deleted the deprecated-CSSStyleSheet-members branch April 3, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-content/bindings The DOM bindings A-content/script Related to the script thread

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants