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

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

Issue 1177373002: Change API name and return type of findFocusableNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: *recursively Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/input/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 2202
2203 document().updateLayoutIgnorePendingStylesheets(); 2203 document().updateLayoutIgnorePendingStylesheets();
2204 if (!isFocusable()) 2204 if (!isFocusable())
2205 return; 2205 return;
2206 2206
2207 if (shadowRoot() && shadowRoot()->delegatesFocus()) { 2207 if (shadowRoot() && shadowRoot()->delegatesFocus()) {
2208 if (containsIncludingShadowDOM(document().focusedElement())) 2208 if (containsIncludingShadowDOM(document().focusedElement()))
2209 return; 2209 return;
2210 2210
2211 // Slide the focus to its inner node. 2211 // Slide the focus to its inner node.
2212 Node* next = document().page()->focusController().findFocusableNode(WebF ocusTypeForward, *this); 2212 Element* next = document().page()->focusController().findFocusableElemen t(WebFocusTypeForward, *this);
2213 if (next && next->isElementNode() && containsIncludingShadowDOM(next)) { 2213 if (next && containsIncludingShadowDOM(next)) {
2214 toElement(next)->focus(false, WebFocusTypeForward); 2214 next->focus(false, WebFocusTypeForward);
2215 return; 2215 return;
2216 } 2216 }
2217 } 2217 }
2218 2218
2219 RefPtrWillBeRawPtr<Node> protect(this); 2219 RefPtrWillBeRawPtr<Node> protect(this);
2220 if (!document().page()->focusController().setFocusedElement(this, document() .frame(), type)) 2220 if (!document().page()->focusController().setFocusedElement(this, document() .frame(), type))
2221 return; 2221 return;
2222 2222
2223 // Setting the focused node above might have invalidated the layout due to s cripts. 2223 // Setting the focused node above might have invalidated the layout due to s cripts.
2224 document().updateLayoutIgnorePendingStylesheets(); 2224 document().updateLayoutIgnorePendingStylesheets();
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 { 3417 {
3418 #if ENABLE(OILPAN) 3418 #if ENABLE(OILPAN)
3419 if (hasRareData()) 3419 if (hasRareData())
3420 visitor->trace(elementRareData()); 3420 visitor->trace(elementRareData());
3421 visitor->trace(m_elementData); 3421 visitor->trace(m_elementData);
3422 #endif 3422 #endif
3423 ContainerNode::trace(visitor); 3423 ContainerNode::trace(visitor);
3424 } 3424 }
3425 3425
3426 } // namespace blink 3426 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698