Bug 843579 - Unprefix -moz-any-link. r=bz

--HG--
extra : rebase_source : d5ad8227cc118491f130e1fef01829c594cc9477
This commit is contained in:
Thomas Wisniewski 2016-07-19 23:13:13 -04:00
parent cd540457fa
commit 051c21928e
12 changed files with 19 additions and 16 deletions

View File

@ -297,7 +297,7 @@ select[disabled] > button {
padding: 1px 7px 1px 7px;
}
*:-moz-any-link:active,
*:any-link:active,
*[role=button]:active,
button:active,
option:active,

View File

@ -116,8 +116,8 @@ function* userAgentStylesVisible(inspector, view) {
// These tests rely on the "a" selector being the last test in
// TEST_DATA.
ok(uaRules.some(rule => {
return rule.matchedSelectors.indexOf(":-moz-any-link") !== -1;
}), "There is a rule for :-moz-any-link");
return rule.matchedSelectors.indexOf(":any-link") !== -1;
}), "There is a rule for :any-link");
ok(uaRules.some(rule => {
return rule.matchedSelectors.indexOf("*|*:link") !== -1;
}), "There is a rule for *|*:link");

View File

@ -1216,9 +1216,10 @@ GetStatesForPseudoClass(const nsAString& aStatePseudo)
CSSPseudoClassType type = nsCSSPseudoClasses::
GetPseudoType(atom, CSSEnabledState::eIgnoreEnabledState);
// Ignore :moz-any-link so we don't give the element simultaneous
// Ignore :any-link so we don't give the element simultaneous
// visited and unvisited style state
if (type == CSSPseudoClassType::mozAnyLink) {
if (type == CSSPseudoClassType::anyLink ||
type == CSSPseudoClassType::mozAnyLink) {
return EventStates();
}
// Our array above is long enough that indexing into it with

View File

@ -184,7 +184,7 @@ interface inIDOMUtils : nsISupports
[retval, array, size_is(aCount)] out wstring aNames);
// pseudo-class style locking methods. aPseudoClass must be a valid pseudo-class
// selector string, e.g. ":hover". ":-moz-any-link" and non-event-state
// selector string, e.g. ":hover". ":any-link" and non-event-state
// pseudo-classes are ignored.
void addPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass);
void removePseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass);

View File

@ -243,7 +243,7 @@ function testMultiple() {
function testInvalid() {
var div = document.getElementById("test-div");
var pseudos = ["not a valid pseudo-class", ":moz-any-link", ":first-child"];
var pseudos = ["not a valid pseudo-class", ":ny-link", ":first-child"];
for (var i = 0; i < pseudos.length; i++) {
var pseudo = pseudos[i];

View File

@ -64,7 +64,7 @@ ms[rquote]:after {
/**************************************************************************/
/* Links */
/**************************************************************************/
:-moz-any-link {
:any-link {
text-decoration: none !important;
}

View File

@ -37,7 +37,7 @@ a:-moz-read-write:active img, a:-moz-read-write:-moz-only-whitespace[name] {
cursor: default;
}
*|*:-moz-any-link:-moz-read-write {
*|*:any-link:-moz-read-write {
cursor: text;
}

View File

@ -146,6 +146,8 @@ 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)
CSS_STATE_PSEUDO_CLASS(active, ":active", 0, "", NS_EVENT_STATE_ACTIVE)

View File

@ -882,7 +882,7 @@ nsLayoutStylesheetCache::BuildPreferenceSheet(StyleSheetHandle::RefPtr* aSheet,
sheetText.AppendPrintf(
"*|*:link { color: #%02x%02x%02x; }\n"
"*|*:-moz-any-link:active { color: #%02x%02x%02x; }\n"
"*|*:any-link:active { color: #%02x%02x%02x; }\n"
"*|*:visited { color: #%02x%02x%02x; }\n",
NS_GET_R_G_B(linkColor),
NS_GET_R_G_B(activeColor),
@ -891,7 +891,7 @@ nsLayoutStylesheetCache::BuildPreferenceSheet(StyleSheetHandle::RefPtr* aSheet,
bool underlineLinks =
aPresContext->GetCachedBoolPref(kPresContext_UnderlineLinks);
sheetText.AppendPrintf(
"*|*:-moz-any-link%s { text-decoration: %s; }\n",
"*|*:any-link%s { text-decoration: %s; }\n",
underlineLinks ? ":not(svg|a)" : "",
underlineLinks ? "underline" : "none");

View File

@ -112,11 +112,11 @@
/* Links */
*|*:-moz-any-link {
*|*:any-link {
cursor: pointer;
}
*|*:-moz-any-link:-moz-focusring {
*|*:any-link:-moz-focusring {
/* Don't specify the outline-color, we should always use initial value. */
outline: 1px dotted;
}

View File

@ -83,11 +83,11 @@ foreignObject {
/* Links */
*|*:-moz-any-link {
*|*:any-link {
cursor: pointer;
}
*|*:-moz-any-link:-moz-focusring {
*|*:any-link:-moz-focusring {
/* Don't specify the outline-color, we should always use initial value. */
outline: 1px dotted;
}

View File

@ -310,7 +310,7 @@ video:not([controls]) > xul|videocontrols {
-moz-binding: url("chrome://global/content/bindings/videocontrols.xml#noControls");
}
*:-moz-any-link:active,
*:any-link:active,
*[role=button]:active,
button:not(:disabled):active,
input:not(:focus):not(:disabled):active,