Commit Graph

439 Commits

Author SHA1 Message Date
Robert Longson
32b0a09aff Bug 1823477 - Create a DisplaySVGItem as a base class for SVG Painted Display Items r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173056
2023-03-21 15:05:34 +00:00
Butkovits Atila
c7bc5ac074 Backed out changeset 0d0d506fe655 (bug 1823477) for causing bustages at DisplaySVGItem.cpp. CLOSED TREE 2023-03-21 15:42:48 +02:00
Robert Longson
1abdc0949e Bug 1823477 - Create a DisplaySVGItem as a base class for SVG Painted Display Items r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173056
2023-03-21 13:14:14 +00:00
Robert Longson
86eb975f46 Bug 1823290 - Check for NS_FRAME_SVG_LAYOUT directly rather than checking for an SVG frame that isn't an outer SVG frame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172960
2023-03-20 12:30:45 +00:00
Jonathan Kew
60150a69e1 Bug 1823215 - Use ElementOrArray<T> to simplify the management of glyphrun(s) in gfxTextRun. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172940
2023-03-19 16:36:06 +00:00
Robert Longson
83cd6a27b6 Bug 1781253 - GetBoundingClientRect should return the bounding rect of the text ignoring ink overflow r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D172549
2023-03-17 19:13:45 +00:00
Robert Longson
2506683955 Bug 1820754 - Move common webrender code into SVGUtils r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171855
2023-03-14 06:31:57 +00:00
Jonathan Kew
e998377ebb Bug 1815404 - Remove refcounting from gfxContext. r=gfx-reviewers,lsalzman
Depends on D170367

Differential Revision: https://phabricator.services.mozilla.com/D170369
2023-02-21 07:28:24 +00:00
Robert Longson
4e2ddd4623 Bug 1407955 - Display text shadow with fill and stroke specified r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D169661
2023-02-14 09:28:44 +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
45fd352534 Bug 1815107 - Don't update correspondence if the text frames haven't changed r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D168905
2023-02-08 16:39:28 +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
Robert Longson
9638d1751d Bug 1815061 - Fix handling of startOffset and stroke-dasharray when the pathLength attribute is zero r=emilio
See https://github.com/w3c/svgwg/issues/81

Differential Revision: https://phabricator.services.mozilla.com/D168899
2023-02-04 17:46:57 +00:00
Robert Longson
69d86c833c Bug 1809688 - Fix processing of trailing whitespace after textPath r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167940
2023-01-27 11:28:35 +00:00
Narcis Beleuzu
98eab9ae07 Backed out changeset a9175e017c28 (bug 1809688) for reftest failure on textpath-cluster-2.svg . CLOSED TREE 2023-01-27 11:33:20 +02:00
Robert Longson
a7a5275b80 Bug 1809688 - Fix processing of trailing whitespace after textPath r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167940
2023-01-27 08:14:38 +00:00
Daniel Holbert
7cbf70e9db Bug 1812729: Use AutoTArray to avoid allocation churn in SVGTextFrame::DoGlyphPositioning. r=hiro
This patch doesn't change user-visible behavior, other than an anticipated
slight performance improvement.

The preallocation sizes here are intended to be relatively small to avoid
wasting stack space, but they're large enough to avoid reallocation churn here
during a run of the Speedometer 3 benchmark.

Differential Revision: https://phabricator.services.mozilla.com/D168000
2023-01-26 21:18:04 +00:00
Robert Longson
ed799ccbac Bug 1811464 - Use SVGElement::FromNode more r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167459
2023-01-23 21:30:54 +00:00
Robert Longson
7763391ed4 Bug 1803957 - remove virtual keyword from override methods in cpp files r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163786
2022-12-04 20:00:25 +00:00
Martin Robinson
62878408df Bug 1803377 - Rename the values of the IntrinsicDirty enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Razvan Cojocaru
363946e17f Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
2022-11-04 18:29:35 +00:00
Iulian Moraru
941a3e39e2 Backed out 4 changesets (bug 1796697) as per Daniel Holbert's request. CLOSED TREE
Backed out changeset f9d2d5f60fe9 (bug 1796697)
Backed out changeset b7ee22f54a6c (bug 1796697)
Backed out changeset d43777f8ef79 (bug 1796697)
Backed out changeset a2763d3ad250 (bug 1796697)
2022-10-30 23:06:57 +02:00
Daniel Holbert
01898a44b3 Bug 1798080 part 2: Add const annotation to some never-modified member-vars in SVGTextFrame's helper classes, to reflect reality. r=jfkthame
This patch doesn't impact behavior.

The new const annotations will help to simplify reasoning about these various
helper classes & what states they could possibly be in.

Differential Revision: https://phabricator.services.mozilla.com/D160695
2022-10-29 17:43:29 +00:00
Daniel Holbert
a663439150 Bug 1798080 part 1: Add MOZ_STACK_CLASS annotation to some text layout/painting classes, to reflect reality. r=jfkthame
This patch doesn't impact behavior; it's just adding an annotation to activate
a static analysis check for various classes.

The annotation gives us some confidence that these instances are tightly scoped
to a particular function-call.  This helps reduce concerns about to-what-extent
the affected classes might need to worry about the lifetimes of the objects
pointed to by their member-vars.

The specific classes I'm annotating are:

 - gfxTextRunDrawCallbacks and PaintTextParams, both of which have multiple
   subclasses, all of which will automatically inherit this annotation and
   benefit from it.

 - TextFrameIterator and CharIterator, two local utility classes in
   SVGTextFrame.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D160694
2022-10-29 17:43:29 +00:00
Daniel Holbert
90d06cfd5d Bug 1796697 part 1: Update SVGTextFrame.cpp to use Maybe<> to represent an optionally-invalid gfxSkipCharsIterator. r=jfkthame
This patch shouldn't change behavior.

This lets us remove the rarely-used no-arg constructor for gfxSkipCharsIterator
in the next patch. (That constructor was an alternate representation of an
invalid gfxSkipCharsIterator; but the Maybe<> representation added here makes
things a bit easier to reason about.)

Differential Revision: https://phabricator.services.mozilla.com/D159902
2022-10-24 14:06:12 +00:00
Robert Longson
61d438af63 Bug 1696505 - stop SVG text reflows triggering other reflows r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D158912
2022-10-10 21:30:38 +00:00
Nicolas Silva
5a86ad27de Bug 1404086 - Early-out when the length adjust scale factor is zero. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D155834
2022-08-30 09:45:46 +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
Robert Longson
c8453138e0 Bug 1777671 - Account for glyph orientations when returning rotation of character r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D150858
2022-07-06 06:01:22 +00:00
Jonathan Kew
f572678eca Bug 1765093 - patch 3 - Also use the new gfxTextRun::GetLineHeightMetrics to optimize GetAscentAndDescentInAppUnits. r=emilio
This accelerates web-exposed SVG APIs such as getExtentOfChar() by avoiding the expensive
MeasureText() call when we're just getting the line-height metrics.

Differential Revision: https://phabricator.services.mozilla.com/D145717
2022-05-07 13:12:00 +00:00
Jonathan Kew
dfb404bce9 Bug 1765093 - patch 1 - Avoid measuring entire textrun in SVGTextFrame's GetBaselinePosition function. r=dholbert
This aims to prevent an O(n^2) performance situation when per-glyph
positioning is in use.

This reduces the time to load the testcase here from around 70s to 17s
in my local build. Still not great, but at least it's less of a disaster.

Differential Revision: https://phabricator.services.mozilla.com/D145631
2022-05-07 13:11:59 +00:00
Cristian Tuns
534456190f Backed out 4 changesets (bug 1765093) for causing web-platform-test failures on boundary-shaping-010.html CLOSED TREE
Backed out changeset 4f24833ac254 (bug 1765093)
Backed out changeset 6e5b336588d1 (bug 1765093)
Backed out changeset 17d5218d84b7 (bug 1765093)
Backed out changeset bbc194412080 (bug 1765093)
2022-05-06 17:08:52 -04:00
Jonathan Kew
d01d1cbf7f Bug 1765093 - patch 3 - Also use the new gfxTextRun::GetLineHeightMetrics to optimize GetAscentAndDescentInAppUnits. r=emilio
This accelerates web-exposed SVG APIs such as getExtentOfChar() by avoiding the expensive
MeasureText() call when we're just getting the line-height metrics.

Differential Revision: https://phabricator.services.mozilla.com/D145717
2022-05-06 17:47:23 +00:00
Jonathan Kew
a9992bf2ae Bug 1765093 - patch 1 - Avoid measuring entire textrun in SVGTextFrame's GetBaselinePosition function. r=dholbert
This aims to prevent an O(n^2) performance situation when per-glyph
positioning is in use.

This reduces the time to load the testcase here from around 70s to 17s
in my local build. Still not great, but at least it's less of a disaster.

Differential Revision: https://phabricator.services.mozilla.com/D145631
2022-05-06 17:47:22 +00:00
David Shin
3bc7313e07 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
Emilio Cobos Álvarez
9fd05b05c5 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
a69cceb2fa 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
3bf68effee 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
dc15260cbc 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
Robert Longson
9c9d8cfcc4 Bug 1730049 - correct dominant-baseline for vertical-rl r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D125371
2021-09-15 08:52:32 +00:00
Cristian Tuns
6062cc3b3d Backed out changeset 373c4720d3ce (bug 1730049) for causing reftest failures on text-layout-10.svg. CLOSED TREE 2021-09-14 15:12:58 -04:00
Robert Longson
c2e0f487cb Bug 1730049 - correct dominant-baseline for vertical-rl r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D125371
2021-09-14 15:05:46 +00:00
Matt Woodrow
445639539e Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-13 05:01:34 +00:00
criss
3f0efebda9 Backed out 10 changesets (bug 1714138, bug 1542929, bug 1728232, bug 1729236, bug 1728258, bug 1728251, bug 1728050) for causing bug 1424348 a=backout
Backed out changeset c5b71e6ce0e5 (bug 1729236)
Backed out changeset c6bcc4ed3d2e (bug 1729236)
Backed out changeset 7e292895282a (bug 1729236)
Backed out changeset d9ddd915e0c2 (bug 1714138)
Backed out changeset 82b98d2f0dcf (bug 1728258)
Backed out changeset 9a84a36b9dc4 (bug 1542929)
Backed out changeset 96be978630ff (bug 1728251)
Backed out changeset d7a8bf19d849 (bug 1728251)
Backed out changeset cce0c53b439f (bug 1728232)
Backed out changeset 3afd6aee7849 (bug 1728050)
2021-09-12 12:00:30 +03:00
Matt Woodrow
fd0279e72a Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-10 03:43:32 +00:00
Marian-Vasile Laza
da24ed0855 Backed out 7 changesets (bug 1728050, bug 1728251, bug 1728232, bug 1542929, bug 1714138, bug 1728258) for causing reftest failures. CLOSED TREE
Backed out changeset 41e053201cd3 (bug 1714138)
Backed out changeset 16ae9f5b4aa0 (bug 1728258)
Backed out changeset 414aa7ff05fe (bug 1542929)
Backed out changeset 7217ecf149c4 (bug 1728251)
Backed out changeset 405ff2ed2110 (bug 1728251)
Backed out changeset 3eec9e6c7218 (bug 1728232)
Backed out changeset 66038c15fe54 (bug 1728050)
2021-09-07 09:00:26 +03:00
Matt Woodrow
22423c85ea Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-06 23:12:03 +00:00
longsonr
d9d1666983 Bug 1695490 - Remove svg.text-spacing.enabled pref r=emilio
Backs out bug 1599173 which landed in Firefox 72. The pref has been enabled since bug 1600855 which landed in Firefox 73

Differential Revision: https://phabricator.services.mozilla.com/D106731
2021-02-28 21:52:21 +00:00
longsonr
f4bf57a0bc Bug 1693032 - SVG text reflow can flow through multiple outer svg elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D105350
2021-02-17 14:51:47 +00:00
Butkovits Atila
15cb93424e Backed out changeset 4b9a80f187e8 (bug 1693032) for causing failures on 1693032.html 2021-02-17 00:09:08 +02:00