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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2764313002: Move plugins to be stored in HTMLPlugInElement. (Closed)
Patch Set: Update comments about duplicating code Created 3 years, 8 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 9e41f765649fb17d020fe6f900fca37b8307dda5..0cbe2398d46789970aa9b47754bc01859feb26e9 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -164,6 +164,7 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLMetaElement.h"
+#include "core/html/HTMLPlugInElement.h"
#include "core/html/HTMLScriptElement.h"
#include "core/html/HTMLTemplateElement.h"
#include "core/html/HTMLTitleElement.h"
@@ -367,6 +368,13 @@ static inline bool isValidNamePart(UChar32 c) {
}
static FrameViewBase* frameViewBaseForElement(const Element& focusedElement) {
+ // Return either plugin or frame.
+ // TODO(joelhockey): FrameViewBase class will soon be removed. It will be
+ // replaced with Focusable ABC that FrameView and PluginView will implement
+ // and this method will return Focusable.
+ if (isHTMLPlugInElement(focusedElement))
+ return toHTMLPlugInElement(focusedElement).plugin();
dcheng 2017/04/05 09:12:24 Btw, I would suggest just changing 381 to use plug
joelhockey 2017/04/05 22:10:31 I'll stick with this for right now in the hope of
+
LayoutObject* layoutObject = focusedElement.layoutObject();
if (!layoutObject || !layoutObject->isLayoutPart())
return 0;

Powered by Google App Engine
This is Rietveld 408576698