Bug 1532833: Use servo code to serialize CSS 'contain' property. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D22260

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daniel Holbert 2019-03-06 16:50:05 +00:00
Родитель 60d0ba7429
Коммит 99a091abb7
5 изменённых файлов: 0 добавлений и 40 удалений

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

@ -77,7 +77,6 @@ LONGHANDS_NOT_SERIALIZED_WITH_SERVO = [
"column-gap",
"column-rule-width",
"column-width",
"contain",
"display",
"fill",
"filter",

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

@ -347,15 +347,6 @@ const KTableEntry nsCSSProps::kLineHeightKTable[] = {
{eCSSKeyword__moz_block_height, NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kContainKTable[] = {
{eCSSKeyword_none, NS_STYLE_CONTAIN_NONE},
{eCSSKeyword_strict, NS_STYLE_CONTAIN_STRICT},
{eCSSKeyword_content, NS_STYLE_CONTAIN_CONTENT},
{eCSSKeyword_layout, NS_STYLE_CONTAIN_LAYOUT},
{eCSSKeyword_paint, NS_STYLE_CONTAIN_PAINT},
{eCSSKeyword_size, NS_STYLE_CONTAIN_SIZE},
{eCSSKeyword_UNKNOWN, -1}};
const KTableEntry nsCSSProps::kTextAlignKTable[] = {
{eCSSKeyword_left, NS_STYLE_TEXT_ALIGN_LEFT},
{eCSSKeyword_right, NS_STYLE_TEXT_ALIGN_RIGHT},

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

@ -305,7 +305,6 @@ class nsCSSProps {
static const KTableEntry kGridAutoFlowKTable[];
static const KTableEntry kGridTrackBreadthKTable[];
static const KTableEntry kLineHeightKTable[];
static const KTableEntry kContainKTable[];
static const KTableEntry kTextAlignKTable[];
static const KTableEntry kTextDecorationLineKTable[];
static const KTableEntry kTextDecorationStyleKTable[];

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

@ -2243,34 +2243,6 @@ already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetDisplay() {
return val.forget();
}
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetContain() {
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
int32_t mask = StyleDisplay()->mContain;
if (mask == 0) {
val->SetIdent(eCSSKeyword_none);
} else if (mask & NS_STYLE_CONTAIN_STRICT) {
NS_ASSERTION(
mask == (NS_STYLE_CONTAIN_STRICT | NS_STYLE_CONTAIN_ALL_BITS),
"contain: strict should imply contain: size layout style paint");
val->SetIdent(eCSSKeyword_strict);
} else if (mask & NS_STYLE_CONTAIN_CONTENT) {
NS_ASSERTION(
mask == (NS_STYLE_CONTAIN_CONTENT | NS_STYLE_CONTAIN_CONTENT_BITS),
"contain: content should imply contain: layout style paint");
val->SetIdent(eCSSKeyword_content);
} else {
nsAutoString valueStr;
nsStyleUtil::AppendBitmaskCSSValue(nsCSSProps::kContainKTable, mask,
NS_STYLE_CONTAIN_SIZE,
NS_STYLE_CONTAIN_PAINT, valueStr);
val->SetString(valueStr);
}
return val.forget();
}
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetWillChange() {
const nsTArray<RefPtr<nsAtom>>& willChange = StyleDisplay()->mWillChange;

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

@ -318,7 +318,6 @@ class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
/* Display properties */
already_AddRefed<CSSValue> DoGetBinding();
already_AddRefed<CSSValue> DoGetDisplay();
already_AddRefed<CSSValue> DoGetContain();
already_AddRefed<CSSValue> DoGetWillChange();
already_AddRefed<CSSValue> DoGetTouchAction();
already_AddRefed<CSSValue> DoGetTransform();