Граф коммитов

3974 Коммитов

Автор SHA1 Сообщение Дата
Jeff Muizelaar f4c31e97d8 Bug 1764943. Add null check on path. r=mstange
This problem was introduced by bug 1756197. The old code checked
for null before setting the path that was implicitly used by the fill.
This null check is retained at the other usage of
CreateClipPathForFrame()

Differential Revision: https://phabricator.services.mozilla.com/D144477
2022-04-22 20:16:30 +00:00
David Shin ec93876623 Bug 1755565 - Implement `contain: inline-size`. r=emilio,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D143501
2022-04-19 17:44:16 +00:00
Emilio Cobos Álvarez 20b8aec4d5 Bug 1764354 - Propagate color-scheme preference to SVG images on chrome documents. r=aosmond
This allows favicons to respect the user theme even when it doesn't
match the content theme.

Differential Revision: https://phabricator.services.mozilla.com/D143639
2022-04-17 20:38:01 +00:00
Emilio Cobos Álvarez 881f8f938a Bug 1762109 - Make the XLink setup a bit saner. r=smaug
Make Link and SVGAElement agree on XLink handling, and make it more
explicit that SVGAElement needs to be a bit more special for SMIL.

Remove dead MathML XLink code.

Differential Revision: https://phabricator.services.mozilla.com/D142546
2022-03-31 14:33:57 +00:00
Andreea Pavel 0fb4d3993c Bug 1642198 - update linux condition and disable test_filter_crossorigin.html on win10_2004 r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D142295
2022-03-30 06:05:01 +00:00
David Shin 093b63fe3c Bug 1755770 - Ensure `TextRenderedRun::GetRunUserSpaceRect` casts float to int without invoking Undefined Behavior r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D142223
2022-03-28 21:07:58 +00:00
Nicolas Silva 6019443efe 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 b0457b9551 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 ecf93a5a7b 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
Mathew Hodson 34da4aaf3e Bug 1751107 Part 3 - Clamp current time for SVG elements. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D140449
2022-03-11 18:13:07 +00:00
Nicolas Silva fe3175568a Bug 1757396 - Prevent SVG geometry with markers from being active. r=gfx-reviewers,lsalzman
We don't currently check whether the geometry has markers, nor do we try to render them properly with WebRender display items.

This is caught by the reftest paint-order-001.svg when active SVG images and rects are enabled.

Differential Revision: https://phabricator.services.mozilla.com/D140808
2022-03-11 13:00:54 +00:00
Daniel Holbert 9f74bc949f Bug 1758029: Gracefully bail out of canvas SVG-filter invalidation codepath, if the canvas has been unlinked due to cycle collection. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D140419
2022-03-08 23:08:32 +00:00
Emilio Cobos Álvarez d85e707e95 Bug 1751108 - Deal with nan context scale in SVGTextFrame::UpdateFontSizeScaleFactor. r=layout-reviewers,jfkthame
Depends on D139936

Differential Revision: https://phabricator.services.mozilla.com/D139937
2022-03-01 14:35:36 +00:00
Emilio Cobos Álvarez 89a8d46834 Bug 1757230 - Add missing includes elsewhere to unbust hybrid builds.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2022-02-26 01:08:16 +01:00
Emilio Cobos Álvarez 9bf0b6e440 Bug 1736243 - Make SVGObserverUtils::GetAndObserveTextPathsPath not observe on continuations. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D139485
2022-02-25 16:55:05 +00:00
Jeff Muizelaar 29ee522959 Bug 1757045. Image elements with fill-opacity == 0 are visible. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D139673
2022-02-25 03:53:10 +00:00
Jeff Muizelaar ee8edce30e Bug 1755975 - Pass rect or path directly to Clip() instead of manually creating a path. r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D139038
2022-02-24 14:42:35 +00:00
Jeff Muizelaar be058f2f87 Bug 1752348. Adjust transform on maskTarget instead of ctx. r=nical
Previously, if ctx->GetDrawTarget() != maskTarget we end up adjusting the
matrix on ctx and not on the maskTarget.

Also, now that we're doing the correct adjustment of the maskTarget transform
we can remove code to set maskTarget's transform to identity.

Differential Revision: https://phabricator.services.mozilla.com/D139133
2022-02-23 22:21:18 +00:00
Jeff Muizelaar adafdb308e Bug 1756197. Avoid clipping if we're just going to fill the path. r=gfx-reviewers,nical
This avoids having to rasterize the path twice. Once for the clip path and once for
the fill. It will also give us correct antialiasing on the edges.

Differential Revision: https://phabricator.services.mozilla.com/D139137
2022-02-23 16:19:07 +00:00
Jeff Muizelaar e78ea43b78 Bug 1756197. Separate out CreateClipPathForFrame. r=gfx-reviewers,aosmond
We'll use this to draw path directly instead of using clipping to it.

Differential Revision: https://phabricator.services.mozilla.com/D139136
2022-02-23 16:19:07 +00:00
Nicolas Silva 50ca258be2 Bug 1755747 - Add support for antialiased non-snapped rectangles. r=gfx-reviewers,aosmond
We need them for SVG primitives.

This patch adds a bit of plumbing to disable snapping some of the primitives and forcing the antialiasing shader feature where needed, and uses it for SVG solid rectangles and images.

Differential Revision: https://phabricator.services.mozilla.com/D139024
2022-02-23 13:37:39 +00:00
Nicolas Silva 79a89e87c2 Bug 1753986 - Allow some SVG solid rects to be active. r=jrmuizel
Currently disabled by default, behind the gfx.webrender.svg-image pref.

Differential Revision: https://phabricator.services.mozilla.com/D138015
2022-02-23 13:37:39 +00:00
Miko Mynttinen ddec6eef59 Bug 1714584 - Part 1: Decouple nsDisplayList internal list from nsDisplayItems r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138152
2022-02-22 23:42:18 +00:00
Jeff Muizelaar 66243c7954 Bug 1756220 - Always paint the the extra mask with an identity transform. r=gfx-reviewers,nical,bradwerth
Previously, we mostly went to the effort of setting the extra tranform to the
inverse of the context transform except for a case in PaintMask which really
didn't make any sense.

Differential Revision: https://phabricator.services.mozilla.com/D139148
2022-02-22 21:16:29 +00:00
Jeff Muizelaar d15f962f85 Bug 1756042 - Replace gfxContext parameter with DrawTarget. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D139063
2022-02-22 17:11:51 +00:00
Norisz Fay 2121660ce9 Backed out 2 changesets (bug 1714584) per devs request for causing crashes a=backout
Backed out changeset 3baead3e079b (bug 1714584)
Backed out changeset a2da895a58ce (bug 1714584)
2022-02-22 16:41:57 +02:00
Miko Mynttinen 28474c7ad2 Bug 1714584 - Part 1: Decouple nsDisplayList internal list from nsDisplayItems r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138152
2022-02-22 00:44:25 +00:00
Nicolas Silva 4824b5ed95 Bug 1753404 - Avoid extra blob tiles from invisible items. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D137862
2022-02-21 21:57:03 +00:00
Norisz Fay f0dc70995f Backed out changeset f06972b41abe (bug 1755975) for causing multiple reftest failures CLOSED TREE 2022-02-18 04:04:47 +02:00
Jeff Muizelaar 914f0bbdbc Bug 1756035 - Remove unused aMaskSurfaceMatrix parameter. r=gfx-reviewers,aosmond
The use of this parameter was removed by bug 1539702.

Differential Revision: https://phabricator.services.mozilla.com/D139061
2022-02-17 20:53:22 +00:00
Jeff Muizelaar 0cfa7fdb40 Bug 1755975 - Pass rect or path directly to Clip() instead of manually creating a path. r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D139038
2022-02-17 20:24:38 +00:00
Jeff Muizelaar 36418078ab Bug 1752652 - Use CreateClippedDrawTarget instead of CreateSimiliarDrawTarget. r=nical
This avoids creating a very large intermediate target if we're using
a RecordingDrawTarget and will properly add an offset if the underlying
DrawTarget has one.

Differential Revision: https://phabricator.services.mozilla.com/D137358
2022-02-17 17:08:14 +00:00
Daniel Holbert 8e9c53a643 Bug 1754277: Fix non-unified build errors in layout/svg, and mark it as safe to build in non-unified mode. r=emilio
Below are the build errors fixed here.

layout/svg/SVGFEUnstyledLeafFrame.cpp:75:33: error: no type named 'SVGFEUnstyledElement' in namespace 'mozilla::dom'

* Fixed this by including SVGFilters.h (which defines this type).

layout/svg/SVGFEContainerFrame.cpp:83:12: error: unknown type name 'SVGFE'; did you mean 'dom::SVGFE'?
layout/svg/SVGFELeafFrame.cpp:80:12: error: unknown type name 'SVGFE'; did you mean 'dom::SVGFE'?

* Fixed these with a 'using' statement for the namespace.

layout/svg/SVGGFrame.cpp:34:32: error: unknown type name 'SVGElement'

* Fixed by including this type's header.

layout/svg/FilterInstance.cpp:873:9: error: use of undeclared identifier 'nsLayoutUtils'
layout/svg/SVGOuterSVGFrame.cpp:623:29: error: incomplete type 'nsLayoutUtils' named in nested name specifier
layout/svg/SVGUseFrame.cpp:84:5: error: use of undeclared identifier 'nsLayoutUtils
layout/svg/SVGViewportFrame.cpp:207:9: error: use of undeclared identifier 'nsLayoutUtils'

* Fixed these by including this header.

layout/svg/SVGOuterSVGFrame.cpp:88:20: error: unused function 'DependsOnIntrinsicSize' [-Werror,-Wunused-function]

* Fixed by removing the unused function.

layout/svg/SVGStopFrame.cpp:86:21: error: unknown type name 'SVGGradientFrame'

* Fixed this by including this header.

Differential Revision: https://phabricator.services.mozilla.com/D138187
2022-02-08 21:22:18 +00:00
Jeff Muizelaar d10642bdfd Bug 1753719 - Properly convert the result of GetMaskArea to device pixels. r=dholbert
Previously, we would get the wrong bounds on HiDPI displays.
This matches what's done in ComputeClipForMaskItem and makes things a bit
more explicit by using typed units.

Differential Revision: https://phabricator.services.mozilla.com/D137880
2022-02-07 22:01:35 +00:00
Emilio Cobos Álvarez 739ada1351 Bug 1753105 - Deal with negative letter-spacing in SVGTextFrame. r=jfkthame
Otherwise we can end up with a rect with negative width, bad stuff to
follow.

Differential Revision: https://phabricator.services.mozilla.com/D137881
2022-02-04 23:25:22 +00:00
Emilio Cobos Álvarez 4eea923e01 Bug 1746794 - Make more nsLayoutUtils functions SVG-text aware. r=layout-reviewers,jfkthame
This makes TransformPoint and TransformRect deal with SVG text
correctly. We need TransformPoint support so that GeometryUtils works as
expected, since we need to transform the points individually so that
stuff like transforms report the expected result (a rect doesn't cut it
for those).

Differential Revision: https://phabricator.services.mozilla.com/D135152
2022-01-28 16:50:14 +00:00
Sandor Molnar 324f6c49c3 Bug 1642198 - Disable layout/svg/tests/test_filter_crossorigin.html on linux, for frequent failures. r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D136685
2022-01-25 13:08:55 +00:00
Andrew Osmond 33641307ec 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 af4570762c 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
Niklas Goegge 5d592a6adb Bug 1617611: Annotate each failing test individually. r=webdriver-reviewers,necko-reviewers,ckerschb,whimboo,valentin
Annotating each test individually lets us avoid introducing new failing tests
while we go through the backlog of failing tests.

Depends on D129162

Differential Revision: https://phabricator.services.mozilla.com/D129163
2021-11-17 11:04:34 +00:00
criss 507f143b88 Backed out 2 changesets (bug 1617611) for causing mochitest failures on storageAccessWithDynamicFpi.js. CLOSED TREE
Backed out changeset fdb2c6bfc0c6 (bug 1617611)
Backed out changeset c3352f4b3681 (bug 1617611)
2021-11-16 13:02:05 +02:00
Niklas Goegge 5b684c7fc6 Bug 1617611: Annotate each failing test individually. r=webdriver-reviewers,necko-reviewers,ckerschb,whimboo,valentin
Annotating each test individually lets us avoid introducing new failing tests
while we go through the backlog of failing tests.

Depends on D129162

Differential Revision: https://phabricator.services.mozilla.com/D129163
2021-11-16 10:15:45 +00:00
Andi-Bogdan Postelnicu c8e0f87391 Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges
Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
2021-11-16 08:07:30 +00:00
Jeff Muizelaar ee53fc453d Bug 1711133. Draw nothing for unitialized filters. r=mstange
Currently we're falling back when hitting an uninitialized filter (e.g. a bad
url) and the fallback path just draws nothing. We can do that just as well by
drawing nothing ourselves.

Differential Revision: https://phabricator.services.mozilla.com/D130281
2021-11-15 19:05:14 +00:00
Sandor Molnar f5bbecdcc2 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 c6eb106f04 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 6632079d8d 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 0ac282d26a 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 dcf17b4f3e 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 b5650b4329 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