[Webkit-unassigned] [Bug 71510] [Microdata] LayoutTests/fast/dom/MicroData/itemid-attribute-test.html assertion failure in Element::getURLAttribute()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 4 09:41:07 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=71510


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #113652|review?                     |review-
               Flag|                            |




--- Comment #4 from Darin Adler <darin at apple.com>  2011-11-04 09:41:07 PST ---
(From update of attachment 113652)
View in context: https://bugs.webkit.org/attachment.cgi?id=113652&action=review

This is the wrong way to do it. We don’t want to put an #if into all these places that are not microdata-related.

And we need to add a new test that covers all these different types of elements. The existing test does not cover enough.

> Source/WebCore/html/HTMLAnchorElement.cpp:244
> +#if ENABLE(MICRODATA)
> +    return attr->name() == hrefAttr || attr->name() == itemidAttr;
> +#else
>      return attr->name() == hrefAttr;
> +#endif

This code should say:

    return attr->name() == hrefAttr || HTMLElement::isURLAttribute(attr);

Since HTMLAnchorElement’s immediate base class is HTMLElement.

No #if.

Same for all the other functions, but please make sure to use the appropriate base class and not just call straight to HTMLElement each time.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list