From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/LabelableElement.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'Source/WebCore/html/LabelableElement.h') diff --git a/Source/WebCore/html/LabelableElement.h b/Source/WebCore/html/LabelableElement.h index 014f11127..5e42ba4e7 100644 --- a/Source/WebCore/html/LabelableElement.h +++ b/Source/WebCore/html/LabelableElement.h @@ -28,8 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LabelableElement_h -#define LabelableElement_h +#pragma once #include "HTMLElement.h" @@ -40,23 +39,19 @@ class LabelableElement : public HTMLElement { public: virtual ~LabelableElement(); - PassRefPtr labels(); + WEBCORE_EXPORT RefPtr labels(); virtual bool supportLabels() const { return false; } protected: LabelableElement(const QualifiedName& tagName, Document&); private: - virtual bool isLabelable() const override final { return true; } + bool isLabelable() const final { return true; } }; -void isLabelableElement(const LabelableElement&); // Catch unnecessary runtime check of type known at compile time. -inline bool isLabelableElement(const HTMLElement& element) { return element.isLabelable(); } -inline bool isLabelableElement(const Node& node) { return node.isHTMLElement() && toHTMLElement(node).isLabelable(); } -template <> inline bool isElementOfType(const Element& element) { return isLabelableElement(element); } - -NODE_TYPE_CASTS(LabelableElement) - } // namespace WebCore -#endif +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::LabelableElement) + static bool isType(const WebCore::HTMLElement& element) { return element.isLabelable(); } + static bool isType(const WebCore::Node& node) { return is(node) && isType(downcast(node)); } +SPECIALIZE_TYPE_TRAITS_END() -- cgit v1.2.1