From b0c60a603d1adac62f8985522ad5482cbcc3fe35 Mon Sep 17 00:00:00 2001 From: Ben Freist Date: Tue, 8 Nov 2022 20:18:45 +0000 Subject: [PATCH] Bug 1799348 - [refactor] Migrate NS_STYLE_CELL_SCOPE_* defines r=emilio Differential Revision: https://phabricator.services.mozilla.com/D161406 --- dom/html/HTMLTableCellElement.cpp | 12 ++++++++---- layout/style/nsStyleConsts.h | 6 ------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dom/html/HTMLTableCellElement.cpp b/dom/html/HTMLTableCellElement.cpp index 702d4e146ea3..8f4ef28c2fa6 100644 --- a/dom/html/HTMLTableCellElement.cpp +++ b/dom/html/HTMLTableCellElement.cpp @@ -14,6 +14,10 @@ #include "celldata.h" #include "mozilla/dom/HTMLTableCellElementBinding.h" +namespace { +enum class StyleCellScope : uint8_t { Row, Col, Rowgroup, Colgroup }; +} // namespace + NS_IMPL_NS_NEW_HTML_ELEMENT(TableCell) namespace mozilla::dom { @@ -100,10 +104,10 @@ void HTMLTableCellElement::GetAlign(DOMString& aValue) { } static const nsAttrValue::EnumTable kCellScopeTable[] = { - {"row", NS_STYLE_CELL_SCOPE_ROW}, - {"col", NS_STYLE_CELL_SCOPE_COL}, - {"rowgroup", NS_STYLE_CELL_SCOPE_ROWGROUP}, - {"colgroup", NS_STYLE_CELL_SCOPE_COLGROUP}, + {"row", StyleCellScope::Row}, + {"col", StyleCellScope::Col}, + {"rowgroup", StyleCellScope::Rowgroup}, + {"colgroup", StyleCellScope::Colgroup}, {nullptr, 0}}; void HTMLTableCellElement::GetScope(DOMString& aScope) { diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index 848e8060e6fe..d0b963b7710f 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -558,12 +558,6 @@ enum class StyleEmptyCells : uint8_t { Show, }; -// constants for cell "scope" attribute -#define NS_STYLE_CELL_SCOPE_ROW 0 -#define NS_STYLE_CELL_SCOPE_COL 1 -#define NS_STYLE_CELL_SCOPE_ROWGROUP 2 -#define NS_STYLE_CELL_SCOPE_COLGROUP 3 - // See nsStyleUIReset enum class StyleImeMode : uint8_t { Auto,