Skip to content

Commit

Permalink
Bug 843579 - Unprefix -moz-any-link. r=bz
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : d5ad8227cc118491f130e1fef01829c594cc9477
  • Loading branch information
wisniewskit committed Jul 20, 2016
1 parent cd54045 commit 051c219
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion b2g/chrome/content/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
5 changes: 3 additions & 2 deletions layout/inspector/inDOMUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion layout/inspector/inIDOMUtils.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion layout/inspector/tests/chrome/test_bug708874.xul
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion layout/mathml/mathml.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ms[rquote]:after {
/**************************************************************************/
/* Links */
/**************************************************************************/
:-moz-any-link {
:any-link {
text-decoration: none !important;
}

Expand Down
2 changes: 1 addition & 1 deletion layout/style/contenteditable.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions layout/style/nsCSSPseudoClassList.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions layout/style/nsLayoutStylesheetCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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");

Expand Down
4 changes: 2 additions & 2 deletions layout/style/res/ua.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions layout/svg/svg.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion mobile/android/themes/core/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 051c219

Please sign in to comment.