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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 void InputMethodController::clear() { 216 void InputMethodController::clear() {
217 m_hasComposition = false; 217 m_hasComposition = false;
218 if (m_compositionRange) { 218 if (m_compositionRange) {
219 m_compositionRange->setStart(&document(), 0); 219 m_compositionRange->setStart(&document(), 0);
220 m_compositionRange->collapse(true); 220 m_compositionRange->collapse(true);
221 } 221 }
222 document().markers().removeMarkers(DocumentMarker::Composition); 222 document().markers().removeMarkers(DocumentMarker::Composition);
223 } 223 }
224 224
225 void InputMethodController::contextDestroyed() { 225 void InputMethodController::contextDestroyed(Document*) {
226 clear(); 226 clear();
227 m_compositionRange = nullptr; 227 m_compositionRange = nullptr;
228 } 228 }
229 229
230 void InputMethodController::documentAttached(Document* document) { 230 void InputMethodController::documentAttached(Document* document) {
231 DCHECK(document); 231 DCHECK(document);
232 setContext(document); 232 setContext(document);
233 } 233 }
234 234
235 void InputMethodController::selectComposition() const { 235 void InputMethodController::selectComposition() const {
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 frame().chromeClient().resetInputMethod(); 1080 frame().chromeClient().resetInputMethod();
1081 } 1081 }
1082 1082
1083 DEFINE_TRACE(InputMethodController) { 1083 DEFINE_TRACE(InputMethodController) {
1084 visitor->trace(m_frame); 1084 visitor->trace(m_frame);
1085 visitor->trace(m_compositionRange); 1085 visitor->trace(m_compositionRange);
1086 SynchronousMutationObserver::trace(visitor); 1086 SynchronousMutationObserver::trace(visitor);
1087 } 1087 }
1088 1088
1089 } // namespace blink 1089 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698