This shouldn't change behavior, but it packs the two arguments to
DestroyFrom into a single thing, and makes nsIFrame::Destroy not so easy
to call without a previous context.
This is a prerequisite to pass aDestroyContext to various things that
right now just mint one, which can cause badness, see bug 1851787 and
related bugs.
It's also a bit nicer to add things there if we need to in the future.
Differential Revision: https://phabricator.services.mozilla.com/D187578
This shouldn't change behavior, but it packs the two arguments to
DestroyFrom into a single thing, and makes nsIFrame::Destroy not so easy
to call without a previous context.
This is a prerequisite to pass aDestroyContext to various things that
right now just mint one, which can cause badness, see bug 1851787 and
related bugs.
It's also a bit nicer to add things there if we need to in the future.
Differential Revision: https://phabricator.services.mozilla.com/D187578
Take care to restore only the parts of the gfxContext that we need to because saving and restoring the complete gfxContext is expensive.
Differential Revision: https://phabricator.services.mozilla.com/D178304
Move SVGUtils:HitTestChildren into its only caller
Remove unreachable code post bug 829802
Remove code that checks for the bounding box when there is opacity as it does nothing useful.
Differential Revision: https://phabricator.services.mozilla.com/D177739
The SVGGeometryFrame::AttributeChanged does not perform any useful work for image frames and the base class nsIFrame::AttributeChanged just returns NS_OK
Differential Revision: https://phabricator.services.mozilla.com/D170994
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.
Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.
Depends on D169127
Differential Revision: https://phabricator.services.mozilla.com/D170969
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.
Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.
Depends on D169127
Differential Revision: https://phabricator.services.mozilla.com/D170969
A cross origin image request should not respect the given style image
orientation, but should use any image orientation provided by the image.
Differential Revision: https://phabricator.services.mozilla.com/D156919
A cross origin image request should not respect the given style image
orientation, but should use any image orientation provided by the image.
Differential Revision: https://phabricator.services.mozilla.com/D156919
All its members are optional, so we can just use it as a plain struct
rather than Maybe<> all around, which simplifies the code and prevents
silly bugs like bug 1779592.
Mostly automatic via:
rg -l 'SVGImageContext' . | xargs sed -i 's/Maybe<SVGImageContext>/SVGImageContext/g'
With trivial build fixes.
Not intended to change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D151846
In bug 1758942 there was a bit of clipping logic for webrenderized svg images that was removed because we didn't know what it was useful for.
I still don't quite know, other than that it caused layout/reftests/svg/image/image-preserveAspectRatio-01-raster.svg and layout/reftests/svg/image/image-preserveAspectRatio-02-raster.svg to start failing when the gfx.webrender.svg-images pref is enabled, so let's revert it.
Depends on D141847
Differential Revision: https://phabricator.services.mozilla.com/D141848
The missing line is consistently called after ImageContainer::GetWidth/GetHeight (see TransformContextForPainting for example which would be the equivalent code path for the non-webrenderized case).
This fixes the wptest /density-size-correction/density-corrected-image-svg.html when active svg images are enabled.
Depends on D141846
Differential Revision: https://phabricator.services.mozilla.com/D141847
I wrote the previous code via trial and error by copying similar code without understanding much what the different values represent.
The result looks about right but I suspect it may be only right because of simplifying assumptions.
Differential Revision: https://phabricator.services.mozilla.com/D140726
Previously with ImageContainers, we would put the new preferred surface
into the ImageContainer. When we check if we should invalidate, it would
have a different image key, and hence invalidate the image frame and
schedule a paint.
With ImageProviders, it returns the same key in this case, because the
ImageProvider represents a particular surface. As such, we need to
actually track when we get a substituted ImageProvider, and invalidate
the image frame more aggressively to ensure we get the preferred size.
Differential Revision: https://phabricator.services.mozilla.com/D132583
In SVGImageFrame::PaintSVG, we may attempt to draw an incomplete image.
In that case it will draw what it can, and display more as we
invalidate. We should do the same on the ::CreateWebRenderCommands path.
Differential Revision: https://phabricator.services.mozilla.com/D129264
This patch hooks up the ImageIntRegion to the blob recording and makes
any necessary adjusts to the display list creation to take advantage of
it.
Differential Revision: https://phabricator.services.mozilla.com/D114986
This patch has no functional change beyond changing prototypes and
adding storage for ImageIntRegion for each ImageContainer.
Differential Revision: https://phabricator.services.mozilla.com/D114984