Chromium Code Reviews| 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 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 #include "core/dom/EventListener.h" | 82 #include "core/dom/EventListener.h" |
| 83 #include "core/dom/EventNames.h" | 83 #include "core/dom/EventNames.h" |
| 84 #include "core/dom/ExceptionCode.h" | 84 #include "core/dom/ExceptionCode.h" |
| 85 #include "core/dom/ExceptionCodePlaceholder.h" | 85 #include "core/dom/ExceptionCodePlaceholder.h" |
| 86 #include "core/dom/HashChangeEvent.h" | 86 #include "core/dom/HashChangeEvent.h" |
| 87 #include "core/dom/NameNodeList.h" | 87 #include "core/dom/NameNodeList.h" |
| 88 #include "core/dom/NamedFlowCollection.h" | 88 #include "core/dom/NamedFlowCollection.h" |
| 89 #include "core/dom/NodeFilter.h" | 89 #include "core/dom/NodeFilter.h" |
| 90 #include "core/dom/NodeIterator.h" | 90 #include "core/dom/NodeIterator.h" |
| 91 #include "core/dom/NodeRareData.h" | 91 #include "core/dom/NodeRareData.h" |
| 92 #include "core/dom/NodeRenderingTraversal.h" | |
| 92 #include "core/dom/NodeTraversal.h" | 93 #include "core/dom/NodeTraversal.h" |
| 93 #include "core/dom/NodeWithIndex.h" | 94 #include "core/dom/NodeWithIndex.h" |
| 94 #include "core/dom/PageTransitionEvent.h" | 95 #include "core/dom/PageTransitionEvent.h" |
| 95 #include "core/dom/PopStateEvent.h" | 96 #include "core/dom/PopStateEvent.h" |
| 96 #include "core/dom/ProcessingInstruction.h" | 97 #include "core/dom/ProcessingInstruction.h" |
| 97 #include "core/dom/QualifiedName.h" | 98 #include "core/dom/QualifiedName.h" |
| 98 #include "core/dom/RegisteredEventListener.h" | 99 #include "core/dom/RegisteredEventListener.h" |
| 99 #include "core/dom/RequestAnimationFrameCallback.h" | 100 #include "core/dom/RequestAnimationFrameCallback.h" |
| 100 #include "core/dom/ScopedEventQueue.h" | 101 #include "core/dom/ScopedEventQueue.h" |
| 101 #include "core/dom/ScriptElement.h" | 102 #include "core/dom/ScriptElement.h" |
| (...skipping 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3114 nodeInSubtree = focusedNode->isDescendantOf(node); | 3115 nodeInSubtree = focusedNode->isDescendantOf(node); |
| 3115 else | 3116 else |
| 3116 nodeInSubtree = (focusedNode == node) || focusedNode->isDescendantOf(nod e); | 3117 nodeInSubtree = (focusedNode == node) || focusedNode->isDescendantOf(nod e); |
| 3117 | 3118 |
| 3118 if (nodeInSubtree) | 3119 if (nodeInSubtree) |
| 3119 document()->focusedNodeRemoved(); | 3120 document()->focusedNodeRemoved(); |
| 3120 } | 3121 } |
| 3121 | 3122 |
| 3122 void Document::hoveredNodeDetached(Node* node) | 3123 void Document::hoveredNodeDetached(Node* node) |
| 3123 { | 3124 { |
| 3124 if (!m_hoverNode || (node != m_hoverNode && (!m_hoverNode->isTextNode() || n ode != m_hoverNode->parentNode()))) | 3125 if (!m_hoverNode) |
| 3125 return; | 3126 return; |
| 3126 | 3127 |
| 3127 m_hoverNode = node->parentNode(); | 3128 NodeRenderingTraversal::ParentDetails details; |
| 3129 if (node != m_hoverNode && (!m_hoverNode->isTextNode() || node != NodeRender ingTraversal::parent(m_hoverNode.get(), &details))) | |
| 3130 return; | |
| 3131 | |
| 3132 m_hoverNode = NodeRenderingTraversal::parent(node, &details); | |
| 3128 while (m_hoverNode && !m_hoverNode->renderer()) | 3133 while (m_hoverNode && !m_hoverNode->renderer()) |
| 3129 m_hoverNode = m_hoverNode->parentNode(); | 3134 m_hoverNode = m_hoverNode->parentOrShadowHostNode(); |
|
hayato
2013/06/03 09:03:47
Shouldn't we use NodeRenderingTraversal::parent()
tasak
2013/06/03 11:18:25
Done.
| |
| 3130 if (frame()) | 3135 if (frame()) |
| 3131 frame()->eventHandler()->scheduleHoverStateUpdate(); | 3136 frame()->eventHandler()->scheduleHoverStateUpdate(); |
| 3132 } | 3137 } |
| 3133 | 3138 |
| 3134 void Document::activeChainNodeDetached(Node* node) | 3139 void Document::activeChainNodeDetached(Node* node) |
| 3135 { | 3140 { |
| 3136 if (!m_activeElement || (node != m_activeElement && (!m_activeElement->isTex tNode() || node != m_activeElement->parentNode()))) | 3141 if (!m_activeElement) |
| 3137 return; | 3142 return; |
| 3138 | 3143 |
| 3139 m_activeElement = node->parentElement(); | 3144 NodeRenderingTraversal::ParentDetails details; |
| 3145 if (node != m_activeElement && (!m_activeElement->isTextNode() || node != No deRenderingTraversal::parent(m_activeElement.get(), &details))) | |
| 3146 return; | |
| 3147 | |
| 3148 Node* parent = NodeRenderingTraversal::parent(node, &details); | |
| 3149 m_activeElement = parent && parent->isElementNode() ? toElement(parent) : 0; | |
| 3140 while (m_activeElement && !m_activeElement->renderer()) | 3150 while (m_activeElement && !m_activeElement->renderer()) |
| 3141 m_activeElement = m_activeElement->parentElement(); | 3151 m_activeElement = m_activeElement->parentOrShadowHostElement(); |
|
hayato
2013/06/03 09:03:47
Ditto.
Also looks like NodeRenderingTraversal sho
tasak
2013/06/03 11:18:25
Done.
| |
| 3142 } | 3152 } |
| 3143 | 3153 |
| 3144 const Vector<AnnotatedRegionValue>& Document::annotatedRegions() const | 3154 const Vector<AnnotatedRegionValue>& Document::annotatedRegions() const |
| 3145 { | 3155 { |
| 3146 return m_annotatedRegions; | 3156 return m_annotatedRegions; |
| 3147 } | 3157 } |
| 3148 | 3158 |
| 3149 void Document::setAnnotatedRegions(const Vector<AnnotatedRegionValue>& regions) | 3159 void Document::setAnnotatedRegions(const Vector<AnnotatedRegionValue>& regions) |
| 3150 { | 3160 { |
| 3151 m_annotatedRegions = regions; | 3161 m_annotatedRegions = regions; |
| (...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5647 return; | 5657 return; |
| 5648 | 5658 |
| 5649 Vector<RefPtr<Element> > associatedFormControls; | 5659 Vector<RefPtr<Element> > associatedFormControls; |
| 5650 copyToVector(m_associatedFormControls, associatedFormControls); | 5660 copyToVector(m_associatedFormControls, associatedFormControls); |
| 5651 | 5661 |
| 5652 frame()->page()->chrome().client()->didAssociateFormControls(associatedFormC ontrols); | 5662 frame()->page()->chrome().client()->didAssociateFormControls(associatedFormC ontrols); |
| 5653 m_associatedFormControls.clear(); | 5663 m_associatedFormControls.clear(); |
| 5654 } | 5664 } |
| 5655 | 5665 |
| 5656 } // namespace WebCore | 5666 } // namespace WebCore |
| OLD | NEW |