Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 2391973002: Revert of Prune createVisibleSelectionDeprecated from SelectionAdjuster (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698