Bug 61839

Summary: Refactor functions related with focus in WebCore::Document
Product: WebKit Reporter: Hayato Ito <hayato>
Component: DOMAssignee: Hayato Ito <hayato>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, dominicc, morrita, rolandsteiner
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 61410    
Attachments:
Description Flags
move focus related functions from Document to FocusController tkent: review+

Description Hayato Ito 2011-06-01 00:36:00 PDT
This is a separated patch form bug 61410, containing only a refactoring part.
Comment 1 Hayato Ito 2011-06-01 00:40:14 PDT
Created attachment 95558 [details]
move focus related functions from Document to FocusController
Comment 2 Kent Tamura 2011-06-01 01:01:53 PDT
Comment on attachment 95558 [details]
move focus related functions from Document to FocusController

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

> Source/WebCore/page/FocusController.cpp:312
> +    for (Node* n = start; n; n = n->traverseNextNode())

nit: Should avoid 1-letter variable name.

> Source/WebCore/page/FocusController.cpp:332
> +    int winningTabIndex = SHRT_MAX + 1;

nit: Because this is C++, we had better use numeric_limits<short> instead of SHRT_MAX.

> Source/WebCore/page/FocusController.h:79
> +    /**

nit: We usually use '//' for comments.
Comment 3 Hayato Ito 2011-06-01 02:03:02 PDT
Thank you for the review. I'll land this patch after addressing the review comments.

(In reply to comment #2)
> (From update of attachment 95558 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=95558&action=review
> 
> > Source/WebCore/page/FocusController.cpp:312
> > +    for (Node* n = start; n; n = n->traverseNextNode())
> 
> nit: Should avoid 1-letter variable name.
> 
> > Source/WebCore/page/FocusController.cpp:332
> > +    int winningTabIndex = SHRT_MAX + 1;
> 
> nit: Because this is C++, we had better use numeric_limits<short> instead of SHRT_MAX.
> 
> > Source/WebCore/page/FocusController.h:79
> > +    /**
> 
> nit: We usually use '//' for comments.
Comment 4 Hayato Ito 2011-06-01 19:24:11 PDT
Committed r87874: <http://trac.webkit.org/changeset/87874>