mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 388422 - Avoid checks for editability in BindToTree, r+sr=peterv
--HG-- extra : rebase_source : 06eae0083f9b620e6a7ee2fe63a22c974b29608c
This commit is contained in:
parent
a887393a34
commit
6541f33eec
@ -143,8 +143,11 @@ enum {
|
||||
NODE_HAS_EDGE_CHILD_SELECTOR |
|
||||
NODE_HAS_SLOW_SELECTOR_NOAPPEND,
|
||||
|
||||
NODE_MAY_HAVE_CONTENT_EDITABLE_ATTR
|
||||
= 0x00040000U,
|
||||
|
||||
// Four bits for the script-type ID
|
||||
NODE_SCRIPT_TYPE_OFFSET = 18,
|
||||
NODE_SCRIPT_TYPE_OFFSET = 19,
|
||||
|
||||
NODE_SCRIPT_TYPE_SIZE = 4,
|
||||
|
||||
|
@ -1114,6 +1114,7 @@ nsGenericHTMLElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||
PRInt32 change;
|
||||
if (contentEditable) {
|
||||
change = GetContentEditableValue() == eTrue ? -1 : 0;
|
||||
SetFlags(NODE_MAY_HAVE_CONTENT_EDITABLE_ATTR);
|
||||
}
|
||||
|
||||
nsresult rv = nsGenericElement::SetAttr(aNameSpaceID, aName, aPrefix, aValue,
|
||||
|
@ -753,6 +753,9 @@ protected:
|
||||
static const nsIContent::AttrValuesArray values[] =
|
||||
{ &nsGkAtoms::_false, &nsGkAtoms::_true, &nsGkAtoms::_empty, nsnull };
|
||||
|
||||
if (!HasFlag(NODE_MAY_HAVE_CONTENT_EDITABLE_ATTR))
|
||||
return eInherit;
|
||||
|
||||
PRInt32 value = FindAttrValueIn(kNameSpaceID_None,
|
||||
nsGkAtoms::contenteditable, values,
|
||||
eIgnoreCase);
|
||||
|
Loading…
Reference in New Issue
Block a user