Issue #2112 - Part 13: Remove construction context for style structs

Partial reversion of bug 1261552. This keeps the behavior of always passing the presentation context to the style structs, unlike pre-stylo where it is conditional.
This commit is contained in:
FranklinDM 2024-03-25 22:40:54 +08:00 committed by roytam1
commit cb08fdd1f0
4 changed files with 67 additions and 164 deletions

View file

@ -1,80 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_StyleStructContext_h
#define mozilla_StyleStructContext_h
#include "CounterStyleManager.h"
#include "mozilla/LookAndFeel.h"
#include "nsPresContext.h"
class nsDeviceContext;
/**
* Construction context for style structs.
* TODO: marked for removal.
*/
class StyleStructContext {
public:
MOZ_IMPLICIT StyleStructContext(nsPresContext* aPresContext)
: mPresContext(aPresContext) { MOZ_ASSERT(aPresContext); }
static StyleStructContext ServoContext() { return StyleStructContext(); }
float TextZoom()
{
return mPresContext->TextZoom();
}
const nsFont* GetDefaultFont(uint8_t aFontID)
{
return mPresContext->GetDefaultFont(aFontID, GetLanguageFromCharset());
}
uint32_t GetBidi()
{
return mPresContext->GetBidi();
}
int32_t AppUnitsPerDevPixel();
nscoord DevPixelsToAppUnits(int32_t aPixels)
{
return NSIntPixelsToAppUnits(aPixels, AppUnitsPerDevPixel());
}
typedef mozilla::LookAndFeel LookAndFeel;
nscolor DefaultColor()
{
return mPresContext->DefaultColor();
}
mozilla::CounterStyle* BuildCounterStyle(const nsSubstring& aName)
{
return mPresContext->CounterStyleManager()->BuildCounterStyle(aName);
}
nsIAtom* GetLanguageFromCharset() const
{
return mPresContext->GetLanguageFromCharset();
}
already_AddRefed<nsIAtom> GetContentLanguage() const
{
return mPresContext->GetContentLanguage();
}
private:
nsDeviceContext* DeviceContext()
{
return mPresContext->DeviceContext();
}
nsDeviceContext* HackilyFindSomeDeviceContext();
StyleStructContext() : mPresContext(nullptr) {}
nsPresContext* mPresContext;
};
#endif // mozilla_StyleStructContext_h

View file

@ -96,7 +96,6 @@ EXPORTS.mozilla += [
'StyleSheet.h',
'StyleSheetInfo.h',
'StyleSheetInlines.h',
'StyleStructContext.h',
]
EXPORTS.mozilla.dom += [

View file

@ -116,28 +116,12 @@ safe_strcmp(const char16_t* a, const char16_t* b)
return NS_strcmp(a, b);
}
int32_t
StyleStructContext::AppUnitsPerDevPixel()
{
return DeviceContext()->AppUnitsPerDevPixel();
}
nsDeviceContext*
StyleStructContext::HackilyFindSomeDeviceContext()
{
nsCOMPtr<nsIAppShellService> appShell(do_GetService("@mozilla.org/appshell/appShellService;1"));
MOZ_ASSERT(appShell);
nsCOMPtr<mozIDOMWindowProxy> win;
appShell->GetHiddenDOMWindow(getter_AddRefs(win));
return nsLayoutUtils::GetDeviceContextForScreenInfo(static_cast<nsPIDOMWindowOuter*>(win.get()));
}
static bool AreShadowArraysEqual(nsCSSShadowArray* lhs, nsCSSShadowArray* rhs);
// --------------------
// nsStyleFont
//
nsStyleFont::nsStyleFont(const nsFont& aFont, StyleStructContext aContext)
nsStyleFont::nsStyleFont(const nsFont& aFont, nsPresContext* aContext)
: mFont(aFont)
, mSize(nsStyleFont::ZoomText(aContext, mFont.size))
, mGenericID(kGenericFont_NONE)
@ -175,9 +159,9 @@ nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
MOZ_COUNT_CTOR(nsStyleFont);
}
nsStyleFont::nsStyleFont(StyleStructContext aContext)
: nsStyleFont(*aContext.GetDefaultFont(kPresContext_DefaultVariableFont_ID),
aContext)
nsStyleFont::nsStyleFont(nsPresContext* aContext)
: nsStyleFont(*(aContext->GetDefaultFont(
kPresContext_DefaultVariableFont_ID, nullptr)), aContext)
{
}
@ -236,11 +220,11 @@ nsStyleFont::CalcDifference(const nsStyleFont& aNewData) const
}
/* static */ nscoord
nsStyleFont::ZoomText(StyleStructContext aContext, nscoord aSize)
nsStyleFont::ZoomText(nsPresContext* aContext, nscoord aSize)
{
// aSize can be negative (e.g.: calc(-1px)) so we can't assert that here.
// The caller is expected deal with that.
return NSToCoordTruncClamped(float(aSize) * aContext.TextZoom());
return NSToCoordTruncClamped(float(aSize) * aContext->TextZoom());
}
/* static */ nscoord
@ -252,16 +236,16 @@ nsStyleFont::UnZoomText(nsPresContext *aPresContext, nscoord aSize)
}
/* static */ already_AddRefed<nsIAtom>
nsStyleFont::GetLanguage(StyleStructContext aContext)
nsStyleFont::GetLanguage(nsPresContext* aContext)
{
RefPtr<nsIAtom> language = aContext.GetContentLanguage();
RefPtr<nsIAtom> language = aContext->GetContentLanguage();
if (!language) {
// we didn't find a (usable) Content-Language, so we fall back
// to whatever the presContext guessed from the charset
// NOTE this should not be used elsewhere, because we want websites
// to use UTF-8 with proper language tag, instead of relying on
// deriving language from charset. See bug 1040668 comment 67.
language = aContext.GetLanguageFromCharset();
language = aContext->GetLanguageFromCharset();
}
return language.forget();
}
@ -282,7 +266,7 @@ CalcCoord(const nsStyleCoord& aCoord, const nscoord* aEnumTable, int32_t aNumEnu
return nsRuleNode::ComputeCoordPercentCalc(aCoord, 0);
}
nsStyleMargin::nsStyleMargin(StyleStructContext aContext)
nsStyleMargin::nsStyleMargin(nsPresContext* aContext)
{
MOZ_COUNT_CTOR(nsStyleMargin);
nsStyleCoord zero(0, nsStyleCoord::CoordConstructor);
@ -317,7 +301,7 @@ nsStyleMargin::CalcDifference(const nsStyleMargin& aNewData) const
nsChangeHint_ClearAncestorIntrinsics;
}
nsStylePadding::nsStylePadding(StyleStructContext aContext)
nsStylePadding::nsStylePadding(nsPresContext* aContext)
{
MOZ_COUNT_CTOR(nsStylePadding);
nsStyleCoord zero(0, nsStyleCoord::CoordConstructor);
@ -356,7 +340,7 @@ nsStylePadding::CalcDifference(const nsStylePadding& aNewData) const
return NS_STYLE_HINT_REFLOW & ~nsChangeHint_ClearDescendantIntrinsics;
}
nsStyleBorder::nsStyleBorder(StyleStructContext aContext)
nsStyleBorder::nsStyleBorder(nsPresContext* aContext)
: mBorderColors(nullptr)
, mBorderImageFill(NS_STYLE_BORDER_IMAGE_SLICE_NOFILL)
, mBorderImageRepeatH(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH)
@ -383,7 +367,7 @@ nsStyleBorder::nsStyleBorder(StyleStructContext aContext)
mBorderColor[side] = StyleComplexColor::CurrentColor();
}
mTwipsPerPixel = aContext.DevPixelsToAppUnits(1);
mTwipsPerPixel = aContext->DevPixelsToAppUnits(1);
}
nsBorderColors::~nsBorderColors()
@ -564,13 +548,13 @@ nsStyleBorder::CalcDifference(const nsStyleBorder& aNewData) const
return nsChangeHint(0);
}
nsStyleOutline::nsStyleOutline(StyleStructContext aContext)
nsStyleOutline::nsStyleOutline(nsPresContext* aContext)
: mOutlineWidth(NS_STYLE_BORDER_WIDTH_MEDIUM, eStyleUnit_Enumerated)
, mOutlineOffset(0)
, mOutlineColor(StyleComplexColor::CurrentColor())
, mOutlineStyle(NS_STYLE_BORDER_STYLE_NONE)
, mActualOutlineWidth(0)
, mTwipsPerPixel(aContext.DevPixelsToAppUnits(1))
, mTwipsPerPixel(aContext->DevPixelsToAppUnits(1))
{
MOZ_COUNT_CTOR(nsStyleOutline);
// spacing values not inherited
@ -640,9 +624,10 @@ nsStyleOutline::CalcDifference(const nsStyleOutline& aNewData) const
// --------------------
// nsStyleList
//
nsStyleList::nsStyleList(StyleStructContext aContext)
nsStyleList::nsStyleList(nsPresContext* aContext)
: mListStylePosition(NS_STYLE_LIST_STYLE_POSITION_OUTSIDE)
, mCounterStyle(aContext.BuildCounterStyle(NS_LITERAL_STRING("disc")))
, mCounterStyle(aContext->CounterStyleManager()->
BuildCounterStyle(NS_LITERAL_STRING("disc")))
{
MOZ_COUNT_CTOR(nsStyleList);
SetQuotesInitial();
@ -750,7 +735,7 @@ nsStyleList::sNoneQuotes;
// --------------------
// nsStyleXUL
//
nsStyleXUL::nsStyleXUL(StyleStructContext aContext)
nsStyleXUL::nsStyleXUL(nsPresContext* aContext)
: mBoxFlex(0.0f)
, mBoxOrdinal(1)
, mBoxAlign(StyleBoxAlign::Stretch)
@ -802,7 +787,7 @@ nsStyleXUL::CalcDifference(const nsStyleXUL& aNewData) const
//
/* static */ const uint32_t nsStyleColumn::kMaxColumnCount;
nsStyleColumn::nsStyleColumn(StyleStructContext aContext)
nsStyleColumn::nsStyleColumn(nsPresContext* aContext)
: mColumnCount(NS_STYLE_COLUMN_COUNT_AUTO)
, mColumnWidth(eStyleUnit_Auto)
, mColumnRuleColor(StyleComplexColor::CurrentColor())
@ -810,7 +795,7 @@ nsStyleColumn::nsStyleColumn(StyleStructContext aContext)
, mColumnFill(NS_STYLE_COLUMN_FILL_BALANCE)
, mColumnRuleWidth((StaticPresData::Get()
->GetBorderWidthTable())[NS_STYLE_BORDER_WIDTH_MEDIUM])
, mTwipsPerPixel(aContext.AppUnitsPerDevPixel())
, mTwipsPerPixel(aContext->AppUnitsPerDevPixel())
{
MOZ_COUNT_CTOR(nsStyleColumn);
}
@ -868,7 +853,7 @@ nsStyleColumn::CalcDifference(const nsStyleColumn& aNewData) const
// --------------------
// nsStyleSVG
//
nsStyleSVG::nsStyleSVG(StyleStructContext aContext)
nsStyleSVG::nsStyleSVG(nsPresContext* aContext)
: mFill(eStyleSVGPaintType_Color) // Will be initialized to NS_RGB(0, 0, 0)
, mStroke(eStyleSVGPaintType_None)
, mStrokeDashoffset(0, nsStyleCoord::CoordConstructor)
@ -1142,7 +1127,7 @@ nsStyleFilter::SetDropShadow(nsCSSShadowArray* aDropShadow)
// --------------------
// nsStyleSVGReset
//
nsStyleSVGReset::nsStyleSVGReset(StyleStructContext aContext)
nsStyleSVGReset::nsStyleSVGReset(nsPresContext* aContext)
: mMask(nsStyleImageLayers::LayerType::Mask)
, mStopColor(NS_RGB(0, 0, 0))
, mFloodColor(NS_RGB(0, 0, 0))
@ -1364,7 +1349,7 @@ bool nsStyleSVGPaint::operator==(const nsStyleSVGPaint& aOther) const
// --------------------
// nsStylePosition
//
nsStylePosition::nsStylePosition(StyleStructContext aContext)
nsStylePosition::nsStylePosition(nsPresContext* aContext)
: mWidth(eStyleUnit_Auto)
, mMinWidth(eStyleUnit_Auto)
, mMaxWidth(eStyleUnit_None)
@ -1695,7 +1680,7 @@ nsStylePosition::UsedJustifySelf(nsStyleContext* aParent) const
// nsStyleTable
//
nsStyleTable::nsStyleTable(StyleStructContext aContext)
nsStyleTable::nsStyleTable(nsPresContext* aContext)
: mLayoutStrategy(NS_STYLE_TABLE_LAYOUT_AUTO)
, mSpan(1)
{
@ -1727,7 +1712,7 @@ nsStyleTable::CalcDifference(const nsStyleTable& aNewData) const
// -----------------------
// nsStyleTableBorder
nsStyleTableBorder::nsStyleTableBorder(StyleStructContext aContext)
nsStyleTableBorder::nsStyleTableBorder(nsPresContext* aContext)
: mBorderSpacingCol(0)
, mBorderSpacingRow(0)
, mBorderCollapse(NS_STYLE_BORDER_SEPARATE)
@ -1779,8 +1764,8 @@ nsStyleTableBorder::CalcDifference(const nsStyleTableBorder& aNewData) const
// nsStyleColor
//
nsStyleColor::nsStyleColor(StyleStructContext aContext)
: mColor(aContext.DefaultColor())
nsStyleColor::nsStyleColor(nsPresContext* aContext)
: mColor(aContext->DefaultColor())
{
MOZ_COUNT_CTOR(nsStyleColor);
}
@ -2839,7 +2824,7 @@ nsStyleImageLayers::Layer::CalcDifference(const nsStyleImageLayers::Layer& aNewL
// nsStyleBackground
//
nsStyleBackground::nsStyleBackground(StyleStructContext aContext)
nsStyleBackground::nsStyleBackground(nsPresContext* aContext)
: mImage(nsStyleImageLayers::LayerType::Background)
, mBackgroundColor(NS_RGBA(0, 0, 0, 0))
{
@ -3033,7 +3018,7 @@ StyleAnimation::operator==(const StyleAnimation& aOther) const
// --------------------
// nsStyleDisplay
//
nsStyleDisplay::nsStyleDisplay(StyleStructContext aContext)
nsStyleDisplay::nsStyleDisplay(nsPresContext* aContext)
: mDisplay(StyleDisplay::Inline)
, mOriginalDisplay(StyleDisplay::Inline)
, mContain(NS_STYLE_CONTAIN_NONE)
@ -3383,8 +3368,8 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
// nsStyleVisibility
//
nsStyleVisibility::nsStyleVisibility(StyleStructContext aContext)
: mDirection(aContext.GetBidi() == IBMBIDI_TEXTDIRECTION_RTL
nsStyleVisibility::nsStyleVisibility(nsPresContext* aContext)
: mDirection(aContext->GetBidi() == IBMBIDI_TEXTDIRECTION_RTL
? NS_STYLE_DIRECTION_RTL
: NS_STYLE_DIRECTION_LTR)
, mVisible(NS_STYLE_VISIBILITY_VISIBLE)
@ -3560,7 +3545,7 @@ nsStyleContentData::UntrackImage(ImageTracker* aImageTracker)
// nsStyleContent
//
nsStyleContent::nsStyleContent(StyleStructContext aContext)
nsStyleContent::nsStyleContent(nsPresContext* aContext)
{
MOZ_COUNT_CTOR(nsStyleContent);
}
@ -3623,7 +3608,7 @@ nsStyleContent::CalcDifference(const nsStyleContent& aNewData) const
// nsStyleTextReset
//
nsStyleTextReset::nsStyleTextReset(StyleStructContext aContext)
nsStyleTextReset::nsStyleTextReset(nsPresContext* aContext)
: mTextDecorationLine(NS_STYLE_TEXT_DECORATION_LINE_NONE)
, mTextDecorationStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID)
, mUnicodeBidi(NS_STYLE_UNICODE_BIDI_NORMAL)
@ -3701,7 +3686,7 @@ AreShadowArraysEqual(nsCSSShadowArray* lhs,
// nsStyleText
//
nsStyleText::nsStyleText(StyleStructContext aContext)
nsStyleText::nsStyleText(nsPresContext* aContext)
: mTextAlign(NS_STYLE_TEXT_ALIGN_START)
, mTextAlignLast(NS_STYLE_TEXT_ALIGN_AUTO)
, mTextAlignTrue(false)
@ -3731,7 +3716,7 @@ nsStyleText::nsStyleText(StyleStructContext aContext)
, mTextShadow(nullptr)
{
MOZ_COUNT_CTOR(nsStyleText);
nsCOMPtr<nsIAtom> language = aContext.GetContentLanguage();
nsCOMPtr<nsIAtom> language = aContext->GetContentLanguage();
mTextEmphasisPosition = language &&
nsStyleUtil::MatchesLanguagePrefix(language, u"zh") ?
NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT_ZH :
@ -3930,7 +3915,7 @@ nsCursorImage::operator==(const nsCursorImage& aOther) const
EqualImages(mImage, aOther.mImage);
}
nsStyleUserInterface::nsStyleUserInterface(StyleStructContext aContext)
nsStyleUserInterface::nsStyleUserInterface(nsPresContext* aContext)
: mUserInput(StyleUserInput::Auto)
, mUserModify(StyleUserModify::ReadOnly)
, mUserFocus(StyleUserFocus::None)
@ -4017,7 +4002,7 @@ nsStyleUserInterface::CalcDifference(const nsStyleUserInterface& aNewData) const
// nsStyleUIReset
//
nsStyleUIReset::nsStyleUIReset(StyleStructContext aContext)
nsStyleUIReset::nsStyleUIReset(nsPresContext* aContext)
: mUserSelect(StyleUserSelect::Auto)
, mForceBrokenImageIcon(0)
, mIMEMode(NS_STYLE_IME_MODE_AUTO)
@ -4070,7 +4055,7 @@ nsStyleUIReset::CalcDifference(const nsStyleUIReset& aNewData) const
// nsStyleVariables
//
nsStyleVariables::nsStyleVariables(StyleStructContext aContext)
nsStyleVariables::nsStyleVariables(nsPresContext* aContext)
{
MOZ_COUNT_CTOR(nsStyleVariables);
}
@ -4096,7 +4081,7 @@ nsStyleVariables::CalcDifference(const nsStyleVariables& aNewData) const
// nsStyleEffects
//
nsStyleEffects::nsStyleEffects(StyleStructContext aContext)
nsStyleEffects::nsStyleEffects(nsPresContext* aContext)
: mBoxShadow(nullptr)
, mClip(0, 0, 0, 0)
, mOpacity(1.0f)

View file

@ -18,7 +18,6 @@
#include "mozilla/SheetType.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/StyleComplexColor.h"
#include "mozilla/StyleStructContext.h"
#include "mozilla/UniquePtr.h"
#include "nsColor.h"
#include "nsCoord.h"
@ -154,9 +153,9 @@ struct Position {
// The lifetime of these objects is managed by the presshell's arena.
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleFont
{
nsStyleFont(const nsFont& aFont, StyleStructContext aContext);
nsStyleFont(const nsFont& aFont, nsPresContext* aContext);
nsStyleFont(const nsStyleFont& aStyleFont);
explicit nsStyleFont(StyleStructContext aContext);
explicit nsStyleFont(nsPresContext* aContext);
~nsStyleFont() {
MOZ_COUNT_DTOR(nsStyleFont);
}
@ -179,14 +178,14 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleFont
* aSize is allowed to be negative, but the caller is expected to deal with
* negative results. The result is clamped to nscoord_MIN .. nscoord_MAX.
*/
static nscoord ZoomText(StyleStructContext aContext, nscoord aSize);
static nscoord ZoomText(nsPresContext* aContext, nscoord aSize);
/**
* Return aSize divided by the current text zoom factor (in aPresContext).
* aSize is allowed to be negative, but the caller is expected to deal with
* negative results. The result is clamped to nscoord_MIN .. nscoord_MAX.
*/
static nscoord UnZoomText(nsPresContext* aPresContext, nscoord aSize);
static already_AddRefed<nsIAtom> GetLanguage(StyleStructContext aPresContext);
static already_AddRefed<nsIAtom> GetLanguage(nsPresContext* aPresContext);
void* operator new(size_t sz, nsStyleFont* aSelf) { return aSelf; }
void* operator new(size_t sz, nsPresContext* aContext) {
@ -523,7 +522,7 @@ private:
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleColor
{
explicit nsStyleColor(StyleStructContext aContext);
explicit nsStyleColor(nsPresContext* aContext);
nsStyleColor(const nsStyleColor& aOther);
~nsStyleColor() {
MOZ_COUNT_DTOR(nsStyleColor);
@ -862,7 +861,7 @@ struct nsStyleImageLayers {
};
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBackground {
explicit nsStyleBackground(StyleStructContext aContext);
explicit nsStyleBackground(nsPresContext* aContext);
nsStyleBackground(const nsStyleBackground& aOther);
~nsStyleBackground();
@ -912,7 +911,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBackground {
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleMargin
{
explicit nsStyleMargin(StyleStructContext aContext);
explicit nsStyleMargin(nsPresContext* aContext);
nsStyleMargin(const nsStyleMargin& aMargin);
~nsStyleMargin() {
MOZ_COUNT_DTOR(nsStyleMargin);
@ -959,7 +958,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleMargin
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStylePadding
{
explicit nsStylePadding(StyleStructContext aContext);
explicit nsStylePadding(nsPresContext* aContext);
nsStylePadding(const nsStylePadding& aPadding);
~nsStylePadding() {
MOZ_COUNT_DTOR(nsStylePadding);
@ -1171,7 +1170,7 @@ static bool IsVisibleBorderStyle(uint8_t aStyle)
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBorder
{
explicit nsStyleBorder(StyleStructContext aContext);
explicit nsStyleBorder(nsPresContext* aContext);
nsStyleBorder(const nsStyleBorder& aBorder);
~nsStyleBorder();
@ -1385,7 +1384,7 @@ ASSERT_BORDER_COLOR_FIELD(Left);
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleOutline
{
explicit nsStyleOutline(StyleStructContext aContext);
explicit nsStyleOutline(nsPresContext* aContext);
nsStyleOutline(const nsStyleOutline& aOutline);
~nsStyleOutline() {
MOZ_COUNT_DTOR(nsStyleOutline);
@ -1460,7 +1459,7 @@ private:
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleList
{
explicit nsStyleList(StyleStructContext aContext);
explicit nsStyleList(nsPresContext* aContext);
nsStyleList(const nsStyleList& aStyleList);
~nsStyleList();
@ -1684,7 +1683,7 @@ struct nsStyleGridTemplate
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStylePosition
{
explicit nsStylePosition(StyleStructContext aContext);
explicit nsStylePosition(nsPresContext* aContext);
nsStylePosition(const nsStylePosition& aOther);
~nsStylePosition();
@ -1921,7 +1920,7 @@ struct nsStyleTextOverflow
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTextReset
{
explicit nsStyleTextReset(StyleStructContext aContext);
explicit nsStyleTextReset(nsPresContext* aContext);
nsStyleTextReset(const nsStyleTextReset& aOther);
~nsStyleTextReset();
@ -1969,7 +1968,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTextReset
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText
{
explicit nsStyleText(StyleStructContext aContext);
explicit nsStyleText(nsPresContext* aContext);
nsStyleText(const nsStyleText& aOther);
~nsStyleText();
@ -2194,7 +2193,7 @@ protected:
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleVisibility
{
explicit nsStyleVisibility(StyleStructContext aContext);
explicit nsStyleVisibility(nsPresContext* aContext);
nsStyleVisibility(const nsStyleVisibility& aVisibility);
~nsStyleVisibility() {
MOZ_COUNT_DTOR(nsStyleVisibility);
@ -2701,7 +2700,7 @@ using StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>;
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay
{
explicit nsStyleDisplay(StyleStructContext aContext);
explicit nsStyleDisplay(nsPresContext* aContext);
nsStyleDisplay(const nsStyleDisplay& aOther);
~nsStyleDisplay() {
MOZ_COUNT_DTOR(nsStyleDisplay);
@ -3016,7 +3015,7 @@ public:
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTable
{
explicit nsStyleTable(StyleStructContext aContext);
explicit nsStyleTable(nsPresContext* aContext);
nsStyleTable(const nsStyleTable& aOther);
~nsStyleTable();
@ -3047,7 +3046,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTable
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTableBorder
{
explicit nsStyleTableBorder(StyleStructContext aContext);
explicit nsStyleTableBorder(nsPresContext* aContext);
nsStyleTableBorder(const nsStyleTableBorder& aOther);
~nsStyleTableBorder();
@ -3155,7 +3154,7 @@ struct nsStyleCounterData
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleContent
{
explicit nsStyleContent(StyleStructContext aContext);
explicit nsStyleContent(nsPresContext* aContext);
nsStyleContent(const nsStyleContent& aContent);
~nsStyleContent();
@ -3235,7 +3234,7 @@ protected:
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUIReset
{
explicit nsStyleUIReset(StyleStructContext aContext);
explicit nsStyleUIReset(nsPresContext* aContext);
nsStyleUIReset(const nsStyleUIReset& aOther);
~nsStyleUIReset();
@ -3307,7 +3306,7 @@ private:
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUserInterface
{
explicit nsStyleUserInterface(StyleStructContext aContext);
explicit nsStyleUserInterface(nsPresContext* aContext);
nsStyleUserInterface(const nsStyleUserInterface& aOther);
~nsStyleUserInterface();
@ -3352,7 +3351,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUserInterface
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleXUL
{
explicit nsStyleXUL(StyleStructContext aContext);
explicit nsStyleXUL(nsPresContext* aContext);
nsStyleXUL(const nsStyleXUL& aSource);
~nsStyleXUL();
@ -3391,7 +3390,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleXUL
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleColumn
{
explicit nsStyleColumn(StyleStructContext aContext);
explicit nsStyleColumn(nsPresContext* aContext);
nsStyleColumn(const nsStyleColumn& aSource);
~nsStyleColumn();
@ -3514,7 +3513,7 @@ private:
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVG
{
explicit nsStyleSVG(StyleStructContext aContext);
explicit nsStyleSVG(nsPresContext* aContext);
nsStyleSVG(const nsStyleSVG& aSource);
~nsStyleSVG();
@ -3703,7 +3702,7 @@ struct nsTArray_CopyChooser<nsStyleFilter>
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVGReset
{
explicit nsStyleSVGReset(StyleStructContext aContext);
explicit nsStyleSVGReset(nsPresContext* aContext);
nsStyleSVGReset(const nsStyleSVGReset& aSource);
~nsStyleSVGReset();
@ -3755,7 +3754,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVGReset
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleVariables
{
explicit nsStyleVariables(StyleStructContext aContext);
explicit nsStyleVariables(nsPresContext* aContext);
nsStyleVariables(const nsStyleVariables& aSource);
~nsStyleVariables();
@ -3785,7 +3784,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleVariables
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleEffects
{
explicit nsStyleEffects(StyleStructContext aContext);
explicit nsStyleEffects(nsPresContext* aContext);
nsStyleEffects(const nsStyleEffects& aSource);
~nsStyleEffects();