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/core/html/PluginDocument.cpp

Issue 2262053002: Allow rewriting of Flash embeds in PluginDocument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8f4f31157243e27f541b4a4fd12e3c9aea1403af..62ee3fbecc3b5c955d445254b30ff77a1d83702f 100644
--- a/third_party/WebKit/Source/core/html/PluginDocument.cpp
+++ b/third_party/WebKit/Source/core/html/PluginDocument.cpp
@@ -179,7 +179,10 @@ Widget* PluginDocument::pluginWidget()
{
if (m_pluginNode && m_pluginNode->layoutObject()) {
CHECK(m_pluginNode->layoutObject()->isEmbeddedObject());
- return toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget();
+ Widget* widget = toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget();
+ if (!widget || !widget->isPluginContainer())
+ return nullptr;
+ return widget;
}
return 0;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698