| 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 Handle<Document> newDocument = node->document(); | 346 Handle<Document> newDocument = node->document(); |
| 347 | 347 |
| 348 if (newDocument != document) | 348 if (newDocument != document) |
| 349 // Focus is going away from this document, so clear the focused node. | 349 // Focus is going away from this document, so clear the focused node. |
| 350 document->setFocusedNode(nullptr); | 350 document->setFocusedNode(nullptr); |
| 351 | 351 |
| 352 if (newDocument) | 352 if (newDocument) |
| 353 setFocusedFrame(newDocument->frame()); | 353 setFocusedFrame(newDocument->frame()); |
| 354 | 354 |
| 355 if (caretBrowsing) { | 355 if (caretBrowsing) { |
| 356 Position position = firstPositionInOrBeforeNode(node.raw()); | 356 Position position = firstPositionInOrBeforeNode(node); |
| 357 VisibleSelection newSelection(position, position, DOWNSTREAM); | 357 VisibleSelection newSelection(position, position, DOWNSTREAM); |
| 358 if (frame->selection()->shouldChangeSelection(newSelection)) | 358 if (frame->selection()->shouldChangeSelection(newSelection)) |
| 359 frame->selection()->setSelection(newSelection); | 359 frame->selection()->setSelection(newSelection); |
| 360 } | 360 } |
| 361 | 361 |
| 362 toElement(node)->focus(false, direction); | 362 toElement(node)->focus(false, direction); |
| 363 return true; | 363 return true; |
| 364 } | 364 } |
| 365 | 365 |
| 366 Result<Node> FocusController::findFocusableNodeAcrossFocusScope(FocusDirection d
irection, FocusNavigationScope scope, const Handle<Node>& currentNode, KeyboardE
vent* event) | 366 Result<Node> FocusController::findFocusableNodeAcrossFocusScope(FocusDirection d
irection, FocusNavigationScope scope, const Handle<Node>& currentNode, KeyboardE
vent* event) |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); | 886 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); |
| 887 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); | 887 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); |
| 888 if (container && container->isDocumentNode()) | 888 if (container && container->isDocumentNode()) |
| 889 toDocument(container)->updateLayoutIgnorePendingStylesheets(); | 889 toDocument(container)->updateLayoutIgnorePendingStylesheets(); |
| 890 } while (!consumed && container); | 890 } while (!consumed && container); |
| 891 | 891 |
| 892 return consumed; | 892 return consumed; |
| 893 } | 893 } |
| 894 | 894 |
| 895 } // namespace WebCore | 895 } // namespace WebCore |
| OLD | NEW |