mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 737786 - 3/5 - Restrictions for ::-moz-placeholder. r=bz
The restrictions are basicially the one used for ::first-line with a few additions required to style the placeholder by the UA or for the users. See the bug comments for more details (hopefully, there will be a doc and a spec soon enough).
This commit is contained in:
parent
a69affa1ba
commit
b172bb3de1
@ -125,8 +125,12 @@ textarea::-moz-placeholder {
|
||||
white-space: pre;
|
||||
overflow: auto;
|
||||
border: 0px !important;
|
||||
/* The 1px horizontal padding is for parity with Win/IE */
|
||||
padding: 0px 1px;
|
||||
/*
|
||||
* The 1px horizontal padding is for parity with Win/IE.
|
||||
* We need to mark it !important to make sure it can't be changed on the
|
||||
* placeholder.
|
||||
*/
|
||||
padding: 0px 1px !important;
|
||||
margin: 0px;
|
||||
text-decoration: inherit;
|
||||
-moz-text-decoration-color: inherit;
|
||||
@ -147,12 +151,23 @@ input > .anonymous-div.inherit-overflow {
|
||||
|
||||
input::-moz-placeholder,
|
||||
textarea::-moz-placeholder {
|
||||
/*
|
||||
* Changing display to inline can leads to broken behaviour and will assert.
|
||||
*/
|
||||
display: inline-block !important;
|
||||
|
||||
/*
|
||||
* Changing resize would display a broken behaviour and will assert.
|
||||
*/
|
||||
resize: none !important;
|
||||
|
||||
overflow: hidden !important;
|
||||
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
textarea::-moz-placeholder {
|
||||
resize: none;
|
||||
white-space: pre-wrap;
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
|
||||
input:-moz-read-write,
|
||||
|
@ -340,7 +340,8 @@ CSS_PROP_FONT(
|
||||
_x_system_font,
|
||||
CSS_PROP_DOMPROP_PREFIXED(SystemFont),
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
0,
|
||||
kFontKTable,
|
||||
@ -458,6 +459,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundAttachment,
|
||||
CSS_PROPERTY_PARSE_VALUE_LIST |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
|
||||
"",
|
||||
VARIANT_KEYWORD, // used by list parsing
|
||||
@ -470,6 +472,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundClip,
|
||||
CSS_PROPERTY_PARSE_VALUE_LIST |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
|
||||
"",
|
||||
VARIANT_KEYWORD, // used by list parsing
|
||||
@ -482,6 +485,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundColor,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
|
||||
CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
|
||||
"",
|
||||
@ -495,6 +499,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundImage,
|
||||
CSS_PROPERTY_PARSE_VALUE_LIST |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
|
||||
CSS_PROPERTY_START_IMAGE_LOADS,
|
||||
@ -508,7 +513,8 @@ CSS_PROP_BACKGROUND(
|
||||
_moz_background_inline_policy,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BackgroundInlinePolicy),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kBackgroundInlinePolicyKTable,
|
||||
@ -520,6 +526,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundOrigin,
|
||||
CSS_PROPERTY_PARSE_VALUE_LIST |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
|
||||
"",
|
||||
VARIANT_KEYWORD, // used by list parsing
|
||||
@ -532,6 +539,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundPosition,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
@ -545,6 +553,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundRepeat,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
|
||||
"",
|
||||
VARIANT_KEYWORD, // used by list parsing
|
||||
@ -557,6 +566,7 @@ CSS_PROP_BACKGROUND(
|
||||
BackgroundSize,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
@ -1365,6 +1375,7 @@ CSS_PROP_COLOR(
|
||||
Color,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
|
||||
CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
|
||||
"",
|
||||
@ -1519,7 +1530,11 @@ CSS_PROP_DISPLAY(
|
||||
display,
|
||||
display,
|
||||
Display,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
// This is allowed because we need to make the placeholder
|
||||
// pseudo-element an inline-block in the UA stylesheet. It is a block
|
||||
// by default.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kDisplayKTable,
|
||||
@ -1669,7 +1684,8 @@ CSS_PROP_FONT(
|
||||
FontFamily,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_PARSER_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
0,
|
||||
nullptr,
|
||||
@ -1681,7 +1697,8 @@ CSS_PROP_FONT(
|
||||
CSS_PROP_DOMPROP_PREFIXED(FontFeatureSettings),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_PARSER_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
0,
|
||||
nullptr,
|
||||
@ -1692,7 +1709,8 @@ CSS_PROP_FONT(
|
||||
font_language_override,
|
||||
CSS_PROP_DOMPROP_PREFIXED(FontLanguageOverride),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_NORMAL | VARIANT_INHERIT | VARIANT_STRING,
|
||||
nullptr,
|
||||
@ -1705,6 +1723,7 @@ CSS_PROP_FONT(
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
|
||||
"",
|
||||
VARIANT_HKLP | VARIANT_SYSFONT | VARIANT_CALC,
|
||||
@ -1719,7 +1738,8 @@ CSS_PROP_FONT(
|
||||
FontSizeAdjust,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HON | VARIANT_SYSFONT,
|
||||
nullptr,
|
||||
@ -1730,7 +1750,8 @@ CSS_PROP_FONT(
|
||||
font_stretch,
|
||||
FontStretch,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK | VARIANT_SYSFONT,
|
||||
kFontStretchKTable,
|
||||
@ -1741,7 +1762,8 @@ CSS_PROP_FONT(
|
||||
font_style,
|
||||
FontStyle,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK | VARIANT_SYSFONT,
|
||||
kFontStyleKTable,
|
||||
@ -1752,7 +1774,8 @@ CSS_PROP_FONT(
|
||||
font_variant,
|
||||
FontVariant,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK | VARIANT_SYSFONT,
|
||||
kFontVariantKTable,
|
||||
@ -1764,7 +1787,8 @@ CSS_PROP_FONT(
|
||||
FontWeight,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_PARSER_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
// NOTE: This property has range restrictions on interpolation!
|
||||
"",
|
||||
0,
|
||||
@ -1833,6 +1857,7 @@ CSS_PROP_TEXT(
|
||||
LetterSpacing,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
|
||||
"",
|
||||
VARIANT_HL | VARIANT_NORMAL | VARIANT_CALC,
|
||||
@ -1845,7 +1870,8 @@ CSS_PROP_TEXT(
|
||||
LineHeight,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HLPN | VARIANT_KEYWORD | VARIANT_NORMAL | VARIANT_SYSFONT,
|
||||
kLineHeightKTable,
|
||||
@ -2124,7 +2150,8 @@ CSS_PROP_DISPLAY(
|
||||
opacity,
|
||||
opacity,
|
||||
Opacity,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HN,
|
||||
nullptr,
|
||||
@ -2207,7 +2234,9 @@ CSS_PROP_DISPLAY(
|
||||
overflow-x,
|
||||
overflow_x,
|
||||
OverflowX,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kOverflowSubKTable,
|
||||
@ -2217,7 +2246,9 @@ CSS_PROP_DISPLAY(
|
||||
overflow-y,
|
||||
overflow_y,
|
||||
OverflowY,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kOverflowSubKTable,
|
||||
@ -2237,6 +2268,8 @@ CSS_PROP_PADDING(
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_STORES_CALC |
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
|
||||
"",
|
||||
@ -2258,6 +2291,8 @@ CSS_PROP_PADDING(
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
VARIANT_HLP | VARIANT_CALC, // for internal use
|
||||
@ -2280,6 +2315,8 @@ CSS_PROP_PADDING(
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
@ -2293,6 +2330,8 @@ CSS_PROP_PADDING(
|
||||
PaddingLeftLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE,
|
||||
"",
|
||||
0,
|
||||
@ -2305,6 +2344,8 @@ CSS_PROP_PADDING(
|
||||
PaddingLeftRTLSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE,
|
||||
"",
|
||||
0,
|
||||
@ -2327,6 +2368,8 @@ CSS_PROP_PADDING(
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
@ -2340,6 +2383,8 @@ CSS_PROP_PADDING(
|
||||
PaddingRightLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE,
|
||||
"",
|
||||
0,
|
||||
@ -2373,6 +2418,8 @@ CSS_PROP_PADDING(
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
VARIANT_HLP | VARIANT_CALC, // for internal use
|
||||
@ -2387,6 +2434,8 @@ CSS_PROP_PADDING(
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_STORES_CALC |
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
|
||||
"",
|
||||
@ -2466,7 +2515,11 @@ CSS_PROP_DISPLAY(
|
||||
resize,
|
||||
resize,
|
||||
Resize,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
// This is allowed because the UA stylesheet sets 'resize: both;' on
|
||||
// textarea and we need to disable this for the placeholder
|
||||
// pseudo-element.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kResizeKTable,
|
||||
@ -2535,7 +2588,8 @@ CSS_PROP_TEXTRESET(
|
||||
text_blink,
|
||||
CSS_PROP_DOMPROP_PREFIXED(TextBlink),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kTextBlinkKTable,
|
||||
@ -2547,6 +2601,7 @@ CSS_PROP_TEXTRESET(
|
||||
CSS_PROP_DOMPROP_PREFIXED(TextDecorationColor),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
VARIANT_HCK,
|
||||
@ -2559,7 +2614,8 @@ CSS_PROP_TEXTRESET(
|
||||
CSS_PROP_DOMPROP_PREFIXED(TextDecorationLine),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_PARSER_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
0,
|
||||
kTextDecorationLineKTable,
|
||||
@ -2570,7 +2626,8 @@ CSS_PROP_TEXTRESET(
|
||||
text_decoration_style,
|
||||
CSS_PROP_DOMPROP_PREFIXED(TextDecorationStyle),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kTextDecorationStyleKTable,
|
||||
@ -2604,6 +2661,7 @@ CSS_PROP_TEXT(
|
||||
TextShadow,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
// NOTE: some components must be nonnegative
|
||||
@ -2627,7 +2685,8 @@ CSS_PROP_TEXT(
|
||||
text_transform,
|
||||
TextTransform,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kTextTransformKTable,
|
||||
@ -2816,6 +2875,7 @@ CSS_PROP_TEXTRESET(
|
||||
VerticalAlign,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_STORES_CALC,
|
||||
"",
|
||||
VARIANT_HKLP | VARIANT_CALC,
|
||||
@ -2836,7 +2896,9 @@ CSS_PROP_TEXT(
|
||||
white-space,
|
||||
white_space,
|
||||
WhiteSpace,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
// This is required by the UA stylesheet and can't be overridden.
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kWhitespaceKTable,
|
||||
@ -2890,6 +2952,7 @@ CSS_PROP_TEXT(
|
||||
WordSpacing,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
|
||||
"",
|
||||
VARIANT_HL | VARIANT_NORMAL | VARIANT_CALC,
|
||||
|
@ -101,6 +101,9 @@ MOZ_STATIC_ASSERT((CSS_PROPERTY_PARSE_PROPERTY_MASK &
|
||||
// Is this property (which must be a shorthand) really an alias?
|
||||
#define CSS_PROPERTY_IS_ALIAS (1<<17)
|
||||
|
||||
// Does the property apply to ::-moz-placeholder?
|
||||
#define CSS_PROPERTY_APPLIES_TO_PLACEHOLDER (1<<18)
|
||||
|
||||
/**
|
||||
* Types of animatable values.
|
||||
*/
|
||||
|
@ -1823,6 +1823,8 @@ GetPseudoRestriction(nsStyleContext *aContext)
|
||||
pseudoRestriction = CSS_PROPERTY_APPLIES_TO_FIRST_LETTER;
|
||||
} else if (pseudoType == nsCSSPseudoElements::firstLine) {
|
||||
pseudoRestriction = CSS_PROPERTY_APPLIES_TO_FIRST_LINE;
|
||||
} else if (pseudoType == nsCSSPseudoElements::mozPlaceholder) {
|
||||
pseudoRestriction = CSS_PROPERTY_APPLIES_TO_PLACEHOLDER;
|
||||
}
|
||||
}
|
||||
return pseudoRestriction;
|
||||
|
@ -129,9 +129,7 @@ nsStyleSet::Init(nsPresContext *aPresContext)
|
||||
{
|
||||
mFirstLineRule = new nsEmptyStyleRule;
|
||||
mFirstLetterRule = new nsEmptyStyleRule;
|
||||
if (!mFirstLineRule || !mFirstLetterRule) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
mPlaceholderRule = new nsEmptyStyleRule;
|
||||
|
||||
if (!BuildDefaultStyleData(aPresContext)) {
|
||||
mDefaultStyleData.Destroy(0, aPresContext);
|
||||
@ -1065,6 +1063,8 @@ nsStyleSet::WalkRestrictionRule(nsCSSPseudoElements::Type aPseudoType,
|
||||
aRuleWalker->Forward(mFirstLetterRule);
|
||||
else if (aPseudoType == nsCSSPseudoElements::ePseudo_firstLine)
|
||||
aRuleWalker->Forward(mFirstLineRule);
|
||||
else if (aPseudoType == nsCSSPseudoElements::ePseudo_mozPlaceholder)
|
||||
aRuleWalker->Forward(mPlaceholderRule);
|
||||
}
|
||||
|
||||
already_AddRefed<nsStyleContext>
|
||||
|
@ -385,7 +385,7 @@ class nsStyleSet
|
||||
|
||||
// Empty style rules to force things that restrict which properties
|
||||
// apply into different branches of the rule tree.
|
||||
nsRefPtr<nsEmptyStyleRule> mFirstLineRule, mFirstLetterRule;
|
||||
nsRefPtr<nsEmptyStyleRule> mFirstLineRule, mFirstLetterRule, mPlaceholderRule;
|
||||
|
||||
// Style rule which sets all properties to their initial values for
|
||||
// determining when context-sensitive values are in use.
|
||||
|
Loading…
Reference in New Issue
Block a user