Bug 122067 - Add first()/last() to ElementIteratorAdapters
Summary: Add first()/last() to ElementIteratorAdapters
Status: RESOLVED FIXED
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: 2013-09-28 12:57 PDT by Antti Koivisto
Modified: 2013-09-28 13:20 PDT (History)
0 users

See Also:


Attachments
patch (14.80 KB, patch)
2013-09-28 13:02 PDT, Antti Koivisto
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2013-09-28 12:57:28 PDT
Add a convenient way for getting the first and last element if it exists.
Comment 1 Antti Koivisto 2013-09-28 13:02:26 PDT
Created attachment 212906 [details]
patch
Comment 2 Darin Adler 2013-09-28 13:04:13 PDT
Comment on attachment 212906 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=212906&action=review

> Source/WebCore/svg/SVGElement.cpp:957
> +    return firstTitle ? const_cast<SVGTitleElement*>(firstTitle)->innerText() : String();

Lame that this const_cast is needed.
Comment 3 Antti Koivisto 2013-09-28 13:20:02 PDT
https://trac.webkit.org/r156612