Skip to content

Commit 0393375

Browse files
committed
Bug 1600481 : convert NS_STYLE_ISOLATION_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55378 --HG-- extra : moz-landing-system : lando
1 parent 2485066 commit 0393375

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

layout/generic/nsFrame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10929,7 +10929,7 @@ bool nsIFrame::IsStackingContext(const nsStyleDisplay* aStyleDisplay,
1092910929
aStylePosition->mZIndex.IsInteger())) ||
1093010930
(aStyleDisplay->mWillChange.bits &
1093110931
StyleWillChangeBits_STACKING_CONTEXT) ||
10932-
aStyleDisplay->mIsolation != NS_STYLE_ISOLATION_AUTO ||
10932+
aStyleDisplay->mIsolation != StyleIsolation::Auto ||
1093310933
aStyleEffects->HasBackdropFilters();
1093410934
}
1093510935

layout/style/ServoBindings.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ rusty-enums = [
139139
"mozilla::StyleTextAnchor",
140140
"mozilla::StyleObjectFit",
141141
"mozilla::StyleTopLayer",
142+
"mozilla::StyleIsolation",
142143
"mozilla::StyleTextOrientation",
143144
"nsStyleImageType",
144145
"nsINode_BooleanFlag",

layout/style/nsStyleConsts.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,10 @@ enum class StyleGridTrackBreadth : uint8_t {
579579
#define NS_STYLE_POINTER_EVENTS_ALL 8
580580
#define NS_STYLE_POINTER_EVENTS_AUTO 9
581581

582-
// See nsStyleDisplay
583-
#define NS_STYLE_ISOLATION_AUTO 0
584-
#define NS_STYLE_ISOLATION_ISOLATE 1
582+
enum class StyleIsolation : uint8_t {
583+
Auto,
584+
Isolate,
585+
};
585586

586587
// See nsStylePosition.mObjectFit
587588
enum class StyleObjectFit : uint8_t {

layout/style/nsStyleStruct.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2678,7 +2678,7 @@ nsStyleDisplay::nsStyleDisplay(const Document& aDocument)
26782678
mOverflowClipBoxInline(StyleOverflowClipBox::PaddingBox),
26792679
mResize(StyleResize::None),
26802680
mOrient(StyleOrient::Inline),
2681-
mIsolation(NS_STYLE_ISOLATION_AUTO),
2681+
mIsolation(StyleIsolation::Auto),
26822682
mTopLayer(StyleTopLayer::None),
26832683
mTouchAction(StyleTouchAction_AUTO),
26842684
mScrollBehavior(NS_STYLE_SCROLL_BEHAVIOR_AUTO),

layout/style/nsStyleStruct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay {
15281528
mozilla::StyleOverflowClipBox mOverflowClipBoxInline;
15291529
mozilla::StyleResize mResize;
15301530
mozilla::StyleOrient mOrient;
1531-
uint8_t mIsolation; // NS_STYLE_ISOLATION_*
1531+
mozilla::StyleIsolation mIsolation;
15321532
mozilla::StyleTopLayer mTopLayer;
15331533

15341534
mozilla::StyleTouchAction mTouchAction;

servo/components/style/properties/longhands/box.mako.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ ${helpers.single_keyword(
491491
engines="gecko",
492492
spec="https://drafts.fxtf.org/compositing/#isolation",
493493
flags="CREATES_STACKING_CONTEXT",
494+
gecko_enum_prefix="StyleIsolation",
494495
animation_value_type="discrete",
495496
)}
496497

0 commit comments

Comments
 (0)