| Index: third_party/WebKit/Source/core/exported/WebNode.cpp
|
| diff --git a/third_party/WebKit/Source/core/exported/WebNode.cpp b/third_party/WebKit/Source/core/exported/WebNode.cpp
|
| index a9cb9678f2e2564efe084943da15cf72f23b31da..17a6c066a3f6401beead4aa2a88d6ac22a07a26a 100644
|
| --- a/third_party/WebKit/Source/core/exported/WebNode.cpp
|
| +++ b/third_party/WebKit/Source/core/exported/WebNode.cpp
|
| @@ -45,6 +45,7 @@
|
| #include "core/exported/WebPluginContainerImpl.h"
|
| #include "core/html/HTMLCollection.h"
|
| #include "core/html/HTMLElement.h"
|
| +#include "core/html/HTMLFrameOwnerElement.h"
|
| #include "core/layout/LayoutEmbeddedContent.h"
|
| #include "core/layout/LayoutObject.h"
|
| #include "platform/wtf/PtrUtil.h"
|
| @@ -99,6 +100,15 @@ WebDocument WebNode::GetDocument() const {
|
| return WebDocument(&private_->GetDocument());
|
| }
|
|
|
| +WebFrame* WebNode::ContentFrame() const {
|
| + Frame* target_frame = nullptr;
|
| + if (private_->IsFrameOwnerElement())
|
| + target_frame = ToHTMLFrameOwnerElement(private_.Get())->ContentFrame();
|
| + else
|
| + target_frame = private_->GetDocument().GetFrame();
|
| + return WebFrame::FromFrame(target_frame);
|
| +}
|
| +
|
| WebNode WebNode::FirstChild() const {
|
| return WebNode(private_->firstChild());
|
| }
|
|
|