Bug 1270406 - Remove :-moz-dir support.
MozReview-Commit-ID: HRBj6YF4hZS
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -6331,17 +6331,16 @@ CSSParserImpl::ParsePseudoClassWithIdent
UngetToken();
return eSelectorParsingStatus_Error; // our caller calls SkipUntil(')')
}
// -moz-locale-dir and dir take an identifier argument. While
// only 'ltr' and 'rtl' (case-insensitively) will match anything, any
// other identifier is still valid.
if (aType == CSSPseudoClassType::mozLocaleDir ||
- aType == CSSPseudoClassType::mozDir ||
aType == CSSPseudoClassType::dir) {
nsContentUtils::ASCIIToLower(mToken.mIdent); // case insensitive
}
// Add the pseudo with the language parameter
aSelector.AddPseudoClass(aType, mToken.mIdent.get());
// close the parenthesis
--- a/layout/style/nsCSSPseudoClassList.h
+++ b/layout/style/nsCSSPseudoClassList.h
@@ -133,19 +133,16 @@ CSS_PSEUDO_CLASS(scope, ":scope", 0, "la
// :not needs to come at the end of the non-bit pseudo-class list, since
// it doesn't actually get directly matched on in SelectorMatches.
CSS_PSEUDO_CLASS(negation, ":not", 0, "")
// :dir(ltr) and :dir(rtl) match elements whose resolved
// directionality in the markup language is ltr or rtl respectively.
CSS_STATE_DEPENDENT_PSEUDO_CLASS(dir, ":dir", 0, "",
NS_EVENT_STATE_LTR | NS_EVENT_STATE_RTL)
-// prefix version is deprecated and will be removed per bug 1270406.
-CSS_STATE_DEPENDENT_PSEUDO_CLASS(mozDir, ":-moz-dir", 0, "",
- NS_EVENT_STATE_LTR | NS_EVENT_STATE_RTL)
CSS_STATE_PSEUDO_CLASS(link, ":link", 0, "", NS_EVENT_STATE_UNVISITED)
// what matches :link or :visited
CSS_STATE_PSEUDO_CLASS(mozAnyLink, ":-moz-any-link", 0, "",
NS_EVENT_STATE_VISITED | NS_EVENT_STATE_UNVISITED)
CSS_STATE_PSEUDO_CLASS(anyLink, ":any-link", 0, "",
NS_EVENT_STATE_VISITED | NS_EVENT_STATE_UNVISITED)
CSS_STATE_PSEUDO_CLASS(visited, ":visited", 0, "", NS_EVENT_STATE_VISITED)
--- a/layout/style/nsCSSPseudoClasses.cpp
+++ b/layout/style/nsCSSPseudoClasses.cpp
@@ -83,17 +83,16 @@ void nsCSSPseudoClasses::AddRefAtoms()
bool
nsCSSPseudoClasses::HasStringArg(Type aType)
{
return aType == Type::lang ||
aType == Type::mozEmptyExceptChildrenWithLocalname ||
aType == Type::mozSystemMetric ||
aType == Type::mozLocaleDir ||
- aType == Type::mozDir ||
aType == Type::dir;
}
bool
nsCSSPseudoClasses::HasNthPairArg(Type aType)
{
return aType == Type::nthChild ||
aType == Type::nthLastChild ||
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -2076,17 +2076,16 @@ static bool SelectorMatches(Element* aEl
browserFrame = do_QueryInterface(aElement);
if (!browserFrame ||
!browserFrame->GetReallyIsBrowser()) {
return false;
}
}
break;
- case CSSPseudoClassType::mozDir:
case CSSPseudoClassType::dir:
{
if (aDependence) {
EventStates states = sPseudoClassStateDependences[
static_cast<CSSPseudoClassTypeBase>(pseudoClass->mType)];
if (aNodeMatchContext.mStateMask.HasAtLeastOneOfStates(states)) {
*aDependence = true;
return false;