tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 50a5799612e6e712d6f20090b2d5ab71a712136e
parent dae7a7c8626ea7bc2b19ac98b95157cb6c1209cd
Author: Frédéric Wang <fwang@igalia.com>
Date:   Thu,  8 Jan 2026 15:24:06 +0000

Bug 2008902 - Improve member initialization for nsEmbellishData/nsPresentationData. r=emilio,layout-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D278090

Diffstat:
Mlayout/mathml/nsIMathMLFrame.h | 27+++++++--------------------
1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/layout/mathml/nsIMathMLFrame.h b/layout/mathml/nsIMathMLFrame.h @@ -216,28 +216,20 @@ class nsIMathMLFrame { // state in those frames that are not part of the embellished hierarchy. struct nsEmbellishData { // bits used to mark certain properties of our embellishments - uint32_t flags; + uint32_t flags = 0; // pointer on the <mo> frame at the core of the embellished hierarchy - nsIFrame* coreFrame; + nsIFrame* coreFrame = nullptr; // stretchy direction that the nsMathMLChar owned by the core <mo> supports - nsStretchDirection direction; + nsStretchDirection direction = NS_STRETCH_DIRECTION_UNSUPPORTED; // spacing that may come from <mo> depending on its 'form'. Since // the 'form' may also depend on the position of the outermost // embellished ancestor, the set up of these values may require // looking up the position of our ancestors. - nscoord leadingSpace; - nscoord trailingSpace; - - nsEmbellishData() { - flags = 0; - coreFrame = nullptr; - direction = NS_STRETCH_DIRECTION_UNSUPPORTED; - leadingSpace = 0; - trailingSpace = 0; - } + nscoord leadingSpace = 0; + nscoord trailingSpace = 0; }; // struct used by a container frame to modulate its presentation. @@ -250,17 +242,12 @@ struct nsEmbellishData { // descendants that affects us. struct nsPresentationData { // bits for: compressed, etc - uint32_t flags; + uint32_t flags = 0; // handy pointer on our base child (the 'nucleus' in TeX), but it may be // null here (e.g., tags like <mrow>, <mfrac>, <mtable>, etc, won't // pick a particular child in their child list to be the base) - nsIFrame* baseFrame; - - nsPresentationData() { - flags = 0; - baseFrame = nullptr; - } + nsIFrame* baseFrame = nullptr; }; // ==========================================================================