Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: Source/core/page/FocusController.cpp

Issue 1010203002: Avoid computing navigation data for nodes in the wrong navigation direction (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/page/SpatialNavigation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 if (element == focusedElement) 879 if (element == focusedElement)
880 continue; 880 continue;
881 881
882 if (!element->isKeyboardFocusable() && !element->isFrameOwnerElement() & & !canScrollInDirection(element, type)) 882 if (!element->isKeyboardFocusable() && !element->isFrameOwnerElement() & & !canScrollInDirection(element, type))
883 continue; 883 continue;
884 884
885 FocusCandidate candidate = FocusCandidate(element, type); 885 FocusCandidate candidate = FocusCandidate(element, type);
886 if (candidate.isNull()) 886 if (candidate.isNull())
887 continue; 887 continue;
888 888
889 if (!isRectInDirection(type, current.rect, candidate.rect))
fs 2015/03/18 14:02:11 Could you perhaps make this the first thing in dis
Abhijeet Kandalkar Slow 2015/03/18 14:26:42 Done.
890 continue;
891
889 candidate.enclosingScrollableBox = &container; 892 candidate.enclosingScrollableBox = &container;
890 updateFocusCandidateIfNeeded(type, current, candidate, closest); 893 updateFocusCandidateIfNeeded(type, current, candidate, closest);
891 } 894 }
892 } 895 }
893 896
894 bool FocusController::advanceFocusDirectionallyInContainer(Node* container, cons t LayoutRect& startingRect, WebFocusType type) 897 bool FocusController::advanceFocusDirectionallyInContainer(Node* container, cons t LayoutRect& startingRect, WebFocusType type)
895 { 898 {
896 if (!container) 899 if (!container)
897 return false; 900 return false;
898 901
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 return consumed; 1007 return consumed;
1005 } 1008 }
1006 1009
1007 DEFINE_TRACE(FocusController) 1010 DEFINE_TRACE(FocusController)
1008 { 1011 {
1009 visitor->trace(m_page); 1012 visitor->trace(m_page);
1010 visitor->trace(m_focusedFrame); 1013 visitor->trace(m_focusedFrame);
1011 } 1014 }
1012 1015
1013 } // namespace blink 1016 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/SpatialNavigation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698