mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Unprefix -moz-read-write / -moz-read-only
This commit is contained in:
parent
e4630ce481
commit
4cc014cb6b
25 changed files with 75 additions and 75 deletions
|
|
@ -201,8 +201,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
|
||||
|
|
@ -288,11 +287,11 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ public:
|
|||
#ifdef MOZILLA_INTERNAL_API
|
||||
explicit Element(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo) :
|
||||
FragmentOrElement(aNodeInfo),
|
||||
mState(NS_EVENT_STATE_MOZ_READONLY)
|
||||
mState(NS_EVENT_STATE_READONLY)
|
||||
{
|
||||
MOZ_ASSERT(mNodeInfo->NodeType() == nsIDOMNode::ELEMENT_NODE,
|
||||
"Bad NodeType in aNodeInfo");
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,11 +205,10 @@ private:
|
|||
#define NS_EVENT_STATE_INRANGE NS_DEFINE_EVENT_STATE_MACRO(15)
|
||||
// Content value is out-of-range.
|
||||
#define NS_EVENT_STATE_OUTOFRANGE NS_DEFINE_EVENT_STATE_MACRO(16)
|
||||
// These two are temporary (see bug 302188)
|
||||
// Content is read-only.
|
||||
#define NS_EVENT_STATE_MOZ_READONLY NS_DEFINE_EVENT_STATE_MACRO(17)
|
||||
#define NS_EVENT_STATE_READONLY NS_DEFINE_EVENT_STATE_MACRO(17)
|
||||
// Content is editable.
|
||||
#define NS_EVENT_STATE_MOZ_READWRITE NS_DEFINE_EVENT_STATE_MACRO(18)
|
||||
#define NS_EVENT_STATE_READWRITE NS_DEFINE_EVENT_STATE_MACRO(18)
|
||||
// Content is the default one (meaning depends of the context).
|
||||
#define NS_EVENT_STATE_DEFAULT NS_DEFINE_EVENT_STATE_MACRO(19)
|
||||
// Content could not be rendered (image/object/etc).
|
||||
|
|
|
|||
|
|
@ -1608,7 +1608,7 @@ 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;
|
||||
|
|
|
|||
|
|
@ -2198,13 +2198,13 @@ nsGenericHTMLFormElement::IntrinsicState() const
|
|||
}
|
||||
|
||||
// Make the text controls read-write
|
||||
if (!state.HasState(NS_EVENT_STATE_MOZ_READWRITE) &&
|
||||
if (!state.HasState(NS_EVENT_STATE_READWRITE) &&
|
||||
IsTextOrNumberControl(/*aExcludePassword*/ false)) {
|
||||
bool roState = GetBoolAttr(nsGkAtoms::readonly);
|
||||
|
||||
if (!roState) {
|
||||
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"));
|
||||
let readonly = [].slice.call(document.querySelectorAll("input:read-only"));
|
||||
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");
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ nsXULElement::nsXULElement(already_AddRefed<mozilla::dom::NodeInfo> aNodeInfo)
|
|||
|
||||
// We may be READWRITE by default; check.
|
||||
if (IsReadWriteTextElement()) {
|
||||
AddStatesSilently(NS_EVENT_STATE_MOZ_READWRITE);
|
||||
RemoveStatesSilently(NS_EVENT_STATE_MOZ_READONLY);
|
||||
AddStatesSilently(NS_EVENT_STATE_READWRITE);
|
||||
RemoveStatesSilently(NS_EVENT_STATE_READONLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1855,8 +1855,8 @@ nsXULElement::IntrinsicState() const
|
|||
EventStates state = nsStyledElement::IntrinsicState();
|
||||
|
||||
if (IsReadWriteTextElement()) {
|
||||
state |= NS_EVENT_STATE_MOZ_READWRITE;
|
||||
state &= ~NS_EVENT_STATE_MOZ_READONLY;
|
||||
state |= NS_EVENT_STATE_READWRITE;
|
||||
state &= ~NS_EVENT_STATE_READONLY;
|
||||
}
|
||||
|
||||
return state;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue