| 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 |
| 11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
| 12 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
| 13 * | 13 * |
| 14 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 * Library General Public License for more details. | 17 * Library General Public License for more details. |
| 18 * | 18 * |
| 19 * You should have received a copy of the GNU Library General Public License | 19 * You should have received a copy of the GNU Library General Public License |
| 20 * along with this library; see the file COPYING.LIB. If not, write to | 20 * along with this library; see the file COPYING.LIB. If not, write to |
| 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 22 * Boston, MA 02110-1301, USA. | 22 * Boston, MA 02110-1301, USA. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #include "config.h" | 25 #include "config.h" |
| 26 #include "core/dom/Node.h" | 26 #include "core/dom/Node.h" |
| 27 | 27 |
| 28 #include "bindings/core/v8/DOMDataStore.h" |
| 28 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
| 29 #include "bindings/core/v8/ScriptCallStackFactory.h" | 30 #include "bindings/core/v8/ScriptCallStackFactory.h" |
| 31 #include "bindings/core/v8/V8DOMWrapper.h" |
| 30 #include "core/HTMLNames.h" | 32 #include "core/HTMLNames.h" |
| 31 #include "core/XMLNames.h" | 33 #include "core/XMLNames.h" |
| 32 #include "core/accessibility/AXObjectCache.h" | 34 #include "core/accessibility/AXObjectCache.h" |
| 33 #include "core/css/resolver/StyleResolver.h" | 35 #include "core/css/resolver/StyleResolver.h" |
| 34 #include "core/dom/Attr.h" | 36 #include "core/dom/Attr.h" |
| 35 #include "core/dom/Attribute.h" | 37 #include "core/dom/Attribute.h" |
| 36 #include "core/dom/ChildListMutationScope.h" | 38 #include "core/dom/ChildListMutationScope.h" |
| 37 #include "core/dom/ChildNodeList.h" | 39 #include "core/dom/ChildNodeList.h" |
| 38 #include "core/dom/DOMImplementation.h" | 40 #include "core/dom/DOMImplementation.h" |
| 39 #include "core/dom/Document.h" | 41 #include "core/dom/Document.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 68 #include "core/events/GestureEvent.h" | 70 #include "core/events/GestureEvent.h" |
| 69 #include "core/events/KeyboardEvent.h" | 71 #include "core/events/KeyboardEvent.h" |
| 70 #include "core/events/MouseEvent.h" | 72 #include "core/events/MouseEvent.h" |
| 71 #include "core/events/MutationEvent.h" | 73 #include "core/events/MutationEvent.h" |
| 72 #include "core/events/TextEvent.h" | 74 #include "core/events/TextEvent.h" |
| 73 #include "core/events/TouchEvent.h" | 75 #include "core/events/TouchEvent.h" |
| 74 #include "core/events/UIEvent.h" | 76 #include "core/events/UIEvent.h" |
| 75 #include "core/events/WheelEvent.h" | 77 #include "core/events/WheelEvent.h" |
| 76 #include "core/frame/EventHandlerRegistry.h" | 78 #include "core/frame/EventHandlerRegistry.h" |
| 77 #include "core/frame/LocalFrame.h" | 79 #include "core/frame/LocalFrame.h" |
| 80 #include "core/frame/Settings.h" |
| 78 #include "core/html/HTMLAnchorElement.h" | 81 #include "core/html/HTMLAnchorElement.h" |
| 79 #include "core/html/HTMLDialogElement.h" | 82 #include "core/html/HTMLDialogElement.h" |
| 80 #include "core/html/HTMLFrameOwnerElement.h" | 83 #include "core/html/HTMLFrameOwnerElement.h" |
| 81 #include "core/html/HTMLStyleElement.h" | 84 #include "core/html/HTMLStyleElement.h" |
| 82 #include "core/page/ContextMenuController.h" | 85 #include "core/page/ContextMenuController.h" |
| 83 #include "core/page/EventHandler.h" | 86 #include "core/page/EventHandler.h" |
| 84 #include "core/page/Page.h" | 87 #include "core/page/Page.h" |
| 85 #include "core/frame/Settings.h" | |
| 86 #include "core/rendering/FlowThreadController.h" | 88 #include "core/rendering/FlowThreadController.h" |
| 87 #include "core/rendering/RenderBox.h" | 89 #include "core/rendering/RenderBox.h" |
| 88 #include "core/svg/graphics/SVGImage.h" | 90 #include "core/svg/graphics/SVGImage.h" |
| 89 #include "platform/EventDispatchForbiddenScope.h" | 91 #include "platform/EventDispatchForbiddenScope.h" |
| 90 #include "platform/Partitions.h" | 92 #include "platform/Partitions.h" |
| 91 #include "platform/TraceEvent.h" | 93 #include "platform/TraceEvent.h" |
| 92 #include "platform/TracedValue.h" | 94 #include "platform/TracedValue.h" |
| 93 #include "wtf/HashSet.h" | 95 #include "wtf/HashSet.h" |
| 94 #include "wtf/PassOwnPtr.h" | 96 #include "wtf/PassOwnPtr.h" |
| 95 #include "wtf/RefCountedLeakCounter.h" | 97 #include "wtf/RefCountedLeakCounter.h" |
| (...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2460 case Node::DOCUMENT_NODE: | 2462 case Node::DOCUMENT_NODE: |
| 2461 case Node::DOCUMENT_FRAGMENT_NODE: | 2463 case Node::DOCUMENT_FRAGMENT_NODE: |
| 2462 return toContainerNode(this)->countChildren(); | 2464 return toContainerNode(this)->countChildren(); |
| 2463 case Node::DOCUMENT_TYPE_NODE: | 2465 case Node::DOCUMENT_TYPE_NODE: |
| 2464 return 0; | 2466 return 0; |
| 2465 } | 2467 } |
| 2466 ASSERT_NOT_REACHED(); | 2468 ASSERT_NOT_REACHED(); |
| 2467 return 0; | 2469 return 0; |
| 2468 } | 2470 } |
| 2469 | 2471 |
| 2472 v8::Handle<v8::Object> Node::wrap(v8::Handle<v8::Object> creationContext, v8::Is
olate* isolate) |
| 2473 { |
| 2474 ASSERT(!DOMDataStore::containsWrapperNonTemplate(this, isolate)); |
| 2475 |
| 2476 const WrapperTypeInfo* wrapperType = wrapperTypeInfo(); |
| 2477 |
| 2478 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, wrapperType, toInternalPointer(), isolate); |
| 2479 if (UNLIKELY(wrapper.IsEmpty())) |
| 2480 return wrapper; |
| 2481 |
| 2482 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); |
| 2483 wrapperType->refObject(toInternalPointer()); |
| 2484 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp
er, isolate); |
| 2485 return wrapper; |
| 2486 } |
| 2487 |
| 2470 } // namespace blink | 2488 } // namespace blink |
| 2471 | 2489 |
| 2472 #ifndef NDEBUG | 2490 #ifndef NDEBUG |
| 2473 | 2491 |
| 2474 void showNode(const blink::Node* node) | 2492 void showNode(const blink::Node* node) |
| 2475 { | 2493 { |
| 2476 if (node) | 2494 if (node) |
| 2477 node->showNode(""); | 2495 node->showNode(""); |
| 2478 } | 2496 } |
| 2479 | 2497 |
| 2480 void showTree(const blink::Node* node) | 2498 void showTree(const blink::Node* node) |
| 2481 { | 2499 { |
| 2482 if (node) | 2500 if (node) |
| 2483 node->showTreeForThis(); | 2501 node->showTreeForThis(); |
| 2484 } | 2502 } |
| 2485 | 2503 |
| 2486 void showNodePath(const blink::Node* node) | 2504 void showNodePath(const blink::Node* node) |
| 2487 { | 2505 { |
| 2488 if (node) | 2506 if (node) |
| 2489 node->showNodePathForThis(); | 2507 node->showNodePathForThis(); |
| 2490 } | 2508 } |
| 2491 | 2509 |
| 2492 #endif | 2510 #endif |
| OLD | NEW |