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

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

Issue 2698793003: Get rid of redundant layout tree update related to selection (Closed)
Patch Set: 2017-02-17T16:13:56 selectionTypeWithLegacyGranularity() Created 3 years, 10 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
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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 1621
1622 m_areMarkedTextMatchesHighlighted = flag; 1622 m_areMarkedTextMatchesHighlighted = flag;
1623 frame().document()->markers().repaintMarkers(DocumentMarker::TextMatch); 1623 frame().document()->markers().repaintMarkers(DocumentMarker::TextMatch);
1624 } 1624 }
1625 1625
1626 void Editor::respondToChangedSelection( 1626 void Editor::respondToChangedSelection(
1627 const Position& oldSelectionStart, 1627 const Position& oldSelectionStart,
1628 FrameSelection::SetSelectionOptions options) { 1628 FrameSelection::SetSelectionOptions options) {
1629 spellChecker().respondToChangedSelection(oldSelectionStart, options); 1629 spellChecker().respondToChangedSelection(oldSelectionStart, options);
1630 client().respondToChangedSelection(&frame(), 1630 client().respondToChangedSelection(&frame(),
1631 frame().selection().getSelectionType()); 1631 frame()
1632 .selection()
1633 .selectionInDOMTree()
1634 .selectionTypeWithLegacyGranularity());
1632 setStartNewKillRingSequence(true); 1635 setStartNewKillRingSequence(true);
1633 } 1636 }
1634 1637
1635 SpellChecker& Editor::spellChecker() const { 1638 SpellChecker& Editor::spellChecker() const {
1636 return frame().spellChecker(); 1639 return frame().spellChecker();
1637 } 1640 }
1638 1641
1639 void Editor::toggleOverwriteModeEnabled() { 1642 void Editor::toggleOverwriteModeEnabled() {
1640 m_overwriteModeEnabled = !m_overwriteModeEnabled; 1643 m_overwriteModeEnabled = !m_overwriteModeEnabled;
1641 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); 1644 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 1705
1703 DEFINE_TRACE(Editor) { 1706 DEFINE_TRACE(Editor) {
1704 visitor->trace(m_frame); 1707 visitor->trace(m_frame);
1705 visitor->trace(m_lastEditCommand); 1708 visitor->trace(m_lastEditCommand);
1706 visitor->trace(m_undoStack); 1709 visitor->trace(m_undoStack);
1707 visitor->trace(m_mark); 1710 visitor->trace(m_mark);
1708 visitor->trace(m_typingStyle); 1711 visitor->trace(m_typingStyle);
1709 } 1712 }
1710 1713
1711 } // namespace blink 1714 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/DOMSelection.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698