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

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-28T17:13:40 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 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3324 // Create the AXObject cache in a focus change because Chromium relies o n it. 3324 // Create the AXObject cache in a focus change because Chromium relies o n it.
3325 if (AXObjectCache* cache = axObjectCache()) 3325 if (AXObjectCache* cache = axObjectCache())
3326 cache->handleFocusedUIElementChanged(oldFocusedNode.get(), newFocuse dNode.get()); 3326 cache->handleFocusedUIElementChanged(oldFocusedNode.get(), newFocuse dNode.get());
3327 } 3327 }
3328 3328
3329 if (!focusChangeBlocked) 3329 if (!focusChangeBlocked)
3330 page()->chrome().focusedNodeChanged(m_focusedNode.get()); 3330 page()->chrome().focusedNodeChanged(m_focusedNode.get());
3331 3331
3332 SetFocusedNodeDone: 3332 SetFocusedNodeDone:
3333 updateStyleIfNeeded(); 3333 updateStyleIfNeeded();
3334 if (Frame* frame = this->frame())
3335 frame->selection()->didChangeFocus();
3334 return !focusChangeBlocked; 3336 return !focusChangeBlocked;
3335 } 3337 }
3336 3338
3337 void Document::getFocusableNodes(Vector<RefPtr<Node> >& nodes) 3339 void Document::getFocusableNodes(Vector<RefPtr<Node> >& nodes)
3338 { 3340 {
3339 updateLayout(); 3341 updateLayout();
3340 3342
3341 for (Node* node = firstChild(); node; node = NodeTraversal::next(node)) { 3343 for (Node* node = firstChild(); node; node = NodeTraversal::next(node)) {
3342 if (node->isFocusable()) 3344 if (node->isFocusable())
3343 nodes.append(node); 3345 nodes.append(node);
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
5223 { 5225 {
5224 return DocumentLifecycleNotifier::create(this); 5226 return DocumentLifecycleNotifier::create(this);
5225 } 5227 }
5226 5228
5227 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5229 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5228 { 5230 {
5229 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5231 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5230 } 5232 }
5231 5233
5232 } // namespace WebCore 5234 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/editing/caret/caret-is-hidden-when-no-focus-expected.html ('k') | Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698