Bug 37634 - Spatial Navigation: remove unnecessery assignment in updateFocusCandidateIfCloser method
Summary: Spatial Navigation: remove unnecessery assignment in updateFocusCandidateIfCl...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Antonio Gomes
Depends on: 18662
Blocks: 35874
  Show dependency treegraph
Reported: 2010-04-14 21:01 PDT by Antonio Gomes
Modified: 2010-04-15 12:43 PDT (History)
2 users (show)

See Also:

(committed: r57662) patch v1 (2.13 KB, patch)
2010-04-14 21:06 PDT, Antonio Gomes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2010-04-14 21:01:20 PDT
in the quoted code below, the assignment line is not needed any more after bug 36168 (patch 51940) landed.

@@ -364,8 +364,6 @@ static void updateFocusCandidateIfCloser(Node* focusedNode, const FocusCandidate
         if (closest.alignment < candidate.alignment
          && closest.parentAlignment < candidate.alignment)
             closest.distance = maxDistance();
-        closest.alignment = candidate.alignment;

reason, all assignment takes place lines below in the same method, and not class member by class member.

in other words, now instead of:

closest.alignment = candidate.alignment, 

we have

closest = candidate

later on in the same method.
Comment 1 Antonio Gomes 2010-04-14 21:06:16 PDT
Created attachment 53404 [details]
(committed: r57662) patch v1
Comment 2 Antonio Gomes 2010-04-15 12:42:27 PDT
Comment on attachment 53404 [details]
(committed: r57662) patch v1

Clearing flags on attachment: 53434

Committed r57662: <http://trac.webkit.org/changeset/57662>
Comment 3 Antonio Gomes 2010-04-15 12:43:20 PDT
Thank you Simon Fraser!