Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: third_party/WebKit/Source/web/WebNode.cpp

Issue 2888203006: Move the logic to retrieve the WebPluginContainer to LocalFrame and Node. (Closed)
Patch Set: Rename & format. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebNode.cpp
diff --git a/third_party/WebKit/Source/web/WebNode.cpp b/third_party/WebKit/Source/web/WebNode.cpp
index 4f9f48b9fde0e1ddb0ceec374a27d461aa97bb36..7cdeacfb3a601c389af1c7bba138163a747ae55b 100644
--- a/third_party/WebKit/Source/web/WebNode.cpp
+++ b/third_party/WebKit/Source/web/WebNode.cpp
@@ -55,7 +55,6 @@
#include "public/web/WebDocument.h"
#include "public/web/WebElement.h"
#include "public/web/WebElementCollection.h"
-#include "public/web/WebPluginContainer.h"
namespace blink {
@@ -174,25 +173,8 @@ bool WebNode::Focused() const {
return private_->IsFocused();
}
-WebPluginContainer* WebNode::PluginContainerFromNode(const Node* node) {
- if (!node)
- return nullptr;
-
- if (!isHTMLObjectElement(node) && !isHTMLEmbedElement(node))
- return nullptr;
-
- LayoutObject* object = node->GetLayoutObject();
- if (object && object->IsLayoutPart()) {
- PluginView* plugin = ToLayoutPart(object)->Plugin();
- if (plugin && plugin->IsPluginContainer())
- return ToWebPluginContainerBase(plugin);
- }
-
- return nullptr;
-}
-
WebPluginContainer* WebNode::PluginContainer() const {
- return PluginContainerFromNode(ConstUnwrap<Node>());
+ return private_->GetWebPluginContainerBase();
}
WebAXObject WebNode::AccessibilityObject() {

Powered by Google App Engine
This is Rietveld 408576698