diff options
Diffstat (limited to 'Source/WebCore/html/shadow/ProgressShadowElement.h')
-rw-r--r-- | Source/WebCore/html/shadow/ProgressShadowElement.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/Source/WebCore/html/shadow/ProgressShadowElement.h b/Source/WebCore/html/shadow/ProgressShadowElement.h index 78bc49ec4..f7ccb500a 100644 --- a/Source/WebCore/html/shadow/ProgressShadowElement.h +++ b/Source/WebCore/html/shadow/ProgressShadowElement.h @@ -29,10 +29,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef ProgressShadowElement_h -#define ProgressShadowElement_h +#pragma once -#if ENABLE(PROGRESS_ELEMENT) #include "HTMLDivElement.h" #include <wtf/Forward.h> @@ -48,58 +46,56 @@ protected: ProgressShadowElement(Document&); private: - virtual bool rendererIsNeeded(const RenderStyle&) override; + bool rendererIsNeeded(const RenderStyle&) override; }; class ProgressInnerElement final : public ProgressShadowElement { public: - static PassRefPtr<ProgressInnerElement> create(Document&); + static Ref<ProgressInnerElement> create(Document&); private: ProgressInnerElement(Document&); - virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override; - virtual bool rendererIsNeeded(const RenderStyle&) override; + RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override; + bool rendererIsNeeded(const RenderStyle&) override; }; -inline PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document& document) +inline Ref<ProgressInnerElement> ProgressInnerElement::create(Document& document) { - RefPtr<ProgressInnerElement> result = adoptRef(new ProgressInnerElement(document)); + Ref<ProgressInnerElement> result = adoptRef(*new ProgressInnerElement(document)); result->setPseudo(AtomicString("-webkit-progress-inner-element", AtomicString::ConstructFromLiteral)); return result; } class ProgressBarElement final : public ProgressShadowElement { public: - static PassRefPtr<ProgressBarElement> create(Document&); + static Ref<ProgressBarElement> create(Document&); private: ProgressBarElement(Document&); }; -inline PassRefPtr<ProgressBarElement> ProgressBarElement::create(Document& document) +inline Ref<ProgressBarElement> ProgressBarElement::create(Document& document) { - RefPtr<ProgressBarElement> result = adoptRef(new ProgressBarElement(document)); + Ref<ProgressBarElement> result = adoptRef(*new ProgressBarElement(document)); result->setPseudo(AtomicString("-webkit-progress-bar", AtomicString::ConstructFromLiteral)); return result; } class ProgressValueElement final : public ProgressShadowElement { public: - static PassRefPtr<ProgressValueElement> create(Document&); + static Ref<ProgressValueElement> create(Document&); void setWidthPercentage(double); private: ProgressValueElement(Document&); }; -inline PassRefPtr<ProgressValueElement> ProgressValueElement::create(Document& document) +inline Ref<ProgressValueElement> ProgressValueElement::create(Document& document) { - RefPtr<ProgressValueElement> result = adoptRef(new ProgressValueElement(document)); + Ref<ProgressValueElement> result = adoptRef(*new ProgressValueElement(document)); result->setPseudo(AtomicString("-webkit-progress-value", AtomicString::ConstructFromLiteral)); return result; } -} -#endif // ENABLE(PROGRESS_ELEMENT) -#endif // ProgressShadowElement_h +} // namespace WebCore |