| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 293 |
| 294 if (caretBrowsing && !currentNode) | 294 if (caretBrowsing && !currentNode) |
| 295 currentNode = frame->selection()->start().deprecatedNode(); | 295 currentNode = frame->selection()->start().deprecatedNode(); |
| 296 | 296 |
| 297 document->updateLayoutIgnorePendingStylesheets(); | 297 document->updateLayoutIgnorePendingStylesheets(); |
| 298 | 298 |
| 299 RefPtr<Node> node = findFocusableNodeAcrossFocusScope(direction, FocusNaviga
tionScope::focusNavigationScopeOf(currentNode ? currentNode : document), current
Node, event); | 299 RefPtr<Node> node = findFocusableNodeAcrossFocusScope(direction, FocusNaviga
tionScope::focusNavigationScopeOf(currentNode ? currentNode : document), current
Node, event); |
| 300 | 300 |
| 301 if (!node) { | 301 if (!node) { |
| 302 // We didn't find a node to focus, so we should try to pass focus to Chr
ome. | 302 // We didn't find a node to focus, so we should try to pass focus to Chr
ome. |
| 303 if (!initialFocus && m_page->chrome()->canTakeFocus(direction)) { | 303 if (!initialFocus && m_page->chrome().canTakeFocus(direction)) { |
| 304 document->setFocusedNode(0); | 304 document->setFocusedNode(0); |
| 305 setFocusedFrame(0); | 305 setFocusedFrame(0); |
| 306 m_page->chrome()->takeFocus(direction); | 306 m_page->chrome().takeFocus(direction); |
| 307 return true; | 307 return true; |
| 308 } | 308 } |
| 309 | 309 |
| 310 // Chrome doesn't want focus, so we should wrap focus. | 310 // Chrome doesn't want focus, so we should wrap focus. |
| 311 node = findFocusableNodeRecursively(direction, FocusNavigationScope::foc
usNavigationScopeOf(m_page->mainFrame()->document()), 0, event); | 311 node = findFocusableNodeRecursively(direction, FocusNavigationScope::foc
usNavigationScopeOf(m_page->mainFrame()->document()), 0, event); |
| 312 node = findFocusableNodeDecendingDownIntoFrameDocument(direction, node.g
et(), event); | 312 node = findFocusableNodeDecendingDownIntoFrameDocument(direction, node.g
et(), event); |
| 313 | 313 |
| 314 if (!node) | 314 if (!node) |
| 315 return false; | 315 return false; |
| 316 } | 316 } |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); | 869 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); |
| 870 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); | 870 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); |
| 871 if (container && container->isDocumentNode()) | 871 if (container && container->isDocumentNode()) |
| 872 toDocument(container)->updateLayoutIgnorePendingStylesheets(); | 872 toDocument(container)->updateLayoutIgnorePendingStylesheets(); |
| 873 } while (!consumed && container); | 873 } while (!consumed && container); |
| 874 | 874 |
| 875 return consumed; | 875 return consumed; |
| 876 } | 876 } |
| 877 | 877 |
| 878 } // namespace WebCore | 878 } // namespace WebCore |
| OLD | NEW |