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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 21694005: Spell check whole content of an editable element when it gets focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: style & spurious comment removal. Created 7 years, 4 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3325 matching lines...) Expand 10 before | Expand all | Expand 10 after
3336 m_focusedElement->dispatchFocusInEvent(eventNames().DOMFocusInEvent, old FocusedElement.get()); // DOM level 2 for compatibility. 3336 m_focusedElement->dispatchFocusInEvent(eventNames().DOMFocusInEvent, old FocusedElement.get()); // DOM level 2 for compatibility.
3337 3337
3338 if (m_focusedElement != newFocusedElement) { 3338 if (m_focusedElement != newFocusedElement) {
3339 // handler shifted focus 3339 // handler shifted focus
3340 focusChangeBlocked = true; 3340 focusChangeBlocked = true;
3341 goto SetFocusedElementDone; 3341 goto SetFocusedElementDone;
3342 } 3342 }
3343 m_focusedElement->setFocus(true); 3343 m_focusedElement->setFocus(true);
3344 3344
3345 if (m_focusedElement->isRootEditableElement()) 3345 if (m_focusedElement->isRootEditableElement())
3346 frame()->editor()->didBeginEditing(); 3346 frame()->editor()->didBeginEditing(m_focusedElement.get());
3347 3347
3348 // eww, I suck. set the qt focus correctly 3348 // eww, I suck. set the qt focus correctly
3349 // ### find a better place in the code for this 3349 // ### find a better place in the code for this
3350 if (view()) { 3350 if (view()) {
3351 Widget* focusWidget = widgetForElement(m_focusedElement.get()); 3351 Widget* focusWidget = widgetForElement(m_focusedElement.get());
3352 if (focusWidget) { 3352 if (focusWidget) {
3353 // Make sure a widget has the right size before giving it focus. 3353 // Make sure a widget has the right size before giving it focus.
3354 // Otherwise, we are testing edge cases of the Widget code. 3354 // Otherwise, we are testing edge cases of the Widget code.
3355 // Specifically, in WebCore this does not work well for text fie lds. 3355 // Specifically, in WebCore this does not work well for text fie lds.
3356 updateLayout(); 3356 updateLayout();
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
5205 { 5205 {
5206 return DocumentLifecycleNotifier::create(this); 5206 return DocumentLifecycleNotifier::create(this);
5207 } 5207 }
5208 5208
5209 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5209 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5210 { 5210 {
5211 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5211 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5212 } 5212 }
5213 5213
5214 } // namespace WebCore 5214 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync-expected.txt ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698