Backed out 2 changesets (bug 811391) because of build bustage

Backed out changeset c20904b75bcc (bug 811391)
Backed out changeset f0a00bf2ba8e (bug 811391)
This commit is contained in:
Ehsan Akhgari committed 2013-01-12 16:05:11 -05:00
1 parent 9f5247ebe3
commit 15947869c9
2 files changed
-37

No files matched your search

-21
View File
@@ -753,9 +753,6 @@ protected:
// True if unsafe rules should be allowed
bool mUnsafeRulesEnabled : 1;
// True if viewport units should be allowed.
bool mViewportUnitsEnabled : 1;
// True for parsing media lists for HTML attributes, where we have to
// ignore CSS comments.
bool mHTMLMediaMode : 1;
@@ -837,7 +834,6 @@ CSSParserImpl::CSSParserImpl()
mNavQuirkMode(false),
mHashlessColorQuirk(false),
mUnitlessLengthQuirk(false),
mViewportUnitsEnabled(true),
mUnsafeRulesEnabled(false),
mHTMLMediaMode(false),
mParsingCompoundProperty(false),
@@ -2403,16 +2399,9 @@ CSSParserImpl::ParsePageRule(RuleAppendFunc aAppendFunc, void* aData)
// TODO: There can be page selectors after @page such as ":first", ":left".
uint32_t parseFlags = eParseDeclaration_InBraces |
eParseDeclaration_AllowImportant;
// Forbid viewport units in @page rules. See bug 811391.
NS_ABORT_IF_FALSE(mViewportUnitsEnabled,
"Viewport units should be enabled outside of @page rules.");
mViewportUnitsEnabled = false;
nsAutoPtr<css::Declaration> declaration(
ParseDeclarationBlock(parseFlags,
eCSSContext_Page));
mViewportUnitsEnabled = true;
if (!declaration) {
return false;
}
@@ -4687,16 +4676,6 @@ CSSParserImpl::TranslateDimension(nsCSSValue& aValue,
}
}
if (!mViewportUnitsEnabled &&
(eCSSUnit_ViewportWidth == units ||
eCSSUnit_ViewportHeight == units ||
eCSSUnit_ViewportMin == units ||
eCSSUnit_ViewportMax == units)) {
// Viewport units aren't allowed right now, probably because we're
// inside an @page declaration. Fail.
return false;
}
if (i == ArrayLength(UnitData)) {
// Unknown unit
return false;
-16
View File
@@ -23,22 +23,6 @@
// Check a bad property.
{ rule: "position: absolute;" },
// Check good properties with invalid units.
{ rule: _("margin: 2in; margin: 2vw;"), expected: {
"margin-top": "2in",
"margin-right-value": "2in",
"margin-bottom": "2in",
"margin-left-value": "2in",
"margin-left-ltr-source": "physical",
"margin-left-rtl-source": "physical",
"margin-right-ltr-source": "physical",
"margin-right-rtl-source": "physical"
}},
{ rule: _("margin-top: 2in; margin-top: 2vw;"), expected: {"margin-top": "2in"}},
{ rule: _("margin-top: 2in; margin-top: 2vh;"), expected: {"margin-top": "2in"}},
{ rule: _("margin-top: 2in; margin-top: 2vmax;"), expected: {"margin-top": "2in"}},
{ rule: _("margin-top: 2in; margin-top: 2vmin;"), expected: {"margin-top": "2in"}},
// Check good properties.
// NOTE: The margin-*-value and margin-*-source properties are not really
// expected and will need to be removed once bug 241234 is addressed.