Bug 122696 - Generate tighter isFooElement() functions for HTML elements.
Summary: Generate tighter isFooElement() functions for HTML elements.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-12 10:44 PDT by Andreas Kling
Modified: 2013-10-12 11:25 PDT (History)
8 users (show)

See Also:


Attachments
Patch (4.54 KB, patch)
2013-10-12 10:46 PDT, Andreas Kling
koivisto: review+
eflews.bot: commit-queue-
Details | Formatted Diff | Diff
For the land (4.54 KB, patch)
2013-10-12 10:57 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2013-10-12 10:44:37 PDT
We shouldn't have to do a full QName compare for HTML elements.
Comment 1 Andreas Kling 2013-10-12 10:46:42 PDT
Example:

class HTMLAnchorElement;
inline bool isHTMLAnchorElement(const HTMLElement& element) { return element.hasLocalName(HTMLNames::aTag); }
inline bool isHTMLAnchorElement(const HTMLElement* element) { return isHTMLAnchorElement(*element); }
inline bool isHTMLAnchorElement(const Node& node) { return node.isHTMLElement() && isHTMLAnchorElement(toHTMLElement(node)); }
inline bool isHTMLAnchorElement(const Node* node) { ASSERT(node); return isHTMLAnchorElement(*node); }
template <> inline bool isElementOfType<HTMLAnchorElement>(const HTMLElement* element) { return isHTMLAnchorElement(element); }
template <> inline bool isElementOfType<HTMLAnchorElement>(const Element* element) { return isHTMLAnchorElement(element); }
Comment 2 Andreas Kling 2013-10-12 10:46:54 PDT
Created attachment 214058 [details]
Patch
Comment 3 EFL EWS Bot 2013-10-12 10:52:59 PDT
Comment on attachment 214058 [details]
Patch

Attachment 214058 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/3980004
Comment 4 EFL EWS Bot 2013-10-12 10:54:42 PDT
Comment on attachment 214058 [details]
Patch

Attachment 214058 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/3976004
Comment 5 kov's GTK+ EWS bot 2013-10-12 10:57:13 PDT
Comment on attachment 214058 [details]
Patch

Attachment 214058 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/3914010
Comment 6 Andreas Kling 2013-10-12 10:57:15 PDT
Created attachment 214059 [details]
For the land
Comment 7 WebKit Commit Bot 2013-10-12 11:25:14 PDT
Comment on attachment 214059 [details]
For the land

Clearing flags on attachment: 214059

Committed r157343: <http://trac.webkit.org/changeset/157343>
Comment 8 WebKit Commit Bot 2013-10-12 11:25:17 PDT
All reviewed patches have been landed.  Closing bug.