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

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: Ensure we have a valid PluginView before using it. 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 595b7a78f070d829669d13b9dc3b21215b5c1132..198f0ceed04767ee5259e51e14d041bcaeca7547 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() {
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698