| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "core/dom/NodeList.h" | 38 #include "core/dom/NodeList.h" |
| 39 #include "core/dom/StaticNodeList.h" | 39 #include "core/dom/StaticNodeList.h" |
| 40 #include "core/dom/TagCollection.h" | 40 #include "core/dom/TagCollection.h" |
| 41 #include "core/dom/TaskRunnerHelper.h" | 41 #include "core/dom/TaskRunnerHelper.h" |
| 42 #include "core/editing/EditingUtilities.h" | 42 #include "core/editing/EditingUtilities.h" |
| 43 #include "core/editing/serializers/Serialization.h" | 43 #include "core/editing/serializers/Serialization.h" |
| 44 #include "core/events/Event.h" | 44 #include "core/events/Event.h" |
| 45 #include "core/exported/WebPluginContainerImpl.h" | 45 #include "core/exported/WebPluginContainerImpl.h" |
| 46 #include "core/html/HTMLCollection.h" | 46 #include "core/html/HTMLCollection.h" |
| 47 #include "core/html/HTMLElement.h" | 47 #include "core/html/HTMLElement.h" |
| 48 #include "core/html/HTMLFrameOwnerElement.h" |
| 48 #include "core/layout/LayoutEmbeddedContent.h" | 49 #include "core/layout/LayoutEmbeddedContent.h" |
| 49 #include "core/layout/LayoutObject.h" | 50 #include "core/layout/LayoutObject.h" |
| 50 #include "platform/wtf/PtrUtil.h" | 51 #include "platform/wtf/PtrUtil.h" |
| 51 #include "public/platform/WebString.h" | 52 #include "public/platform/WebString.h" |
| 52 #include "public/web/WebDOMEvent.h" | 53 #include "public/web/WebDOMEvent.h" |
| 53 #include "public/web/WebDocument.h" | 54 #include "public/web/WebDocument.h" |
| 54 #include "public/web/WebElement.h" | 55 #include "public/web/WebElement.h" |
| 55 #include "public/web/WebElementCollection.h" | 56 #include "public/web/WebElementCollection.h" |
| 56 | 57 |
| 57 namespace blink { | 58 namespace blink { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 93 } |
| 93 | 94 |
| 94 WebString WebNode::NodeValue() const { | 95 WebString WebNode::NodeValue() const { |
| 95 return private_->nodeValue(); | 96 return private_->nodeValue(); |
| 96 } | 97 } |
| 97 | 98 |
| 98 WebDocument WebNode::GetDocument() const { | 99 WebDocument WebNode::GetDocument() const { |
| 99 return WebDocument(&private_->GetDocument()); | 100 return WebDocument(&private_->GetDocument()); |
| 100 } | 101 } |
| 101 | 102 |
| 103 WebFrame* WebNode::ContentFrame() const { |
| 104 Frame* target_frame = nullptr; |
| 105 if (private_->IsFrameOwnerElement()) |
| 106 target_frame = ToHTMLFrameOwnerElement(private_.Get())->ContentFrame(); |
| 107 else |
| 108 target_frame = private_->GetDocument().GetFrame(); |
| 109 return WebFrame::FromFrame(target_frame); |
| 110 } |
| 111 |
| 102 WebNode WebNode::FirstChild() const { | 112 WebNode WebNode::FirstChild() const { |
| 103 return WebNode(private_->firstChild()); | 113 return WebNode(private_->firstChild()); |
| 104 } | 114 } |
| 105 | 115 |
| 106 WebNode WebNode::LastChild() const { | 116 WebNode WebNode::LastChild() const { |
| 107 return WebNode(private_->lastChild()); | 117 return WebNode(private_->lastChild()); |
| 108 } | 118 } |
| 109 | 119 |
| 110 WebNode WebNode::PreviousSibling() const { | 120 WebNode WebNode::PreviousSibling() const { |
| 111 return WebNode(private_->previousSibling()); | 121 return WebNode(private_->previousSibling()); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 WebNode& WebNode::operator=(Node* node) { | 210 WebNode& WebNode::operator=(Node* node) { |
| 201 private_ = node; | 211 private_ = node; |
| 202 return *this; | 212 return *this; |
| 203 } | 213 } |
| 204 | 214 |
| 205 WebNode::operator Node*() const { | 215 WebNode::operator Node*() const { |
| 206 return private_.Get(); | 216 return private_.Get(); |
| 207 } | 217 } |
| 208 | 218 |
| 209 } // namespace blink | 219 } // namespace blink |
| OLD | NEW |