Bug 1211040 - Restrict -moz-window-{dragging,shadow} to be chrome-only. r=dbaron

--HG--
extra : source : d6d13a625c2b6e9e6a95e4b50320c4cbf9be778e
This commit is contained in:
Xidorn Quan 2015-10-06 14:18:35 +11:00
Родитель 39fbfc7425
Коммит 974ec0361d
3 изменённых файлов: 32 добавлений и 19 удалений

Просмотреть файл

@ -3590,11 +3590,14 @@ CSS_PROP_POSITION(
kWidthKTable, kWidthKTable,
offsetof(nsStylePosition, mWidth), offsetof(nsStylePosition, mWidth),
eStyleAnimType_Coord) eStyleAnimType_Coord)
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_USERINTERFACE( CSS_PROP_USERINTERFACE(
-moz-window-dragging, -moz-window-dragging,
_moz_window_dragging, _moz_window_dragging,
CSS_PROP_DOMPROP_PREFIXED(WindowDragging), CSS_PROP_DOMPROP_PREFIXED(WindowDragging),
CSS_PROPERTY_PARSE_VALUE, CSS_PROPERTY_INTERNAL |
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_ENABLED_IN_UA_SHEETS_AND_CHROME,
"", "",
VARIANT_HK, VARIANT_HK,
kWindowDraggingKTable, kWindowDraggingKTable,
@ -3604,12 +3607,15 @@ CSS_PROP_UIRESET(
-moz-window-shadow, -moz-window-shadow,
_moz_window_shadow, _moz_window_shadow,
CSS_PROP_DOMPROP_PREFIXED(WindowShadow), CSS_PROP_DOMPROP_PREFIXED(WindowShadow),
CSS_PROPERTY_PARSE_VALUE, CSS_PROPERTY_INTERNAL |
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_ENABLED_IN_UA_SHEETS_AND_CHROME,
"", "",
VARIANT_HK, VARIANT_HK,
kWindowShadowKTable, kWindowShadowKTable,
CSS_PROP_NO_OFFSET, CSS_PROP_NO_OFFSET,
eStyleAnimType_None) eStyleAnimType_None)
#endif
CSS_PROP_TEXT( CSS_PROP_TEXT(
word-break, word-break,
word_break, word_break,

Просмотреть файл

@ -111,7 +111,9 @@ const char *gInaccessibleProperties[] = {
"-moz-script-size-multiplier", "-moz-script-size-multiplier",
"-moz-script-min-size", "-moz-script-min-size",
"-moz-math-variant", "-moz-math-variant",
"-moz-math-display" // parsed by UA sheets only "-moz-math-display", // parsed by UA sheets only
"-moz-window-dragging", // chrome-only internal properties
"-moz-window-shadow" // chrome-only internal properties
}; };
inline int inline int

Просмотреть файл

@ -1844,22 +1844,6 @@ var gCSSProperties = {
other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ], other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ],
invalid_values: [] invalid_values: []
}, },
"-moz-window-dragging": {
domProp: "MozWindowDragging",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: [ "no-drag" ],
other_values: [ "drag" ],
invalid_values: [ "none" ]
},
"-moz-window-shadow": {
domProp: "MozWindowShadow",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "default" ],
other_values: [ "none", "menu", "tooltip", "sheet" ],
invalid_values: []
},
"background": { "background": {
domProp: "background", domProp: "background",
inherited: false, inherited: false,
@ -6414,3 +6398,24 @@ for (var prop in gCSSProperties) {
} }
} }
} }
if (false) {
// TODO These properties are chrome-only, and are not exposed via CSSOM.
// We may still want to find a way to test them. See bug 1206999.
gCSSProperties["-moz-window-dragging"] = {
//domProp: "MozWindowDragging",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: [ "no-drag" ],
other_values: [ "drag" ],
invalid_values: [ "none" ]
};
gCSSProperties["-moz-window-shadow"] = {
//domProp: "MozWindowShadow",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "default" ],
other_values: [ "none", "menu", "tooltip", "sheet" ],
invalid_values: []
};
}