| 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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 if (&newDocument != document) { | 994 if (&newDocument != document) { |
| 995 // Focus is going away from this document, so clear the focused element. | 995 // Focus is going away from this document, so clear the focused element. |
| 996 document->clearFocusedElement(); | 996 document->clearFocusedElement(); |
| 997 document->setSequentialFocusNavigationStartingPoint(nullptr); | 997 document->setSequentialFocusNavigationStartingPoint(nullptr); |
| 998 } | 998 } |
| 999 | 999 |
| 1000 setFocusedFrame(newDocument.frame()); | 1000 setFocusedFrame(newDocument.frame()); |
| 1001 | 1001 |
| 1002 if (caretBrowsing) { | 1002 if (caretBrowsing) { |
| 1003 Position position = firstPositionInOrBeforeNode(element); | 1003 Position position = firstPositionInOrBeforeNode(element); |
| 1004 VisibleSelection newSelection(position, position); | 1004 VisibleSelection newSelection = createVisibleSelectionDeprecated(positio
n, position); |
| 1005 frame->selection().setSelection(newSelection); | 1005 frame->selection().setSelection(newSelection); |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 element->focus(FocusParams(SelectionBehaviorOnFocus::Reset, type, sourceCapa
bilities)); | 1008 element->focus(FocusParams(SelectionBehaviorOnFocus::Reset, type, sourceCapa
bilities)); |
| 1009 return true; | 1009 return true; |
| 1010 } | 1010 } |
| 1011 | 1011 |
| 1012 Element* FocusController::findFocusableElement(WebFocusType type, Element& eleme
nt) | 1012 Element* FocusController::findFocusableElement(WebFocusType type, Element& eleme
nt) |
| 1013 { | 1013 { |
| 1014 // FIXME: No spacial navigation code yet. | 1014 // FIXME: No spacial navigation code yet. |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 return consumed; | 1314 return consumed; |
| 1315 } | 1315 } |
| 1316 | 1316 |
| 1317 DEFINE_TRACE(FocusController) | 1317 DEFINE_TRACE(FocusController) |
| 1318 { | 1318 { |
| 1319 visitor->trace(m_page); | 1319 visitor->trace(m_page); |
| 1320 visitor->trace(m_focusedFrame); | 1320 visitor->trace(m_focusedFrame); |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 } // namespace blink | 1323 } // namespace blink |
| OLD | NEW |