[webkit-reviews] review denied: [Bug 5578] WebKit does not support DOM Level 3 setIsId and isId : [Attachment 42779] fix performance issue; pass related test cases

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 9 16:14:35 PST 2009


Darin Adler <darin at apple.com> has denied Chang Shu <Chang.Shu at nokia.com>'s
request for review:
Bug 5578: WebKit does not support DOM Level 3 setIsId and isId
https://bugs.webkit.org/show_bug.cgi?id=5578

Attachment 42779: fix performance issue; pass related test cases
https://bugs.webkit.org/attachment.cgi?id=42779&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
(In reply to comment #19)
> So far I see the existing test cases are pretty comprehensive

That is not so.

The existing test cases don't even cover using getElementById after using
setIdAttribute on an element. Nor do they cover any of the other indirect
effects of having an id. The setIdAttribute function can change what the value
of the id attribute is by changing its name from an attribute with one value to
an attribute with another, so that function needs to trigger the work that
StyledElement::parseMappedAttribute does as well as all the same work that
Element::updateId does. You need test cases that cover the actual use of
elements by id, including things like CSS styling, which works by id,
getElementById, and you need to test cases where multiple elements have the
same id as well as where exactly one element has the id or zero elements have
it. And vary the order. The getElementById function must always return the
first element in the document in document order. Even if the node is moved to a
different place in the document.

Here are a few things that work by id that should be tested:

    - getElementById
    - CSS styling with a selector that specifies an id like this: #elementid
    - node lists, which can be indexed by an id like this list["elementid"],
for example: document.getElementsByTagName("a")["elementid"]
    - SVG <use> elements

I found these by searching for clients of getIDAttribute and hasID and then
figuring out how these clients in turn were used.


More information about the webkit-reviews mailing list