| 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #include "sky/engine/core/editing/htmlediting.h" | 54 #include "sky/engine/core/editing/htmlediting.h" |
| 55 #include "sky/engine/core/events/Event.h" | 55 #include "sky/engine/core/events/Event.h" |
| 56 #include "sky/engine/core/events/EventDispatchMediator.h" | 56 #include "sky/engine/core/events/EventDispatchMediator.h" |
| 57 #include "sky/engine/core/events/EventDispatcher.h" | 57 #include "sky/engine/core/events/EventDispatcher.h" |
| 58 #include "sky/engine/core/events/EventListener.h" | 58 #include "sky/engine/core/events/EventListener.h" |
| 59 #include "sky/engine/core/events/KeyboardEvent.h" | 59 #include "sky/engine/core/events/KeyboardEvent.h" |
| 60 #include "sky/engine/core/events/TextEvent.h" | 60 #include "sky/engine/core/events/TextEvent.h" |
| 61 #include "sky/engine/core/events/UIEvent.h" | 61 #include "sky/engine/core/events/UIEvent.h" |
| 62 #include "sky/engine/core/frame/LocalFrame.h" | 62 #include "sky/engine/core/frame/LocalFrame.h" |
| 63 #include "sky/engine/core/frame/Settings.h" | 63 #include "sky/engine/core/frame/Settings.h" |
| 64 #include "sky/engine/core/html/HTMLAnchorElement.h" | |
| 65 #include "sky/engine/core/html/HTMLStyleElement.h" | |
| 66 #include "sky/engine/core/page/EventHandler.h" | 64 #include "sky/engine/core/page/EventHandler.h" |
| 67 #include "sky/engine/core/page/Page.h" | 65 #include "sky/engine/core/page/Page.h" |
| 68 #include "sky/engine/core/rendering/RenderBox.h" | 66 #include "sky/engine/core/rendering/RenderBox.h" |
| 69 #include "sky/engine/platform/EventDispatchForbiddenScope.h" | 67 #include "sky/engine/platform/EventDispatchForbiddenScope.h" |
| 70 #include "sky/engine/platform/JSONValues.h" | 68 #include "sky/engine/platform/JSONValues.h" |
| 71 #include "sky/engine/platform/Partitions.h" | 69 #include "sky/engine/platform/Partitions.h" |
| 72 #include "sky/engine/platform/TraceEvent.h" | 70 #include "sky/engine/platform/TraceEvent.h" |
| 73 #include "sky/engine/tonic/dart_gc_visitor.h" | 71 #include "sky/engine/tonic/dart_gc_visitor.h" |
| 74 #include "sky/engine/wtf/HashSet.h" | 72 #include "sky/engine/wtf/HashSet.h" |
| 75 #include "sky/engine/wtf/PassOwnPtr.h" | 73 #include "sky/engine/wtf/PassOwnPtr.h" |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 for (Node* child = node->firstChild(); child; child = child->nextSibling()) | 1216 for (Node* child = node->firstChild(); child; child = child->nextSibling()) |
| 1219 showSubTreeAcrossFrame(child, markedNode, indent + "\t"); | 1217 showSubTreeAcrossFrame(child, markedNode, indent + "\t"); |
| 1220 } | 1218 } |
| 1221 | 1219 |
| 1222 #endif | 1220 #endif |
| 1223 | 1221 |
| 1224 // -------- | 1222 // -------- |
| 1225 | 1223 |
| 1226 Element* Node::enclosingLinkEventParentOrSelf() | 1224 Element* Node::enclosingLinkEventParentOrSelf() |
| 1227 { | 1225 { |
| 1228 for (Node* node = this; node; node = NodeRenderingTraversal::parent(node)) { | |
| 1229 // For imagemaps, the enclosing link node is the associated area element
not the image itself. | |
| 1230 // So we don't let images be the enclosingLinkNode, even though isLink s
ometimes returns true | |
| 1231 // for them. | |
| 1232 if (node->isLink() && !isHTMLImageElement(*node)) { | |
| 1233 // Casting to Element is safe because only HTMLAnchorElement, HTMLIm
ageElement and | |
| 1234 // SVGAElement can return true for isLink(). | |
| 1235 return toElement(node); | |
| 1236 } | |
| 1237 } | |
| 1238 | |
| 1239 return 0; | 1226 return 0; |
| 1240 } | 1227 } |
| 1241 | 1228 |
| 1242 const AtomicString& Node::interfaceName() const | 1229 const AtomicString& Node::interfaceName() const |
| 1243 { | 1230 { |
| 1244 return EventTargetNames::Node; | 1231 return EventTargetNames::Node; |
| 1245 } | 1232 } |
| 1246 | 1233 |
| 1247 ExecutionContext* Node::executionContext() const | 1234 ExecutionContext* Node::executionContext() const |
| 1248 { | 1235 { |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 node->showTreeForThis(); | 1641 node->showTreeForThis(); |
| 1655 } | 1642 } |
| 1656 | 1643 |
| 1657 void showNodePath(const blink::Node* node) | 1644 void showNodePath(const blink::Node* node) |
| 1658 { | 1645 { |
| 1659 if (node) | 1646 if (node) |
| 1660 node->showNodePathForThis(); | 1647 node->showNodePathForThis(); |
| 1661 } | 1648 } |
| 1662 | 1649 |
| 1663 #endif | 1650 #endif |
| OLD | NEW |