| 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 ASSERT(container); | 772 ASSERT(container); |
| 773 Element* focusedElement = (focusedFrame() && focusedFrame()->document()) ? f
ocusedFrame()->document()->focusedElement() : 0; | 773 Element* focusedElement = (focusedFrame() && focusedFrame()->document()) ? f
ocusedFrame()->document()->focusedElement() : 0; |
| 774 | 774 |
| 775 Element* element = ElementTraversal::firstWithin(container); | 775 Element* element = ElementTraversal::firstWithin(container); |
| 776 FocusCandidate current; | 776 FocusCandidate current; |
| 777 current.rect = startingRect; | 777 current.rect = startingRect; |
| 778 current.focusableNode = focusedElement; | 778 current.focusableNode = focusedElement; |
| 779 current.visibleNode = focusedElement; | 779 current.visibleNode = focusedElement; |
| 780 | 780 |
| 781 for (; element; element = (element->isFrameOwnerElement() || canScrollInDire
ction(element, direction)) | 781 for (; element; element = (element->isFrameOwnerElement() || canScrollInDire
ction(element, direction)) |
| 782 ? ElementTraversal::nextSkippingChildren(element, container) | 782 ? ElementTraversal::nextSkippingChildren(*element, container) |
| 783 : ElementTraversal::next(*element, container)) { | 783 : ElementTraversal::next(*element, container)) { |
| 784 if (element == focusedElement) | 784 if (element == focusedElement) |
| 785 continue; | 785 continue; |
| 786 | 786 |
| 787 if (!element->isKeyboardFocusable() && !element->isFrameOwnerElement() &
& !canScrollInDirection(element, direction)) | 787 if (!element->isKeyboardFocusable() && !element->isFrameOwnerElement() &
& !canScrollInDirection(element, direction)) |
| 788 continue; | 788 continue; |
| 789 | 789 |
| 790 FocusCandidate candidate = FocusCandidate(element, direction); | 790 FocusCandidate candidate = FocusCandidate(element, direction); |
| 791 if (candidate.isNull()) | 791 if (candidate.isNull()) |
| 792 continue; | 792 continue; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); | 900 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); |
| 901 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); | 901 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); |
| 902 if (container && container->isDocumentNode()) | 902 if (container && container->isDocumentNode()) |
| 903 toDocument(container)->updateLayoutIgnorePendingStylesheets(); | 903 toDocument(container)->updateLayoutIgnorePendingStylesheets(); |
| 904 } while (!consumed && container); | 904 } while (!consumed && container); |
| 905 | 905 |
| 906 return consumed; | 906 return consumed; |
| 907 } | 907 } |
| 908 | 908 |
| 909 } // namespace WebCore | 909 } // namespace WebCore |
| OLD | NEW |