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
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
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
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
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
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
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
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
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
The textcase and reference differ by a single space.
We should check that we've not run off the end of the path while we're skipping characters
Also removes a redundant check presumably left over from some earlier refactoring.
Differential Revision: https://phabricator.services.mozilla.com/D97828
The textcase and reference differ by a single space.
We should check for new clusters or ligature groups in textPaths even in skipped characters
Also removes a redundant check presumably left over from some earlier refactoring.
Differential Revision: https://phabricator.services.mozilla.com/D97828
This patch is generated via the rename functionality in my editor; add
`mozilla::` prefix to `OverflowAreas` in headers; and remove the
`OverflowType` alias added in Part 1.
Differential Revision: https://phabricator.services.mozilla.com/D97235
SVGSVGElement::SetCurrentScaleTranslate checks that things have changed but if we
manage to update both translate values before we get here then we'll skip the screen update
that we need.
Also
- introduces a tear off for SVGSVGElement.currentTranslate so we hand out the same object as required by the SVG idl
- removes SVGSVGElement::SetCurrentTranslate as dead code
- removes mPreviousScale and mPreviousTranslate from SVGSVGElement as they are no longer necessary
Differential Revision: https://phabricator.services.mozilla.com/D84796
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.
Differential Revision: https://phabricator.services.mozilla.com/D83140
This is a straightforward conversion except that
`NS_SUBTREE_DIRTY(this)` can be written terser as `IsSubtreeDirty()`.
Differential Revision: https://phabricator.services.mozilla.com/D82811