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. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * (C) 2007 Eric Seidel (eric@webkit.org) | 9 * (C) 2007 Eric Seidel (eric@webkit.org) |
10 * | 10 * |
(...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2884 return true; | 2884 return true; |
2885 if (!IsSVGElement()) | 2885 if (!IsSVGElement()) |
2886 return false; | 2886 return false; |
2887 return (HasEventListeners(EventTypeNames::focus) || | 2887 return (HasEventListeners(EventTypeNames::focus) || |
2888 HasEventListeners(EventTypeNames::blur) || | 2888 HasEventListeners(EventTypeNames::blur) || |
2889 HasEventListeners(EventTypeNames::focusin) || | 2889 HasEventListeners(EventTypeNames::focusin) || |
2890 HasEventListeners(EventTypeNames::focusout)); | 2890 HasEventListeners(EventTypeNames::focusout)); |
2891 } | 2891 } |
2892 | 2892 |
2893 bool Element::IsFocusable() const { | 2893 bool Element::IsFocusable() const { |
2894 // Style cannot be cleared out for non-active documents, so in that case the | |
2895 // needsLayoutTreeUpdateForNode check is invalid. | |
2896 DCHECK(!GetDocument().IsActive() || | |
2897 !GetDocument().NeedsLayoutTreeUpdateForNode(*this)); | |
Changwan Ryu
2017/06/09 15:40:04
yosin@ / kochi@ may have more knowledge, but I don
AKVT
2017/06/12 12:21:24
Done.
| |
2898 return isConnected() && SupportsFocus() && !IsInert() && | 2894 return isConnected() && SupportsFocus() && !IsInert() && |
2899 LayoutObjectIsFocusable(); | 2895 LayoutObjectIsFocusable(); |
2900 } | 2896 } |
2901 | 2897 |
2902 bool Element::IsKeyboardFocusable() const { | 2898 bool Element::IsKeyboardFocusable() const { |
2903 return IsFocusable() && tabIndex() >= 0; | 2899 return IsFocusable() && tabIndex() >= 0; |
2904 } | 2900 } |
2905 | 2901 |
2906 bool Element::IsMouseFocusable() const { | 2902 bool Element::IsMouseFocusable() const { |
2907 return IsFocusable(); | 2903 return IsFocusable(); |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4423 } | 4419 } |
4424 | 4420 |
4425 DEFINE_TRACE_WRAPPERS(Element) { | 4421 DEFINE_TRACE_WRAPPERS(Element) { |
4426 if (HasRareData()) { | 4422 if (HasRareData()) { |
4427 visitor->TraceWrappers(GetElementRareData()); | 4423 visitor->TraceWrappers(GetElementRareData()); |
4428 } | 4424 } |
4429 ContainerNode::TraceWrappers(visitor); | 4425 ContainerNode::TraceWrappers(visitor); |
4430 } | 4426 } |
4431 | 4427 |
4432 } // namespace blink | 4428 } // namespace blink |
OLD | NEW |