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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 return; 785 return;
786 EphemeralRange markerRange = EphemeralRange(Position(caretRange.startPositio n().computeContainerNode(), markers[0]->startOffset()), Position(caretRange.endP osition().computeContainerNode(), markers[0]->endOffset())); 786 EphemeralRange markerRange = EphemeralRange(Position(caretRange.startPositio n().computeContainerNode(), markers[0]->startOffset()), Position(caretRange.endP osition().computeContainerNode(), markers[0]->endOffset()));
787 if (markerRange.isNull()) 787 if (markerRange.isNull())
788 return; 788 return;
789 frame().selection().setSelection(VisibleSelection(markerRange), CharacterGra nularity); 789 frame().selection().setSelection(VisibleSelection(markerRange), CharacterGra nularity);
790 frame().editor().replaceSelectionWithText(text, false, false); 790 frame().editor().replaceSelectionWithText(text, false, false);
791 } 791 }
792 792
793 static bool shouldCheckOldSelection(const VisibleSelection& oldSelection) 793 static bool shouldCheckOldSelection(const VisibleSelection& oldSelection)
794 { 794 {
795 if (!oldSelection.start().inShadowIncludingDocument()) 795 if (!oldSelection.start().isConnected())
796 return false; 796 return false;
797 if (isSelectionInTextField(oldSelection)) 797 if (isSelectionInTextField(oldSelection))
798 return false; 798 return false;
799 if (isSelectionInTextArea(oldSelection)) 799 if (isSelectionInTextArea(oldSelection))
800 return true; 800 return true;
801 oldSelection.start().document()->updateStyleAndLayoutIgnorePendingStylesheet s(); 801 oldSelection.start().document()->updateStyleAndLayoutIgnorePendingStylesheet s();
802 return oldSelection.isContentEditable(); 802 return oldSelection.isContentEditable();
803 } 803 }
804 804
805 void SpellChecker::respondToChangedSelection(const VisibleSelection& oldSelectio n, FrameSelection::SetSelectionOptions options) 805 void SpellChecker::respondToChangedSelection(const VisibleSelection& oldSelectio n, FrameSelection::SetSelectionOptions options)
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 visitor->trace(m_frame); 970 visitor->trace(m_frame);
971 visitor->trace(m_spellCheckRequester); 971 visitor->trace(m_spellCheckRequester);
972 } 972 }
973 973
974 void SpellChecker::prepareForLeakDetection() 974 void SpellChecker::prepareForLeakDetection()
975 { 975 {
976 m_spellCheckRequester->prepareForLeakDetection(); 976 m_spellCheckRequester->prepareForLeakDetection();
977 } 977 }
978 978
979 } // namespace blink 979 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698