Bug 74371 - Need data on whether we can implement DOM4 attribute objects
Summary: Need data on whether we can implement DOM4 attribute objects
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 17:00 PST by Ojan Vafai
Modified: 2023-12-29 03:05 PST (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2011-12-12 17:00:01 PST
DOM4 considerably simplifies Attrs (http://www.w3.org/TR/domcore/#interface-attr). DOM2 has them be full-fledged Nodes. We need data on how safe implementing DOM4's version will be. 

If someone instruments Node to log to Chromium histograms everytime an API is used on an Attr, then we can get data and make informed decisions. 

The new API is 1000x better, so the more of it we can implement the better. The parts we're worried about implementing should be brought up on www-dom@.
Comment 1 Alexey Proskuryakov 2011-12-13 11:11:39 PST
> The new API is 1000x better

For completeness, could you explain some ways in which it is better?
Comment 2 Ojan Vafai 2011-12-13 11:26:01 PST
The main difference is that they are not Nodes anymore. They are (hopefully) just the minimal interface required by web compat. This makes Attrs a lot lighter-weight (e.g. don't need to have member variables for child nodes) and gets rid of non-sensical APIs (e.g. appendChild to an Attr).

In terms of WebCore implementation, it may eventually allow us to remove the distinction between Attrs and Attributes.
Comment 3 Alexey Proskuryakov 2011-12-16 16:05:21 PST
One place where attribute nodes are particularly visible in the platform is XPath.
Comment 4 Anne van Kesteren 2023-12-29 03:05:03 PST
This is more or less complete now. Any further improvements should have more detailed bugs.