Bug 130573

Summary: [WK2] Refine WebKit2 BatteryStatus code
Product: WebKit Reporter: Jinwoo Song <jinwoo7.song>
Component: WebKit Misc.Assignee: Jinwoo Song <jinwoo7.song>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, gyuyoung.kim, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Jinwoo Song 2014-03-21 02:16:01 PDT
Refinements
 - Return PassRef instead of PassRefPtr in create methods
 - Use auto instead of iterator
Comment 1 Jinwoo Song 2014-03-21 02:44:51 PDT
Created attachment 227405 [details]
Patch
Comment 2 Anders Carlsson 2014-03-23 08:18:36 PDT
Comment on attachment 227405 [details]
Patch

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

> Source/WebKit2/WebProcess/Battery/WebBatteryManager.cpp:80
> +    for (auto it = m_pageSet.begin(), end = m_pageSet.end(); it != end; ++it) {

This can just use the range for syntax, 

for (auto* page : m_pageSet)

> Source/WebKit2/WebProcess/Battery/WebBatteryManager.cpp:91
> +    for (auto it = m_pageSet.begin(), end = m_pageSet.end(); it != end; ++it) {

Ditto.
Comment 3 Jinwoo Song 2014-03-23 21:00:35 PDT
Created attachment 227621 [details]
Patch

Applied Andersca's comments.
Comment 4 WebKit Commit Bot 2014-03-23 21:38:22 PDT
Comment on attachment 227621 [details]
Patch

Clearing flags on attachment: 227621

Committed r166148: <http://trac.webkit.org/changeset/166148>
Comment 5 WebKit Commit Bot 2014-03-23 21:38:26 PDT
All reviewed patches have been landed.  Closing bug.