Changeset 56311 in webkit
- Timestamp:
- Mar 20, 2010 3:20:12 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56309 r56311 1 2010-03-20 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Kenneth Christiansen. 4 Patch by Antonio Gomes <tonikitoo@webkit.org> 5 6 Spatial Navigation: Code simplification in FocusController.cpp and SpatialNavigation.cpp (part I) 7 https://bugs.webkit.org/show_bug.cgi?id=36168 8 9 Make use of isNull and document methods introduced in FocusCandidate class by patch in bug 36167. 10 No functionalty change. 11 12 * page/FocusController.cpp: 13 (WebCore::updateFocusCandidateIfCloser): 14 * page/SpatialNavigation.cpp: 15 (WebCore::distanceInDirection): 16 1 17 2010-03-20 Kevin Ollivier <kevino@theolliviers.com> 2 18 -
trunk/WebCore/page/FocusController.cpp
r56057 r56311 362 362 // |focusedNode|. 363 363 if (!((isInRootDocument(candidate) && !isInRootDocument(focusedNode)) 364 && closestFocusCandidate.node 365 && focusedNode->document() == closestFocusCandidate.node->document())) { 364 && focusedNode->document() == closestFocusCandidate.document())) { 366 365 closestFocusCandidate.node = candidate; 367 366 closestFocusCandidate.distance = distance; -
trunk/WebCore/page/SpatialNavigation.cpp
r56057 r56311 77 77 RectsAlignment alignment = alignmentForRects(direction, curRect, targetRect); 78 78 79 bool sameDocument = candidate.node && dest->document() == candidate.node->document();79 bool sameDocument = dest->document() == candidate.document(); 80 80 if (sameDocument) { 81 81 if (candidate.alignment > alignment || (candidate.parentAlignment && alignment > candidate.parentAlignment)) … … 86 86 // FIXME_tonikitoo: simplify the logic here ! 87 87 if (alignment != None 88 || (candidate.node && candidate.parentAlignment >= alignment 89 && (candidate.node->document() == dest->document()) 90 && alignment > None)) { 88 || (!candidate.isNull() && candidate.parentAlignment >= alignment 89 && candidate.document() == dest->document())) { 91 90 92 91 // If we are now in an higher precedent case, lets reset the current |candidate|'s
Note: See TracChangeset
for help on using the changeset viewer.