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

Unified Diff: Source/core/html/HTMLPlugInElement.h

Issue 202153005: Add isHTMLPlugInElement() helpers for consistency with other HTML elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Keep virtual function Created 6 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
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInElement.h
diff --git a/Source/core/html/HTMLPlugInElement.h b/Source/core/html/HTMLPlugInElement.h
index 74e7a0cb7018d714f4ba427ded2008f782e042e7..92ed0f2590add51fe88e4b59ddd54df900f21da1 100644
--- a/Source/core/html/HTMLPlugInElement.h
+++ b/Source/core/html/HTMLPlugInElement.h
@@ -98,7 +98,6 @@ private:
virtual void attach(const AttachContext& = AttachContext()) OVERRIDE FINAL;
virtual void detach(const AttachContext& = AttachContext()) OVERRIDE FINAL;
virtual void finishParsingChildren() OVERRIDE FINAL;
- virtual bool isPluginElement() const OVERRIDE FINAL;
// Element functions:
virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
@@ -111,6 +110,7 @@ private:
// HTMLElement function:
virtual bool hasCustomFocusLogic() const OVERRIDE;
+ virtual bool isPluginElement() const OVERRIDE FINAL;
// Return any existing RenderWidget without triggering relayout, or 0 if it
// doesn't yet exist.
@@ -138,7 +138,17 @@ private:
DisplayState m_displayState;
};
-DEFINE_ELEMENT_TYPE_CASTS(HTMLPlugInElement, isPluginElement());
+inline bool isHTMLPlugInElement(const Element& element)
+{
+ return element.isHTMLElement() && toHTMLElement(element).isPluginElement();
+}
+
+inline bool isHTMLPlugInElement(const HTMLElement& element)
+{
+ return element.isPluginElement();
+}
+
+DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement);
} // namespace WebCore
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698