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

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

Issue 1704333002: Do not use Node in FocusController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split a CL Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/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 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 2354
2355 document().updateLayoutIgnorePendingStylesheets(); 2355 document().updateLayoutIgnorePendingStylesheets();
2356 if (!isFocusable()) 2356 if (!isFocusable())
2357 return; 2357 return;
2358 2358
2359 if (authorShadowRoot() && authorShadowRoot()->delegatesFocus()) { 2359 if (authorShadowRoot() && authorShadowRoot()->delegatesFocus()) {
2360 if (containsIncludingShadowDOM(document().focusedElement())) 2360 if (containsIncludingShadowDOM(document().focusedElement()))
2361 return; 2361 return;
2362 2362
2363 // Slide the focus to its inner node. 2363 // Slide the focus to its inner node.
2364 Element* next = document().page()->focusController().findFocusableElemen t(WebFocusTypeForward, *this); 2364 Element* found = document().page()->focusController().findFocusableEleme ntInShadowHost(*this);
2365 if (next && containsIncludingShadowDOM(next)) { 2365 if (found && containsIncludingShadowDOM(found)) {
2366 next->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTyp eForward, nullptr)); 2366 found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTy peForward, nullptr));
2367 return; 2367 return;
2368 } 2368 }
2369 } 2369 }
2370 2370
2371 RefPtrWillBeRawPtr<Node> protect(this); 2371 RefPtrWillBeRawPtr<Node> protect(this);
2372 if (!document().page()->focusController().setFocusedElement(this, document() .frame(), params)) 2372 if (!document().page()->focusController().setFocusedElement(this, document() .frame(), params))
2373 return; 2373 return;
2374 2374
2375 if (document().focusedElement() == this && UserGestureIndicator::processedUs erGestureSinceLoad()) { 2375 if (document().focusedElement() == this && UserGestureIndicator::processedUs erGestureSinceLoad()) {
2376 // Bring up the keyboard in the context of anything triggered by a user 2376 // Bring up the keyboard in the context of anything triggered by a user
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3639 { 3639 {
3640 #if ENABLE(OILPAN) 3640 #if ENABLE(OILPAN)
3641 if (hasRareData()) 3641 if (hasRareData())
3642 visitor->trace(elementRareData()); 3642 visitor->trace(elementRareData());
3643 visitor->trace(m_elementData); 3643 visitor->trace(m_elementData);
3644 #endif 3644 #endif
3645 ContainerNode::trace(visitor); 3645 ContainerNode::trace(visitor);
3646 } 3646 }
3647 3647
3648 } // namespace blink 3648 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698