OLD | NEW |
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 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2357 return; | 2357 return; |
2358 | 2358 |
2359 if (!document().isActive()) | 2359 if (!document().isActive()) |
2360 return; | 2360 return; |
2361 | 2361 |
2362 document().updateLayoutIgnorePendingStylesheetsForNode(this); | 2362 document().updateLayoutIgnorePendingStylesheetsForNode(this); |
2363 if (!isFocusable()) | 2363 if (!isFocusable()) |
2364 return; | 2364 return; |
2365 | 2365 |
2366 if (authorShadowRoot() && authorShadowRoot()->delegatesFocus()) { | 2366 if (authorShadowRoot() && authorShadowRoot()->delegatesFocus()) { |
2367 if (containsIncludingShadowDOM(document().focusedElement())) | 2367 if (isShadowIncludingInclusiveAncestorOf(document().focusedElement())) |
2368 return; | 2368 return; |
2369 | 2369 |
2370 // Slide the focus to its inner node. | 2370 // Slide the focus to its inner node. |
2371 Element* found = document().page()->focusController().findFocusableEleme
ntInShadowHost(*this); | 2371 Element* found = document().page()->focusController().findFocusableEleme
ntInShadowHost(*this); |
2372 if (found && containsIncludingShadowDOM(found)) { | 2372 if (found && isShadowIncludingInclusiveAncestorOf(found)) { |
2373 found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTy
peForward, nullptr)); | 2373 found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTy
peForward, nullptr)); |
2374 return; | 2374 return; |
2375 } | 2375 } |
2376 } | 2376 } |
2377 | 2377 |
2378 RawPtr<Node> protect(this); | 2378 RawPtr<Node> protect(this); |
2379 if (!document().page()->focusController().setFocusedElement(this, document()
.frame(), params)) | 2379 if (!document().page()->focusController().setFocusedElement(this, document()
.frame(), params)) |
2380 return; | 2380 return; |
2381 | 2381 |
2382 if (document().focusedElement() == this && UserGestureIndicator::processedUs
erGestureSinceLoad()) { | 2382 if (document().focusedElement() == this && UserGestureIndicator::processedUs
erGestureSinceLoad()) { |
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3675 | 3675 |
3676 DEFINE_TRACE(Element) | 3676 DEFINE_TRACE(Element) |
3677 { | 3677 { |
3678 if (hasRareData()) | 3678 if (hasRareData()) |
3679 visitor->trace(elementRareData()); | 3679 visitor->trace(elementRareData()); |
3680 visitor->trace(m_elementData); | 3680 visitor->trace(m_elementData); |
3681 ContainerNode::trace(visitor); | 3681 ContainerNode::trace(visitor); |
3682 } | 3682 } |
3683 | 3683 |
3684 } // namespace blink | 3684 } // namespace blink |
OLD | NEW |