Bug 122640

Summary: Do a bit of optimization and cleanup in the HTMLElement class
Product: WebKit Reporter: Darin Adler <darin>
Component: DOMAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, eflews.bot, esprehn+autocc, gtk-ews, gyuyoung.kim, kling, philn, rniwa, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch kling: review+, kling: commit-queue-

Darin Adler
Reported 2013-10-10 23:30:32 PDT
Do a bit of optimization and cleanup in the HTMLElement class
Attachments
Patch (21.94 KB, patch)
2013-10-10 23:36 PDT, Darin Adler
kling: review+
kling: commit-queue-
Darin Adler
Comment 1 2013-10-10 23:36:57 PDT
Andreas Kling
Comment 2 2013-10-10 23:46:27 PDT
Comment on attachment 213970 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213970&action=review r=me > Source/WebCore/html/HTMLElement.cpp:375 > + RefPtr<Text> textNode = &node; > RefPtr<Text> textNext = toText(next); These two could be Ref<Text> to skip some null checks. > Source/WebCore/html/HTMLElement.cpp:740 > - if (equalIgnoringCase(value, "yes") || equalIgnoringCase(value, "")) > + if (equalIgnoringCase(value, "yes") || value.isEmpty()) Looks like we need isEmptyIgnoringCase(). ;) > Source/WebCore/html/HTMLElement.cpp:752 > + for (const Element* element = this; element; element = element->parentElement()) { > + if (!element->isHTMLElement()) > + continue; This would look slightly nicer as a loop over ancestorsOfType<HTMLElement>(this).
EFL EWS Bot
Comment 3 2013-10-10 23:46:56 PDT
Andreas Kling
Comment 4 2013-10-10 23:48:18 PDT
Dang, I didn't spot the bogus "string->parsedLength()" calls.
EFL EWS Bot
Comment 5 2013-10-10 23:50:22 PDT
Build Bot
Comment 6 2013-10-11 00:03:44 PDT
Build Bot
Comment 7 2013-10-11 00:14:22 PDT
Build Bot
Comment 8 2013-10-11 00:22:08 PDT
kov's GTK+ EWS bot
Comment 9 2013-10-11 00:34:05 PDT
Darin Adler
Comment 10 2013-10-11 08:05:38 PDT
Note You need to log in before you can comment on or make changes to this bug.