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

Ignore spaces before atomic inline for the min-content size #31896

Merged

Conversation

Loirooriol
Copy link
Contributor

@Loirooriol Loirooriol commented Mar 27, 2024

For the min-content size we should wrap lines wherever is possible,
so wrappable spaces shouldn't increase the length of the line,
they will just be removed or hang at the end of the line.


  • ./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/inline A-layout/2020 https://github.com/servo/servo/wiki/Layout-2020 T-linux-wpt-2020 Do a try run of the WPT labels Mar 27, 2024
@github-actions github-actions bot removed the T-linux-wpt-2020 Do a try run of the WPT label Mar 27, 2024
Copy link

🔨 Triggering try run (#8452391477) for Linux WPT

Copy link

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

Flaky unexpected result (16)
  • FAIL [expected PASS] /_mozilla/css/iframe/hide_and_show.html (#15265)
  • CRASH [expected PASS] /_webgl/conformance/glsl/bugs/nested-functions-should-not-crash.html (#30680)
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • PASS [expected FAIL] subtest: Matching font-weight: '400' should prefer '500' over '350 399'
    • PASS [expected FAIL] subtest: Matching font-weight: '430' should prefer '340 398' over '501 550'
    • PASS [expected FAIL] subtest: Matching font-weight: '501' should prefer '502 510' over '503 520'
    • PASS [expected FAIL] subtest: Matching font-stretch: '110%' should prefer '115% 116%' over '105%'
    • PASS [expected FAIL] subtest: Matching font-stretch: '90%' should prefer '50% 80%' over '60% 70%'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 20deg' should prefer 'oblique 0deg' over 'oblique -50deg -20deg'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 21deg' should prefer 'italic' over 'oblique 0deg'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique -21deg' should prefer 'oblique -10deg' over 'italic'
  • OK /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • PASS [expected FAIL] subtest: listeners are called correct number of times
  • TIMEOUT /css/cssom-view/MediaQueryList-extends-EventTarget.html (#25269)
    • FAIL [expected PASS] subtest: listeners for "change" type are called

      assert_equals: expected 1 but got 0
      

  • OK /css/cssom-view/matchMedia.html (#31428)
    • PASS [expected FAIL] subtest: iframe.matchMedia("(min-width: 150px)") matches
  • 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])
      

  • OK [expected TIMEOUT] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html (#30970)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
    • 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 OK] /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-cross-site.tentative.sub.window.html (#31754)
    • TIMEOUT [expected FAIL] subtest: A same-site unsandboxed iframe navigation does not consume user activation and allows top-level navigation.

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: A same-site unsandboxed iframe navigation without sticky user activation does not allow top-level navigation.
  • OK /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • PASS [expected FAIL] subtest: Check that rel=noopener with target=_self does a normal load
  • OK /html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html (#26243)
    • FAIL [expected PASS] subtest: document.write in an imported module

      assert_true: onload must be called expected true got false
      

  • TIMEOUT [expected OK] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • TIMEOUT [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Test that iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe refreshes are not observable by the parent
  • OK [expected TIMEOUT] /webmessaging/with-ports/017.html (#24486)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, about:blank
  • OK [expected TIMEOUT] /webmessaging/without-ports/017.html (#24486)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, about:blank
Stable unexpected results that are known to be intermittent (11)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-with-non-reserved-words.html (#16216)
    • NOTRUN [expected PASS] subtest: Overall test
  • PASS [expected FAIL] /css/css-sizing/dynamic-available-size-iframe.html (#31559)
  • TIMEOUT [expected OK] /custom-elements/reactions/customized-builtins/HTMLMediaElement.html (#31014)
  • TIMEOUT /fetch/metadata/generated/element-img-environment-change.sub.html (#30111)
    • FAIL [expected TIMEOUT] subtest: sec-fetch-site - Not sent to non-trustworthy same-site destination, no attributes

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

    • TIMEOUT [expected NOTRUN] subtest: sec-fetch-site - Not sent to non-trustworthy cross-site destination, no attributes

      Test timed out
      

  • PASS [expected CRASH] /html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html (#30063)
  • FAIL [expected CRASH] /html/canvas/element/manual/text/canvas.2d.disconnected.html (#30063)
  • OK /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 [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/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: double quote in filename (formdata event)
  • OK [expected CRASH] /html/semantics/forms/the-fieldset-element/disabled-003.html (#31730)
Stable unexpected results (3)
  • PASS [expected FAIL] /css/css-tables/absolute-tables-013.html
  • PASS [expected FAIL] /css/css-tables/absolute-tables-014.html
  • PASS [expected FAIL] /css/css-tables/absolute-tables-015.html

Copy link

⚠️ Try run (#8452391477) failed.

For the min-content size we should wrap lines wherever is possible,
so wrappable spaces shouldn't increase the length of the line,
they will just be removed or hang at the end of the line.
@Loirooriol Loirooriol force-pushed the intrinsic-sizing-space-before-atomic branch from 175e229 to 27e366d Compare March 27, 2024 14:01
@Loirooriol Loirooriol marked this pull request as ready for review March 27, 2024 14:02
Copy link
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix.

components/layout_2020/flow/inline.rs Show resolved Hide resolved
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
@Loirooriol Loirooriol added this pull request to the merge queue Mar 27, 2024
Merged via the queue into servo:main with commit b77ec08 Mar 27, 2024
9 checks passed
@Loirooriol Loirooriol deleted the intrinsic-sizing-space-before-atomic branch March 27, 2024 18:02
ektuu pushed a commit to ektuu/servo that referenced this pull request Mar 28, 2024
)

* Ignore spaces before atomic inline for the min-content size

For the min-content size we should wrap lines wherever is possible,
so wrappable spaces shouldn't increase the length of the line,
they will just be removed or hang at the end of the line.

* Add a clarifying comment

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
MunishMummadi pushed a commit to MunishMummadi/servo that referenced this pull request Mar 29, 2024
)

* Ignore spaces before atomic inline for the min-content size

For the min-content size we should wrap lines wherever is possible,
so wrappable spaces shouldn't increase the length of the line,
they will just be removed or hang at the end of the line.

* Add a clarifying comment

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-layout/inline 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