[webkit-reviews] review requested: [Bug 36168] Spatial Navigation: Code simplification in FocusController.cpp and SpatialNavigation.cpp : [Attachment 51285] patch_2 - v1 - code simplification

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 22 07:48:51 PDT 2010


Antonio Gomes (tonikitoo) <tonikitoo at webkit.org> has asked  for review:
Bug 36168: Spatial Navigation: Code simplification in FocusController.cpp and
SpatialNavigation.cpp
https://bugs.webkit.org/show_bug.cgi?id=36168

Attachment 51285: patch_2 - v1 - code simplification
https://bugs.webkit.org/attachment.cgi?id=51285&action=review

------- Additional Comments from Antonio Gomes (tonikitoo)
<tonikitoo at webkit.org>
I will try to help reviewers to understand the refactory going on here, by
pointing out that is just code moving around, so one does not need to
understand the code completely and in all its details to review it.

--> In the first chunk of the patch: it is code moving from distanceForNode to
updateFocusCandidateIfCloser
+    bool sameDocument = candidate.document() == closest.document();
(...)

--> In the 2nd chunk, code is not being removed but moving down to the same
method body, 
    with different variable names.
-    // If |focusedNode| and |candidate| are in the same document AND
(...)


--> In the 3rd chunk: it is also about code moving from distanceForNode to
updateFocusCandidateIfCloser
+    if (candidate.alignment != None
(...)


--> the last big chunck in distanceInDirection: is not a sonely code removal.
It was moved to updateFocusCandidateIfCloser
-    RectsAlignment alignment = alignmentForRects(direction, curRect,
targetRect);
(...)


More information about the webkit-reviews mailing list