mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 629200 part 4 - Tidy up bool parameters to make them easier to read; r=bz
This commit is contained in:
parent
c0c319ccbe
commit
8b808c4c87
@ -4945,7 +4945,7 @@ nsGenericElement::SetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
|
||||
|
||||
return SetAttrAndNotify(aNamespaceID, aName, aPrefix, oldValue,
|
||||
attrValue, modType, hasListeners, aNotify,
|
||||
true);
|
||||
kCallAfterSetAttr);
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -4981,7 +4981,7 @@ nsGenericElement::SetParsedAttr(PRInt32 aNamespaceID, nsIAtom* aName,
|
||||
|
||||
return SetAttrAndNotify(aNamespaceID, aName, aPrefix, oldValue,
|
||||
aParsedValue, modType, hasListeners, aNotify,
|
||||
true);
|
||||
kCallAfterSetAttr);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -633,6 +633,17 @@ public:
|
||||
static void MarkUserDataHandler(void* aObject, nsIAtom* aKey, void* aChild,
|
||||
void* aData);
|
||||
protected:
|
||||
/*
|
||||
* Named-bools for use with SetAttrAndNotify to make call sites easier to
|
||||
* read.
|
||||
*/
|
||||
static const bool kFireMutationEvent = true;
|
||||
static const bool kDontFireMutationEvent = false;
|
||||
static const bool kNotifyDocumentObservers = true;
|
||||
static const bool kDontNotifyDocumentObservers = false;
|
||||
static const bool kCallAfterSetAttr = true;
|
||||
static const bool kDontCallAfterSetAttr = false;
|
||||
|
||||
/**
|
||||
* Set attribute and (if needed) notify documentobservers and fire off
|
||||
* mutation events. This will send the AttributeChanged notification.
|
||||
@ -640,6 +651,9 @@ protected:
|
||||
* since that needs to happen before the new attr value has been set, and
|
||||
* in particular before it has been parsed.
|
||||
*
|
||||
* For the boolean parameters, consider using the named bools above to aid
|
||||
* code readability.
|
||||
*
|
||||
* @param aNamespaceID namespace of attribute
|
||||
* @param aAttribute local-name of attribute
|
||||
* @param aPrefix aPrefix of attribute
|
||||
|
@ -202,7 +202,7 @@ nsStyledElementNotElementCSSInlineStyle::SetInlineStyleRule(css::StyleRule* aSty
|
||||
|
||||
return SetAttrAndNotify(kNameSpaceID_None, nsGkAtoms::style, nsnull,
|
||||
oldValue, attrValue, modType, hasListeners,
|
||||
aNotify, false);
|
||||
aNotify, kDontCallAfterSetAttr);
|
||||
}
|
||||
|
||||
css::StyleRule*
|
||||
|
Loading…
Reference in New Issue
Block a user