зеркало из https://github.com/mozilla/gecko-dev.git
Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT. Differential Revision: https://phabricator.services.mozilla.com/D75231
This commit is contained in:
Родитель
863d186226
Коммит
b9c1bf761c
|
@ -72,7 +72,7 @@ role HyperTextAccessible::NativeRole() const {
|
|||
uint64_t HyperTextAccessible::NativeState() const {
|
||||
uint64_t states = AccessibleWrap::NativeState();
|
||||
|
||||
if (mContent->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
|
||||
if (mContent->AsElement()->State().HasState(NS_EVENT_STATE_READWRITE)) {
|
||||
states |= states::EDITABLE;
|
||||
|
||||
} else if (mContent->IsHTMLElement(nsGkAtoms::article)) {
|
||||
|
|
|
@ -260,8 +260,7 @@ Element::QueryInterface(REFNSIID aIID, void** aInstancePtr) {
|
|||
}
|
||||
|
||||
EventStates Element::IntrinsicState() const {
|
||||
return IsEditable() ? NS_EVENT_STATE_MOZ_READWRITE
|
||||
: NS_EVENT_STATE_MOZ_READONLY;
|
||||
return IsEditable() ? NS_EVENT_STATE_READWRITE : NS_EVENT_STATE_READONLY;
|
||||
}
|
||||
|
||||
void Element::NotifyStateChange(EventStates aStates) {
|
||||
|
@ -334,11 +333,11 @@ void Element::UpdateEditableState(bool aNotify) {
|
|||
// insertion into the document and UpdateState can be slow for
|
||||
// some kinds of elements even when not notifying.
|
||||
if (IsEditable()) {
|
||||
RemoveStatesSilently(NS_EVENT_STATE_MOZ_READONLY);
|
||||
AddStatesSilently(NS_EVENT_STATE_MOZ_READWRITE);
|
||||
RemoveStatesSilently(NS_EVENT_STATE_READONLY);
|
||||
AddStatesSilently(NS_EVENT_STATE_READWRITE);
|
||||
} else {
|
||||
RemoveStatesSilently(NS_EVENT_STATE_MOZ_READWRITE);
|
||||
AddStatesSilently(NS_EVENT_STATE_MOZ_READONLY);
|
||||
RemoveStatesSilently(NS_EVENT_STATE_READWRITE);
|
||||
AddStatesSilently(NS_EVENT_STATE_READONLY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ class Element : public FragmentOrElement {
|
|||
#ifdef MOZILLA_INTERNAL_API
|
||||
explicit Element(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||
: FragmentOrElement(std::move(aNodeInfo)),
|
||||
mState(NS_EVENT_STATE_MOZ_READONLY | NS_EVENT_STATE_DEFINED) {
|
||||
mState(NS_EVENT_STATE_READONLY | NS_EVENT_STATE_DEFINED) {
|
||||
MOZ_ASSERT(mNodeInfo->NodeType() == ELEMENT_NODE,
|
||||
"Bad NodeType in aNodeInfo");
|
||||
SetIsElement();
|
||||
|
|
|
@ -197,7 +197,7 @@ nsIContent::IMEState nsIContent::GetDesiredIMEState() {
|
|||
// Check for the special case where we're dealing with elements which don't
|
||||
// have the editable flag set, but are readwrite (such as text controls).
|
||||
if (!IsElement() ||
|
||||
!AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
|
||||
!AsElement()->State().HasState(NS_EVENT_STATE_READWRITE)) {
|
||||
return IMEState(IMEState::DISABLED);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ static bool IsEditorNode(const nsINode* aNode) {
|
|||
}
|
||||
|
||||
auto* element = Element::FromNode(aNode);
|
||||
return element && element->State().HasState(NS_EVENT_STATE_MOZ_READWRITE);
|
||||
return element && element->State().HasState(NS_EVENT_STATE_READWRITE);
|
||||
}
|
||||
|
||||
bool Selection::IsEditorSelection() const {
|
||||
|
|
|
@ -228,11 +228,12 @@ class EventStates {
|
|||
#define NS_EVENT_STATE_INRANGE NS_DEFINE_EVENT_STATE_MACRO(27)
|
||||
// Content value is out-of-range.
|
||||
#define NS_EVENT_STATE_OUTOFRANGE NS_DEFINE_EVENT_STATE_MACRO(28)
|
||||
// These two are temporary (see bug 302188)
|
||||
// Content is read-only.
|
||||
#define NS_EVENT_STATE_MOZ_READONLY NS_DEFINE_EVENT_STATE_MACRO(29)
|
||||
// TODO(emilio): This is always the inverse of READWRITE. With some style system
|
||||
// work we could remove one of the two bits.
|
||||
#define NS_EVENT_STATE_READONLY NS_DEFINE_EVENT_STATE_MACRO(29)
|
||||
// Content is editable.
|
||||
#define NS_EVENT_STATE_MOZ_READWRITE NS_DEFINE_EVENT_STATE_MACRO(30)
|
||||
#define NS_EVENT_STATE_READWRITE NS_DEFINE_EVENT_STATE_MACRO(30)
|
||||
// Content is the default one (meaning depends of the context).
|
||||
#define NS_EVENT_STATE_DEFAULT NS_DEFINE_EVENT_STATE_MACRO(31)
|
||||
// Content is a submit control and the form isn't valid.
|
||||
|
|
|
@ -1742,7 +1742,7 @@ bool IMEStateManager::IsEditable(nsINode* node) {
|
|||
}
|
||||
// |node| might be readwrite (for example, a text control)
|
||||
if (node->IsElement() &&
|
||||
node->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
|
||||
node->AsElement()->State().HasState(NS_EVENT_STATE_READWRITE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -1977,10 +1977,10 @@ EventStates nsGenericHTMLFormElement::IntrinsicState() const {
|
|||
}
|
||||
|
||||
// Make the text controls read-write
|
||||
if (!state.HasState(NS_EVENT_STATE_MOZ_READWRITE) && DoesReadOnlyApply()) {
|
||||
if (!state.HasState(NS_EVENT_STATE_READWRITE) && DoesReadOnlyApply()) {
|
||||
if (!GetBoolAttr(nsGkAtoms::readonly) && !IsDisabled()) {
|
||||
state |= NS_EVENT_STATE_MOZ_READWRITE;
|
||||
state &= ~NS_EVENT_STATE_MOZ_READONLY;
|
||||
state |= NS_EVENT_STATE_READWRITE;
|
||||
state &= ~NS_EVENT_STATE_READONLY;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=535043
|
|||
/** Test for Bug 1264157 **/
|
||||
SimpleTest.waitForFocus(function() {
|
||||
// Check the initial values.
|
||||
let active = [].slice.call(document.querySelectorAll("input:not(:disabled):not(:-moz-read-only)"));
|
||||
let active = [].slice.call(document.querySelectorAll("input:not(:disabled):not(:read-only)"));
|
||||
let disabled = [].slice.call(document.querySelectorAll("input:disabled"));
|
||||
let readonly = [].slice.call(document.querySelectorAll("input:-moz-read-only:not(:disabled)"));
|
||||
let readonly = [].slice.call(document.querySelectorAll("input:read-only:not(:disabled)"));
|
||||
ok(active.length == 2, "Test is messed up: missing non-disabled/non-readonly inputs");
|
||||
ok(disabled.length == 2, "Test is messed up: missing disabled inputs");
|
||||
ok(readonly.length == 2, "Test is messed up: missing readonly inputs");
|
||||
|
|
|
@ -395,7 +395,7 @@ Element* HTMLEditor::FindSelectionRoot(nsINode* aNode) const {
|
|||
// If the content is in read-write state but is not editable itself,
|
||||
// return it as the selection root.
|
||||
if (content->IsElement() &&
|
||||
content->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
|
||||
content->AsElement()->State().HasState(NS_EVENT_STATE_READWRITE)) {
|
||||
return content->AsElement();
|
||||
}
|
||||
return nullptr;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<html class="reftest-wait">
|
||||
<body>
|
||||
<style>
|
||||
:-moz-read-only { color: red; }
|
||||
:-moz-read-write { color: green; }
|
||||
:read-only { color: red; }
|
||||
:read-write { color: green; }
|
||||
</style>
|
||||
<script>
|
||||
onload = function() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style>
|
||||
:-moz-read-only { color: green; }
|
||||
:-moz-read-write { color: red; }
|
||||
:read-only { color: green; }
|
||||
:read-write { color: red; }
|
||||
</style>
|
||||
<body onload="document.designMode='on';document.designMode='off'">
|
||||
<div>test</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style>
|
||||
:-moz-read-only { color: green; }
|
||||
:-moz-read-write { color: red; }
|
||||
:read-only { color: green; }
|
||||
:read-write { color: red; }
|
||||
</style>
|
||||
<body onload="document.designMode='on';document.designMode='off'">
|
||||
<div>test</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style>
|
||||
:-moz-read-only { color: red; }
|
||||
:-moz-read-write { color: green; }
|
||||
:read-only { color: red; }
|
||||
:read-write { color: green; }
|
||||
</style>
|
||||
<body onload="document.designMode='on';document.designMode='off'">
|
||||
<div contenteditable>test</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
:-moz-read-write + span {
|
||||
:read-write + span {
|
||||
display: none;
|
||||
}
|
||||
span {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
:-moz-read-only + span {
|
||||
:read-only + span {
|
||||
display: none;
|
||||
}
|
||||
span {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
:-moz-read-write + span {
|
||||
:read-write + span {
|
||||
display: none;
|
||||
}
|
||||
span {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
:-moz-read-write + span {
|
||||
:read-write + span {
|
||||
display: none;
|
||||
}
|
||||
span {
|
||||
|
|
|
@ -35,11 +35,11 @@ for (const element of Array.from(document.querySelectorAll('#should-apply *')))
|
|||
if (elementDesc === "input")
|
||||
elementDesc += ` type="${element.type}"`;
|
||||
test(function() {
|
||||
assert_false(element.matches(':-moz-read-only'), "Shouldn't be initially read-only");
|
||||
assert_true(element.matches(':-moz-read-write'), "Thus should be read-write");
|
||||
assert_false(element.matches(':read-only'), "Shouldn't be initially read-only");
|
||||
assert_true(element.matches(':read-write'), "Thus should be read-write");
|
||||
element.setAttribute("readonly", "readonly");
|
||||
assert_true(element.matches(':-moz-read-only'), "Should become read-only");
|
||||
assert_false(element.matches(':-moz-read-write'), "Thus should stop being read-write");
|
||||
assert_true(element.matches(':read-only'), "Should become read-only");
|
||||
assert_false(element.matches(':read-write'), "Thus should stop being read-write");
|
||||
}, elementDesc);
|
||||
}
|
||||
|
||||
|
@ -48,11 +48,11 @@ for (const element of Array.from(document.querySelectorAll('#should-not-apply *'
|
|||
if (elementDesc === "input")
|
||||
elementDesc += ` type="${element.type}"`;
|
||||
test(function() {
|
||||
assert_true(element.matches(':-moz-read-only'), "Should match read-only");
|
||||
assert_false(element.matches(':-moz-read-write'), "Should not be read-write");
|
||||
assert_true(element.matches(':read-only'), "Should match read-only");
|
||||
assert_false(element.matches(':read-write'), "Should not be read-write");
|
||||
element.setAttribute("readonly", "readonly");
|
||||
assert_true(element.matches(':-moz-read-only'), "Should keep matching read-only");
|
||||
assert_false(element.matches(':-moz-read-write'), "Should still not be read-write");
|
||||
assert_true(element.matches(':read-only'), "Should keep matching read-only");
|
||||
assert_false(element.matches(':read-write'), "Should still not be read-write");
|
||||
}, elementDesc);
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<html class="reftest-wait"><style>
|
||||
.c12:-moz-read-write, *|* { vertical-align: -moz-calc(30060px 36%); display: inline; -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight; border-collapse: collapse; speak: normal; width: 2.88999223464x+18mozmm; -moz-outline-radius: -219px/6827px; }
|
||||
.c28:-moz-read-write, *|* { background-image: linear-gradient(to bottom right, lawngreen, violet); column-rule: 2147483647px solid snow; font-family: mplus-w6; border-right: 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px solid hsla(56224, 127%, 11074%, 3.1529590536x+18); font: Arial, sans-serif; -moz-transform: matrix(9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999, 54, 70.084369622, 2600244143.97, 225, 200); animation: step-right 7.82973832672x+18s forwards;.c29 { background: radial-gradient(circle closest-corner at 223px 33127px, mediumspringgreen, steelblue); -moz-appearance: statusbar; font-family: foo, sans-serif; : blue; column-rule-width: 21px; column-rule-style: solid; }
|
||||
.c12:read-write, *|* { vertical-align: -moz-calc(30060px 36%); display: inline; -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight; border-collapse: collapse; speak: normal; width: 2.88999223464x+18mozmm; -moz-outline-radius: -219px/6827px; }
|
||||
.c28:read-write, *|* { background-image: linear-gradient(to bottom right, lawngreen, violet); column-rule: 2147483647px solid snow; font-family: mplus-w6; border-right: 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px solid hsla(56224, 127%, 11074%, 3.1529590536x+18); font: Arial, sans-serif; -moz-transform: matrix(9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999, 54, 70.084369622, 2600244143.97, 225, 200); animation: step-right 7.82973832672x+18s forwards;.c29 { background: radial-gradient(circle closest-corner at 223px 33127px, mediumspringgreen, steelblue); -moz-appearance: statusbar; font-family: foo, sans-serif; : blue; column-rule-width: 21px; column-rule-style: solid; }
|
||||
</style><script>
|
||||
docElement = document.documentElement;
|
||||
docElement.contentEditable = "true";
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
<style type="text/css">
|
||||
body,html { color:black; background:white; font-size:16px; padding:0; margin:0; }
|
||||
|
||||
#t1:-moz-read-only { display:none; }
|
||||
#t1:-moz-read-write { display:block; }
|
||||
#t1:read-only { display:none; }
|
||||
#t1:read-write { display:block; }
|
||||
|
||||
#t2:-moz-read-write { display:none; }
|
||||
#t2:-moz-read-only { display:block; }
|
||||
#t2:read-write { display:none; }
|
||||
#t2:read-only { display:block; }
|
||||
|
||||
#t3:disabled { display:none; }
|
||||
#t3:enabled { display:block; }
|
||||
|
|
|
@ -12,6 +12,3 @@ include percentage/reftest.list
|
|||
include hidden/reftest.list
|
||||
include color/reftest.list
|
||||
include datetime/reftest.list
|
||||
|
||||
fuzzy-if(geckoview,0-1,0-2) == selector-read-write-type-change-001.html selector-read-write-type-change-001-ref.html
|
||||
== selector-read-write-type-change-002.html selector-read-write-type-change-002-ref.html
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
span { color: green; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input type="button"><span>This should be green</span>
|
||||
</body>
|
||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Check for correctly updating :read-write matching on type change</title>
|
||||
<link rel="match" href="selector-read-write-type-change-001-ref.html">
|
||||
<style>
|
||||
span { color: green; }
|
||||
:-moz-read-write + span { color: red }
|
||||
</style>
|
||||
<script>
|
||||
onload = function() {
|
||||
document.querySelector("input").type = "button";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input required><span>This should be green</span>
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
span { color: green; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input required><span>This should be green</span>
|
||||
</body>
|
||||
</html>
|
|
@ -1,24 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<title>Check for correctly updating :read-write matching on type change</title>
|
||||
<link rel="match" href="selector-read-write-type-change-002-ref.html">
|
||||
<style>
|
||||
span { color: red; }
|
||||
:-moz-read-write + span { color: green }
|
||||
</style>
|
||||
<script>
|
||||
onload = function() {
|
||||
// setTimeout because in some browsers apparently a toplevel restyle
|
||||
// happens right after the load event fires?
|
||||
setTimeout(function() {
|
||||
document.querySelector("input").type = "";
|
||||
document.documentElement.className = "";
|
||||
}, 10);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input type="hidden" required><span>This should be green</span>
|
||||
</body>
|
||||
</html>
|
|
@ -8,8 +8,8 @@
|
|||
/* Scroll-anchoring shouldn't work in any editable and scrollable elements when
|
||||
user inserts something.
|
||||
*/
|
||||
*|*:-moz-read-write:focus,
|
||||
*|*:root:-moz-read-write {
|
||||
*|*:read-write:focus,
|
||||
*|*:root:read-write {
|
||||
overflow-anchor: none;
|
||||
}
|
||||
|
||||
|
@ -22,48 +22,48 @@
|
|||
Override the browser's pointer cursor over links
|
||||
*/
|
||||
|
||||
img:-moz-read-write, img:-moz-read-write[usemap], area:-moz-read-write,
|
||||
object:-moz-read-write, object:-moz-read-write[usemap],
|
||||
applet:-moz-read-write, hr:-moz-read-write, button:-moz-read-write,
|
||||
select:-moz-read-write,
|
||||
a:-moz-read-write:link img, a:-moz-read-write:visited img,
|
||||
a:-moz-read-write:active img, a:-moz-read-write:-moz-only-whitespace[name] {
|
||||
img:read-write, img:read-write[usemap], area:read-write,
|
||||
object:read-write, object:read-write[usemap],
|
||||
applet:read-write, hr:read-write, button:read-write,
|
||||
select:read-write,
|
||||
a:read-write:link img, a:read-write:visited img,
|
||||
a:read-write:active img, a:read-write:-moz-only-whitespace[name] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
*|*:any-link:-moz-read-write {
|
||||
*|*:any-link:read-write {
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
/* Prevent clicking on links from going to link */
|
||||
a:link:-moz-read-write img, a:visited:-moz-read-write img,
|
||||
a:active:-moz-read-write img {
|
||||
a:link:read-write img, a:visited:read-write img,
|
||||
a:active:read-write img {
|
||||
-moz-user-input: none;
|
||||
}
|
||||
|
||||
/* We suppress user/author's prefs for link underline,
|
||||
so we must set explicitly. This isn't good!
|
||||
*/
|
||||
a:link:-moz-read-write {
|
||||
a:link:read-write {
|
||||
color: -moz-hyperlinktext;
|
||||
}
|
||||
|
||||
/* Allow double-clicks on these widgets to open properties dialogs
|
||||
XXX except when the widget has disabled attribute */
|
||||
*|*:-moz-read-write > input:-moz-read-only,
|
||||
*|*:-moz-read-write > button:-moz-read-only,
|
||||
*|*:-moz-read-write > textarea:-moz-read-only {
|
||||
*|*:read-write > input:read-only,
|
||||
*|*:read-write > button:read-only,
|
||||
*|*:read-write > textarea:read-only {
|
||||
user-select: all;
|
||||
-moz-user-input: auto !important;
|
||||
-moz-user-focus: none !important;
|
||||
}
|
||||
|
||||
/* XXX Still need a better way of blocking other events to these widgets */
|
||||
select:-moz-read-write,
|
||||
*|*:-moz-read-write > input:disabled,
|
||||
*|*:-moz-read-write > input[type="checkbox"],
|
||||
*|*:-moz-read-write > input[type="radio"],
|
||||
*|*:-moz-read-write > input[type="file"],
|
||||
select:read-write,
|
||||
*|*:read-write > input:disabled,
|
||||
*|*:read-write > input[type="checkbox"],
|
||||
*|*:read-write > input[type="radio"],
|
||||
*|*:read-write > input[type="file"],
|
||||
input[contenteditable="true"]:disabled,
|
||||
input[contenteditable="true"][type="checkbox"],
|
||||
input[contenteditable="true"][type="radio"],
|
||||
|
@ -73,7 +73,7 @@ input[contenteditable="true"][type="file"] {
|
|||
-moz-user-focus: none !important;
|
||||
}
|
||||
|
||||
*|*:-moz-read-write > input[type="hidden"],
|
||||
*|*:read-write > input[type="hidden"],
|
||||
input[contenteditable="true"][type="hidden"] {
|
||||
border: 1px solid black !important;
|
||||
visibility: visible !important;
|
||||
|
@ -83,7 +83,7 @@ input[contenteditable="true"][type="hidden"] {
|
|||
user-select: text;
|
||||
}
|
||||
|
||||
option:-moz-read-write {
|
||||
option:read-write {
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,8 +214,8 @@ textarea::-moz-text-control-preview {
|
|||
white-space: pre-wrap !important;
|
||||
}
|
||||
|
||||
input:-moz-read-write,
|
||||
textarea:-moz-read-write {
|
||||
input:read-write,
|
||||
textarea:read-write {
|
||||
-moz-user-modify: read-write !important;
|
||||
}
|
||||
|
||||
|
@ -1061,8 +1061,8 @@ input[type="time"] {
|
|||
|
||||
input[type="date"]:disabled,
|
||||
input[type="time"]:disabled,
|
||||
input[type="date"]:-moz-read-only,
|
||||
input[type="time"]:-moz-read-only {
|
||||
input[type="date"]:read-only,
|
||||
input[type="time"]:read-only {
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
th[scope="row"] {
|
||||
font-weight: normal;
|
||||
}
|
||||
input:-moz-read-only,
|
||||
textarea:-moz-read-only {
|
||||
input:read-only,
|
||||
textarea:read-only {
|
||||
background: none;
|
||||
border: none;
|
||||
width: 100%;
|
||||
|
|
|
@ -87,9 +87,9 @@ bitflags! {
|
|||
/// <https://html.spec.whatwg.org/multipage/#selector-out-of-range>
|
||||
const IN_OUTOFRANGE_STATE = 1 << 28;
|
||||
/// <https://html.spec.whatwg.org/multipage/#selector-read-only>
|
||||
const IN_MOZ_READONLY_STATE = 1 << 29;
|
||||
const IN_READONLY_STATE = 1 << 29;
|
||||
/// <https://html.spec.whatwg.org/multipage/#selector-read-write>
|
||||
const IN_MOZ_READWRITE_STATE = 1 << 30;
|
||||
const IN_READWRITE_STATE = 1 << 30;
|
||||
/// <https://html.spec.whatwg.org/multipage/#selector-default>
|
||||
const IN_DEFAULT_STATE = 1 << 31;
|
||||
/// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-submit-invalid
|
||||
|
|
|
@ -79,8 +79,8 @@ macro_rules! apply_non_ts_list {
|
|||
("out-of-range", OutOfRange, IN_OUTOFRANGE_STATE, _),
|
||||
("default", Default, IN_DEFAULT_STATE, _),
|
||||
("placeholder-shown", PlaceholderShown, IN_PLACEHOLDER_SHOWN_STATE, _),
|
||||
("-moz-read-only", MozReadOnly, IN_MOZ_READONLY_STATE, _),
|
||||
("-moz-read-write", MozReadWrite, IN_MOZ_READWRITE_STATE, _),
|
||||
("read-only", ReadOnly, IN_READONLY_STATE, _),
|
||||
("read-write", ReadWrite, IN_READWRITE_STATE, _),
|
||||
("-moz-submit-invalid", MozSubmitInvalid, IN_MOZ_SUBMITINVALID_STATE, _),
|
||||
("-moz-ui-valid", MozUIValid, IN_MOZ_UI_VALID_STATE, _),
|
||||
("-moz-ui-invalid", MozUIInvalid, IN_MOZ_UI_INVALID_STATE, _),
|
||||
|
|
|
@ -119,6 +119,8 @@ impl NonTSPseudoClass {
|
|||
match_ignore_ascii_case! { &name,
|
||||
$($css => Some(NonTSPseudoClass::$name),)*
|
||||
"-moz-full-screen" => Some(NonTSPseudoClass::Fullscreen),
|
||||
"-moz-read-only" => Some(NonTSPseudoClass::ReadOnly),
|
||||
"-moz-read-write" => Some(NonTSPseudoClass::ReadWrite),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2037,8 +2037,8 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
|||
NonTSPseudoClass::MozHandlerCrashed |
|
||||
NonTSPseudoClass::Required |
|
||||
NonTSPseudoClass::Optional |
|
||||
NonTSPseudoClass::MozReadOnly |
|
||||
NonTSPseudoClass::MozReadWrite |
|
||||
NonTSPseudoClass::ReadOnly |
|
||||
NonTSPseudoClass::ReadWrite |
|
||||
NonTSPseudoClass::FocusWithin |
|
||||
NonTSPseudoClass::FocusVisible |
|
||||
NonTSPseudoClass::MozDragOver |
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[selector-read-write-type-change-002.html]
|
||||
expected: FAIL
|
||||
bug: 312971
|
|
@ -1,67 +0,0 @@
|
|||
[readwrite-readonly.html]
|
||||
[The :read-write pseudo-class must match input elements to which the readonly attribute applies, and that are mutable]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must not match input elements to which the readonly attribute applies, and that are mutable]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must not match input elements after the readonly attribute has been added]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must match input elements after the readonly attribute has been added]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must not match input elements after the readonly attribute has been removed]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must match input elements after the readonly attribute has been removed]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must match textarea elements that do not have a readonly attribute, and that are not disabled]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must match textarea elements that have a readonly attribute, or that are disabled]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must match textarea elements after the readonly attribute has been added]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must match textarea elements after the readonly attribute has been added]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must not match textarea elements that are disabled]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must match textarea elements that are disabled]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must match elements that are editable]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must not match elements that are editable]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must match elements that are editing hosts]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must not match elements that are editing hosts]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must not match input elements to which the readonly attribute does not apply]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must match input elements to which the readonly attribute does not apply]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must match input elements after the disabled attribute has been added]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-only pseudo-class must not match input elements after the disabled attribute has been removed]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must not match input elements after the disabled attribute has been added]
|
||||
expected: FAIL
|
||||
|
||||
[The :read-write pseudo-class must match input elements after the disabled attribute has been removed]
|
||||
expected: FAIL
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
}
|
||||
|
||||
/* disable scrolling in contenteditable */
|
||||
:host(:-moz-read-write) .horizontalOuterDiv,
|
||||
:host(:-moz-read-write) .verticalInnerDiv {
|
||||
:host(:read-write) .horizontalOuterDiv,
|
||||
:host(:read-write) .verticalInnerDiv {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче