Open Bug 278737 Opened 21 years ago Updated 3 years ago

Investigate removing nsIContent::GetExistingAttrNameFromQName

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: sicking, Unassigned)

Details

The only two clients of that function are nsDOMAttributeMap and the xul persist code (in nsXULDocument::Persist and nsXULContentBuilder::AddPersistentAttributes). GetExistingAttrNameFromQName is mostly a convinience function and a speed optimization, so it might very well be possible to remove it. nsDOMAttributeMap is surly not performance critical, and the Persist code might not be either. If we do remove this function we should remove the one-slot nsNodeInfo cache as well since this should be the only situation where we create temporary nsNodeInfos.
An alternative to the function could be a helperfunction in nsContentUtils. The advantage of having some sort of helping function around is that it makes it easier to support namespaced attributes properly in various places.
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
Assignee: general → nobody
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5

Element::GetExistingAttrNameFromQName, as it is these days, is indeed a bit odd.
It returns a nodeinfo, yet the method name hints about AttrName.

(AttrArray::GetExistingAttrNameFromQName does what one would expect it to do.)

So, still a valid bug.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.