Closed Bug 1960755 Opened 1 year ago Closed 1 year ago

Incorrect position of the box when using scrollbar-gutter on the root

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Points:
5

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 1 open bug)

Details

(Whiteboard: [viewtransitions:m2])

Attachments

(2 files, 4 obsolete files)

Whiteboard: [viewtransitions:triage]
Attached image Firefox Nightly (obsolete) —
Blocks: 1957569

Change to [viewtransition:m2] because this is still reproducible.

I will close this once other bugs fix this as well.

Whiteboard: [viewtransitions:triage] → [viewtransitions:m2]
Points: --- → 5

The testcase I uploaded is not reproducible.

However, I think we could change this bug title for this test failure:
snapshot-containing-block-includes-scrollbar-gutter.html

For more specifically, the rendering result looks like the position of this box is not correct. Perhaps it is due to the scrollbar-gutter (i.e. the user wants to reserve space for the scrollbar).

Summary: Incorrect rendering result if we scroll before calling startViewTranistion() → Incorrect position of the box when using scrollbar-gutter on the root
Attachment #9479227 - Attachment is obsolete: true
Attachment #9479228 - Attachment is obsolete: true
Attachment #9479229 - Attachment is obsolete: true
Assignee: nobody → boris.chiou
Status: NEW → ASSIGNED

The interesting thing is, the rendering result is correct if I simply run it with mach run.

That's because wpt forces non-overlay scrollbars

(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)

That's because wpt forces non-overlay scrollbars

Right. I have to change my mac system setup to show the scrollbar always (i.e. non-overlay scrollbar I guess) to reproduce this test failure.

So looks like this is a regression of my previous patch of snapshot containing block. It should include the scrollbar gutter.

Setting the ua style with inset:0 may not be enough because the spec
expects us to include any scrollbar-gutters. So we dynamically set the
inset based on its scrollbar-gutter values.

See Also: → 1874091

Per spec, snapshot containing block should include scrollbar-gutter, so
we shouldn't adjust its position and size by the scrollbar sizes.
However, for the rest of children of viewport frame still need this
adjustment, so we move all the calculation into
nsAbsoluteContainingBlock::Reflow(), and choose the proper ReflowInput
and containing block for different frames.

Attachment #9505610 - Attachment description: Bug 1960755 - Specialize the reflow input and containing block of snapshot containing block frame. → Bug 1960755 - Specialize the reflow input and the containing block for snapshot containing block.
Attachment #9504192 - Attachment is obsolete: true

This function may be used outside ViewportFrame, and we expect its
parameter, ReflowInput, is non-null always, so use reference to avoid
any accidents.

Blocks: 1983345
Pushed by bchiou@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/98ffe096b826 https://hg.mozilla.org/integration/autoland/rev/83d337396839 Replace pointer with reference in ViewportFrame::AdjustReflowInputAsContainingBlock(). r=TYLin https://github.com/mozilla-firefox/firefox/commit/32d77c48fe71 https://hg.mozilla.org/integration/autoland/rev/625d9e32d01d Specialize the reflow input and the containing block for snapshot containing block. r=layout-reviewers,view-transitions-reviewers,emilio,firefox-style-system-reviewers https://github.com/mozilla-firefox/firefox/commit/59ad26a1eb3e https://hg.mozilla.org/integration/autoland/rev/5d31a5f72a2e apply code formatting via Lando
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: