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

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

Issue 2852913002: Prune ComputeVisibleSelectionInDOMTreeDeprecated from Editor::ChangeSelectionAfterCommand (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | 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) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
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 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 // WebCore inserts <div><br></div> *before* the current block, which correctly 1481 // WebCore inserts <div><br></div> *before* the current block, which correctly
1482 // moves the paragraph down but which doesn't change the caret's DOM position 1482 // moves the paragraph down but which doesn't change the caret's DOM position
1483 // (["hello", 0]). In these situations the above FrameSelection::setSelection 1483 // (["hello", 0]). In these situations the above FrameSelection::setSelection
1484 // call does not call EditorClient::respondToChangedSelection(), which, on the 1484 // call does not call EditorClient::respondToChangedSelection(), which, on the
1485 // Mac, sends selection change notifications and starts a new kill ring 1485 // Mac, sends selection change notifications and starts a new kill ring
1486 // sequence, but we want to do these things (matches AppKit). 1486 // sequence, but we want to do these things (matches AppKit).
1487 if (selection_did_not_change_dom_position) { 1487 if (selection_did_not_change_dom_position) {
1488 Client().RespondToChangedSelection( 1488 Client().RespondToChangedSelection(
1489 frame_, GetFrame() 1489 frame_, GetFrame()
1490 .Selection() 1490 .Selection()
1491 .ComputeVisibleSelectionInDOMTreeDeprecated() 1491 .GetSelectionInDOMTree()
1492 .GetSelectionType()); 1492 .SelectionTypeWithLegacyGranularity());
1493 } 1493 }
1494 } 1494 }
1495 1495
1496 IntRect Editor::FirstRectForRange(const EphemeralRange& range) const { 1496 IntRect Editor::FirstRectForRange(const EphemeralRange& range) const {
1497 DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate()); 1497 DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate());
1498 DocumentLifecycle::DisallowTransitionScope disallow_transition( 1498 DocumentLifecycle::DisallowTransitionScope disallow_transition(
1499 GetFrame().GetDocument()->Lifecycle()); 1499 GetFrame().GetDocument()->Lifecycle());
1500 1500
1501 LayoutUnit extra_width_to_end_of_line; 1501 LayoutUnit extra_width_to_end_of_line;
1502 DCHECK(range.IsNotNull()); 1502 DCHECK(range.IsNotNull());
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 1820
1821 DEFINE_TRACE(Editor) { 1821 DEFINE_TRACE(Editor) {
1822 visitor->Trace(frame_); 1822 visitor->Trace(frame_);
1823 visitor->Trace(last_edit_command_); 1823 visitor->Trace(last_edit_command_);
1824 visitor->Trace(undo_stack_); 1824 visitor->Trace(undo_stack_);
1825 visitor->Trace(mark_); 1825 visitor->Trace(mark_);
1826 visitor->Trace(typing_style_); 1826 visitor->Trace(typing_style_);
1827 } 1827 }
1828 1828
1829 } // namespace blink 1829 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698