Closed Bug 1226305 Opened 10 years ago Closed 5 years ago

overflow-clip-box:content-box doesn't clip properly in some cases

Categories

(Core :: Layout, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox45 --- wontfix
firefox89 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: TYLin)

References

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file testcase
It appears we don't clip to the content-box on the top/left side properly when there is overflow only on the left and/or top side.
Attachment #8689664 - Attachment is patch: false
Attachment #8689664 - Attachment mime type: text/plain → text/html
It does work for <input> though when the text scrolls out on the left side, which surprises me since I thought those went through the same code paths...
Dumping the frame trees for the cases with red areas in the atached testcase shows that there is no registered overflow areas on those frames. Dumping the frame tree for an <input> with some text scrolled out-of-view on the left side shows there is some overflow areas there.

In ScrollFrameHelper::BuildDisplayList(), before comparing the clipRect
with scrollable overflow area, we should deflate the clipRect with
padding if overflow-clip-box is content-box in any axis, to get the
correct content-box dimension in that axis.

overflow-clip-box-3.html is adapted from the testcase attached in bug
1226305 comment 0.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Blocks: 1527949
Attachment #9210341 - Attachment description: Bug 1226305 - Fix clipRect if overflow-clip-box is content-box in any axis. → WIP: Bug 1226305 - Fix clipRect if overflow-clip-box is content-box in any axis.
Attachment #9210341 - Attachment description: WIP: Bug 1226305 - Fix clipRect if overflow-clip-box is content-box in any axis. → Bug 1226305 - Fix clipRect if overflow-clip-box is content-box in any axis. r?emilio
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5461febd021f Fix clipRect if overflow-clip-box is content-box in any axis. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: