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

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

Issue 17005008: Don't show caret when containing element doesn't have focus (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-28T14:12:48 Created 7 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 | Annotate | Revision Log
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 3311 matching lines...) Expand 10 before | Expand all | Expand 10 after
3322 // Create the AXObject cache in a focus change because Chromium relies o n it. 3322 // Create the AXObject cache in a focus change because Chromium relies o n it.
3323 if (AXObjectCache* cache = axObjectCache()) 3323 if (AXObjectCache* cache = axObjectCache())
3324 cache->handleFocusedUIElementChanged(oldFocusedNode.get(), newFocuse dNode.get()); 3324 cache->handleFocusedUIElementChanged(oldFocusedNode.get(), newFocuse dNode.get());
3325 } 3325 }
3326 3326
3327 if (!focusChangeBlocked) 3327 if (!focusChangeBlocked)
3328 page()->chrome().focusedNodeChanged(m_focusedNode.get()); 3328 page()->chrome().focusedNodeChanged(m_focusedNode.get());
3329 3329
3330 SetFocusedNodeDone: 3330 SetFocusedNodeDone:
3331 updateStyleIfNeeded(); 3331 updateStyleIfNeeded();
3332 if (Frame* frame = this->frame())
3333 frame->selection()->didFocusChanged();
3332 return !focusChangeBlocked; 3334 return !focusChangeBlocked;
3333 } 3335 }
3334 3336
3335 void Document::getFocusableNodes(Vector<RefPtr<Node> >& nodes) 3337 void Document::getFocusableNodes(Vector<RefPtr<Node> >& nodes)
3336 { 3338 {
3337 updateLayout(); 3339 updateLayout();
3338 3340
3339 for (Node* node = firstChild(); node; node = NodeTraversal::next(node)) { 3341 for (Node* node = firstChild(); node; node = NodeTraversal::next(node)) {
3340 if (node->isFocusable()) 3342 if (node->isFocusable())
3341 nodes.append(node); 3343 nodes.append(node);
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
5221 { 5223 {
5222 return DocumentLifecycleNotifier::create(this); 5224 return DocumentLifecycleNotifier::create(this);
5223 } 5225 }
5224 5226
5225 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5227 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5226 { 5228 {
5227 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5229 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5228 } 5230 }
5229 5231
5230 } // namespace WebCore 5232 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698