Skip to content

Handle min/max sizes in non-replaced positioned boxes - #29594

Merged
bors-servo merged 1 commit into
servo:masterfrom
delan:minmax-positioned
Apr 12, 2023
Merged

bors-servo merged 1 commit into
servo:masterfrom
delan:minmax-positioned

Conversation

@delan

@delan delan commented Apr 6, 2023 •

Copy link
Copy Markdown
Member

This patch makes HoistedAbsolutelyPositionedBox handle min/max sizes in the non-replaced case, per CSS2 #min-max-widths and #min-max-heights. No changes are made to the replaced case.

3 new tests:

  • /css/CSS2/positioning/absolute-non-replaced-max-001.html (fails under layout 2013)
  • /css/CSS2/positioning/absolute-non-replaced-min-001.html (fails under layout 2013)
  • /css/CSS2/positioning/absolute-non-replaced-min-max-001.html (passes under layout 2013)

13 tests now pass:

11 tests would now pass if <br> was inserted between the two <img> tags in the reference (#29591):

1 test continues to fail, but the expectation was out of date:


  • There are tests for these changes OR
  • These changes do not require tests because ___

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@delan
delan force-pushed the minmax-positioned branch from 2450212 to d6c8845 Compare April 6, 2023 12:46
Comment thread components/layout_2020/positioned.rs Resolved
@delan
delan requested review from mrobinson and nox April 6, 2023 12:47

@mrobinson mrobinson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great stuff. Maybe you could wait for @SimonSapin to give some insight into the issue below and add comment before landing? I guess the plan here is to land this and then land the fix for the case of descendants with percentage height in a later change?

Comment thread components/layout_2020/positioned.rs Resolved
Comment thread components/layout_2020/positioned.rs Resolved
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

1 similar comment
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@delan
delan requested review from mrobinson and mukilan April 7, 2023 07:26
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#39488) with upstreamable changes.

@delan

delan commented Apr 12, 2023

Copy link
Copy Markdown
Member Author

Thanks for the feedback!

@bors-servo r=mrobinson

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 73dcce1 has been approved by mrobinson

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 73dcce1 with merge 39ba7fb...

@github-actions

Copy link
Copy Markdown

Results from try job (#4676414583):

Flaky unexpected result (22)
  • OK /_mozilla/mozilla/scrollBy.html (#21321)
    • FAIL [expected PASS] subtest: Ensure that the window.scrollBy function affects scroll position as expected
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/CSS2/normal-flow/block-in-inline-hittest-relpos-zindex.html (#29052)
    • PASS [expected FAIL] subtest: block-in-inline-hittest-relpos-zindex
  • OK /css/CSS2/normal-flow/hit-test-anonymous-block.html (#25807)
    • PASS [expected FAIL] subtest: Hit test beside line of text inside anonymous block
  • TIMEOUT [expected PASS] /css/css-color/animation/opacity-animation-ending-correctly-002.html (#29216)
  • FAIL [expected PASS] /css/css-text/line-breaking/segment-break-transformation-unremovable-2.html (#28758)
  • OK /css/cssom-view/elementFromPoint-float-in-relative.html (#27753)
    • FAIL [expected PASS] subtest: elementFromPoint-float-in-relative
  • 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 /css/cssom-view/elementFromPosition.html (#21295)
    • FAIL [expected PASS] subtest: test the top of layer
  • OK /css/cssom-view/elementsFromPoint-iframes.html (#19273)
    • PASS [expected FAIL] subtest: elementsFromPoint on inner documents
  • OK /css/cssom-view/elementsFromPoint-simple.html
    • FAIL [expected PASS] subtest: elementsFromPoint for each corner of a simple div
  • OK /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html (#28066)
    • PASS [expected FAIL] subtest: D83D DE0D set in href="" targeting a frame and clicked
  • 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
  • OK /html/browsers/history/the-history-interface/traverse_the_history_3.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
    • TIMEOUT [expected FAIL] subtest: Check that popups from a sandboxed iframe escape the sandbox if
      allow-popups-to-escape-sandbox is used
  • 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/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • FAIL [expected PASS] subtest: The end: DOMContentLoaded and defer scripts
  • 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
  • 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] /webmessaging/with-ports/017.html (#24486)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, about:blank
  • 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
Stable unexpected results that are known to be intermittent (24)
  • 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/floats/hit-test-floats-003.html (#25733)
    • FAIL [expected PASS] subtest: Miss float below something else
  • 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-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/css-transforms/inline-with-filter-and-hidden-backface.html (#29547)
    • PASS [expected FAIL] subtest: Hit test
  • 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)
    • 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>
  • TIMEOUT [expected OK] /fetch/api/basic/keepalive.any.html (#29536)
  • 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
  • TIMEOUT /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html (#29048)
    • FAIL [expected TIMEOUT] subtest: Navigating to a different document with link click
    • TIMEOUT [expected NOTRUN] subtest: Navigating to a different document with form submission
  • 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/history/the-history-interface/traverse_the_history_5.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted
  • CRASH [expected OK] /html/browsers/windows/embedded-opener-remove-frame.html (#23867)
  • FAIL [expected TIMEOUT] /html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html (#29224)
  • OK [expected CRASH] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
  • OK /html/semantics/embedded-content/the-img-element/non-active-document.html (#21544)
    • FAIL [expected PASS] subtest: createHTMLDocument
    • FAIL [expected PASS] subtest: <template>
  • OK [expected ERROR] /html/semantics/scripting-1/the-script-element/defer-script/async-script.html?reload (#29054)
  • TIMEOUT [expected OK] /html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html (#25805)
    • TIMEOUT [expected FAIL] subtest: Fulfillment handler on pending-then-fulfilled promise
    • TIMEOUT [expected FAIL] subtest: Rejection handler on pending-then-rejected promise
  • OK [expected TIMEOUT] /webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html (#21743)
  • TIMEOUT [expected CRASH] /webmessaging/broadcastchannel/cross-partition.https.tentative.html (#29058)

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-github
Approved by: mrobinson
Pushing 39ba7fb to master...

@bors-servo
bors-servo merged commit 39ba7fb into servo:master Apr 12, 2023
@delan
delan deleted the minmax-positioned branch April 13, 2023 07:40
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.

5 participants