OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |