SVG's clip doesn't seem to restrict the visual/building rect.
Categories
(Core :: Web Painting, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: tnikkel)
References
Details
Attachments
(1 file)
Scroll frames reduce the visual/building rect:
https://searchfox.org/mozilla-central/source/layout/generic/nsGfxScrollFrame.cpp#3405
SVG doesn't use a scroll frame to implement it's overflow behaviour.
https://searchfox.org/mozilla-central/rev/7531325c8660cfa61bf71725f83501028178cbb9/layout/svg/nsSVGOuterSVGFrame.cpp#770
It doesn't seem to restrict the visual/building rect, but perhaps should?
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Yes, I think it should clip the visible/dirty rect (and Markus agrees).
Comment 2•5 years ago
|
||
I've audited the other users of DisplayListClipState::AutoSaveRestore
and only found one other location which re-enters BuildDisplayList and does not modify the building rect: https://searchfox.org/mozilla-central/rev/7531325c8660cfa61bf71725f83501028178cbb9/layout/forms/nsHTMLButtonControlFrame.cpp#102
All the other users only build a single display item while the DisplayListClipState::AutoSaveRestore
is on the stack, or they already use nsDisplayListBuilder::AutoBuildingDisplayList
to modify the building rect.
Assignee | ||
Comment 3•5 years ago
|
||
I wrote the obvious patch without thinking about it at all and pushed that to try to see and it's green on reftests.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c4716e4f1db138b01c209bb24630c696af8b2893
Comment 4•5 years ago
|
||
Looks good! Instead of adding another if
, I'd move the intersecting into the existing if that sets the clip.
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Perhaps you could verify that this fixes your issue?
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/840f7be6f7e3 Restrict visual and dirty rect when building the display list for svg contents that cannot overflow. r=mstange
Updated•5 years ago
|
Comment 8•5 years ago
|
||
bugherder |
Reporter | ||
Comment 9•5 years ago
|
||
This fixes the problem that I was seeing. Thanks everyone.
Description
•