| 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 | 1070 |
| 1071 if (caretBrowsing) { | 1071 if (caretBrowsing) { |
| 1072 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1072 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1073 // needs to be audited. See http://crbug.com/590369 for more details. | 1073 // needs to be audited. See http://crbug.com/590369 for more details. |
| 1074 // In the long term, we should change FrameSelection::setSelection to take a | 1074 // In the long term, we should change FrameSelection::setSelection to take a |
| 1075 // parameter that does not require clean layout, so that modifying selection | 1075 // parameter that does not require clean layout, so that modifying selection |
| 1076 // no longer performs synchronous layout by itself. | 1076 // no longer performs synchronous layout by itself. |
| 1077 newDocument.updateStyleAndLayoutIgnorePendingStylesheets(); | 1077 newDocument.updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1078 | 1078 |
| 1079 Position position = firstPositionInOrBeforeNode(element); | 1079 Position position = firstPositionInOrBeforeNode(element); |
| 1080 VisibleSelection newSelection = | 1080 VisibleSelection newSelection = createVisibleSelection(position, position); |
| 1081 createVisibleSelectionDeprecated(position, position); | |
| 1082 frame->selection().setSelection(newSelection); | 1081 frame->selection().setSelection(newSelection); |
| 1083 } | 1082 } |
| 1084 | 1083 |
| 1085 element->focus( | 1084 element->focus( |
| 1086 FocusParams(SelectionBehaviorOnFocus::Reset, type, sourceCapabilities)); | 1085 FocusParams(SelectionBehaviorOnFocus::Reset, type, sourceCapabilities)); |
| 1087 return true; | 1086 return true; |
| 1088 } | 1087 } |
| 1089 | 1088 |
| 1090 Element* FocusController::findFocusableElement(WebFocusType type, | 1089 Element* FocusController::findFocusableElement(WebFocusType type, |
| 1091 Element& element) { | 1090 Element& element) { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 | 1443 |
| 1445 return consumed; | 1444 return consumed; |
| 1446 } | 1445 } |
| 1447 | 1446 |
| 1448 DEFINE_TRACE(FocusController) { | 1447 DEFINE_TRACE(FocusController) { |
| 1449 visitor->trace(m_page); | 1448 visitor->trace(m_page); |
| 1450 visitor->trace(m_focusedFrame); | 1449 visitor->trace(m_focusedFrame); |
| 1451 } | 1450 } |
| 1452 | 1451 |
| 1453 } // namespace blink | 1452 } // namespace blink |
| OLD | NEW |