mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Bug 1122918 - Part 1 - Add parsing for logical inline-start/end keywords to the 'float' and 'clear' properties. r=heycam
This commit is contained in:
parent
b2b40026ff
commit
ca4a1dfbb6
@ -172,8 +172,8 @@ function do_test() {
|
|||||||
// test property
|
// test property
|
||||||
var prop = "float";
|
var prop = "float";
|
||||||
var values = utils.getCSSValuesForProperty(prop);
|
var values = utils.getCSSValuesForProperty(prop);
|
||||||
var expected = [ "initial", "inherit", "unset", "none", "left", "right" ];
|
var expected = [ "initial", "inherit", "unset", "none", "left", "right", "inline-start", "inline-end" ];
|
||||||
ok(testValues(values, expected), "proprety float values");
|
ok(testValues(values, expected), "property float's values.");
|
||||||
|
|
||||||
// Test property with "auto"
|
// Test property with "auto"
|
||||||
var prop = "margin";
|
var prop = "margin";
|
||||||
|
@ -309,8 +309,10 @@ CSS_KEY(initial, initial)
|
|||||||
CSS_KEY(inline, inline)
|
CSS_KEY(inline, inline)
|
||||||
CSS_KEY(inline-axis, inline_axis)
|
CSS_KEY(inline-axis, inline_axis)
|
||||||
CSS_KEY(inline-block, inline_block)
|
CSS_KEY(inline-block, inline_block)
|
||||||
|
CSS_KEY(inline-end, inline_end)
|
||||||
CSS_KEY(inline-flex, inline_flex)
|
CSS_KEY(inline-flex, inline_flex)
|
||||||
CSS_KEY(inline-grid, inline_grid)
|
CSS_KEY(inline-grid, inline_grid)
|
||||||
|
CSS_KEY(inline-start, inline_start)
|
||||||
CSS_KEY(inline-table, inline_table)
|
CSS_KEY(inline-table, inline_table)
|
||||||
CSS_KEY(inset, inset)
|
CSS_KEY(inset, inset)
|
||||||
CSS_KEY(inside, inside)
|
CSS_KEY(inside, inside)
|
||||||
|
@ -1005,10 +1005,12 @@ const KTableValue nsCSSProps::kCaptionSideKTable[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const KTableValue nsCSSProps::kClearKTable[] = {
|
const KTableValue nsCSSProps::kClearKTable[] = {
|
||||||
eCSSKeyword_none, NS_STYLE_CLEAR_NONE,
|
eCSSKeyword_none, NS_STYLE_CLEAR_NONE,
|
||||||
eCSSKeyword_left, NS_STYLE_CLEAR_LEFT,
|
eCSSKeyword_left, NS_STYLE_CLEAR_LEFT,
|
||||||
eCSSKeyword_right, NS_STYLE_CLEAR_RIGHT,
|
eCSSKeyword_right, NS_STYLE_CLEAR_RIGHT,
|
||||||
eCSSKeyword_both, NS_STYLE_CLEAR_BOTH,
|
eCSSKeyword_inline_start, NS_STYLE_CLEAR_INLINE_START,
|
||||||
|
eCSSKeyword_inline_end, NS_STYLE_CLEAR_INLINE_END,
|
||||||
|
eCSSKeyword_both, NS_STYLE_CLEAR_BOTH,
|
||||||
eCSSKeyword_UNKNOWN,-1
|
eCSSKeyword_UNKNOWN,-1
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1353,9 +1355,11 @@ const KTableValue nsCSSProps::kHyphensKTable[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const KTableValue nsCSSProps::kFloatKTable[] = {
|
const KTableValue nsCSSProps::kFloatKTable[] = {
|
||||||
eCSSKeyword_none, NS_STYLE_FLOAT_NONE,
|
eCSSKeyword_none, NS_STYLE_FLOAT_NONE,
|
||||||
eCSSKeyword_left, NS_STYLE_FLOAT_LEFT,
|
eCSSKeyword_left, NS_STYLE_FLOAT_LEFT,
|
||||||
eCSSKeyword_right, NS_STYLE_FLOAT_RIGHT,
|
eCSSKeyword_right, NS_STYLE_FLOAT_RIGHT,
|
||||||
|
eCSSKeyword_inline_start, NS_STYLE_FLOAT_INLINE_START,
|
||||||
|
eCSSKeyword_inline_end, NS_STYLE_FLOAT_INLINE_END,
|
||||||
eCSSKeyword_UNKNOWN,-1
|
eCSSKeyword_UNKNOWN,-1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -343,8 +343,10 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
|||||||
#define NS_STYLE_CLEAR_NONE 0
|
#define NS_STYLE_CLEAR_NONE 0
|
||||||
#define NS_STYLE_CLEAR_LEFT 1
|
#define NS_STYLE_CLEAR_LEFT 1
|
||||||
#define NS_STYLE_CLEAR_RIGHT 2
|
#define NS_STYLE_CLEAR_RIGHT 2
|
||||||
#define NS_STYLE_CLEAR_BOTH 3
|
#define NS_STYLE_CLEAR_INLINE_START 3
|
||||||
#define NS_STYLE_CLEAR_LINE 4
|
#define NS_STYLE_CLEAR_INLINE_END 4
|
||||||
|
#define NS_STYLE_CLEAR_BOTH 5
|
||||||
|
#define NS_STYLE_CLEAR_LINE 8
|
||||||
// @note NS_STYLE_CLEAR_LINE can be added to one of the other values in layout
|
// @note NS_STYLE_CLEAR_LINE can be added to one of the other values in layout
|
||||||
// so it needs to use a bit value that none of the other values can have.
|
// so it needs to use a bit value that none of the other values can have.
|
||||||
#define NS_STYLE_CLEAR_MAX (NS_STYLE_CLEAR_LINE | NS_STYLE_CLEAR_BOTH)
|
#define NS_STYLE_CLEAR_MAX (NS_STYLE_CLEAR_LINE | NS_STYLE_CLEAR_BOTH)
|
||||||
@ -545,6 +547,8 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
|||||||
#define NS_STYLE_FLOAT_NONE 0
|
#define NS_STYLE_FLOAT_NONE 0
|
||||||
#define NS_STYLE_FLOAT_LEFT 1
|
#define NS_STYLE_FLOAT_LEFT 1
|
||||||
#define NS_STYLE_FLOAT_RIGHT 2
|
#define NS_STYLE_FLOAT_RIGHT 2
|
||||||
|
#define NS_STYLE_FLOAT_INLINE_START 3
|
||||||
|
#define NS_STYLE_FLOAT_INLINE_END 4
|
||||||
|
|
||||||
// See nsStyleClipPath
|
// See nsStyleClipPath
|
||||||
#define NS_STYLE_CLIP_PATH_NONE 0
|
#define NS_STYLE_CLIP_PATH_NONE 0
|
||||||
|
@ -2498,7 +2498,7 @@ var gCSSProperties = {
|
|||||||
inherited: false,
|
inherited: false,
|
||||||
type: CSS_TYPE_LONGHAND,
|
type: CSS_TYPE_LONGHAND,
|
||||||
initial_values: [ "none" ],
|
initial_values: [ "none" ],
|
||||||
other_values: [ "left", "right", "both" ],
|
other_values: [ "left", "right", "both", "inline-start", "inline-end" ],
|
||||||
invalid_values: []
|
invalid_values: []
|
||||||
},
|
},
|
||||||
"clip": {
|
"clip": {
|
||||||
@ -2602,7 +2602,7 @@ var gCSSProperties = {
|
|||||||
inherited: false,
|
inherited: false,
|
||||||
type: CSS_TYPE_LONGHAND,
|
type: CSS_TYPE_LONGHAND,
|
||||||
initial_values: [ "none" ],
|
initial_values: [ "none" ],
|
||||||
other_values: [ "left", "right" ],
|
other_values: [ "left", "right", "inline-start", "inline-end" ],
|
||||||
invalid_values: []
|
invalid_values: []
|
||||||
},
|
},
|
||||||
"font": {
|
"font": {
|
||||||
|
Loading…
Reference in New Issue
Block a user