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 calculation of block axis for abspos elements in Layout 2020 #29631

Merged

Conversation

mrobinson
Copy link
Member

The calculation of the block axis positioning of absolutely positioned elements was using the inline size of the containing block instead of the block size.


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

The calculation of the block axis positioning of absolutely positioned
elements was using the inline size of the containing block instead of
the block size.
@mrobinson mrobinson requested a review from delan April 14, 2023 09:18
@mrobinson mrobinson added the A-layout/2020 https://github.com/servo/servo/wiki/Layout-2020 label Apr 14, 2023
@mrobinson mrobinson changed the title Fix calculation of block axis for abspos elements Fix calculation of block axis for abspos elements in Layout 2020 Apr 14, 2023
@mrobinson
Copy link
Member Author

mrobinson commented Apr 14, 2023

@delan I have been looking into how insets are resolved for positioned elements and this intersects a bit.

@mrobinson
Copy link
Member Author

@bors-servo r=mrego

@bors-servo
Copy link
Contributor

📌 Commit c23f055 has been approved by mrego

@bors-servo
Copy link
Contributor

⌛ Testing commit c23f055 with merge 766917e...

@github-actions
Copy link

Results from try job (#4700917083):

Flaky unexpected result (18)
  • OK /_mozilla/mozilla/task_queue_throttling.any.html (#22519)
    • FAIL [expected PASS] subtest: Throttling the performance timeline task queue.
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/CSS2/floats/hit-test-floats-005.html (#25804)
    • FAIL [expected PASS] subtest: Miss clipped float
  • OK /css/css-flexbox/hittest-anonymous-box.html (#27091)
    • PASS [expected FAIL] subtest: Hit-testing within an anonymous flex-item should return the flexbox as the hittest result.
  • OK /css/css-transforms/inline-with-filter-and-hidden-backface.html (#29547)
    • PASS [expected FAIL] subtest: Hit test
  • OK /css/css-transitions/properties-value-inherit-002.html (#21486)
    • FAIL [expected PASS] subtest: color color(rgba) / values
    • FAIL [expected PASS] subtest: font-size length(pt) / values
    • FAIL [expected PASS] subtest: font-size length(pc) / values
    • FAIL [expected PASS] subtest: font-size length(px) / values
    • FAIL [expected PASS] subtest: font-size length(em) / values
    • FAIL [expected PASS] subtest: font-size length(ex) / values
    • FAIL [expected PASS] subtest: font-size length(mm) / values
    • FAIL [expected PASS] subtest: font-size length(cm) / values
    • FAIL [expected PASS] subtest: font-size length(in) / values
    • FAIL [expected PASS] subtest: font-size percentage(%) / values
    • And 40 more unexpected results...
  • CRASH [expected OK] /css/cssom-view/elementFromPoint-dynamic-anon-box.html (#22337)
  • OK /css/cssom-view/elementFromPoint-float-in-relative.html (#27753)
    • FAIL [expected PASS] subtest: elementFromPoint-float-in-relative
  • OK /css/cssom-view/elementFromPoint-subpixel.html (#23623)
    • FAIL [expected PASS] subtest: Hit test top left corner of box
  • 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
  • OK /html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html (#23849)
    • PASS [expected FAIL] subtest: The document for a standalone media file should have one child in the body.
  • TIMEOUT [expected OK] /html/browsers/history/the-history-interface/traverse-during-unload.html (#28688)
    • TIMEOUT [expected PASS] subtest: Traversing the history during unload
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/update-the-rendering.html (#24145)
    • TIMEOUT [expected FAIL] subtest: "Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: non-ASCII in name and value (formdata event)
  • OK [expected ERROR] /html/semantics/scripting-1/the-script-element/defer-script/async-script.html?reload (#29054)
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • FAIL [expected PASS] subtest: The end: DOMContentLoaded and defer scripts
  • TIMEOUT [expected OK] /html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html (#25805)
    • TIMEOUT [expected FAIL] subtest: Fulfillment handler on pending-then-fulfilled promise
    • TIMEOUT [expected FAIL] subtest: Rejection handler on pending-then-rejected promise
  • ERROR [expected OK] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results that are known to be intermittent (34)
  • TIMEOUT [expected OK] /FileAPI/url/url-charset.window.html (#26997)
    • TIMEOUT [expected PASS] subtest: Blob charset should override any auto-detected charset.
  • OK /_mozilla/mozilla/scrollBy.html (#21321)
    • FAIL [expected PASS] subtest: Ensure that the window.scrollBy function affects scroll position as expected
  • ERROR /_webgl/conformance/textures/misc/origin-clean-conformance-offscreencanvas.html (#24038)
    • PASS [expected FAIL] subtest: WebGL test #0: img was loaded
  • ERROR /_webgl/conformance2/textures/misc/origin-clean-conformance-offscreencanvas.html (#29589)
    • PASS [expected FAIL] subtest: WebGL test #0: img was loaded
  • OK /css/CSS2/floats/hit-test-floats-002.html (#25733)
    • PASS [expected FAIL] subtest: Hit test float
  • OK /css/CSS2/normal-flow/block-in-inline-hittest-002.html (#29057)
    • PASS [expected FAIL] subtest: elementFromPoint
  • OK /css/CSS2/normal-flow/hit-test-anonymous-block.html (#25807)
    • PASS [expected FAIL] subtest: Hit test beside line of text inside anonymous block
  • OK /css/css-flexbox/hittest-before-pseudo.html (#26521)
    • PASS [expected FAIL] subtest: Hit-testing text within a pseudo-element flex-item should return the flexbox as the hittest result.
  • OK /css/css-fonts/variations/font-weight-matching.html (#20686)
    • FAIL [expected PASS] subtest: Test @font-face matching for weight 400
    • FAIL [expected PASS] subtest: Test @font-face matching for weight 420
  • OK /css/cssom-view/CaretPosition-001.html (#21338)
    • PASS [expected FAIL] subtest: Element at (400, 100)
  • OK /css/cssom-view/elementFromPoint-float-in-table.html (#27002)
    • PASS [expected FAIL] subtest: float-in-div
  • OK /css/cssom-view/elementFromPoint-list-001.html (#23915)
    • FAIL [expected PASS] subtest: <li>Inside 1</li>
    • PASS [expected FAIL] subtest: <li>Inside 2</li>
    • PASS [expected FAIL] subtest: <li>Inside 3</li>
    • PASS [expected FAIL] subtest: <li>Image Inside 1</li>
    • PASS [expected FAIL] subtest: <li>Image Inside 2</li>
  • OK /css/cssom-view/elementFromPoint-visibility-hidden-resizer.html (#28695)
    • PASS [expected FAIL] subtest: elementFromPoint on resizer area of an element with visibility:hidden
  • OK [expected TIMEOUT] /fetch/api/redirect/redirect-keepalive.any.html (#29536)
  • TIMEOUT /fetch/content-type/response.window.html (#22304)
    • PASS [expected FAIL] subtest: Request: combined response Content-Type: text/plain
  • OK /html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html (#29066)
    • PASS [expected FAIL] subtest: Check execution order on load handler
    • PASS [expected FAIL] subtest: Check execution order from nested timeout
  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html (#28207)
    • FAIL [expected TIMEOUT] subtest: CSP check precedes X-Frame-Options check
    • FAIL [expected NOTRUN] subtest: CSP check precedes COEP check - CSP header first
    • FAIL [expected NOTRUN] subtest: CSP check precedes COEP check - COEP header first
    • FAIL [expected NOTRUN] subtest: COEP check precedes X-Frame-Options check
  • OK /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html (#28066)
    • FAIL [expected PASS] subtest: DE0D 0041 set in href="" targeting a frame and clicked
  • OK /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html (#28697)
    • FAIL [expected PASS] subtest: aElement.click() before the load event must NOT replace
  • OK /html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html (#29046)
    • FAIL [expected PASS] subtest: first argument: absolute url
  • CRASH [expected OK] /html/browsers/windows/embedded-opener-remove-frame.html (#23867)
  • OK /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • FAIL [expected PASS] subtest: Non-HTMLElement should not support autofocus
  • OK [expected CRASH] /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-1.html (#24066)
    • FAIL [expected NOTRUN] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • 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
  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • PASS [expected FAIL] subtest: multipart/form-data: single quote in name (formdata event)
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: Basic File test (formdata event)
  • 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)
    • FAIL [expected PASS] subtest: The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document
  • OK [expected TIMEOUT] /html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html (#26371)
    • FAIL [expected TIMEOUT] subtest: delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire
  • ERROR /resource-timing/content-type-parsing.html (#29131)
    • TIMEOUT [expected FAIL] subtest: mime-type 16 : text/html;charset=�gbk
    • NOTRUN [expected TIMEOUT] subtest: mime-type 17 : text/html;charset= gbk
  • OK [expected TIMEOUT] /webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html (#21743)
  • TIMEOUT [expected OK] /webmessaging/with-ports/018.html (#24485)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, javascript:
  • TIMEOUT [expected OK] /webmessaging/without-ports/017.html (#24486)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, about:blank

@bors-servo
Copy link
Contributor

☀️ Test successful - checks-github
Approved by: mrego
Pushing 766917e to master...

@bors-servo bors-servo merged commit 766917e into servo:master Apr 14, 2023
11 checks passed
@delan
Copy link
Member

delan commented Apr 17, 2023

Thanks for following up on this!

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

4 participants