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 | |
321 m_selectionEditor->setVisibleSelection(s, options); | 317 m_selectionEditor->setVisibleSelection(s, options); |
322 m_frameCaret->setCaretRectNeedsUpdate(); | 318 m_frameCaret->setCaretRectNeedsUpdate(); |
323 | 319 |
324 if (!s.isNone() && !(options & DoNotSetFocus)) { | 320 if (!s.isNone() && !(options & DoNotSetFocus)) { |
325 setFocusedNodeIfNeeded(); | 321 setFocusedNodeIfNeeded(); |
326 // |setFocusedNodeIfNeeded()| dispatches sync events "FocusOut" and | 322 // |setFocusedNodeIfNeeded()| dispatches sync events "FocusOut" and |
327 // "FocusIn", |m_frame| may associate to another document. | 323 // "FocusIn", |m_frame| may associate to another document. |
328 if (!isAvailable() || document() != currentDocument) { | 324 if (!isAvailable() || document() != currentDocument) { |
329 // Once we get test case to reach here, we should change this | 325 // Once we get test case to reach here, we should change this |
330 // if-statement to |DCHECK()|. | 326 // if-statement to |DCHECK()|. |
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 } | 1474 } |
1479 | 1475 |
1480 void showTree(const blink::FrameSelection* sel) { | 1476 void showTree(const blink::FrameSelection* sel) { |
1481 if (sel) | 1477 if (sel) |
1482 sel->showTreeForThis(); | 1478 sel->showTreeForThis(); |
1483 else | 1479 else |
1484 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1480 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
1485 } | 1481 } |
1486 | 1482 |
1487 #endif | 1483 #endif |
OLD | NEW |