Convert attributes to nsIAtom* in editing code

NEW
Unassigned

Status

()

--
enhancement
6 years ago
6 years ago

People

(Reporter: ayg, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Random representative example:

nsresult
nsHTMLCSSUtils::RemoveCSSEquivalentToHTMLStyle(nsIDOMNode * aNode,
                                               nsIAtom *aHTMLProperty,
                                               const nsAString *aAttribute,
                                               const nsAString *aValue,
                                               bool aSuppressTransaction)

aAttribute here should be nsIAtom*, because there are only a limited set of attributes we care about and we already have them as nsEditProperty members.  Of course, there are a zillion methods that use this calling convention, so fixing this would require

1) changing all the method signatures,

2) changing all ->EqualsLiteral() to equality comparisons,

3) (preferably) getting rid of all the now-redundant "aAttribute &&" checks,

4) fixing all callers once you get to the root of whatever calls all this stuff to start with (editor/composer/?),

5) making sure comm-central didn't break.

Conceivably this could be done incrementally by overloading methods to accept either, starting with leaf methods like IsCSSEditableProperty.  But it might be simplest to just do it all at once.

Interested, Ms2ger?  :)
You need to log in before you can comment on or make changes to this bug.