Commit graph

474 commits

Author SHA1 Message Date
Jonathan Kew
78f1bf88f1 Bug 1906978 - Fix the positioning/anchoring of SVG text runs with bidi control characters. a=dmeehan
The added reftests here failed both prior to and after the bidi-engine update,
although the exact nature of the failures changed due to the engine leaving the
bidi control characters in different places in the reordered text. (This is
explicitly unspecified by the Unicode Bidi Algorithm, because the control codes
are nominally removed after processing; leaving them present but invisible is
an implementation detail.)

The key fix here is that DoGlyphPositioning() anchors the first *addressable*
character of the text, not necessarily the absolute first codepoint, as that
may be a "deleted" control code whose position is arbitrary.

Original Revision: https://phabricator.services.mozilla.com/D216400

Differential Revision: https://phabricator.services.mozilla.com/D216527
2024-07-17 15:08:42 +00:00
longsonr
dbf44bb672 Bug 1903352 - SVG attribute values should not be zoomed r=emilio a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D214286
2024-06-20 14:56:29 +00:00
longsonr
a3a30a77a0 Bug 1899525 - Stop lengthAdjust="spacingAndGlyphs" clipping the last character r=jfkthame
Reverts a small part of bug 1621502

Differential Revision: https://phabricator.services.mozilla.com/D212091
2024-05-30 14:26:29 +00:00
Daniel Holbert
88d1a64077 Bug 1896711 part 2: Use MakeRefPtr to reduce boilerplate, in layout/svg. r=TYLin
Also remove one unnecessary null-check for an object that we're allocating
infallibly.

Differential Revision: https://phabricator.services.mozilla.com/D210388
2024-05-15 07:29:20 +00:00
Robert Longson
b77620a825 Bug 1882921 - Set mPaintingShadows to false in NotifySelectionBackgroundNeedsFill r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D203242
2024-03-01 16:09:25 +00:00
Daniel Holbert
e668aee977 Bug 1882921: Initialize SVGTextDrawPathCallbacks:mPaintingShadows to false. r=longsonr,jfkthame
While we're there: also pull mColor's initialization out of the init list,
since it's the other member that's unconditionally initialized to a constant
value; and initialize it to 0 using the easier-to-interpret NS_RGBA macro
for setting nscolor values.

Differential Revision: https://phabricator.services.mozilla.com/D203214
2024-03-01 16:09:25 +00:00
Robert Longson
bca1520c01 Bug 1816628 Part 2 - Make text-shadow react to stroke properties and fill opacity r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200436
2024-02-28 18:51:23 +00:00
Robert Longson
1cdd9ca5d0 Bug 1816628 Part 1 - Account for horizontal overflow caused by text-shadow r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200435
2024-02-28 18:51:23 +00:00
Stanca Serban
71b51917c2 Backed out 2 changesets (bug 1816628) for causing OS X mochitests-plain failures in test_bug1426594.html.
Backed out changeset e32deae0b0b4 (bug 1816628)
Backed out changeset 3ee753e740b9 (bug 1816628)
2024-02-24 06:38:52 +02:00
Robert Longson
a267fa11a7 Bug 1816628 Part 2 - Make text-shadow react to stroke properties and fill opacity r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200436
2024-02-23 23:48:24 +00:00
Robert Longson
645518bec7 Bug 1816628 Part 1 - Account for horizontal overflow caused by text-shadow r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200435
2024-02-23 23:48:23 +00:00
Stanca Serban
a683301977 Backed out 2 changesets (bug 1816628) for linux related wr failures in SVGTextFrame.cpp. CLOSED TREE
Backed out changeset d58d91582a84 (bug 1816628)
Backed out changeset ddaf27e9243d (bug 1816628)
2024-02-23 21:37:04 +02:00
Robert Longson
ed7dfb1417 Bug 1816628 Part 2 - Make text-shadow react to stroke properties and fill opacity r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200436
2024-02-23 16:58:58 +00:00
Robert Longson
fe0adf9d22 Bug 1816628 Part 1 - Account for horizontal overflow caused by text-shadow r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200435
2024-02-23 16:58:58 +00:00
Robert Longson
6dcb1f869d Bug 1621502 - fix lengthAdjust when applied to vertical text r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D199797
2024-01-28 21:17:04 +00:00
Masayuki Nakano
fe9fef936b Bug 1816581 - part 1: Make CaretAssociationHint an enum class r=emilio
For forward-decl-able.

Differential Revision: https://phabricator.services.mozilla.com/D197283
2023-12-27 04:42:09 +00:00
Robert Longson
cad8a108e0 Bug 1871107 - Use do_AddRef more r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D197001
2023-12-20 23:34:03 +00:00
Jens Stutte
30b28c264e Bug 1839051 - Remove include nsQuickSort.h from some more files. r=emilio
Depends on D182724

Differential Revision: https://phabricator.services.mozilla.com/D182731
2023-12-11 06:53:28 +00:00
Iulian Moraru
95f4da1719 Backed out 8 changesets (bug 1839051) for causing assertion failures on NotificationController.cpp. CLOSED TREE
Backed out changeset 94a4c163e417 (bug 1839051)
Backed out changeset 5204b97e40bc (bug 1839051)
Backed out changeset 8443a22a399d (bug 1839051)
Backed out changeset 2ab1e27d5945 (bug 1839051)
Backed out changeset 20a850a4fd7e (bug 1839051)
Backed out changeset 658568fe9662 (bug 1839051)
Backed out changeset 82525b11a7c3 (bug 1839051)
Backed out changeset 720e6863c41a (bug 1839051)
2023-12-04 22:34:25 +02:00
Jens Stutte
11a85fe724 Bug 1839051 - Remove include nsQuickSort.h from some more files. r=emilio
Depends on D182724

Differential Revision: https://phabricator.services.mozilla.com/D182731
2023-12-04 18:33:42 +00:00
Robert Longson
87a1d9c8eb Bug 1862411 - simplify array access by using range based loops and LastElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192465
2023-11-03 16:22:23 +00:00
Sylvestre Ledru
d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +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
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
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
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
Robert Longson
24922776ca Bug 1401030 - Remove SVGDisplayContainerFrame::ReflowSVG at the end of SVGTextFrame::ReflowSVG as it has no effect r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D173628
2023-03-25 14:19:35 +00:00
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