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

3721 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 2b522290ef Bug 1634393 - Resolve <textPath> href local references against document URL, not base URL. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D78627
2020-06-08 06:06:26 +00:00
longsonr 6ded748d68 Bug 1638051 - Stop clamping radialGradients. r=dholbert
We have to remove one of the radialGradient-basic-03-ref.svg tests (id=gradient5)
because it's testing clamping i.e. an fr just inside the radius is the same as
just outside and that's no longer true. Two of the other references are now different
due to the lack of clamping. In order to get the test and reference the same, the reference is created
using canvas since canvas has never had clamping.

Clamping was required by SVG 1.1 but that requirement was explicitly removed in SVG 2
mostly to match canvas, which has never clamped. Any rendering artifacts would likely
have been uncovered by canvas over the years since it has the same code that SVG uses
absent any clamping.

Differential Revision: https://phabricator.services.mozilla.com/D75706
2020-06-07 10:05:00 +00:00
Cameron McCormack 5e27c1bd6b Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-05 00:39:50 +00:00
Keefer Rourke 1b3a17d452 Bug 1608515: Update the SVG IsContainingWindowElementOfType impl for Fission r=barret,dholbert
In nsSVGOuterSVGFrame::IsContainingWindowElementOfType, we now inspect
the embedder by asking the window for its browsing context, instead of
asking it directly for its frame element.

Differential Revision: https://phabricator.services.mozilla.com/D77518
2020-06-03 15:24:54 +00:00
Bogdan Tara ffdcf42e89 Backed out 2 changesets (bug 1642261) for browser_use_counters.js failures CLOSED TREE
Backed out changeset dd4c99038ede (bug 1642261)
Backed out changeset 308d2f7a4a13 (bug 1642261)
2020-06-03 11:43:20 +03:00
Cameron McCormack 061da14b2e Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-03 05:15:21 +00:00
Narcis Beleuzu 726ebdec39 Backed out 2 changesets (bug 1642261) for mochitest failures on test_property_database.html . CLOSED TREE
Backed out changeset 32b26c1984f6 (bug 1642261)
Backed out changeset 68456151c046 (bug 1642261)
2020-06-03 07:30:23 +03:00
Cameron McCormack 8cf9670c90 Bug 1642261 - Part 2: Add telemetry for -moz-appearance usage. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77637
2020-06-02 13:15:04 +00:00
Cameron McCormack 49aa58bbaa Bug 1635064 - Make SVG images take image-orientation property into account. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D75478
2020-05-18 00:04:03 +00:00
Csoregi Natalia cab314bb7a Backed out changeset 81bc50969df8 (bug 1635064) for webrender failures on image-orientation/svg-image-orientation-aspect-ratio.html. CLOSED TREE 2020-05-16 06:39:07 +03:00
Cameron McCormack adc997e221 Bug 1635064 - Make SVG images take image-orientation property into account. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D75478
2020-05-16 00:38:18 +00:00
Bert Peers 2546aafcc2 Bug 1555356 - Make images inside of SVGs active. r=aosmond
(rebased Alexis' patch)

Differential Revision: https://phabricator.services.mozilla.com/D59925
2020-05-15 18:49:52 +00:00
Cameron McCormack d56f82ffbf Bug 1609663 - Reflow non-display SVG text that has just been inserted. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D75034
2020-05-13 08:00:23 +00:00
Timothy Nikkel 0ddee13c53 Bug 1635658. Fix how CSS filters render with webrender that are represented as component transfer when they are required to be represented as SVG filters. r=mstange
The brightness, contrast, and invert css filters are represented as component transfer filters when they required to be represented as an svg filter (ie when an element has a combination of CSS and SVG filters specified).

https://hg.mozilla.org/mozilla-central/rev/4f3360c4f104 (bug 1417699) used the value SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN for the function type in the G and B channels to specify that the R channel function should be used. As we know from https://hg.mozilla.org/mozilla-central/rev/a1ff0af83ad2 (bug 1605223) SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN is the value we get if the function is not specified, and by spec that is to be interpreted as the identity function.

To fix this use a special function type that is not exposed to content, SVG_FECOMPONENTTRANSFER_SAME_AS_R, when we want to do this optimization. And then teach the webrender filter code to understand it.

Differential Revision: https://phabricator.services.mozilla.com/D74189
2020-05-07 23:39:56 +00:00
Botond Ballo 5cffd06241 Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-05-05 15:24:12 +00:00
Botond Ballo 173d001b86 Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-05-05 19:26:38 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo 2cb46cfa4b Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-04-28 01:44:43 +00:00
Botond Ballo 405c8807cd Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-04-28 01:40:35 +00:00
Botond Ballo 66f6d998af Bug 1629732 - Fix non-unified build errors in layout/svg. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D71845
2020-04-22 00:10:47 +00:00
Timothy Nikkel b89bb47353 Bug 1628988. Don't apply ImgDrawResult::NOT_READY in PaintMaskSurface. r=mstange
PaintMaskSurface shouldn't be applying ImgDrawResult::NOT_READY when we don't have a frame and the mask image hasn't been resolved. ImgDrawResult is only about drawing images, not about waiting for external resources to resolve or frames to get constructed. The only purpose of tracking ImgDrawResult's in painting code is to know which frames we need to invalidate because their rendering might change if we sync decode images during a Draw call. Applying NOT_READY here means we invalidate for every paint with the sync decode images flag (ie reftest paints), and it never changes from NOT_READY. This bites the reftest for this bug 1624532.

To fix it, instead of "overloading" the ImgDrawResult we return a bool to indicate the mask is missing or incomplete.

Differential Revision: https://phabricator.services.mozilla.com/D70595

--HG--
extra : moz-landing-system : lando
2020-04-13 20:08:05 +00:00
Chris Peterson 4a9feda3ee Bug 1625855 - Replace MOZ_MUST_USE with [[nodiscard]] in layout. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D68751

--HG--
extra : moz-landing-system : lando
2020-04-08 01:59:36 +00:00
Brian Grinstead 30b9da5519 Bug 1623992 - Automated rewrite from chrome://global/skin/ to chrome://global/skin/global.css in markup r=marionette-reviewers,perftest-reviewers,mossop,whimboo,sparky
This was generated with

```
cp .gitignore .rgignore
rg -l -g '*.{html,xhtml}' 'href="chrome://global/skin/"' | xargs sed -i "" 's/href\="chrome:\/\/global\/skin\/"/href\="chrome:\/\/global\/skin\/global.css"/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D67687

--HG--
extra : moz-landing-system : lando
2020-04-03 22:23:23 +00:00
cbrewster aa9335954f Bug 1618000: Part 1: Remove blur radius clamping on Gecko-side for WR blur filters r=gfx-reviewers,nical
Clamping of the blur radius depends on transform scale factors. This info is not available until later in the WebRender pipeline, so we need to delegate blur radius clamping to WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D65804

--HG--
extra : moz-landing-system : lando
2020-03-25 23:57:53 +00:00
Razvan Maries 3389ad3b1f Backed out 2 changesets (bug 1618000) for wrench bustages. CLOSED TREE
Backed out changeset c72b18b22267 (bug 1618000)
Backed out changeset 9bc71e7b317b (bug 1618000)
2020-03-23 21:00:24 +02:00
cbrewster 0c74db8b9e Bug 1618000: Part 1: Remove blur radius clamping on Gecko-side for WR blur filters r=gfx-reviewers,nical
Clamping of the blur radius depends on transform scale factors. This info is not available until later in the WebRender pipeline, so we need to delegate blur radius clamping to WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D65804

--HG--
extra : moz-landing-system : lando
2020-03-23 17:36:26 +00:00
Philipp Zech 3db72bdd4b Bug 1622332 - Convert style-blend #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66867

--HG--
extra : moz-landing-system : lando
2020-03-14 21:24:11 +00:00
Boris Zbarsky 4e0a47195b Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 04:25:34 +00:00
Mihai Alexandru Michis 795c7787a3 Backed out changeset 3552ac882d4f (bug 1621835) for causing bustages.
CLOSED TREE
2020-03-12 04:15:33 +02:00
Boris Zbarsky e5766424b8 Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 01:46:16 +00:00
shindli 0b1a68a2ad Backed out 2 changesets (bug 1618000) for causing reftest failures in feGaussianBlur-5-ref.svg CLOSED TREE
Backed out changeset a561435c24cf (bug 1618000)
Backed out changeset e720691ccf17 (bug 1618000)
2020-03-11 10:36:47 +02:00
cbrewster e0da264814 Bug 1618000: Part 1: Remove blur radius clamping on Gecko-side for WR blur filters r=gfx-reviewers,nical
Clamping of the blur radius depends on transform scale factors. This info is not available until later in the WebRender pipeline, so we need to delegate blur radius clamping to WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D65804

--HG--
extra : moz-landing-system : lando
2020-03-10 19:10:56 +00:00
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

Differential Revision: https://phabricator.services.mozilla.com/D64771

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Mark Banner 15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D65703

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Philipp Zech 05f68040bd Bug 1617644 - Convert color-interpolation #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64813

--HG--
extra : moz-landing-system : lando
2020-02-29 15:41:13 +00:00
cbrewster ac38c6d0ab Bug 1596513: Part 2: Allow for floating point dx/dy on feDropShadow attributes r=nical
WebRender expects drop shadow dx/dy to be in user space, which is a floating point value.
Before this, a dx/dy such as (0.2, 0.2) was truncated to (0, 0) resulting in no offset of the shadow.

Differential Revision: https://phabricator.services.mozilla.com/D63442

--HG--
extra : moz-landing-system : lando
2020-02-28 17:10:17 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Andrew Osmond fbaa72bc71 Bug 1617493 - Rasterize SVG patterns in content process into a shared surface for WebRender. r=jrmuizel
In DrawTargetRecording::CreateSimilarDrawTarget, we would originally
create a new DrawTargetRecording. For resources that are shared, such as
SVG patterns, we would do the same work for each blob image tile. This
can get expensive if the pattern is large. Now we check a size
threshold, and if passed, we create a DrawTargetSkia backed by a
SourceSurfaceSharedData. When we want a snapshot, we now try to get the
shared surface instead if available. The recording infrastructure
already knows how to handle the lifetimes and use of external IDs for
shared surfaces, so now we rasterize the pattern once for all the blob
tiles. In an ideal world we would do this in the compositor process
once, but that requires more changes, and this is useful as a stopgap in
the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D63903

--HG--
extra : moz-landing-system : lando
2020-02-25 13:56:23 +00:00
Andreea Pavel 1f0dedc29d Backed out 2 changesets (bug 1596513) for webrender wrench bustages on a CLOSED TREE
Backed out changeset 49e61b566da1 (bug 1596513)
Backed out changeset 889cee140af8 (bug 1596513)
2020-02-25 09:37:45 +02:00
cbrewster b11401a6e1 Bug 1596513: Part 2: Allow for floating point dx/dy on feDropShadow attributes r=nical
WebRender expects drop shadow dx/dy to be in user space, which is a floating point value.
Before this, a dx/dy such as (0.2, 0.2) was truncated to (0, 0) resulting in no offset of the shadow.

Differential Revision: https://phabricator.services.mozilla.com/D63442

--HG--
extra : moz-landing-system : lando
2020-02-25 06:05:36 +00:00
Sylvestre Ledru ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D63787

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
Emilio Cobos Álvarez 71cc1a2c62 Bug 1617425 - Use cbindgen for SVG lengths. r=jwatt
Depends on D63777

Differential Revision: https://phabricator.services.mozilla.com/D63778

--HG--
extra : moz-landing-system : lando
2020-02-23 15:43:03 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

Differential Revision: https://phabricator.services.mozilla.com/D62604

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

Differential Revision: https://phabricator.services.mozilla.com/D62604

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Mihai Alexandru Michis 2951da7110 Backed out changeset 6550b62f1fe7 (bug 1555356) for causing reftest failures in SVG files.
CLOSED TREE
2020-02-14 23:59:09 +02:00
Alexis Beingessner 6b442a22a5 Bug 1555356 - Make images inside of SVGs active. r=aosmond
This is done using a similar approach to CreateWebRenderCommands
but slightly modified. In particular the active layer check needs
to be done before we're ready to CreateWebRenderCommands, but once
we decide to activate an item, we can't let CreateWebRenderCommands
fail. Unfortunately, the need to query ImageLib for support means
we need to do basically ~all of the work of CreateWebRenderCommands
to do this check.

As such, this introduces a modified version of CreateWebRenderCommands
that SVGGeometryFrames implement with a "dry run" flag. When true,
it runs the same code but stops short of mutating the WR DL/state.

ImageLib may be encouraged to do some extra work that could be thrown
away, but I'm not sure there's any way to avoid that.

For now, only SVGImageFrame actually provides an implementation. The
bulk of the implementation is handling the on-by-default
preserveAspectRatio feature of SVG images. It was cleaner to just
reimplement that logic than reuse the existing preserveAspectRatio
code, as it was too tangled up in the particulars of how the PaintSVG
path is designed.

Differential Revision: https://phabricator.services.mozilla.com/D59925

--HG--
extra : moz-landing-system : lando
2020-02-14 14:50:36 +00:00
Brindusan Cristian 73ca873fdb Backed out changeset 3a8a36e50541 (bug 1555356) for reftest failures at pattern-big-image.html. CLOSED TREE 2020-02-13 23:16:11 +02:00
Alexis Beingessner 33d729a0f1 Bug 1555356 - Make images inside of SVGs active. r=aosmond
This is done using a similar approach to CreateWebRenderCommands
but slightly modified. In particular the active layer check needs
to be done before we're ready to CreateWebRenderCommands, but once
we decide to activate an item, we can't let CreateWebRenderCommands
fail. Unfortunately, the need to query ImageLib for support means
we need to do basically ~all of the work of CreateWebRenderCommands
to do this check.

As such, this introduces a modified version of CreateWebRenderCommands
that SVGGeometryFrames implement with a "dry run" flag. When true,
it runs the same code but stops short of mutating the WR DL/state.

ImageLib may be encouraged to do some extra work that could be thrown
away, but I'm not sure there's any way to avoid that.

For now, only SVGImageFrame actually provides an implementation. The
bulk of the implementation is handling the on-by-default
preserveAspectRatio feature of SVG images. It was cleaner to just
reimplement that logic than reuse the existing preserveAspectRatio
code, as it was too tangled up in the particulars of how the PaintSVG
path is designed.

Differential Revision: https://phabricator.services.mozilla.com/D59925

--HG--
extra : moz-landing-system : lando
2020-02-13 18:39:27 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00