| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // changed. | 307 // changed. |
| 308 m_frame->inputMethodController().cancelCompositionIfSelectionIsInvalid(); | 308 m_frame->inputMethodController().cancelCompositionIfSelectionIsInvalid(); |
| 309 notifyLayoutObjectOfSelectionChange(userTriggered); | 309 notifyLayoutObjectOfSelectionChange(userTriggered); |
| 310 return; | 310 return; |
| 311 } | 311 } |
| 312 | 312 |
| 313 const VisibleSelectionTemplate<Strategy> oldSelection = | 313 const VisibleSelectionTemplate<Strategy> oldSelection = |
| 314 visibleSelection<Strategy>(); | 314 visibleSelection<Strategy>(); |
| 315 const VisibleSelection oldSelectionInDOMTree = selection(); | 315 const VisibleSelection oldSelectionInDOMTree = selection(); |
| 316 | 316 |
| 317 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 318 // needs to be audited. See http://crbug.com/590369 for more details. |
| 319 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 320 |
| 317 m_selectionEditor->setVisibleSelection(s, options); | 321 m_selectionEditor->setVisibleSelection(s, options); |
| 318 m_frameCaret->setCaretRectNeedsUpdate(); | 322 m_frameCaret->setCaretRectNeedsUpdate(); |
| 319 | 323 |
| 320 if (!s.isNone() && !(options & DoNotSetFocus)) { | 324 if (!s.isNone() && !(options & DoNotSetFocus)) { |
| 321 setFocusedNodeIfNeeded(); | 325 setFocusedNodeIfNeeded(); |
| 322 // |setFocusedNodeIfNeeded()| dispatches sync events "FocusOut" and | 326 // |setFocusedNodeIfNeeded()| dispatches sync events "FocusOut" and |
| 323 // "FocusIn", |m_frame| may associate to another document. | 327 // "FocusIn", |m_frame| may associate to another document. |
| 324 if (!isAvailable() || document() != currentDocument) { | 328 if (!isAvailable() || document() != currentDocument) { |
| 325 // Once we get test case to reach here, we should change this | 329 // Once we get test case to reach here, we should change this |
| 326 // if-statement to |DCHECK()|. | 330 // if-statement to |DCHECK()|. |
| (...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 } | 1478 } |
| 1475 | 1479 |
| 1476 void showTree(const blink::FrameSelection* sel) { | 1480 void showTree(const blink::FrameSelection* sel) { |
| 1477 if (sel) | 1481 if (sel) |
| 1478 sel->showTreeForThis(); | 1482 sel->showTreeForThis(); |
| 1479 else | 1483 else |
| 1480 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1484 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
| 1481 } | 1485 } |
| 1482 | 1486 |
| 1483 #endif | 1487 #endif |
| OLD | NEW |