Closed Bug 357007 Opened 18 years ago Closed 2 years ago

a bit better handling for namespaced attributes

Categories

(Core :: CSS Parsing and Computation, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(1 file)

The namespace of the attributes isn't handled for example in HasAttributeDependentStyle.
I'd like to change this, so that implementing xml:id and
DOM 3 setIdAttribute* efficiently would be a bit simpler.
Basically just adding PRInt32 aNamespaceID parameter to few methods and
using it whenever using aAttribute parameter too.
The changes to nsCSSFrameConstructor.cpp fixes two other cases when namespaced attributes might not be handled properly.
Attachment #242541 - Flags: review?(bzbarsky)
HasAttributeDependentStyle is just an optimization.  Are there really enough cases where pages use multiple attributes of the same name to make the extra code worthwhile?
smaug, I have no idea when I would be able to get to this review.  :(
I'll make some tests to see how much this improves the performance when there are multiple IDs.
QA Contact: ian → style-system
Smaug, got any test results here?
I included this as a part of the current xml:id patch.
namespaces are needed there anyway and calls like GetIDAttributeName will be
namespace aware.
Attachment #242541 - Flags: review?(bzbarsky)
Want to mark the dep?
Depends on: 275196

This was for xml:id, I think, and that was removed.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: