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

layout2020 (flexbox): Implement start, end, and space-evenly content alignment #31724

Merged
merged 2 commits into from Apr 29, 2024

Conversation

nicoburns
Copy link
Contributor

@nicoburns nicoburns commented Mar 18, 2024

Implements support for start, end and space-evenly values of the align- and justify- content properties. Also fixes alignment for some of the other values (space-between) in some cases. Note that the actual alignment logic is duplicated for AlignContent and JustifyContent. This is required as they are different types. If we switch to Gecko's alignment implementation then this could be de-duplicated as they become wrappers of a shared underling type.

Depends on servo/stylo#21

Questions

  • Is there an automated way to update expected WPT test results? I have updated them manually for this PR.

Notes on WPT test changes:

align-content-wrap-003.html

  • PASS due to added space-evenly support
  • PASS due to fixed space-between behaviour when content overflows
  • FAIL is genuine according to test. But our result matches both Chrome and Firefox.

align-content-wrap-005.html

  • FAIL due to missing direction support (was previously passing by coincidence)
  • FAIL due to missing direction support (was previously passing by coincidence)

flexbox_justifycontent-rtl-001.html

  • PASS due to added space-evenly support
  • FAIL due to missing direction support (was previously passing by coincidence)

flexbox-flex-direction-column-percentage-ignored.html

  • This file tests flexbox columns which are entirely unimplemented, so it is expected that this test would fail (and surprising that it was passing before).

overflow-auto-008.html

  • Suspected spurious error. Off by one and these changes should not affect that test.

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

@nicoburns nicoburns changed the title Layout2020 (flexbox): Implement start, end, and space-evenly content alignment layout2020 (flexbox): Implement start, end, and space-evenly content alignment Mar 18, 2024
@jdm
Copy link
Member

jdm commented Mar 18, 2024

https://github.com/servo/servo/blob/main/tests/wpt/README.md#updating-test-expectations should answer your question about updating test expectations.

@nicoburns
Copy link
Contributor Author

@jdm Thanks! I've noticed that this PR is failing the "Tidy" CI check due to duplicate entries in the Cargo.lock. Is there a process for updating Cargo.lock to avoid this? (I've updated Cargo.toml to point to temporarily point to my branch of Stylo that this PR depends on - and I deleted and recreated Cargo.toml to make to work but it seems like CI is not even running most of it's checks in the current state).

@jdm
Copy link
Member

jdm commented Mar 19, 2024

You can update https://github.com/servo/servo/blob/main/servo-tidy.toml to allow duplicates.

@jdm
Copy link
Member

jdm commented Mar 19, 2024

It looks like you ran a general cargo update, though, which would be good to avoid unless it's actually required for these changes.

@nicoburns
Copy link
Contributor Author

OK, I've fixed the cargo.lock update to be just Stylo. The WPT check still seems to be skipped (does this need to be triggered manually?), but we seem to be passing the checks that have been run :)

Copy link

🔨 Triggering try run (#8339499036) for Linux WPT

@mrobinson
Copy link
Member

WPT tests are triggered via adding labels. They take too long to run for every push. I've triggered them here.

Copy link

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

Flaky unexpected result (21)
  • FAIL [expected PASS] /_mozilla/css/dirty_viewport.html (#13731)
  • FAIL [expected PASS] /_mozilla/mozilla/iframe/resize_after_load.html (#13573)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-with-non-reserved-words.html (#16216)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected PASS] /css/css-fonts/font-size-adjust-reload.html (#30678)
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 20deg' should prefer 'oblique 40deg 50deg' over 'oblique 10deg'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 10deg' should prefer 'oblique 10deg' over 'oblique 5deg'
  • TIMEOUT /css/cssom-view/MediaQueryList-extends-EventTarget.html (#25269)
    • TIMEOUT [expected PASS] subtest: onchange removes listener

      Test timed out
      

    • NOTRUN [expected PASS] subtest: listeners for "change" type are called
    • NOTRUN [expected PASS] subtest: listeners with different type are not called
    • NOTRUN [expected TIMEOUT] subtest: addEventListener "once" option is respected
  • OK /css/cssom-view/MediaQueryListEvent.html (#25275)
    • FAIL [expected PASS] subtest: argument of addListener

      assert_true: expected true got false
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html (#29048)
    • PASS [expected FAIL] subtest: Navigating to a different document with link click
  • 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_2.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • 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])
      

  • 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 [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"
      

  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • PASS [expected FAIL] subtest: multipart/form-data: 0x00 in value (normal form)
  • 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/historical.html (#28568)
    • PASS [expected FAIL] subtest: <input name=isindex> should not be supported
  • ERROR /resource-timing/content-type-parsing.html (#29131)
    • FAIL [expected TIMEOUT] subtest: mime-type 16 : text/html;charset=�gbk

      assert_equals: expected (string) "text/html" but got (undefined) undefined
      

    • TIMEOUT [expected NOTRUN] subtest: mime-type 17 : text/html;charset= gbk

      Test timed out
      

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

      assert_equals: expected 6683136 but got 6683392
      

  • OK [expected ERROR] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results that are known to be intermittent (17)
  • FAIL [expected PASS] /_mozilla/css/iframe/hide_and_show.html (#15265)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • PASS [expected FAIL] /css/css-sizing/dynamic-available-size-iframe.html (#31559)
  • OK /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • PASS [expected FAIL] subtest: listeners are called correct number of times
  • 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/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src=''

      assert_unreached: load should not be fired Reached unreachable code
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html (#28691)
    • FAIL [expected PASS] subtest: load event does not fire on window.open('about:blank')

      assert_unreached: load should not be fired Reached unreachable code
      

  • TIMEOUT [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
  • TIMEOUT [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
  • CRASH [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
  • OK [expected CRASH] /html/semantics/forms/the-fieldset-element/disabled-003.html (#31730)
  • 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 [expected OK] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • TIMEOUT [expected PASS] subtest: Test that iframe navigations are not observable by the parent, even after history navigations by the parent

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent
    • 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
  • TIMEOUT /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img)
  • 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/with-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
  • 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 (4)
  • PASS [expected FAIL] /css/css-flexbox/flexbox-flex-direction-column-percentage-ignored.html
  • FAIL [expected PASS] /css/css-flexbox/flexbox-mbp-horiz-003-reverse.xhtml
  • FAIL [expected PASS] /css/css-flexbox/flexbox-mbp-horiz-003.xhtml
  • FAIL [expected PASS] /css/css-flexbox/flexbox-mbp-horiz-003v.xhtml

Copy link

⚠️ Try run (#8339499036) failed.

@nicoburns
Copy link
Contributor Author

Hmm... the stable unexpected results (both PASS and FAIL) are all test expectations that I changed which are different on my local machine (macos m1). But I guess I should change them back. Frustrating that there are platform differences here (I'm assuming that's what's going on as the results are consistent for me). I feel like there shouldn't be!

The /css/css-flexbox/flexbox-mbp-horiz-003-* tests have relatively simple layouts but render complex borders so I suspect it may be those that are causing the failures (but I can't verify because the tests are passing for me).

@nicoburns
Copy link
Contributor Author

@mrobinson

  1. Can I get another WPT run on this? I've updated the test expectations match the previous run. These changes were al reverting expectations back to the way they are currently set on main so I am expecting that to be uncontroversial.

  2. Assuming that there are no "Stable unexpected results" in the next run, what would it take to get this merged?

    I assume that we would need to:

    It seems to me that this process would be easier if we pinned a specific git commit of stylo in servo's Cargo.toml (rather than relying on Cargo.lock for this - which seems easy to accidentally unpin), but perhaps there is some reason why this can't be done?

P.S. What are the criteria for being added to the Servo github organisation / who's decision would that be? It would be good to be able to add the CI-triggering labels myself so I don't have to take up anybody else's time

@mrobinson mrobinson added the T-linux-wpt-2020 Do a try run of the WPT label Mar 25, 2024
@github-actions github-actions bot removed the T-linux-wpt-2020 Do a try run of the WPT label Mar 25, 2024
Copy link

🔨 Triggering try run (#8420665004) for Linux WPT

@mrobinson
Copy link
Member

mrobinson commented Mar 25, 2024

  1. Can I get another WPT run on this? I've updated the test expectations match the previous run. These changes were al reverting expectations back to the way they are currently set on main so I am expecting that to be uncontroversial.

Apologies for the delay. I've triggered a new WPT run.

  1. Assuming that there are no "Stable unexpected results" in the next run, what would it take to get this merged?
    I assume that we would need to:

Someone who understands flex layout or is willing to dive in here, will just need to review these changes. I think we also need to land servo/stylo#21 first.

P.S. What are the criteria for being added to the Servo github organisation / who's decision would that be? It would be good to be able to add the CI-triggering labels myself so I don't have to take up anybody else's time

It's all a bit informal now, but we should likely add a bit more more process here.

Copy link

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

Flaky unexpected result (20)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-with-non-reserved-words.html (#16216)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected PASS] /css/css-fonts/font-size-adjust-reload.html (#30678)
  • OK /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • PASS [expected FAIL] subtest: listeners are called correct number of times
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html (#29084)
    • TIMEOUT [expected FAIL] subtest: changing srcdoc to about:srcdoc#yo then another srcdoc does two push navigations and we can navigate back

      Test timed out
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • FAIL [expected PASS] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src=''

      assert_unreached: load should not be fired Reached unreachable code
      

  • 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/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
      

  • OK [expected TIMEOUT] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html (#30970)
  • TIMEOUT [expected OK] /html/semantics/document-metadata/the-base-element/base_target_does_not_affect_location_assignment.html
    • TIMEOUT [expected PASS] subtest: base_target_does_not_affect_location_assignment

      Test timed out
      

  • OK /html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html (#21666)
    • PASS [expected FAIL] subtest: <img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (standards mode)
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: non-ASCII in name and value (normal form)
  • OK [expected CRASH] /html/semantics/forms/the-fieldset-element/disabled-003.html (#31730)
  • 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
  • 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 [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/without-ports/017.html (#24486)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, about:blank
  • TIMEOUT [expected OK] /webmessaging/without-ports/018.html (#24485)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, javascript:

      Test timed out
      

  • OK /workers/WorkerGlobalScope-close.html (#23064)
    • PASS [expected FAIL] subtest: Test sending a message after closing.
  • OK [expected ERROR] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results that are known to be intermittent (18)
  • FAIL [expected PASS] /_mozilla/css/iframe/hide_and_show.html (#15265)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • 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: '399' should prefer '340 360' over '200 300'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 21deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique -10deg' should prefer 'oblique -10deg' over 'oblique -5deg'
  • PASS [expected FAIL] /css/css-sizing/dynamic-available-size-iframe.html (#31559)
  • OK /css/cssom-view/MediaQueryList-addListener-handleEvent.html (#24571)
    • FAIL [expected PASS] subtest: doesn't look up handleEvent method on callable event listeners

      assert_equals: expected 1 but got 0
      

  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • PASS [expected TIMEOUT] subtest: background-image sec-fetch-site - HTTPS downgrade (header not sent)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html (#28691)
    • FAIL [expected PASS] subtest: load event does not fire on window.open('about:blank')

      assert_unreached: load should not be fired Reached unreachable code
      

  • 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_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])
      

  • 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)
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Host element with delegatesFocus including no focusable descendants should be skipped

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Area element should support autofocus
  • CRASH [expected TIMEOUT] /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-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"
      

  • 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.
  • TIMEOUT /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img)
  • OK [expected TIMEOUT] /webmessaging/with-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
  • TIMEOUT [expected OK] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html (#29053)
    • TIMEOUT [expected PASS] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe

      Test timed out
      

Stable unexpected results (20)
  • FAIL [expected PASS] /_mozilla/css/text_shadow_decorations_a.html
  • FAIL [expected PASS] /_mozilla/css/text_shadow_multiple_shadows_a.html
  • FAIL [expected PASS] /_mozilla/css/text_shadow_simple_a.html
  • FAIL [expected PASS] /css/css-backgrounds/box-shadow-multiple-001.html
  • PASS [expected FAIL] /css/css-pseudo/highlight-currentcolor-painting-text-shadow-001.html
  • OK /css/css-text-decor/inheritance.html
    • FAIL [expected PASS] subtest: Property text-shadow has initial value none

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-shadow inherits

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

  • FAIL [expected PASS] /css/css-text-decor/text-shadow/basic-negcoord.html
  • FAIL [expected PASS] /css/css-text-decor/text-shadow/basic-opacity.html
  • FAIL [expected PASS] /css/css-text-decor/text-shadow/basic.html
  • FAIL [expected PASS] /css/css-text-decor/text-shadow/blur.html
  • FAIL [expected PASS] /css/css-text-decor/text-shadow/color-inherit.html
  • FAIL [expected PASS] /css/css-text-decor/text-shadow/multiple-noblur.html
  • OK /css/css-text-decor/text-shadow/parsing/text-shadow-computed.html
    • FAIL [expected PASS] subtest: Property text-shadow value 'none'

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-shadow value '10px 20px'

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-shadow value 'red 10px 20px 30px'

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-shadow value 'calc(0.5em + 10px) calc(0.5em + 10px) calc(0.5em + 10px)'

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-shadow value 'calc(-0.5em + 10px) calc(-0.5em + 10px) calc(-0.5em + 10px)'

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-shadow value '10px 20px, 30px 40px'

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

    • FAIL [expected PASS] subtest: Property text-shadow value 'lime 10px 20px 30px, red 40px 50px'

      assert_true: text-shadow doesn't seem to be supported in the computed style expected true got false
      

  • OK /css/css-text-decor/text-shadow/parsing/text-shadow-valid.html
    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "none" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "10px 20px" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "10px 20px 30px" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "calc(1em + 2px) calc(3em + 4px) calc(5em + 6px)" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "-10px 20px 30px" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "10px -20px 30px" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "rgb(255, 0, 0) 10px 20px" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "10px 20px 30px lime" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "10px 20px, 30px 40px" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

    • FAIL [expected PASS] subtest: e.style['text-shadow'] = "lime 10px 20px 30px, blue 40px 50px" should set the property value

      assert_not_equals: property should be set got disallowed value ""
      

  • FAIL [expected PASS] /css/css-text-decor/text-shadow/quirks-decor-noblur.html
  • FAIL [expected PASS] /css/css-text-decor/text-shadow/standards-decor-noblur-2.html
  • FAIL [expected PASS] /css/css-text-decor/text-shadow/standards-decor-noblur.html
  • OK /css/css-transitions/animations/text-shadow-interpolation.html
    • FAIL [expected PASS] subtest: CSS Transitions: property <text-shadow> from neutral to [green 20px 20px 20px] at (-0.3) should be [rgb(255, 176, 0) 7px 33px 7px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions: property <text-shadow> from neutral to [green 20px 20px 20px] at (0) should be [rgb(255, 165, 0) 10px 30px 10px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions: property <text-shadow> from neutral to [green 20px 20px 20px] at (0.3) should be [rgb(179, 154, 0) 13px 27px 13px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions: property <text-shadow> from neutral to [green 20px 20px 20px] at (0.6) should be [rgb(102, 143, 0) 16px 24px 16px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions: property <text-shadow> from neutral to [green 20px 20px 20px] at (1) should be [rgb(0, 128, 0) 20px 20px 20px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions: property <text-shadow> from neutral to [green 20px 20px 20px] at (1.5) should be [rgb(0, 110, 0) 25px 15px 25px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions with transition: all: property <text-shadow> from neutral to [green 20px 20px 20px] at (-0.3) should be [rgb(255, 176, 0) 7px 33px 7px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions with transition: all: property <text-shadow> from neutral to [green 20px 20px 20px] at (0) should be [rgb(255, 165, 0) 10px 30px 10px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions with transition: all: property <text-shadow> from neutral to [green 20px 20px 20px] at (0.3) should be [rgb(179, 154, 0) 13px 27px 13px]

      assert_true: 'to' value should be supported expected true got false
      

    • FAIL [expected PASS] subtest: CSS Transitions with transition: all: property <text-shadow> from neutral to [green 20px 20px 20px] at (0.6) should be [rgb(102, 143, 0) 16px 24px 16px]

      assert_true: 'to' value should be supported expected true got false
      

    • And 116 more unexpected results...
  • OK /css/css-variables/variable-substitution-shadow-properties.html
    • FAIL [expected PASS] subtest: text-shadow

      assert_equals: Expected Value should match actual value expected "rgb(0, 128, 0) 1px 1px 1px" but got ""
      

  • OK /quirks/unitless-length/excluded-properties-002.html
    • FAIL [expected PASS] subtest: Property text-shadow does not support quirky length

      assert_unreached: Property text-shadow not supported Reached unreachable code
      

Copy link

⚠️ Try run (#8420665004) failed.

@nicoburns
Copy link
Contributor Author

Stable unexpected results (20)

I think these failures were due to servo/stylo#21 becoming out of date due to servo/stylo#22 being recently landed. I've rebased. I suppose we'll need to do another WPT run?

Someone who understands flex layout or is willing to dive in here, will just need to review these changes. I think we also need to land servo/stylo#21 first.

@Loirooriol would you be an appropriate person to review this and servo/stylo#21 (which is tiny btw). Also, is there anyone else active in the Servo project who is familiar enough with Flexbox to review such PRs, because I have a bunch more changes like this planned (streaming in flexbox-local changes from well-tested code in Taffy, so I'm pretty confident in the changes, but I imagine Servo will still want them reviewed).

In this case servo main actually builds fine with the stylo PR applied (as Servo code has a fallback path in the code that matches on these enums) so it could probably be landed separately. In general there seems to be quite a tricky dance where:

  1. The Servo change needs to approved
  2. The Style change needs to be approved
  3. The Stylo change needs to be landed
  4. The Servo PR needs updated to point back to Stylo main or dated (e.g. 2023-09-01 branch)
  5. The Servo PR then needs to be merged

I suppose once 1. and 2. are completed, the PR author might be able to complete steps 3-5?

@Loirooriol Loirooriol added T-linux-wpt-2013 Do a try run of the WPT (legacy layout) T-linux-wpt-2020 Do a try run of the WPT labels Mar 26, 2024
@github-actions github-actions bot removed the T-linux-wpt-2013 Do a try run of the WPT (legacy layout) label Mar 26, 2024
@nicoburns
Copy link
Contributor Author

@mrobinson I think this also needs a "layout 2013" WPT run

P.S. I've rebased this against latest main and latest stylo main after the new stylo update was merged yesterday, although as far as I can tell this hasn't caused and changes in the WPT test results.

@mrobinson
Copy link
Member

All of the code changes here are in the layout_2020 directory so it's really unlikely that this has affected results for legacy layout. That said, before landing this, the merge queue will run the legacy layout (layout 2013) WPT suite as well so even if it did change results, it would be caught before landing.

@nicoburns
Copy link
Contributor Author

All of the code changes here are in the layout_2020 directory so it's really unlikely that this has affected results for legacy layout. That said, before landing this, the merge queue will run the legacy layout (layout 2013) WPT suite as well so even if it did change results, it would be caught before landing.

There is also a Stylo change which seems to have changed layout2013 parsing results.

I don't really care if the tests are run or not. My main concern is trying to reduce latency with regard to test runs, such that if layout2013 needs to be run I'd rather it be run sooner than later.

@mrobinson mrobinson added the T-linux-wpt-2013 Do a try run of the WPT (legacy layout) label Apr 17, 2024
@github-actions github-actions bot removed the T-linux-wpt-2013 Do a try run of the WPT (legacy layout) label Apr 17, 2024
Copy link

🔨 Triggering try run (#8716833107) for Linux WPT

Copy link

Test results for linux-wpt-layout-2013 from try job (#8716833107):

Flaky unexpected result (15)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.html (#29081)
    • TIMEOUT [expected FAIL] subtest: origin referrer policy used to create the starting page

      Test timed out
      

    • NOTRUN [expected TIMEOUT] subtest: no-referrer referrer policy used to create the starting page
  • 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/browsers/history/the-history-interface/traverse-during-unload.html (#28688)
    • TIMEOUT [expected PASS] subtest: Traversing the history during unload

      Test timed out
      

  • OK [expected TIMEOUT] /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 /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: non-ASCII in name and value (formdata event)
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: 0x00 in name (formdata event)
  • TIMEOUT [expected OK] /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • NOTRUN [expected FAIL] subtest: Check that rel=noopener with target=_self does a normal load
    • NOTRUN [expected FAIL] subtest: Check that rel=noopener with target=_parent does a normal load
    • NOTRUN [expected FAIL] subtest: Check that rel=noopener with target=_top does a normal load
  • TIMEOUT [expected OK] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • TIMEOUT [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent
    • 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
  • TIMEOUT /resource-timing/test_resource_timing.html (#25720)
    • FAIL [expected PASS] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img)

      assert_equals: expected 9835520 but got 9835776
      

  • TIMEOUT [expected PASS] /streams/readable-streams/crashtests/strategy-worker-terminate.html
  • TIMEOUT [expected OK] /wasm/jsapi/functions/entry.html (#27087)
    • TIMEOUT [expected FAIL] subtest: Start function

      Test timed out
      

  • 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:
  • ERROR [expected OK] /workers/baseurl/alpha/sharedworker-in-worker.html (#21315)
Stable unexpected results that are known to be intermittent (8)
  • 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-same-origin.window.html (#29049)
    • FAIL [expected PASS] subtest: Same-origin navigation started from unload handler must be ignored

      assert_equals: expected "?pass" but got "?fail"
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html (#28697)
    • PASS [expected FAIL] subtest: aElement.click() before the load event must NOT replace
  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/track/track-element/no-cuechange-before-play.html (#31014)
    • FAIL [expected TIMEOUT] subtest: Ensure that the 'cuechange' event is not fired before video playback has begun.

      assert_true: Not expecting event, but got canplaythrough event expected true got false
      

  • OK /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"
      

  • OK [expected TIMEOUT] /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"
      

  • 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
  • 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 25389312 but got 25389056
      

Copy link

✨ Try run (#8716833107) succeeded.

@nicoburns
Copy link
Contributor Author

@Loirooriol Just a reminder that this is awaiting your re-review in case you have forgotten about it.

Copy link
Contributor

@Loirooriol Loirooriol left a comment

Choose a reason for hiding this comment

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

Sorry for the delay


[.default, .verticalWriting 2]
expected: FAIL
expected: FAIL
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you edit this file manually? I think it should end with a newline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the automated update mechanism isn't working very well for me due to platform-specific differences (at least I'm assuming that's the cause). Specifically, the following tests:

CI PASS [local FAIL] /css/css-flexbox/flexbox-flex-direction-column-percentage-ignored.html
CI FAIL [local PASS] /css/css-flexbox/flexbox-mbp-horiz-003-reverse.xhtml
CI FAIL [local PASS] /css/css-flexbox/flexbox-mbp-horiz-003.xhtml
CI FAIL [local PASS] /css/css-flexbox/flexbox-mbp-horiz-003v.xhtml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Newline restored

components/layout_2020/flexbox/layout.rs Outdated Show resolved Hide resolved
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.

I've landed the change to stylo so this just needs to update Cargo.toml and Cargo.lock to land.

Update test expectations for content alignment fixes

Revert test expectations that are still generating the old results in CI

Update layout2013 test expectation for content alignment

Update content alignment fallback to use safe alignment

Implement fallback alignment

Update content alignment with recent spec changes
@nicoburns
Copy link
Contributor Author

Cargo.toml/Cargo.lock updated. I've also applied Oriol's review suggestions.

I've changed the reference in Cargo.toml from a branch to a rev reference (similar to our other git dependencies). This makes it much easier to target a non-latest version of stylo, which is required in this case as servo won't compile with latest stylo until #32146 lands). It also makes rebases much easier to process as you can update the commit id in the human-readable Cargo.toml rather than needing to update the Cargo.lock.

@nicoburns nicoburns added this pull request to the merge queue Apr 28, 2024
Merged via the queue into servo:main with commit 1d6be62 Apr 29, 2024
9 checks passed
@nicoburns nicoburns deleted the content-alignment-fixes branch April 29, 2024 00:17
@mrobinson
Copy link
Member

I've changed the reference in Cargo.toml from a branch to a rev reference (similar to our other git dependencies). This makes it much easier to target a non-latest version of stylo, which is required in this case as servo won't compile with latest stylo until #32146 lands). It also makes rebases much easier to process as you can update the commit id in the human-readable Cargo.toml rather than needing to update the Cargo.lock.

This is unnecessary as it can be managed via Cargo.lock and it makes it harder to update stylo as you always have to know what revision to use versus only when you are trying to pin to a specific one. We chose to use the branch name after agreeing among ourselves what the best approach should be, so I think we make changes here based on consensus.

@nicoburns
Copy link
Contributor Author

@mrobinson

This is unnecessary as it can be managed via Cargo.lock and it makes it harder to update stylo as you always have to know what revision to use versus only when you are trying to pin to a specific one. We chose to use the branch name after agreeing among ourselves what the best approach should be, so I think we make changes here based on consensus.

Hmm... ok sorry. Well whoever next bumps stylo can switch it back.

Happy to go with the consensus, but I'm not personally convinced that the chosen approach is easier: specifically in this case (and it seems to me that it could easily happen in future) the required commit is not represented by a branch (because the main and 2024-04-16 that it has been merged to both have a more recent commit).

Is there an easy way to update Cargo.lock to a specific commit of a branch without temporarily specifying it in the Cargo.toml and then changing it back or manually updating the commit ids in the Cargo.lock (which requires you to know both the old and new commit id).

@mrobinson
Copy link
Member

Is there an easy way to update Cargo.lock to a specific commit of a branch without temporarily specifying it in the Cargo.toml and then changing it back or manually updating the commit ids in the Cargo.lock (which requires you to know both the old and new commit id).

My workflow generally to switch Servo's Cargo.toml to the branch with the Stylo changes and then when they land in Stylo, I undo those Cargo.toml changes and run ./mach build again. I haven't had any issues with this approach so far and I think other folks are using it to.

@nicoburns
Copy link
Contributor Author

My workflow generally to switch Servo's Cargo.toml to the branch with the Stylo changes and then when they land in Stylo, I undo those Cargo.toml changes and run ./mach build again. I haven't had any issues with this approach so far and I think other folks are using it to.

IIRC that is what I tried first, but I ended up with compile errors because branch = "main" means the latest commit of the main branch and this PR / servo main won't currently compile with latest stylo main. And in general this will be case any time more than one breaking change is landed to stylo at once (before the corresponding servo PRs have been landed).

@mrobinson
Copy link
Member

IIRC that is what I tried first, but I ended up with compile errors because branch = "main" means the latest commit of the main branch and this PR / servo main won't currently compile with latest stylo main. And in general this will be case any time more than one breaking change is landed to stylo at once (before the corresponding servo PRs have been landed).

Instead of switching branch to be main switch it to be your WIP branch in Stylo or modify the line in Cargo.toml to reference something like rev = "refs/pull/493/head" as described in the documentation.

In the case that multiple changes land in Stylo (that need updates in Servo) and without Servo being updated in between (this has never happened for me, but can happen), you will then need to set Cargo.lock to track a particular revision in order to land the changes in Servo. I think this just means passing a precise revision to cargo update before running ./mach build.

@Loirooriol
Copy link
Contributor

I don't particularly mind changing the approach, but probably this conversation should happen in a https://github.com/servo/stylo/ issue.

For now in #32146 I'm going back to using the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants