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

Side by Side Diff: sky/engine/core/editing/Editor.cpp

Issue 840403003: First pass at deleting paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 searchStart = firstPositionInNode(m_frame.document()); 795 searchStart = firstPositionInNode(m_frame.document());
796 searchEnd = lastPositionInNode(m_frame.document()); 796 searchEnd = lastPositionInNode(m_frame.document());
797 resultRange = findStringBetweenPositions(target, searchStart, searchEnd, options); 797 resultRange = findStringBetweenPositions(target, searchStart, searchEnd, options);
798 } 798 }
799 799
800 return resultRange.release(); 800 return resultRange.release();
801 } 801 }
802 802
803 void Editor::setMarkedTextMatchesAreHighlighted(bool flag) 803 void Editor::setMarkedTextMatchesAreHighlighted(bool flag)
804 { 804 {
805 if (flag == m_areMarkedTextMatchesHighlighted)
806 return;
807
808 m_areMarkedTextMatchesHighlighted = flag; 805 m_areMarkedTextMatchesHighlighted = flag;
809 m_frame.document()->markers().repaintMarkers(DocumentMarker::TextMatch);
810 } 806 }
811 807
812 void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, Fra meSelection::SetSelectionOptions options) 808 void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, Fra meSelection::SetSelectionOptions options)
813 { 809 {
814 spellChecker().respondToChangedSelection(oldSelection, options); 810 spellChecker().respondToChangedSelection(oldSelection, options);
815 m_frame.inputMethodController().cancelCompositionIfSelectionIsInvalid(); 811 m_frame.inputMethodController().cancelCompositionIfSelectionIsInvalid();
816 notifyComponentsOnChangedSelection(oldSelection, options); 812 notifyComponentsOnChangedSelection(oldSelection, options);
817 } 813 }
818 814
819 SpellChecker& Editor::spellChecker() const 815 SpellChecker& Editor::spellChecker() const
820 { 816 {
821 return m_frame.spellChecker(); 817 return m_frame.spellChecker();
822 } 818 }
823 819
824 void Editor::toggleOverwriteModeEnabled() 820 void Editor::toggleOverwriteModeEnabled()
825 { 821 {
826 m_overwriteModeEnabled = !m_overwriteModeEnabled; 822 m_overwriteModeEnabled = !m_overwriteModeEnabled;
827 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); 823 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled);
828 } 824 }
829 825
830 } // namespace blink 826 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/DocumentMarkerController.cpp ('k') | sky/engine/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698