mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 711862 - Do not process the node itself in nsHTMLEditor::RemoveStyleInside if the caller requests only children to be modified; r=ehsan
This commit is contained in:
parent
ec3a2c158e
commit
7bf0363244
@ -800,19 +800,17 @@ nsresult nsHTMLEditor::RemoveStyleInside(nsIDOMNode *aNode,
|
||||
}
|
||||
|
||||
// then process the node itself
|
||||
if (
|
||||
(!aChildrenOnly &&
|
||||
(
|
||||
// node is prop we asked for
|
||||
(aProperty && NodeIsType(aNode, aProperty)) ||
|
||||
// but check for link (<a href=...)
|
||||
(aProperty == nsEditProperty::href && nsHTMLEditUtils::IsLink(aNode)) ||
|
||||
// and for named anchors
|
||||
(aProperty == nsEditProperty::name && nsHTMLEditUtils::IsNamedAnchor(aNode))
|
||||
)
|
||||
) ||
|
||||
// or node is any prop and we asked for that
|
||||
(!aProperty && NodeIsProperty(aNode))
|
||||
if (!aChildrenOnly &&
|
||||
(
|
||||
// node is prop we asked for
|
||||
(aProperty && NodeIsType(aNode, aProperty)) ||
|
||||
// but check for link (<a href=...)
|
||||
(aProperty == nsEditProperty::href && nsHTMLEditUtils::IsLink(aNode)) ||
|
||||
// and for named anchors
|
||||
(aProperty == nsEditProperty::name && nsHTMLEditUtils::IsNamedAnchor(aNode)) ||
|
||||
// or node is any prop and we asked for that
|
||||
(!aProperty && NodeIsProperty(aNode))
|
||||
)
|
||||
) {
|
||||
// if we weren't passed an attribute, then we want to
|
||||
// remove any matching inlinestyles entirely
|
||||
|
Loading…
Reference in New Issue
Block a user