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

Unified Diff: third_party/WebKit/Source/core/html/PluginDocument.cpp

Issue 2764313002: Move plugins to be stored in HTMLPlugInElement. (Closed)
Patch Set: Created 3 years, 9 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/core/html/PluginDocument.cpp
diff --git a/third_party/WebKit/Source/core/html/PluginDocument.cpp b/third_party/WebKit/Source/core/html/PluginDocument.cpp
index 9c4c34c201d0ce0adc1d99d70817ebed1f7f3f77..c2445be8c5f6d5dc034fade5682aee8de5b6cc28 100644
--- a/third_party/WebKit/Source/core/html/PluginDocument.cpp
+++ b/third_party/WebKit/Source/core/html/PluginDocument.cpp
@@ -34,6 +34,7 @@
#include "core/html/HTMLBodyElement.h"
#include "core/html/HTMLEmbedElement.h"
#include "core/html/HTMLHtmlElement.h"
+#include "core/html/HTMLPlugInElement.h"
#include "core/layout/LayoutEmbeddedObject.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoader.h"
@@ -175,15 +176,9 @@ DocumentParser* PluginDocument::createParser() {
}
PluginView* PluginDocument::pluginView() {
- if (m_pluginNode && m_pluginNode->layoutObject()) {
- CHECK(m_pluginNode->layoutObject()->isEmbeddedObject());
- FrameViewBase* frameViewBase =
- toLayoutEmbeddedObject(m_pluginNode->layoutObject())->frameViewBase();
- if (!frameViewBase || !frameViewBase->isPluginContainer())
- return nullptr;
- return toPluginView(frameViewBase);
- }
- return 0;
+ return m_pluginNode && isHTMLPlugInElement(m_pluginNode)
haraken 2017/03/22 15:32:33 Is it possible that m_pluginNode is not a plugin e
joelhockey 2017/03/27 06:42:21 No. m_pluginNode is always HTMLPlugInElement, or
+ ? toHTMLPlugInElement(m_pluginNode)->plugin()
+ : nullptr;
}
Node* PluginDocument::pluginNode() {

Powered by Google App Engine
This is Rietveld 408576698