mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 19:47:32 +09:00
Bug 1365092 - Move side effects of SetAttr and ParseAttribute to BeforeSetAttr and AfterSetAttr
* Moves side effects of nsGenericHTMLElement and Element's SetAttr, UnsetAttr, and ParseAttribute functions to the corresponding BeforeSetAttr and AfterSetAttr functions * Moves side effects of HTMLAnchorElement's SetAttr, UnsetAttr, and ParseAttribute functions to the corresponding BeforeSetAttr and AfterSetAttr functions * Moves side effects of HTMLImageElement's SetAttr function to the corresponding BeforeSetAttr and AfterSetAttr functions * Moves side effects of SetAttr, UnsetAttr, and ParseAttribute functions to BeforeSetAttr and AfterSetAttr Tag #1375
This commit is contained in:
parent
9d8343e19c
commit
6aa436b588
41 changed files with 983 additions and 956 deletions
|
|
@ -40,7 +40,6 @@ nsStyledElement::ParseAttribute(int32_t aNamespaceID,
|
|||
nsAttrValue& aResult)
|
||||
{
|
||||
if (aAttribute == nsGkAtoms::style && aNamespaceID == kNameSpaceID_None) {
|
||||
SetMayHaveStyle();
|
||||
ParseStyleAttribute(aValue, aResult, false);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -49,6 +48,22 @@ nsStyledElement::ParseAttribute(int32_t aNamespaceID,
|
|||
aResult);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsStyledElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
const nsAttrValueOrString* aValue, bool aNotify)
|
||||
{
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
if (aName == nsGkAtoms::style) {
|
||||
if (aValue) {
|
||||
SetMayHaveStyle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nsStyledElementBase::BeforeSetAttr(aNamespaceID, aName, aValue,
|
||||
aNotify);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsStyledElement::SetInlineStyleDeclaration(DeclarationBlock* aDeclaration,
|
||||
const nsAString* aSerialized,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue