Commit graph

442 commits

Author SHA1 Message Date
Andi-Bogdan Postelnicu
fa5d4cca1f Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 11:35:33 +00:00
Stanca Serban
e31a178029 Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu
0b692b5a96 Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 09:27:57 +00:00
Robert Longson
5d0eab08a3 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
50c8848924 Backed out changeset 0d0d506fe655 (bug 1823477) for causing bustages at DisplaySVGItem.cpp. CLOSED TREE 2023-03-21 15:42:48 +02:00
Robert Longson
187e976ee6 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
93304f6d11 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
73d344d188 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
6fc3d48772 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
e7d91b29ba 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
1b3e69f8aa 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
b1c227d6c4 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
a3dd06b8a5 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
411f1ea6a6 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
2f96f3b482 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
350f9b6199 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
47afd1b3f0 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
c8516c6e39 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
c81bfb01b8 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
84aff27850 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
fc7c0b16c4 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
bb250ece0e 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
abb5044ca7 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
1629218702 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
82b06c58a4 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
6cb8b4b589 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
0aa03120aa 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
11acbcefd2 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
61f0b7afb7 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
9c058a85c3 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
5cbce534c4 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
4bcc81eaf7 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
65fe462eef 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
f4644e4220 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
f1a3cc8348 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
e7bef911d2 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
a29c0bcdbe 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
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
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
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
Robert Longson
2393c1cc61 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
4e6caf25ee 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
c38da81fa5 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
642579b68a Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-13 05:01:34 +00:00
criss
9640d7f5f3 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
706fce127d 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
d25d135947 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
3f9d3853cd Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-06 23:12:03 +00:00