Commit Graph

4179 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
813ca5b3b9 Bug 1855763 - Automatic fixes to avoid using prefixed transforms in tests. r=layout-reviewers,jfkthame
Using the script in comment 5, excluding third-party directories.

Differential Revision: https://phabricator.services.mozilla.com/D189760
2023-10-02 12:36:17 +00:00
Emilio Cobos Álvarez
8b03d49816 Bug 1853323 - Remove browser.underline_anchors. r=settings-reviewers,mconley
This is weirdly placed in the colors dialog, and adds a global selector
to the UA sheet for no great reason.

This sub-setting doesn't really make a lot of sense. We don't let you
force underlines in any way, so any site CSS will override it (unlike
colors, where you can actually override the site).

Just move this to the UA sheet properly.

Differential Revision: https://phabricator.services.mozilla.com/D188326
2023-09-15 15:37:15 +00:00
Tom Marble
9e40a719f2 Bug 1850545 - convert .ini manifests to .toml: batch 3 chrome.ini (bis) r=jmaher,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,places-reviewers,profiler-reviewers,m_kato,mak,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D187597
2023-09-13 18:28:32 +00:00
Emilio Cobos Álvarez
aefd1ddb30 Bug 1851787 - Plumb a DestroyContext through all functions that can destroy frames. r=dholbert
This prevents anonymous content getting destroyed at weird times
during frame destruction.

Differential Revision: https://phabricator.services.mozilla.com/D187693
2023-09-08 15:11:17 +00:00
Emilio Cobos Álvarez
52d097c513 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
77ba6cde90 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
59766eeba4 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
Daisuke Akatsuka
590b41a7b8 Bug 1849791: Enable context paint in SVG of moz-anno protocol r=places-reviewers,dholbert,mak
Differential Revision: https://phabricator.services.mozilla.com/D186644
2023-08-23 21:35:01 +00:00
Robert Longson
efc549bbd7 Bug 1642209 - Fix filtering of masked content r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186528
2023-08-22 17:28:35 +00:00
Robert Longson
bdc9ec0b61 Bug 1848851 - Check target element is valid type before notifying r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186358
2023-08-17 10:06:16 +00:00
Boris Chiou
7bf8670769 Bug 1598158 - Resolve URL to SVG shape elements. r=emilio
Also update offset-path-url-001.html because it seems its ref html is
incorrect per the spec. We are using its `<coord-box>` (i.e. the reference box
of its containing block) as the viewport and user coordinate system, so its
offset-starting-position should be independent from its current position
from CSS reflow. The SVG shape element always provides the offset starting
position.

So I tweak offset-path-url-001.html a little bit to make it passed for all
browsers, and add some other tests to cover the case mentioned above and
other cases.

Differential Revision: https://phabricator.services.mozilla.com/D184431
2023-08-07 22:04:02 +00:00
Robert Longson
ad9a2a895e Bug 1844992 - refactor GetSubStringLength r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184410
2023-07-27 10:15:23 +00:00
Boris Chiou
a0d6bab413 Bug 1786161 - Support rect() function. r=devtools-reviewers,emilio
Note that rect() computes to the equivalent inset() function as well.
i.e. Given `rect(t r b l)`, the equivalent function is
`inset(t calc(100% - r) calc(100% - b) l)`.

The implementation is straightforward, and we don't have to change
anything in cpp because it is always `inset()` when building the gfx::Path.

The tests for clip-path will be added in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D183528
2023-07-25 02:32:43 +00:00
Robert Longson
cb04d5f4a1 Bug 1843945 - optimise SVGObserverUtils r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183802
2023-07-22 14:06:38 +00:00
Robert Longson
ad5918db19 Bug 1844504 - Recover memory for SVGObserverSet more quickly r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184074
2023-07-21 23:15:08 +00:00
Tooru Fujisawa
23c458d4f6 Bug 1843789 - Part 1: Rewrite testing/mochitest/BrowserTestUtils/ContentTaskUtils.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=ahal,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D183657
2023-07-18 23:06:30 +00:00
Robert Longson
e01d015097 Bug 825254 - SMIL animateMotion should react to the path itself being animated r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D181930
2023-07-13 12:15:22 +00:00
Gregory Pappas
76facf7cd2 Bug 1842345 - Remove gfx.webrender.enabled pref r=jrmuizel,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D183071
2023-07-13 04:17:40 +00:00
Boris Chiou
3996efea15 Bug 1842277 - Compute <basic-shape-rect> to the equivalent inset() function. r=devtools-reviewers,emilio
Per spec
https://drafts.csswg.org/css-shapes-1/#basic-shape-computed-values, and
the spec issue, https://github.com/w3c/csswg-drafts/issues/9053,
all <basic-shape-rect> functions compute to the equivalent inset() function.
i.e.
`xywh(x y w h)` computes to
`inset(y calc(100% - x - w) calc(100% - y - h) x)`

The basic concept is to use `BasicShapeRect` as the specified value of
`<basic-shape-rect>`, i.e. inset()/xywh()/rect(), and its computed value is
the equivalent `InsetRect`, and so it becomes possible to interpolate among
these three functions.

Also, we can drop BuildXywhPath() and ComputeRect() because now there is
only inset() function when building gfx::Path.

Besides, tweak the test, offset-path-shape-xywh-003.html, because the original
test, `xywh(10% 10% 80% 80%)`, has to calculate `calc(100% - 10% - 80%)`.
Its result is `Percentage(0.099999964)` in Rust code, and then it makes us
compute an imprecision inset rect when building the gfx::path, which results in
a transform with the sub-pixel translation. So change it to
`xywh(10% 10% 90% 90%)` to avoid adding fuzzy tolerance.

Differential Revision: https://phabricator.services.mozilla.com/D183221
2023-07-12 20:16:47 +00:00
Boris Chiou
413be80cd8 Bug 1786160 - Support xywh() for clip-path. r=emilio
The fuzzy in the test happens on the round because we use the different way
to draw the round of clip-path (compared to border-radius property) in
the render backend, so there are some tiny differences.

Differential Revision: https://phabricator.services.mozilla.com/D182421
2023-07-07 18:12:41 +00:00
Boris Chiou
39d4bd0f10 Bug 1786160 - Support xywh() in style. r=emilio
Also, add layout.css.basic-shape-xywh.enabled and enable it on Nightly

Differential Revision: https://phabricator.services.mozilla.com/D182419
2023-07-07 18:12:40 +00:00
Robert Longson
cea4c95981 Bug 1840746 - SVG patternTransform translate uses wrong units r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D182618
2023-07-04 14:44:35 +00:00
Kershaw Chang
705e17a537 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-28 13:21:00 +00:00
Norisz Fay
07a91b8c6a Backed out 2 changesets (bug 1838829) for causing perma mochitest failure with dom/websocket/tests being skipped CLOSED TREE
Backed out changeset 19a5d4f1850a (bug 1838829)
Backed out changeset 97cd8a256954 (bug 1838829)
2023-06-27 02:52:52 +03:00
Boris Chiou
dfd2e54386 Bug 1598156 - Part 3: Remove RayReferenceData. r=emilio
I'd like to reuse the data in RayReferenceData for all basic shapes,
so unpack RayReferenceData and drop this struct.

Also, use `nsPoint` for the current position and use `nsRect` for coord-box
because we use these types (i.e. app units) in ShapeUtils.

Besides, remove the usage of Maybe from nsStyleTransformMatrix.h and
just accept the pointer of ResolvedMotionPathData to avoid including
the entire header.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D181008
2023-06-26 23:23:54 +00:00
Boris Chiou
dba9f9063b Bug 1598156 - Part 1: Factor out the building of gfx::path into separate functions. r=emilio
So we can reuse them to draw basic shapes for offset-path.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D179629
2023-06-26 23:23:54 +00:00
Kershaw Chang
75c68b6864 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-26 14:22:14 +00:00
Jonathan Kew
429b3f5f17 Bug 1840195 - Don't try to treat the first character in an SVGTextFrame as a cluster extender, even if it's a combining char. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D181941
2023-06-26 08:41:13 +00:00
Emilio Cobos Álvarez
4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Norisz Fay
e86f1fa0e9 Backed out 5 changesets (bug 1838829) for causing mochitest failures CLOSED TREE
Backed out changeset 693d34c8447d (bug 1838829)
Backed out changeset 903d9ff4afaa (bug 1838829)
Backed out changeset 5e51feff7467 (bug 1838829)
Backed out changeset e125be49d2a6 (bug 1838829)
Backed out changeset 1a8cf3c83dc4 (bug 1838829)
2023-06-22 03:37:07 +03:00
Kershaw Chang
2cdb6b3a96 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-21 19:43:33 +00:00
Boris Chiou
8e1a7c8124 Bug 1837305 - Part 1: Rework GenericBasicShape. r=devtools-reviewers,emilio
The definition of `<basic-shape>` includes other types of basic shapes,
e.g. path(), xywh(), rect(). So we put them together to match the spec.
However, some properties only use the subset of basic shapes, so we use
the bitflags to choose the supported basic shape at the parse time.

Also, remove StyleBasicShapeType because no one uses it.

Only refactoring in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D179624
2023-06-15 00:03:59 +00:00
Robert Longson
056bb264bd Bug 1837093 - Make SVGAnimatedLength methods take const pointers to avoid casting away const later r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D180175
2023-06-07 14:28:18 +00:00
Robert Longson
6234013ded Bug 1185271 - SVG pattern with userSpaceOnUse units does not scale correctly for text r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D178728
2023-05-26 04:50:49 +00:00
Robert Longson
a1b7878e33 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
e7716be371 Bug 1832986 - Fix patterns with opacity r=emilio
The change here is to the lifetime of the gfxContext (and any groups it has) - reverting it to that prior to bug 1751025

I don't know whether that affect SVGClipPathFrame but that's the only other place the lifetime changed that I can see.

Differential Revision: https://phabricator.services.mozilla.com/D177974
2023-05-15 17:13:37 +00:00
Robert Longson
f508ed697b Bug 1831419 - check for singular matrix before drawing r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D177886
2023-05-12 11:30:58 +00:00
Robert Longson
9a34e8ff96 Bug 1832767 - Remove TransformFrameRectToOuterSVG r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D177885
2023-05-12 10:30:30 +00:00
Robert Longson
7ec07f0365 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
2219808b7a Bug 1827662 - fix getBoundingClientRect when use elements are present r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D176629
2023-04-29 20:47:43 +00:00
Robert Longson
9acd8521cd 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
83c85baaeb 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
26b601bb79 Bug 1193586 - Fix scaling of patterns with viewBoxes that are not at the origin r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D176462
2023-04-26 08:48:01 +00:00
Robert Longson
2fdf702d6e 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
e47a68c1a6 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
e0d6671991 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
cd523b2514 Backed out changeset a846d1b82b98 (bug 1751025) for failures on opacity.svg. CLOSED TREE 2023-04-11 09:46:16 +03:00
Robert Longson
3a9c792127 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
Timothy Nikkel
3e2ea92aa4 Bug 1826444. Null check pattern in SVGContextPaintImpl::Paint::GetPattern. r=firefox-svg-reviewers,longsonr
It's null because there it's an empty pattern frame. SVGPatternFrame::GetPaintServerPattern returns null because SVGPatternFrame::PaintPattern returns null because SVGPatternFrame::GetPatternWithChildren returns null.

Differential Revision: https://phabricator.services.mozilla.com/D174713
2023-04-05 07:05:26 +00:00
Emilio Cobos Álvarez
4a15af1330 Bug 1824603 - Use BrowsingContext zoom level rather than nsPresContext zoom level for root SVGs. r=longsonr
This trivially reproduces with ui.textScaleFactor=150 or so.

This needs to match ImageDocument::GetZoomLevel, for the math here to
work out.

Differential Revision: https://phabricator.services.mozilla.com/D174367
2023-04-03 16:43:51 +00:00