Commit Graph

62 Commits

Author SHA1 Message Date
Robert Longson
41d16e7e69 Bug 1863206 - Remove virtual keyword from overrides and stop prefixing variables that don't need prefixing r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192807
2023-11-05 18:04:53 +00:00
Sean Feng
2d6e584e05 Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 20:53:36 +00:00
Sandor Molnar
d23e2827b7 Backed out 7 changesets (bug 1722322) for causing bp-nu bustages
Backed out changeset 0ebd32e273b8 (bug 1722322)
Backed out changeset 7a75717f127c (bug 1722322)
Backed out changeset c2a6440a83d7 (bug 1722322)
Backed out changeset 9955756855bd (bug 1722322)
Backed out changeset 37fccb407777 (bug 1722322)
Backed out changeset f52b1f28f753 (bug 1722322)
Backed out changeset 0121c8cf5d2f (bug 1722322)
2023-11-02 21:27:24 +02:00
Sean Feng
cacfa492a8 Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 17:04:47 +00:00
Emilio Cobos Álvarez
6c324c6d1b Bug 1851868 - Refactor nsIFrame::Destroy to pass a single DestroyContext parameter. r=dholbert
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
2023-09-07 11:46:30 +00:00
Narcis Beleuzu
33592fec5e Backed out changeset 55052ae7d067 (bug 1851868) for reftest failure on 1153695.html . CLOSED TREE 2023-09-07 02:42:25 +03:00
Emilio Cobos Álvarez
0698c96bd1 Bug 1851868 - Refactor nsIFrame::Destroy to pass a single DestroyContext parameter. r=dholbert
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
2023-09-06 22:34:35 +00:00
Robert Longson
60fd689429 Bug 1833616 - Use RAII to manage Push/Pop of gfxContext Clip r=emilio,gfx-reviewers,lsalzman
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
2023-05-17 15:08:28 +00:00
Robert Longson
acce73f925 Bug 1832517 - simplify pointer-events and hit-testing logic r=emilio
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
2023-05-11 15:26:57 +00:00
Robert Longson
c3dff9154e Bug 1814398 - SVGImageElement should not derive from SVGGeometryElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168674
2023-04-29 15:13:34 +00:00
Robert Longson
fb15462205 Bug 1776098 - Ensure small scaled vector images are rendered. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151119
2023-04-26 10:15:08 +00:00
Robert Longson
253cd457d8 Bug 1828291 - Give SVGImageFrame its own implementation of IsInvisible r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175559
2023-04-17 22:04:27 +00:00
Robert Longson
db5bd5b9a8 Bug 1751025 - Opacity CSS property should apply to all children of text elements r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D174964
2023-04-11 22:08:24 +00:00
Robert Longson
b48717320b Bug 1827124 - Remove dead dirtyRect processing code r=emilio
Bug 829802 removed the only caller of SVG painting that passed a non-null dirtyRect. All the dirtyRect processing is now dead.

Coverity confirms it...

https://coverage.moz.tools/#revision=latest&path=layout%2Fsvg%2FSVGUtils.cpp&view=file&line=599

https://coverage.moz.tools/#revision=latest&path=layout%2Fsvg%2FSVGUtils.cpp&view=file&line=753

Differential Revision: https://phabricator.services.mozilla.com/D175012
2023-04-11 08:25:12 +00:00
Natalia Csoregi
47f11a320b Backed out changeset a846d1b82b98 (bug 1751025) for failures on opacity.svg. CLOSED TREE 2023-04-11 09:46:16 +03:00
Robert Longson
100721003f Bug 1751025 - Opacity CSS property should apply to all children of text elements r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D174964
2023-04-11 03:25:14 +00:00
Robert Longson
a844302eb4 Bug 1823887 - SVGImageFrame DidSetComputedStyle and OnVisibilityChange should skip SVGGeometryFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173270
2023-03-22 14:25:21 +00:00
Robert Longson
83f4b9f8df Bug 1823268 - Give SVGImageFrame its own implementation of BuildDisplayList r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172944
2023-03-20 09:13:32 +00:00
Robert Longson
aa7370730a Bug 1822261 - Simplify bounds calculation for images r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172544
2023-03-14 11:47:47 +00:00
Robert Longson
69c0cc2516 Bug 1820757 - SVGImageFrame::NotifySVGChanged should not rely on the base class implementation but instead do nothing at all r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171856
2023-03-13 16:57:30 +00:00
Robert Longson
a0aa454f29 Bug 1818876 - Stop calling SVGGeometryFrame::AttributeChanged in SVGImageFrame::AttributeChanged r=dholbert
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
2023-03-07 11:01:04 +00:00
Emilio Cobos Álvarez
8f36a9e74c Bug 1815552 - Make positioned table parts deal correctly with switching position without being reframed. r=TYLin,layout-reviewers
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
2023-03-01 19:04:17 +00:00
Cristina Horotan
76f1a8332c Backed out 2 changesets (bug 1815552) for causing Bp-hybrid bustages at ComputedStyle.h on a CLOSED TREE
Backed out changeset da0f9295df91 (bug 1815552)
Backed out changeset cda1ee891058 (bug 1815552)
2023-03-01 16:05:19 +02:00
Emilio Cobos Álvarez
1190d4ca51 Bug 1815552 - Make positioned table parts deal correctly with switching position without being reframed. r=TYLin,layout-reviewers
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
2023-03-01 10:36:54 +00:00
Daniel Holbert
8aba9bb848 Bug 1818157: Backout changeset 510d250fd545 (bug 1814398) and e44b3ab61ae4 (bug 1817212) for introducing a performance regression. CLOSED TREE 2023-02-28 11:23:00 -08:00
Robert Longson
32dd1416bc Bug 1814398 - SVGImageElement should not derive from SVGGeometryElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168674
2023-02-16 08:56:46 +00:00
Robert Longson
5ec6eef010 Bug 1815945 - Simplify state bit handling r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169367
2023-02-14 08:28:48 +00:00
Robert Longson
a0d7baf8ed Bug 1816070 - Minor improvements to SVGImageFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169430
2023-02-14 05:57:41 +00:00
Emilio Cobos Álvarez
e328c6e26a Bug 829802 - Remove svg.display-lists prefs r=longsonr
See bug 1815115, this configuration doesn't work.

Differential Revision: https://phabricator.services.mozilla.com/D168908
2023-02-05 18:14:31 +00:00
Dan Robertson
130ee7fffe Bug 1655598 - Cross origin image request should not respect image orientation. r=emilio
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
2022-09-28 03:56:57 +00:00
Butkovits Atila
fd6ff06db9 Backed out 2 changesets (bug 1655598) for causing Bug 1792435. a=backout
Backed out changeset 9eb3b3e7295b (bug 1655598)
Backed out changeset 052c6f05c623 (bug 1655598)
2022-09-27 12:37:10 +03:00
Dan Robertson
337ae55b7b Bug 1655598 - Cross origin image request should not respect image orientation. r=emilio
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
2022-09-25 00:07:56 +00:00
Jeff Muizelaar
84b79d2679 Bug 1779602 - Remove nsImageGeometryMixin. r=tnikkel
nsImageGeometryMixin was disabled in bug 1776198. No problems have shown up
so let's get rid of it.

Differential Revision: https://phabricator.services.mozilla.com/D151864
2022-07-18 21:20:50 +00:00
Emilio Cobos Álvarez
893e093b01 Bug 1779598 - Stop passing around Maybe<SVGImageContext>. r=aosmond
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
2022-07-14 16:03:25 +00:00
Nicolas Silva
daa5099553 Bug 1761002 - Restore the clip rect in webrenderized images. r=mstange
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
2022-03-23 20:28:55 +00:00
Nicolas Silva
e7634ebbaa Bug 1761007 - Fix sizing of WebRenderized SVG images. r=gfx-reviewers,aosmond
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
2022-03-23 20:28:55 +00:00
Nicolas Silva
a80fdbd891 Bug 1758942 - Change the way solid rect bounds are computed. r=mstange
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
2022-03-17 11:07:13 +00:00
Andrew Osmond
8113ec1a93 Bug 1743761 - Ensure we invalidate substituted images when the preferred size is ready. r=tnikkel
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
2021-12-03 03:14:01 +00:00
Andrew Osmond
f1bbd40ad7 Bug 1711061 - Part 12. Change the display list to use WebRenderImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126605
2021-11-27 11:47:40 +00:00
Sandor Molnar
5c9a4c3ee8 Backed out 13 changesets (bug 1711061) on devs request. CLOSED TREE
Backed out changeset c4f073f7e3a3 (bug 1711061)
Backed out changeset aced4b672fb4 (bug 1711061)
Backed out changeset 3687e798f665 (bug 1711061)
Backed out changeset 7b471990ea86 (bug 1711061)
Backed out changeset 1014a95f540e (bug 1711061)
Backed out changeset a37b3091281d (bug 1711061)
Backed out changeset 96a0ef35881b (bug 1711061)
Backed out changeset 38890cc266fb (bug 1711061)
Backed out changeset be73004c0850 (bug 1711061)
Backed out changeset b964576ae53d (bug 1711061)
Backed out changeset d453c5219255 (bug 1711061)
Backed out changeset 0145b538175b (bug 1711061)
Backed out changeset 41ba2e2a2d13 (bug 1711061)
2021-10-29 00:36:30 +03:00
Andrew Osmond
81b502e414 Bug 1711061 - Part 12. Change the display list to use WebRenderImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126605
2021-10-27 01:24:35 +00:00
Sandor Molnar
8213f51c9d Backed out 13 changesets (bug 1711061) for causing browser-chrome failures in test/performance/browser_startup_images. CLOSED TREE
Backed out changeset 5988220f56b8 (bug 1711061)
Backed out changeset cb7721d7ce49 (bug 1711061)
Backed out changeset 343746ffae73 (bug 1711061)
Backed out changeset 000940244dcf (bug 1711061)
Backed out changeset 27565d5ae08d (bug 1711061)
Backed out changeset f3b2379d971b (bug 1711061)
Backed out changeset d4b3d0fa1771 (bug 1711061)
Backed out changeset 9af5b3f2225f (bug 1711061)
Backed out changeset da992effeff1 (bug 1711061)
Backed out changeset 6b2bc6c16b9f (bug 1711061)
Backed out changeset ac2792d42be2 (bug 1711061)
Backed out changeset cb00177e655e (bug 1711061)
Backed out changeset 8d5261184226 (bug 1711061)
2021-10-26 18:04:34 +03:00
Andrew Osmond
0babc463c4 Bug 1711061 - Part 12. Change the display list to use WebRenderImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126605
2021-10-26 13:28:27 +00:00
Andrew Osmond
e858fe55bf Bug 1737277 - Allow incomplete rasterizations to be used by SVGImageFrame. r=tnikkel
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
2021-10-25 20:33:26 +00:00
Andrew Osmond
ca3c1900b9 Bug 1737257 - Ensure that we force sync decoding for SVGImageFrame when requested. r=tnikkel
We did this for SVGImageFrame::PaintSVG, but not for
SVGImageFrame::CreateWebRenderCommands.

Differential Revision: https://phabricator.services.mozilla.com/D129254
2021-10-22 11:50:09 +00:00
Emilio Cobos Álvarez
3fad129a52 Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 17:00:36 +00:00
Butkovits Atila
64999a3215 Backed out 4 changesets (bug 1733384) for causing failures at browser_windowPrompt.js. CLOSED TREE
Backed out changeset fa609fadac26 (bug 1733384)
Backed out changeset dd1936d9fe17 (bug 1733384)
Backed out changeset 1a073e40ab1a (bug 1733384)
Backed out changeset 65708a4c708f (bug 1733384)
2021-10-07 17:52:51 +03:00
Emilio Cobos Álvarez
671a086845 Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 11:47:34 +00:00
Andrew Osmond
e962eafb41 Bug 1704792 - Part 7. Integrate use of ImageIntRegion with WebRender display lists. r=jrmuizel
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
2021-05-13 16:24:08 +00:00
Andrew Osmond
543eae628d Bug 1704792 - Part 5. Add plumbing to move/store ImageIntRegion. r=jrmuizel
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
2021-05-13 16:24:07 +00:00