mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 745523 - Part b: Unprefix transforms; r=dbaron
This patch introduces unprefixed 'transform', 'transform-origin', 'perspective', 'perspective-origin', 'transform-style' and 'backface-visibility' properties, and updates the mochitests in layout/style to use them.
This commit is contained in:
parent
a4ebdb8e6a
commit
09fca26b5a
@ -14,7 +14,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Style
|
||||
*/
|
||||
|
||||
[builtinclass, scriptable, uuid(35b2c7f0-b56c-11e1-afa6-0800200c9a66)]
|
||||
[builtinclass, scriptable, uuid(bb40a531-d92b-44d6-a543-cfc25054d5eb)]
|
||||
interface nsIDOMCSS2Properties : nsISupports
|
||||
{
|
||||
attribute DOMString background;
|
||||
@ -632,6 +632,24 @@ interface nsIDOMCSS2Properties : nsISupports
|
||||
attribute DOMString MozHyphens;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transform;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transformOrigin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString perspective;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString perspectiveOrigin;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString backfaceVisibility;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString transformStyle;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
attribute DOMString MozTransform;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
|
@ -35,4 +35,10 @@
|
||||
|
||||
******/
|
||||
|
||||
CSS_PROP_ALIAS(-moz-transform, transform, MozTransform, "")
|
||||
CSS_PROP_ALIAS(-moz-transform-origin, transform_origin, MozTransformOrigin, "")
|
||||
CSS_PROP_ALIAS(-moz-perspective-origin, perspective_origin, MozPerspectiveOrigin, "")
|
||||
CSS_PROP_ALIAS(-moz-perspective, perspective, MozPerspective, "")
|
||||
CSS_PROP_ALIAS(-moz-transform-style, transform_style, MozTransformStyle, "")
|
||||
CSS_PROP_ALIAS(-moz-backface-visibility, backface_visibility, MozBackfaceVisibility, "")
|
||||
CSS_PROP_ALIAS(-moz-border-image, border_image, MozBorderImage, "")
|
||||
|
@ -2492,9 +2492,9 @@ CSS_PROP_TEXT(
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_DISPLAY(
|
||||
-moz-transform,
|
||||
transform,
|
||||
CSS_PROP_DOMPROP_PREFIXED(Transform),
|
||||
transform,
|
||||
Transform,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"",
|
||||
0,
|
||||
@ -2502,9 +2502,9 @@ CSS_PROP_DISPLAY(
|
||||
offsetof(nsStyleDisplay, mSpecifiedTransform),
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_DISPLAY(
|
||||
-moz-transform-origin,
|
||||
transform-origin,
|
||||
transform_origin,
|
||||
CSS_PROP_DOMPROP_PREFIXED(TransformOrigin),
|
||||
TransformOrigin,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
@ -2513,9 +2513,9 @@ CSS_PROP_DISPLAY(
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_DISPLAY(
|
||||
-moz-perspective-origin,
|
||||
perspective-origin,
|
||||
perspective_origin,
|
||||
CSS_PROP_DOMPROP_PREFIXED(PerspectiveOrigin),
|
||||
PerspectiveOrigin,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
@ -2524,9 +2524,9 @@ CSS_PROP_DISPLAY(
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_DISPLAY(
|
||||
-moz-perspective,
|
||||
perspective,
|
||||
CSS_PROP_DOMPROP_PREFIXED(Perspective),
|
||||
perspective,
|
||||
Perspective,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
"",
|
||||
VARIANT_NONE | VARIANT_INHERIT | VARIANT_LENGTH | VARIANT_POSITIVE_LENGTH,
|
||||
@ -2534,9 +2534,9 @@ CSS_PROP_DISPLAY(
|
||||
offsetof(nsStyleDisplay, mChildPerspective),
|
||||
eStyleAnimType_Coord)
|
||||
CSS_PROP_DISPLAY(
|
||||
-moz-transform-style,
|
||||
transform-style,
|
||||
transform_style,
|
||||
CSS_PROP_DOMPROP_PREFIXED(TransformStyle),
|
||||
TransformStyle,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
@ -2544,9 +2544,9 @@ CSS_PROP_DISPLAY(
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_DISPLAY(
|
||||
-moz-backface-visibility,
|
||||
backface-visibility,
|
||||
backface_visibility,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BackfaceVisibility),
|
||||
BackfaceVisibility,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
|
@ -4472,6 +4472,7 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
|
||||
* Implementations of CSS styles *
|
||||
\* ***************************** */
|
||||
|
||||
COMPUTED_STYLE_MAP_ENTRY(backface_visibility, BackfaceVisibility),
|
||||
//// COMPUTED_STYLE_MAP_ENTRY(background, Background),
|
||||
COMPUTED_STYLE_MAP_ENTRY(background_attachment, BackgroundAttachment),
|
||||
COMPUTED_STYLE_MAP_ENTRY(background_clip, BackgroundClip),
|
||||
@ -4574,6 +4575,8 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY(page_break_after, PageBreakAfter),
|
||||
COMPUTED_STYLE_MAP_ENTRY(page_break_before, PageBreakBefore),
|
||||
// COMPUTED_STYLE_MAP_ENTRY(page_break_inside, PageBreakInside),
|
||||
COMPUTED_STYLE_MAP_ENTRY(perspective, Perspective),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(perspective_origin, PerspectiveOrigin),
|
||||
COMPUTED_STYLE_MAP_ENTRY(pointer_events, PointerEvents),
|
||||
COMPUTED_STYLE_MAP_ENTRY(position, Position),
|
||||
COMPUTED_STYLE_MAP_ENTRY(quotes, Quotes),
|
||||
@ -4588,6 +4591,9 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY(text_shadow, TextShadow),
|
||||
COMPUTED_STYLE_MAP_ENTRY(text_transform, TextTransform),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(top, Top),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform, Transform),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform_origin, TransformOrigin),
|
||||
COMPUTED_STYLE_MAP_ENTRY(transform_style, TransformStyle),
|
||||
COMPUTED_STYLE_MAP_ENTRY(unicode_bidi, UnicodeBidi),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(vertical_align, VerticalAlign),
|
||||
COMPUTED_STYLE_MAP_ENTRY(visibility, Visibility),
|
||||
@ -4612,7 +4618,6 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY(animation_play_state, AnimationPlayState),
|
||||
COMPUTED_STYLE_MAP_ENTRY(animation_timing_function, AnimationTimingFunction),
|
||||
COMPUTED_STYLE_MAP_ENTRY(appearance, Appearance),
|
||||
COMPUTED_STYLE_MAP_ENTRY(backface_visibility, BackfaceVisibility),
|
||||
COMPUTED_STYLE_MAP_ENTRY(_moz_background_inline_policy, BackgroundInlinePolicy),
|
||||
COMPUTED_STYLE_MAP_ENTRY(binding, Binding),
|
||||
COMPUTED_STYLE_MAP_ENTRY(border_bottom_colors, BorderBottomColors),
|
||||
@ -4644,8 +4649,6 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_bottomRight,OutlineRadiusBottomRight),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_topLeft, OutlineRadiusTopLeft),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_topRight, OutlineRadiusTopRight),
|
||||
COMPUTED_STYLE_MAP_ENTRY(perspective, Perspective),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(perspective_origin, PerspectiveOrigin),
|
||||
COMPUTED_STYLE_MAP_ENTRY(stack_sizing, StackSizing),
|
||||
COMPUTED_STYLE_MAP_ENTRY(_moz_tab_size, TabSize),
|
||||
COMPUTED_STYLE_MAP_ENTRY(text_align_last, TextAlignLast),
|
||||
@ -4654,9 +4657,6 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY(text_decoration_line, TextDecorationLine),
|
||||
COMPUTED_STYLE_MAP_ENTRY(text_decoration_style, TextDecorationStyle),
|
||||
COMPUTED_STYLE_MAP_ENTRY(text_size_adjust, TextSizeAdjust),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform, Transform),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform_origin, TransformOrigin),
|
||||
COMPUTED_STYLE_MAP_ENTRY(transform_style, TransformStyle),
|
||||
COMPUTED_STYLE_MAP_ENTRY(transition_delay, TransitionDelay),
|
||||
COMPUTED_STYLE_MAP_ENTRY(transition_duration, TransitionDuration),
|
||||
COMPUTED_STYLE_MAP_ENTRY(transition_property, TransitionProperty),
|
||||
|
@ -959,8 +959,8 @@ var gCSSProperties = {
|
||||
other_values: [ "none" ],
|
||||
invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ]
|
||||
},
|
||||
"-moz-transform": {
|
||||
domProp: "MozTransform",
|
||||
"transform": {
|
||||
domProp: "transform",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "width": "300px", "height": "50px" },
|
||||
@ -989,8 +989,8 @@ var gCSSProperties = {
|
||||
"perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)"
|
||||
] : [])
|
||||
},
|
||||
"-moz-transform-origin": {
|
||||
domProp: "MozTransformOrigin",
|
||||
"transform-origin": {
|
||||
domProp: "transformOrigin",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
/* no subproperties */
|
||||
@ -1017,8 +1017,8 @@ var gCSSProperties = {
|
||||
"border", "center red", "right diagonal",
|
||||
"#00ffff bottom"]
|
||||
},
|
||||
"-moz-perspective-origin": {
|
||||
domProp: "MozPerspectiveOrigin",
|
||||
"perspective-origin": {
|
||||
domProp: "perspectiveOrigin",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
/* no subproperties */
|
||||
@ -1044,24 +1044,24 @@ var gCSSProperties = {
|
||||
"border", "center red", "right diagonal",
|
||||
"#00ffff bottom"]
|
||||
},
|
||||
"-moz-perspective": {
|
||||
domProp: "MozPerspective",
|
||||
"perspective": {
|
||||
domProp: "perspective",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "1000px", "500.2px" ],
|
||||
invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ]
|
||||
},
|
||||
"-moz-backface-visibility": {
|
||||
domProp: "MozBackfaceVisibility",
|
||||
"backface-visibility": {
|
||||
domProp: "backfaceVisibility",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "visible" ],
|
||||
other_values: [ "hidden" ],
|
||||
invalid_values: [ "collapse" ]
|
||||
},
|
||||
"-moz-transform-style": {
|
||||
domProp: "MozTransformStyle",
|
||||
"transform-style": {
|
||||
domProp: "transformStyle",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "flat" ],
|
||||
|
@ -76,13 +76,6 @@ var supported_properties = {
|
||||
"-moz-outline-radius-topright": [ test_radius_transition ],
|
||||
"-moz-text-decoration-color": [ test_color_transition,
|
||||
test_border_color_transition ],
|
||||
"-moz-transform": [ test_transform_transition ],
|
||||
"-moz-transform-origin": [ test_length_pair_transition,
|
||||
test_length_percent_pair_transition,
|
||||
test_length_percent_pair_unclamped ],
|
||||
"-moz-perspective-origin": [ test_length_pair_transition,
|
||||
test_length_percent_pair_transition,
|
||||
test_length_percent_pair_unclamped ],
|
||||
"background-color": [ test_color_transition ],
|
||||
"background-position": [ test_background_position_transition,
|
||||
// FIXME: We don't currently test clamping,
|
||||
@ -193,7 +186,10 @@ var supported_properties = {
|
||||
"padding-top": [ test_length_transition, test_percent_transition,
|
||||
test_length_percent_calc_transition,
|
||||
test_length_clamped, test_percent_clamped ],
|
||||
"-moz-perspective": [ test_length_transition ],
|
||||
"perspective": [ test_length_transition ],
|
||||
"perspective-origin": [ test_length_pair_transition,
|
||||
test_length_percent_pair_transition,
|
||||
test_length_percent_pair_unclamped ],
|
||||
"right": [ test_length_transition, test_percent_transition,
|
||||
test_length_percent_calc_transition,
|
||||
test_length_unclamped, test_percent_unclamped ],
|
||||
@ -225,6 +221,10 @@ var supported_properties = {
|
||||
"top": [ test_length_transition, test_percent_transition,
|
||||
test_length_percent_calc_transition,
|
||||
test_length_unclamped, test_percent_unclamped ],
|
||||
"transform": [ test_transform_transition ],
|
||||
"transform-origin": [ test_length_pair_transition,
|
||||
test_length_percent_pair_transition,
|
||||
test_length_percent_pair_unclamped ],
|
||||
"vertical-align": [ test_length_transition, test_percent_transition,
|
||||
test_length_percent_calc_transition,
|
||||
test_length_unclamped, test_percent_unclamped ],
|
||||
|
Loading…
Reference in New Issue
Block a user