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

Treat indefinite percentages as auto for margin collapse #32059

Merged

Conversation

Loirooriol
Copy link
Contributor

The top and bottom margins of an element can collapse through if its height is auto or zero. Indefinite percentages behave as auto, so they shouldn't prevent the margins from collapsing.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___

@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 Apr 11, 2024
@github-actions github-actions bot removed the T-linux-wpt-2020 Do a try run of the WPT label Apr 11, 2024
Copy link

🔨 Triggering try run (#8651561510) for Linux WPT

Copy link

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

Flaky unexpected result (19)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • PASS [expected FAIL] subtest: Matching font-weight: '400' should prefer '450 460' over '500'
    • PASS [expected FAIL] subtest: Matching font-weight: '500' should prefer '500' over '450 460'
    • PASS [expected FAIL] subtest: Matching font-weight: '500' should prefer '501 550' over '502 560'
    • PASS [expected FAIL] subtest: Matching font-stretch: '110%' should prefer '110% 120%' over '115% 116%'
    • PASS [expected FAIL] subtest: Matching font-style: 'italic' should prefer 'oblique 0deg' over 'oblique -60deg -30deg'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 20deg' should prefer 'oblique 10deg' over 'italic'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 0deg' should prefer 'oblique 0deg' over 'oblique 5deg'
  • PASS [expected FAIL] /css/css-sizing/dynamic-available-size-iframe.html (#31559)
  • TIMEOUT [expected OK] /dom/events/webkit-transition-end-event.html (#26497)
    • TIMEOUT [expected PASS] subtest: webkitTransitionEnd event listener should not trigger if an unprefixed listener also exists

      Test timed out
      

    • NOTRUN [expected PASS] subtest: webkitTransitionEnd event listener should not trigger if an unprefixed event handler also exists
    • NOTRUN [expected FAIL] subtest: event types for prefixed and unprefixed transitionend event listeners should be named appropriately
    • NOTRUN [expected PASS] subtest: webkitTransitionEnd event listener is case sensitive
  • TIMEOUT /fetch/api/basic/keepalive.any.html (#29536)
    • TIMEOUT [expected PASS] subtest: [keepalive] simple GET request on 'load' [no payload]; setting up

      Test timed out
      

    • NOTRUN [expected TIMEOUT] subtest: [keepalive] simple GET request on 'pagehide' [no payload]; setting up
  • TIMEOUT [expected OK] /fetch/api/redirect/redirect-keepalive.https.any.html
    • TIMEOUT [expected PASS] subtest: [keepalive][iframe][load] mixed content redirect; setting up

      Test timed out
      

  • OK /fetch/private-network-access/worker-blob-fetch.tentative.window.html (#30064)
    • PASS [expected FAIL] subtest: local to local: success.
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html (#28691)
    • PASS [expected FAIL] subtest: load event does not fire on window.open('about:blank')
  • 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."
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • PASS [expected FAIL] subtest: Same-origin navigation started from unload handler must be ignored
  • 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])
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.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])
      

  • TIMEOUT [expected OK] /html/browsers/history/the-history-interface/traverse_the_history_write_onload_1.html (#21581)
    • TIMEOUT [expected PASS] subtest: Traverse the history when a history entry is written in the load event

      Test timed out
      

  • 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
      

  • TIMEOUT /html/webappapis/scripting/events/compile-event-handler-settings-objects.html (#24246)
    • TIMEOUT [expected FAIL] subtest: The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document

      Test timed out
      

  • TIMEOUT /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img)
  • TIMEOUT [expected OK] /webmessaging/with-ports/017.html (#24486)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, about:blank

      Test timed out
      

  • OK [expected TIMEOUT] /webmessaging/with-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
Stable unexpected results that are known to be intermittent (9)
  • TIMEOUT [expected OK] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html (#30970)
  • OK /html/interaction/focus/the-autofocus-attribute/document-with-fragment-valid.html (#28259)
    • PASS [expected FAIL] subtest: Autofocus elements in top-level browsing context's documents with URL fragments should be skipped.
  • OK [expected CRASH] /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"
      

  • TIMEOUT [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
  • CRASH [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
  • TIMEOUT [expected OK] /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
  • OK /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • 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 [expected TIMEOUT] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • PASS [expected NOTRUN] subtest: Test that iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that crossorigin iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe navigations are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that iframe refreshes are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that crossorigin iframe refreshes are not observable by the parent
    • PASS [expected NOTRUN] subtest: Test that cross-site iframe refreshes are not observable by the parent
  • OK /workers/WorkerGlobalScope-close.html (#23064)
    • PASS [expected FAIL] subtest: Test sending a message after closing.
Stable unexpected results (1)
  • PASS [expected FAIL] /css/CSS2/normal-flow/margin-collapse-through-percentage-height-block.html

@Loirooriol Loirooriol force-pushed the collapse-thru-indefinite-percentages branch from 86fc370 to bc01452 Compare April 11, 2024 19:23
@Loirooriol Loirooriol marked this pull request as ready for review April 11, 2024 19:23
Copy link

⚠️ Try run (#8651561510) failed.

components/layout_2020/flow/mod.rs Outdated Show resolved Hide resolved
components/layout_2020/flow/mod.rs Show resolved Hide resolved
The top and bottom margins of an element can collapse through if its
height is auto or zero. Indefinite percentages behave as auto, so they
shouldn't prevent the margins from collapsing.

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
@Loirooriol Loirooriol force-pushed the collapse-thru-indefinite-percentages branch from bc01452 to 45abcfe Compare April 12, 2024 11:45
@Loirooriol Loirooriol added this pull request to the merge queue Apr 12, 2024
Merged via the queue into servo:main with commit 95654b7 Apr 12, 2024
9 checks passed
@Loirooriol Loirooriol deleted the collapse-thru-indefinite-percentages branch April 12, 2024 13:15
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