This patch doesn't change behavior.
Before this patch, we're calling GetVisualRun and storing its return value (a
BidiDirection), but really we only care about the function's outparam (captured
in 'start'), and we never use the return value.
So, let's just stop capturing the return value. This addresses a clang-tidy
automated review nit.
Differential Revision: https://phabricator.services.mozilla.com/D172325
The function requires this arg to be non-null; and at all of the callsites,
we're working with a reference or an actual instance, so there's no reason for
us to convert to a pointer at the API boundary.
Differential Revision: https://phabricator.services.mozilla.com/D172302
For pointer-type getters, we have a convention that a "Get" prefix implies
"warning, this might return null" , whereas lack-of-a-"Get" implies that the
return value is guaranteed to be non-null.
In the case of this `GetBidiEngine` API, this convention doesn't directly apply
since the return value isn't pointer-typed. But it's still backed by a
dynamically-allocated resource which we dereference at the return statement,
and some of the callers take the pointer-value of what's returned and pass that
along elsewhere. So it's helpful (and more concise) to drop "Get" to convey
that yes, we're sure the returned thing is indeed a real object.
Differential Revision: https://phabricator.services.mozilla.com/D172301
This used to be done within ProcessText itself, but that was semi-redundant when called from Canvas2d;
so we now consistently expect the caller to have removed unwanted separator/control characters.
Differential Revision: https://phabricator.services.mozilla.com/D172286
This is the significant change here: extend the single-character fast-path that skips
bidi processing to also handle strings that are confirmed to have no bidi content.
In such cases, we don't need to pass the text to a Bidi engine for analysis at all.
Depends on D171988
Differential Revision: https://phabricator.services.mozilla.com/D171989
This avoids an extra string copy/scan in ProcessText, by including the block/segment
separators it cares about in the preprocessing that's already being done to normalize
whitespace characters by the caller.
Depends on D171986
Differential Revision: https://phabricator.services.mozilla.com/D171987
This function doesn't need a Bidi engine, it just does property lookups
via the intl API. So drop the redundant parameter.
Depends on D171985
Differential Revision: https://phabricator.services.mozilla.com/D171986
I guess this used to be needed somewhere, but it's long dead now.
Removing the parameter makes it clear that the caller doesn't need
to compute and pass it.
Depends on D171984
Differential Revision: https://phabricator.services.mozilla.com/D171985
After moving FrameChildListID into mozilla namespace, `kPrincipalList` etc. are
also exposed in the mozilla namespace. In the next part, I'll convert
FrameChildListID enum into an enum class, so the naming pollution shouldn't be
an issue.
This patch has a nice side effect that it is now easier to remove all the
aliases of FrameChildListID (`kPrincipalList` etc.) defined in multiple places
since it is confusion to have the same thing written in different ways, e.g.
`nsIFrame::kPrincipalList`, `mozilla::layout::kPrincipalList`,
`FrameChildListID::kPrincipalList`, `kPrincipalList`.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D161863
After moving FrameChildListID into mozilla namespace, `kPrincipalList` etc. are
also exposed in the mozilla namespace. In the next part, I'll convert
FrameChildListID enum into an enum class, so the naming pollution shouldn't be
an issue.
This patch has a nice side effect that it is now easier to remove all the
aliases of FrameChildListID (`kPrincipalList` etc.) defined in multiple places
since it is confusion to have the same thing written in different ways, e.g.
`nsIFrame::kPrincipalList`, `mozilla::layout::kPrincipalList`,
`FrameChildListID::kPrincipalList`, `kPrincipalList`.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D161863
After this patch, we still need nsFrameList::Enumerator to iterate
nsFrameList::Slice. We might enhance nsFrameList::Iterator to support Slice, but
I'll leave this for another day.
Differential Revision: https://phabricator.services.mozilla.com/D158809
This enables an offscreen-canvas Worker to do text rendering, but only with system-installed fonts
because we don't yet have a FontFaceSet available in the Worker. (That's bug 1758946.)
Differential Revision: https://phabricator.services.mozilla.com/D144188
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.
Differential Revision: https://phabricator.services.mozilla.com/D106008
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.
Differential Revision: https://phabricator.services.mozilla.com/D105473
Both PresShell() and PresContext() are cached in nsIFrame. This
simplifies the setup for the callers to
nsCSSFrameConstructor::CreateContinuingFrame().
Differential Revision: https://phabricator.services.mozilla.com/D66600
--HG--
extra : moz-landing-system : lando