Bug 1519958 - Drive by, remove unused CSS keywords. r=boris

While we're at it we may as well do this.

Differential Revision: https://phabricator.services.mozilla.com/D36350
This commit is contained in:
Emilio Cobos Álvarez 2019-06-27 20:28:57 +02:00
parent bb56a14ed1
commit 141cad6847
3 changed files with 0 additions and 166 deletions

View File

@ -52,7 +52,6 @@ CSS_KEY(-moz-inline-box, _moz_inline_box)
CSS_KEY(-moz-inline-grid, _moz_inline_grid)
CSS_KEY(-moz-inline-stack, _moz_inline_stack)
CSS_KEY(-moz-left, _moz_left)
CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
CSS_KEY(-moz-none, _moz_none)
CSS_KEY(-moz-popup, _moz_popup)
CSS_KEY(-moz-right, _moz_right)
@ -64,28 +63,17 @@ CSS_KEY(-webkit-flex, _webkit_flex)
CSS_KEY(-webkit-inline-box, _webkit_inline_box)
CSS_KEY(-webkit-inline-flex, _webkit_inline_flex)
CSS_KEY(alias, alias)
CSS_KEY(all, all)
CSS_KEY(all-scroll, all_scroll)
CSS_KEY(auto, auto)
CSS_KEY(baseline, baseline)
CSS_KEY(blink, blink)
CSS_KEY(block, block)
CSS_KEY(blur, blur)
CSS_KEY(bottom, bottom)
CSS_KEY(brightness, brightness)
CSS_KEY(cell, cell)
CSS_KEY(center, center)
CSS_KEY(circle, circle)
CSS_KEY(clip, clip)
CSS_KEY(closest-side, closest_side)
CSS_KEY(col-resize, col_resize)
CSS_KEY(column, column)
CSS_KEY(content, content)
CSS_KEY(contents, contents)
CSS_KEY(context-fill, context_fill)
CSS_KEY(context-menu, context_menu)
CSS_KEY(context-stroke, context_stroke)
CSS_KEY(contrast, contrast)
CSS_KEY(copy, copy)
CSS_KEY(crosshair, crosshair)
CSS_KEY(dashed, dashed)
@ -95,15 +83,9 @@ CSS_KEY(dot, dot)
CSS_KEY(dotted, dotted)
CSS_KEY(double, double)
CSS_KEY(double-circle, double_circle)
CSS_KEY(drop-shadow, drop_shadow)
CSS_KEY(e-resize, e_resize)
CSS_KEY(ellipse, ellipse)
CSS_KEY(ellipsis, ellipsis)
CSS_KEY(end, end)
CSS_KEY(ew-resize, ew_resize)
CSS_KEY(farthest-side, farthest_side)
CSS_KEY(fill, fill)
CSS_KEY(filled, filled)
CSS_KEY(flex, flex)
CSS_KEY(flex-end, flex_end)
CSS_KEY(flex-start, flex_start)
@ -113,28 +95,17 @@ CSS_KEY(grabbing, grabbing)
CSS_KEY(grayscale, grayscale)
CSS_KEY(grid, grid)
CSS_KEY(help, help)
CSS_KEY(hue-rotate, hue_rotate)
CSS_KEY(infinite, infinite)
CSS_KEY(inline, inline)
CSS_KEY(inline-block, inline_block)
CSS_KEY(inline-flex, inline_flex)
CSS_KEY(inline-grid, inline_grid)
CSS_KEY(inline-table, inline_table)
CSS_KEY(inset, inset)
CSS_KEY(interpolatematrix, interpolatematrix)
CSS_KEY(accumulatematrix, accumulatematrix)
CSS_KEY(invert, invert)
CSS_KEY(justify, justify)
CSS_KEY(last baseline, last_baseline) // only used for DevTools auto-completion
CSS_KEY(layout, layout)
CSS_KEY(left, left)
CSS_KEY(line-through, line_through)
CSS_KEY(list-item, list_item)
CSS_KEY(manipulation, manipulation)
CSS_KEY(matrix, matrix)
CSS_KEY(matrix3d, matrix3d)
CSS_KEY(max-content, max_content)
CSS_KEY(middle, middle)
CSS_KEY(min-content, min_content)
CSS_KEY(move, move)
CSS_KEY(n-resize, n_resize)
@ -147,23 +118,9 @@ CSS_KEY(not-allowed, not_allowed)
CSS_KEY(ns-resize, ns_resize)
CSS_KEY(nw-resize, nw_resize)
CSS_KEY(nwse-resize, nwse_resize)
CSS_KEY(opacity, opacity)
CSS_KEY(open, open)
CSS_KEY(over, over)
CSS_KEY(overline, overline)
CSS_KEY(paint, paint)
CSS_KEY(pan-x, pan_x)
CSS_KEY(pan-y, pan_y)
CSS_KEY(perspective, perspective)
CSS_KEY(pointer, pointer)
CSS_KEY(polygon, polygon)
CSS_KEY(progress, progress)
CSS_KEY(right, right)
CSS_KEY(rotate, rotate)
CSS_KEY(rotate3d, rotate3d)
CSS_KEY(rotatex, rotatex)
CSS_KEY(rotatey, rotatey)
CSS_KEY(rotatez, rotatez)
CSS_KEY(row, row)
CSS_KEY(row-resize, row_resize)
CSS_KEY(ruby, ruby)
@ -172,33 +129,17 @@ CSS_KEY(ruby-base-container, ruby_base_container)
CSS_KEY(ruby-text, ruby_text)
CSS_KEY(ruby-text-container, ruby_text_container)
CSS_KEY(s-resize, s_resize)
CSS_KEY(saturate, saturate)
CSS_KEY(scale, scale)
CSS_KEY(scale3d, scale3d)
CSS_KEY(scalex, scalex)
CSS_KEY(scaley, scaley)
CSS_KEY(scalez, scalez)
CSS_KEY(se-resize, se_resize)
CSS_KEY(self-end, self_end)
CSS_KEY(self-start, self_start)
CSS_KEY(sepia, sepia)
CSS_KEY(sesame, sesame)
CSS_KEY(size, size)
CSS_KEY(skew, skew)
CSS_KEY(skewx, skewx)
CSS_KEY(skewy, skewy)
CSS_KEY(solid, solid)
CSS_KEY(space-around, space_around)
CSS_KEY(space-between, space_between)
CSS_KEY(space-evenly, space_evenly)
CSS_KEY(span, span)
CSS_KEY(start, start)
CSS_KEY(stretch, stretch)
CSS_KEY(strict, strict)
CSS_KEY(style, style)
CSS_KEY(sub, sub)
CSS_KEY(subgrid, subgrid)
CSS_KEY(super, super)
CSS_KEY(sw-resize, sw_resize)
CSS_KEY(table, table)
CSS_KEY(table-caption, table_caption)
@ -210,17 +151,7 @@ CSS_KEY(table-header-group, table_header_group)
CSS_KEY(table-row, table_row)
CSS_KEY(table-row-group, table_row_group)
CSS_KEY(text, text)
CSS_KEY(text-bottom, text_bottom)
CSS_KEY(text-top, text_top)
CSS_KEY(top, top)
CSS_KEY(translate, translate)
CSS_KEY(translate3d, translate3d)
CSS_KEY(translatex, translatex)
CSS_KEY(translatey, translatey)
CSS_KEY(translatez, translatez)
CSS_KEY(triangle, triangle)
CSS_KEY(under, under)
CSS_KEY(underline, underline)
CSS_KEY(vertical-text, vertical_text)
CSS_KEY(w-resize, w_resize)
CSS_KEY(wait, wait)
@ -229,6 +160,5 @@ CSS_KEY(zoom-in, zoom_in)
CSS_KEY(zoom-out, zoom_out)
// Appearance keywords for widget styles
//CSS_KEY(middle, middle)
//CSS_KEY(start, start)

View File

@ -172,9 +172,6 @@ const nsCString& nsCSSProps::GetStringValue(nsCSSCounterDesc aCounterDesc) {
/***************************************************************************/
const KTableEntry nsCSSProps::kBoxShadowTypeKTable[] = {
{eCSSKeyword_inset, uint8_t(StyleBoxShadowType::Inset)},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kCursorKTable[] = {
// CSS 2.0
@ -271,81 +268,11 @@ KTableEntry nsCSSProps::kDisplayKTable[] = {
{eCSSKeyword_flow_root, StyleDisplay::FlowRoot},
{eCSSKeyword_UNKNOWN, -1}};
// <NOTE> these are only used for auto-completion, not parsing:
const KTableEntry nsCSSProps::kAutoCompletionAlignJustifySelf[] = {
{eCSSKeyword_auto, NS_STYLE_ALIGN_AUTO},
{eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL},
{eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH},
{eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE},
{eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE},
{eCSSKeyword_start, NS_STYLE_ALIGN_START},
{eCSSKeyword_end, NS_STYLE_ALIGN_END},
{eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START},
{eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END},
{eCSSKeyword_center, NS_STYLE_ALIGN_CENTER},
{eCSSKeyword_left, NS_STYLE_ALIGN_LEFT},
{eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT},
{eCSSKeyword_self_start, NS_STYLE_ALIGN_SELF_START},
{eCSSKeyword_self_end, NS_STYLE_ALIGN_SELF_END},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kAutoCompletionAlignItems[] = {
// Intentionally no 'auto' here.
{eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL},
{eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH},
{eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE},
{eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE},
{eCSSKeyword_start, NS_STYLE_ALIGN_START},
{eCSSKeyword_end, NS_STYLE_ALIGN_END},
{eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START},
{eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END},
{eCSSKeyword_center, NS_STYLE_ALIGN_CENTER},
{eCSSKeyword_left, NS_STYLE_ALIGN_LEFT},
{eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT},
{eCSSKeyword_self_start, NS_STYLE_ALIGN_SELF_START},
{eCSSKeyword_self_end, NS_STYLE_ALIGN_SELF_END},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kAutoCompletionAlignJustifyContent[] = {
// Intentionally no 'auto' here.
{eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL},
{eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE},
{eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE},
{eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH},
{eCSSKeyword_space_between, NS_STYLE_ALIGN_SPACE_BETWEEN},
{eCSSKeyword_space_around, NS_STYLE_ALIGN_SPACE_AROUND},
{eCSSKeyword_space_evenly, NS_STYLE_ALIGN_SPACE_EVENLY},
{eCSSKeyword_start, NS_STYLE_ALIGN_START},
{eCSSKeyword_end, NS_STYLE_ALIGN_END},
{eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START},
{eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END},
{eCSSKeyword_center, NS_STYLE_ALIGN_CENTER},
{eCSSKeyword_left, NS_STYLE_ALIGN_LEFT},
{eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT},
{eCSSKeyword_UNKNOWN, -1}};
// </NOTE>
const KTableEntry nsCSSProps::kFontSmoothingKTable[] = {
{eCSSKeyword_auto, NS_FONT_SMOOTHING_AUTO},
{eCSSKeyword_grayscale, NS_FONT_SMOOTHING_GRAYSCALE},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kGridAutoFlowKTable[] = {
{eCSSKeyword_row, NS_STYLE_GRID_AUTO_FLOW_ROW},
{eCSSKeyword_column, NS_STYLE_GRID_AUTO_FLOW_COLUMN},
{eCSSKeyword_dense, NS_STYLE_GRID_AUTO_FLOW_DENSE},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kGridTrackBreadthKTable[] = {
{eCSSKeyword_min_content, StyleGridTrackBreadth::MinContent},
{eCSSKeyword_max_content, StyleGridTrackBreadth::MaxContent},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kLineHeightKTable[] = {
// -moz- prefixed, intended for internal use for single-line controls
{eCSSKeyword__moz_block_height, NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kTextAlignKTable[] = {
{eCSSKeyword_left, NS_STYLE_TEXT_ALIGN_LEFT},
{eCSSKeyword_right, NS_STYLE_TEXT_ALIGN_RIGHT},
@ -367,14 +294,6 @@ const KTableEntry nsCSSProps::kTextDecorationStyleKTable[] = {
{eCSSKeyword_wavy, NS_STYLE_TEXT_DECORATION_STYLE_WAVY},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kTextEmphasisStyleShapeKTable[] = {
{eCSSKeyword_dot, NS_STYLE_TEXT_EMPHASIS_STYLE_DOT},
{eCSSKeyword_circle, NS_STYLE_TEXT_EMPHASIS_STYLE_CIRCLE},
{eCSSKeyword_double_circle, NS_STYLE_TEXT_EMPHASIS_STYLE_DOUBLE_CIRCLE},
{eCSSKeyword_triangle, NS_STYLE_TEXT_EMPHASIS_STYLE_TRIANGLE},
{eCSSKeyword_sesame, NS_STYLE_TEXT_EMPHASIS_STYLE_SESAME},
{eCSSKeyword_UNKNOWN, -1}};
int32_t nsCSSProps::FindIndexOfKeyword(nsCSSKeyword aKeyword,
const KTableEntry aTable[]) {
if (eCSSKeyword_UNKNOWN == aKeyword) {

View File

@ -287,28 +287,13 @@ class nsCSSProps {
if (nsCSSProps::IsEnabled(*it_, (mozilla::CSSEnabledState)es_))
// Keyword/Enum value tables
// Not const because we modify its entries when the pref
// "layout.css.background-clip.text" changes:
static const KTableEntry kShapeRadiusKTable[];
static const KTableEntry kBoxShadowTypeKTable[];
static const KTableEntry kCursorKTable[];
// Not const because we modify its entries when various
// "layout.css.*.enabled" prefs changes:
static KTableEntry kDisplayKTable[];
// clang-format off
// -- tables for auto-completion of the {align,justify}-{content,items,self} properties --
static const KTableEntry kAutoCompletionAlignJustifySelf[];
static const KTableEntry kAutoCompletionAlignItems[];
static const KTableEntry kAutoCompletionAlignJustifyContent[];
// ------------------------------------------------------------------
// clang-format on
static const KTableEntry kFontSmoothingKTable[];
static const KTableEntry kGridAutoFlowKTable[];
static const KTableEntry kGridTrackBreadthKTable[];
static const KTableEntry kLineHeightKTable[];
static const KTableEntry kTextAlignKTable[];
static const KTableEntry kTextDecorationStyleKTable[];
static const KTableEntry kTextEmphasisStyleShapeKTable[];
};
// MOZ_DBG support for nsCSSPropertyID