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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 797
798 // When typing we check spelling elsewhere, so don't redo it here. 798 // When typing we check spelling elsewhere, so don't redo it here.
799 // If this is a change in selection resulting from a delete operation, 799 // If this is a change in selection resulting from a delete operation,
800 // oldSelection may no longer be in the document. 800 // oldSelection may no longer be in the document.
801 // FIXME(http://crbug.com/382809): if oldSelection is on a textarea 801 // FIXME(http://crbug.com/382809): if oldSelection is on a textarea
802 // element, we cause synchronous layout. 802 // element, we cause synchronous layout.
803 if (shouldCheckSpellingAndGrammar 803 if (shouldCheckSpellingAndGrammar
804 && closeTyping 804 && closeTyping
805 && !isSelectionInTextField(oldSelection) 805 && !isSelectionInTextField(oldSelection)
806 && (isSelectionInTextArea(oldSelection) || oldSelection.isContentEdi table()) 806 && (isSelectionInTextArea(oldSelection) || oldSelection.isContentEdi table())
807 && oldSelection.start().inDocument()) { 807 && oldSelection.start().inShadowIncludingDocument()) {
808 spellCheckOldSelection(oldSelection, newAdjacentWords); 808 spellCheckOldSelection(oldSelection, newAdjacentWords);
809 } 809 }
810 } 810 }
811 811
812 // When continuous spell checking is off, existing markers disappear after t he selection changes. 812 // When continuous spell checking is off, existing markers disappear after t he selection changes.
813 if (!isContinuousSpellCheckingEnabled) 813 if (!isContinuousSpellCheckingEnabled)
814 frame().document()->markers().removeMarkers(DocumentMarker::Spelling); 814 frame().document()->markers().removeMarkers(DocumentMarker::Spelling);
815 if (!isContinuousGrammarCheckingEnabled) 815 if (!isContinuousGrammarCheckingEnabled)
816 frame().document()->markers().removeMarkers(DocumentMarker::Grammar); 816 frame().document()->markers().removeMarkers(DocumentMarker::Grammar);
817 } 817 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 visitor->trace(m_frame); 944 visitor->trace(m_frame);
945 visitor->trace(m_spellCheckRequester); 945 visitor->trace(m_spellCheckRequester);
946 } 946 }
947 947
948 void SpellChecker::prepareForLeakDetection() 948 void SpellChecker::prepareForLeakDetection()
949 { 949 {
950 m_spellCheckRequester->prepareForLeakDetection(); 950 m_spellCheckRequester->prepareForLeakDetection();
951 } 951 }
952 952
953 } // namespace blink 953 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698