diff options
Diffstat (limited to 'Source/WebCore/html/HTMLOptionElement.h')
-rw-r--r-- | Source/WebCore/html/HTMLOptionElement.h | 59 |
1 files changed, 23 insertions, 36 deletions
diff --git a/Source/WebCore/html/HTMLOptionElement.h b/Source/WebCore/html/HTMLOptionElement.h index d64a8bc47..24e905474 100644 --- a/Source/WebCore/html/HTMLOptionElement.h +++ b/Source/WebCore/html/HTMLOptionElement.h @@ -2,7 +2,7 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2004, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2010, 2011, 2016 Apple Inc. All rights reserved. * Copyright (C) 2010 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or @@ -22,8 +22,7 @@ * */ -#ifndef HTMLOptionElement_h -#define HTMLOptionElement_h +#pragma once #include "HTMLElement.h" @@ -34,33 +33,32 @@ class HTMLSelectElement; class HTMLOptionElement final : public HTMLElement { public: - static PassRefPtr<HTMLOptionElement> create(Document&); - static PassRefPtr<HTMLOptionElement> create(const QualifiedName&, Document&); - static PassRefPtr<HTMLOptionElement> createForJSConstructor(Document&, const String& data, const String& value, - bool defaultSelected, bool selected, ExceptionCode&); + static Ref<HTMLOptionElement> create(Document&); + static Ref<HTMLOptionElement> create(const QualifiedName&, Document&); + static ExceptionOr<Ref<HTMLOptionElement>> createForJSConstructor(Document&, const String& data, const String& value, bool defaultSelected, bool selected); - virtual String text() const; - void setText(const String&, ExceptionCode&); + WEBCORE_EXPORT String text() const; + void setText(const String&); - int index() const; + WEBCORE_EXPORT int index() const; - String value() const; - void setValue(const String&); + WEBCORE_EXPORT String value() const; + WEBCORE_EXPORT void setValue(const String&); - bool selected(); - void setSelected(bool); + WEBCORE_EXPORT bool selected(); + WEBCORE_EXPORT void setSelected(bool); #if ENABLE(DATALIST_ELEMENT) HTMLDataListElement* ownerDataListElement() const; #endif HTMLSelectElement* ownerSelectElement() const; - String label() const; - void setLabel(const String&); + WEBCORE_EXPORT String label() const; + WEBCORE_EXPORT void setLabel(const String&); bool ownElementDisabled() const { return m_disabled; } - virtual bool isDisabledFormControl() const override; + bool isDisabledFormControl() const final; String textIndentedToRespectGroupLabel() const; @@ -69,34 +67,23 @@ public: private: HTMLOptionElement(const QualifiedName&, Document&); - virtual bool isFocusable() const override; - virtual bool rendererIsNeeded(const RenderStyle&) override { return false; } - virtual void didAttachRenderers() override; - virtual void willDetachRenderers() override; + bool isFocusable() const final; + bool rendererIsNeeded(const RenderStyle&) final { return false; } + bool matchesDefaultPseudoClass() const final; - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; + void parseAttribute(const QualifiedName&, const AtomicString&) final; - virtual InsertionNotificationRequest insertedInto(ContainerNode&) override; - virtual void accessKeyAction(bool) override; + InsertionNotificationRequest insertedInto(ContainerNode&) final; + void accessKeyAction(bool) final; - virtual void childrenChanged(const ChildChange&) override; + void childrenChanged(const ChildChange&) final; - // <option> never has a renderer so we manually manage a cached style. - void updateNonRenderStyle(); - virtual RenderStyle* nonRendererStyle() const override; - virtual PassRefPtr<RenderStyle> customStyleForRenderer() override; - - virtual void didRecalcStyle(Style::Change) override; + void willResetComputedStyle() final; String collectOptionInnerText() const; bool m_disabled; bool m_isSelected; - RefPtr<RenderStyle> m_style; }; -NODE_TYPE_CASTS(HTMLOptionElement) - } // namespace - -#endif |