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

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

Issue 2389653002: 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
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
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
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