зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1808888 - [refactor] Migrate NS_STYLE_LIST_STYLE_POSITION_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D166140
This commit is contained in:
Родитель
5b925c72c8
Коммит
476cccc35c
|
@ -59,7 +59,7 @@ nsRect HTMLLIAccessible::BoundsInAppUnits() const {
|
|||
|
||||
if (bullet && frame &&
|
||||
frame->StyleList()->mListStylePosition !=
|
||||
NS_STYLE_LIST_STYLE_POSITION_INSIDE) {
|
||||
StyleListStylePosition::Inside) {
|
||||
nsRect bulletRect = bullet->BoundsInAppUnits();
|
||||
return rect.Union(bulletRect);
|
||||
}
|
||||
|
|
|
@ -5988,7 +5988,7 @@ nsIFrame* nsCSSFrameConstructor::FindSiblingInternal(
|
|||
auto* marker = nsLayoutUtils::GetMarkerFrame(aContent);
|
||||
const bool isInsideMarker =
|
||||
marker && marker->GetInFlowParent()->StyleList()->mListStylePosition ==
|
||||
NS_STYLE_LIST_STYLE_POSITION_INSIDE;
|
||||
StyleListStylePosition::Inside;
|
||||
return isInsideMarker ? marker : nullptr;
|
||||
};
|
||||
|
||||
|
@ -9780,7 +9780,7 @@ void nsCSSFrameConstructor::ProcessChildren(
|
|||
(listItem = do_QueryFrame(aFrame)) &&
|
||||
!styleParentFrame->IsFieldSetFrame()) {
|
||||
isOutsideMarker = computedStyle->StyleList()->mListStylePosition ==
|
||||
NS_STYLE_LIST_STYLE_POSITION_OUTSIDE;
|
||||
StyleListStylePosition::Outside;
|
||||
ItemFlags extraFlags;
|
||||
if (isOutsideMarker) {
|
||||
extraFlags += ItemFlag::IsForOutsideMarker;
|
||||
|
|
|
@ -2427,7 +2427,7 @@ void ReflowInput::InitConstraints(
|
|||
const auto pseudoType = mFrame->Style()->GetPseudoType();
|
||||
if (pseudoType == PseudoStyleType::marker &&
|
||||
mFrame->GetParent()->StyleList()->mListStylePosition ==
|
||||
NS_STYLE_LIST_STYLE_POSITION_OUTSIDE) {
|
||||
StyleListStylePosition::Outside) {
|
||||
// Exclude outside ::markers.
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7533,7 +7533,7 @@ void nsBlockFrame::SetMarkerFrameForListItem(nsIFrame* aMarkerFrame) {
|
|||
NS_BLOCK_FRAME_HAS_OUTSIDE_MARKER),
|
||||
"How can we have a ::marker frame already?");
|
||||
|
||||
if (StyleList()->mListStylePosition == NS_STYLE_LIST_STYLE_POSITION_INSIDE) {
|
||||
if (StyleList()->mListStylePosition == StyleListStylePosition::Inside) {
|
||||
SetProperty(InsideMarkerProperty(), aMarkerFrame);
|
||||
AddStateBits(NS_BLOCK_FRAME_HAS_INSIDE_MARKER);
|
||||
} else {
|
||||
|
|
|
@ -5273,7 +5273,7 @@ void nsTextFrame::GetTextDecorations(
|
|||
|
||||
if (context->GetPseudoType() == PseudoStyleType::marker &&
|
||||
(context->StyleList()->mListStylePosition ==
|
||||
NS_STYLE_LIST_STYLE_POSITION_OUTSIDE ||
|
||||
StyleListStylePosition::Outside ||
|
||||
!context->StyleDisplay()->IsInlineOutsideStyle())) {
|
||||
// Outside ::marker pseudos, and inside markers that aren't inlines, don't
|
||||
// have text decorations.
|
||||
|
|
|
@ -132,6 +132,7 @@ rusty-enums = [
|
|||
"mozilla::StyleOverscrollBehavior",
|
||||
"mozilla::StyleImeMode",
|
||||
"mozilla::StyleOverflowAnchor",
|
||||
"mozilla::StyleListStylePosition",
|
||||
"mozilla::StylePointerEvents",
|
||||
"mozilla::StyleScrollbarWidth",
|
||||
"mozilla::StyleWhiteSpace",
|
||||
|
|
|
@ -436,8 +436,7 @@ enum class ListStyle : uint8_t {
|
|||
};
|
||||
|
||||
// See nsStyleList
|
||||
#define NS_STYLE_LIST_STYLE_POSITION_INSIDE 0
|
||||
#define NS_STYLE_LIST_STYLE_POSITION_OUTSIDE 1
|
||||
enum class StyleListStylePosition : uint8_t { Inside, Outside };
|
||||
|
||||
// See nsStyleVisibility
|
||||
enum class StylePointerEvents : uint8_t {
|
||||
|
|
|
@ -599,7 +599,7 @@ nsChangeHint nsStyleOutline::CalcDifference(
|
|||
// nsStyleList
|
||||
//
|
||||
nsStyleList::nsStyleList(const Document& aDocument)
|
||||
: mListStylePosition(NS_STYLE_LIST_STYLE_POSITION_OUTSIDE),
|
||||
: mListStylePosition(StyleListStylePosition::Outside),
|
||||
mQuotes(StyleQuotes::Auto()),
|
||||
mListStyleImage(StyleImage::None()),
|
||||
mImageRegion(StyleClipRectOrAuto::Auto()) {
|
||||
|
|
|
@ -717,7 +717,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleList {
|
|||
|
||||
already_AddRefed<nsIURI> GetListStyleImageURI() const;
|
||||
|
||||
uint8_t mListStylePosition;
|
||||
mozilla::StyleListStylePosition mListStylePosition;
|
||||
|
||||
mozilla::CounterStylePtr mCounterStyle;
|
||||
mozilla::StyleQuotes mQuotes;
|
||||
|
|
|
@ -11,6 +11,7 @@ ${helpers.single_keyword(
|
|||
"outside inside",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
gecko_enum_prefix="StyleListStylePosition",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-position",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
|
Загрузка…
Ссылка в новой задаче