Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getComputedStyle for width and height #32437

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

Loirooriol
Copy link
Contributor

It was providing a length whenever the element generates a box. However, these properties don't apply to non-replaced inlines, so the computed value should be provided instead.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes

@Loirooriol Loirooriol added A-layout/2020 https://github.com/servo/servo/wiki/Layout-2020 T-linux-wpt-2020 Do a try run of the WPT labels Jun 4, 2024
@Loirooriol Loirooriol requested a review from mrobinson June 4, 2024 16:10
@github-actions github-actions bot removed the T-linux-wpt-2020 Do a try run of the WPT label Jun 4, 2024
Copy link

github-actions bot commented Jun 4, 2024

🔨 Triggering try run (#9370523061) for Linux WPT

Copy link

github-actions bot commented Jun 4, 2024

Test results for linux-wpt-layout-2020 from try job (#9370523061):

Flaky unexpected result (13)
  • FAIL [expected PASS] /_mozilla/css/dirty_viewport.html (#13731)
  • TIMEOUT [expected CRASH] /css/css-transitions/dynamic-root-element.html
  • TIMEOUT [expected OK] /fetch/api/redirect/redirect-keepalive.https.any.html (#32153)
    • TIMEOUT [expected PASS] subtest: [keepalive][iframe][load] mixed content redirect; setting up

      Test timed out
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • TIMEOUT [expected PASS] /html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html (#30063)
  • OK /html/dom/render-blocking/script-inserted-style-element.html
    • PASS [expected FAIL] subtest: Rendering is blocked before render-blocking resources are loaded
  • ERROR /html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html (#16179)
    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) IMG usemap="no-hash-id"

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • FAIL [expected PASS] subtest: HTML (quirks) OBJECT usemap=undefined

      assert_not_equals: sanity check (too many tests to fit in viewport?) got disallowed value null
      

    • And 64 more unexpected results...
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK /html/semantics/embedded-content/the-img-element/non-active-document.html (#21544)
    • FAIL [expected PASS] subtest: DOMParser

      assert_unreached: got unexpected load event Reached unreachable code
      

    • FAIL [expected PASS] subtest: createHTMLDocument

      assert_unreached: got unexpected error event Reached unreachable code
      

    • FAIL [expected PASS] subtest: <template>

      assert_unreached: got unexpected error event Reached unreachable code
      

  • OK [expected TIMEOUT] /html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html (#29724)
    • PASS [expected TIMEOUT] subtest: reparent-form-during-planned-navigation-task
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • PASS [expected FAIL] subtest: The end: DOMContentLoaded and defer scripts
  • OK /html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html (#27659)
    • FAIL [expected PASS] subtest: async document.write in a module

      assert_true: onload must be called expected true got false
      

  • TIMEOUT /resource-timing/test_resource_timing.https.html (#25216)
    • FAIL [expected PASS] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img)

      assert_equals: expected 2616320 but got 2616064
      

Stable unexpected results that are known to be intermittent (7)
  • TIMEOUT /fetch/metadata/generated/element-img-environment-change.https.sub.html (#30111)
    • FAIL [expected NOTRUN] subtest: sec-fetch-site - Same site, no attributes

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

    • FAIL [expected NOTRUN] subtest: sec-fetch-site - Same-Origin -> Cross-Site -> Same-Origin redirect, no attributes

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

    • FAIL [expected NOTRUN] subtest: sec-fetch-site - Same-Origin -> Same-Site -> Same-Origin redirect, no attributes

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

    • FAIL [expected NOTRUN] subtest: sec-fetch-site - Cross-Site -> Same Origin, no attributes

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

    • TIMEOUT [expected NOTRUN] subtest: sec-fetch-site - Cross-Site -> Same-Site, no attributes

      Test timed out
      

  • TIMEOUT /fetch/metadata/generated/element-img-environment-change.sub.html (#30111)
    • FAIL [expected PASS] subtest: sec-fetch-site - Not sent to non-trustworthy same-origin destination, no attributes

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

  • 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
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/media-elements/track/track-element/no-cuechange-before-play.html (#31014)
    • TIMEOUT [expected FAIL] subtest: Ensure that the 'cuechange' event is not fired before video playback has begun.

      Test timed out
      

  • CRASH [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
  • CRASH [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
  • OK /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.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"
      

Stable unexpected results (3)
  • OK /css/css-transitions/pseudo-elements-002.html
    • PASS [expected FAIL] subtest: Check that transitions run on a pseudo element whose ancestor changes display type.
  • OK /html/rendering/non-replaced-elements/hidden-elements.html
    • PASS [expected FAIL] subtest: embed[hidden=''] element should be inline 0x0
  • OK /html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html
    • FAIL [expected PASS] subtest: fieldset with display: inline

      assert_equals: expected "9px" but got "auto"
      

Copy link

github-actions bot commented Jun 4, 2024

⚠️ Try run (#9370523061) failed.

It was providing a length whenever the element generates a box.
However, these properties don't apply to non-replaced inlines,
so the computed value should be provided instead.
@Loirooriol Loirooriol enabled auto-merge June 4, 2024 18:19
@Loirooriol Loirooriol added this pull request to the merge queue Jun 4, 2024
Merged via the queue into servo:main with commit 5f538b8 Jun 4, 2024
9 checks passed
@Loirooriol Loirooriol deleted the getComputedStyle-size branch June 4, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-layout/2020 https://github.com/servo/servo/wiki/Layout-2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants