| 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 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3100 nodeInSubtree = focusedNode->isDescendantOf(node); | 3101 nodeInSubtree = focusedNode->isDescendantOf(node); |
| 3101 else | 3102 else |
| 3102 nodeInSubtree = (focusedNode == node) || focusedNode->isDescendantOf(nod
e); | 3103 nodeInSubtree = (focusedNode == node) || focusedNode->isDescendantOf(nod
e); |
| 3103 | 3104 |
| 3104 if (nodeInSubtree) | 3105 if (nodeInSubtree) |
| 3105 document()->focusedNodeRemoved(); | 3106 document()->focusedNodeRemoved(); |
| 3106 } | 3107 } |
| 3107 | 3108 |
| 3108 void Document::hoveredNodeDetached(Node* node) | 3109 void Document::hoveredNodeDetached(Node* node) |
| 3109 { | 3110 { |
| 3110 if (!m_hoverNode || (node != m_hoverNode && (!m_hoverNode->isTextNode() || n
ode != m_hoverNode->parentNode()))) | 3111 if (!m_hoverNode) |
| 3111 return; | 3112 return; |
| 3112 | 3113 |
| 3113 m_hoverNode = node->parentNode(); | 3114 NodeRenderingTraversal::ParentDetails details; |
| 3114 while (m_hoverNode && !m_hoverNode->renderer()) | 3115 if (node != m_hoverNode && (!m_hoverNode->isTextNode() || node != NodeRender
ingTraversal::parent(m_hoverNode.get(), &details))) |
| 3115 m_hoverNode = m_hoverNode->parentNode(); | 3116 return; |
| 3117 |
| 3118 for (m_hoverNode = NodeRenderingTraversal::parent(node, &details); m_hoverNo
de && !m_hoverNode->renderer(); m_hoverNode = NodeRenderingTraversal::parent(m_h
overNode.get(), &details)) { } |
| 3116 | 3119 |
| 3117 // If the mouse cursor is not visible, do not clear existing | 3120 // If the mouse cursor is not visible, do not clear existing |
| 3118 // hover effects on the ancestors of |node| and do not invoke | 3121 // hover effects on the ancestors of |node| and do not invoke |
| 3119 // new hover effects on any other element. | 3122 // new hover effects on any other element. |
| 3120 if (!page()->isCursorVisible()) | 3123 if (!page()->isCursorVisible()) |
| 3121 return; | 3124 return; |
| 3122 | 3125 |
| 3123 if (frame()) | 3126 if (frame()) |
| 3124 frame()->eventHandler()->scheduleHoverStateUpdate(); | 3127 frame()->eventHandler()->scheduleHoverStateUpdate(); |
| 3125 } | 3128 } |
| 3126 | 3129 |
| 3127 void Document::activeChainNodeDetached(Node* node) | 3130 void Document::activeChainNodeDetached(Node* node) |
| 3128 { | 3131 { |
| 3129 if (!m_activeElement || (node != m_activeElement && (!m_activeElement->isTex
tNode() || node != m_activeElement->parentNode()))) | 3132 if (!m_activeElement) |
| 3130 return; | 3133 return; |
| 3131 | 3134 |
| 3132 m_activeElement = node->parentElement(); | 3135 NodeRenderingTraversal::ParentDetails details; |
| 3133 while (m_activeElement && !m_activeElement->renderer()) | 3136 if (node != m_activeElement && (!m_activeElement->isTextNode() || node != No
deRenderingTraversal::parent(m_activeElement.get(), &details))) |
| 3134 m_activeElement = m_activeElement->parentElement(); | 3137 return; |
| 3138 |
| 3139 Node* activeNode = NodeRenderingTraversal::parent(node, &details); |
| 3140 for (; activeNode && activeNode->isElementNode() && !activeNode->renderer();
activeNode = NodeRenderingTraversal::parent(activeNode, &details)) { } |
| 3141 |
| 3142 m_activeElement = activeNode && activeNode->isElementNode() ? toElement(acti
veNode) : 0; |
| 3135 } | 3143 } |
| 3136 | 3144 |
| 3137 const Vector<AnnotatedRegionValue>& Document::annotatedRegions() const | 3145 const Vector<AnnotatedRegionValue>& Document::annotatedRegions() const |
| 3138 { | 3146 { |
| 3139 return m_annotatedRegions; | 3147 return m_annotatedRegions; |
| 3140 } | 3148 } |
| 3141 | 3149 |
| 3142 void Document::setAnnotatedRegions(const Vector<AnnotatedRegionValue>& regions) | 3150 void Document::setAnnotatedRegions(const Vector<AnnotatedRegionValue>& regions) |
| 3143 { | 3151 { |
| 3144 m_annotatedRegions = regions; | 3152 m_annotatedRegions = regions; |
| (...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5595 return; | 5603 return; |
| 5596 | 5604 |
| 5597 Vector<RefPtr<Element> > associatedFormControls; | 5605 Vector<RefPtr<Element> > associatedFormControls; |
| 5598 copyToVector(m_associatedFormControls, associatedFormControls); | 5606 copyToVector(m_associatedFormControls, associatedFormControls); |
| 5599 | 5607 |
| 5600 frame()->page()->chrome().client()->didAssociateFormControls(associatedFormC
ontrols); | 5608 frame()->page()->chrome().client()->didAssociateFormControls(associatedFormC
ontrols); |
| 5601 m_associatedFormControls.clear(); | 5609 m_associatedFormControls.clear(); |
| 5602 } | 5610 } |
| 5603 | 5611 |
| 5604 } // namespace WebCore | 5612 } // namespace WebCore |
| OLD | NEW |