CTTE: Convert some straggling Element subclasses constructors to take a Document&
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Sep 2013 05:00:18 +0000 (05:00 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Sep 2013 05:00:18 +0000 (05:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121533

Reviewed by Anders Carlsson.

* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::MeterShadowElement):
(WebCore::MeterInnerElement::MeterInnerElement):
* html/shadow/MeterShadowElement.h:
(WebCore::MeterInnerElement::create):
(WebCore::MeterBarElement::create):
(WebCore::MeterValueElement::create):
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::ProgressShadowElement):
(WebCore::ProgressInnerElement::ProgressInnerElement):
(WebCore::ProgressBarElement::ProgressBarElement):
(WebCore::ProgressValueElement::ProgressValueElement):
* html/shadow/ProgressShadowElement.h:
(WebCore::ProgressInnerElement::create):
(WebCore::ProgressBarElement::create):
(WebCore::ProgressValueElement::create):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::create):
* html/shadow/SpinButtonElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerContainer::TextControlInnerContainer):
(WebCore::TextControlInnerContainer::create):
(WebCore::TextControlInnerElement::TextControlInnerElement):
(WebCore::TextControlInnerElement::create):
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
(WebCore::TextControlInnerTextElement::create):
(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
(WebCore::SearchFieldResultsButtonElement::create):
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
(WebCore::SearchFieldCancelButtonElement::create):
(WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
(WebCore::InputFieldSpeechButtonElement::create):
* html/shadow/TextControlInnerElements.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMeterElement.cpp
Source/WebCore/html/HTMLProgressElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/SearchInputType.cpp
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/shadow/MeterShadowElement.cpp
Source/WebCore/html/shadow/MeterShadowElement.h
Source/WebCore/html/shadow/ProgressShadowElement.cpp
Source/WebCore/html/shadow/ProgressShadowElement.h
Source/WebCore/html/shadow/SpinButtonElement.cpp
Source/WebCore/html/shadow/SpinButtonElement.h
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/TextControlInnerElements.h

index a2f6d40..42b31fb 100644 (file)
@@ -1,3 +1,55 @@
+2013-09-17  Sam Weinig  <sam@webkit.org>
+
+        CTTE: Convert some straggling Element subclasses constructors to take a Document&
+        https://bugs.webkit.org/show_bug.cgi?id=121533
+
+        Reviewed by Anders Carlsson.
+
+        * html/HTMLMeterElement.cpp:
+        (WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
+        * html/HTMLProgressElement.cpp:
+        (WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
+        * html/SearchInputType.cpp:
+        (WebCore::SearchInputType::createShadowSubtree):
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::createShadowSubtree):
+        * html/shadow/MeterShadowElement.cpp:
+        (WebCore::MeterShadowElement::MeterShadowElement):
+        (WebCore::MeterInnerElement::MeterInnerElement):
+        * html/shadow/MeterShadowElement.h:
+        (WebCore::MeterInnerElement::create):
+        (WebCore::MeterBarElement::create):
+        (WebCore::MeterValueElement::create):
+        * html/shadow/ProgressShadowElement.cpp:
+        (WebCore::ProgressShadowElement::ProgressShadowElement):
+        (WebCore::ProgressInnerElement::ProgressInnerElement):
+        (WebCore::ProgressBarElement::ProgressBarElement):
+        (WebCore::ProgressValueElement::ProgressValueElement):
+        * html/shadow/ProgressShadowElement.h:
+        (WebCore::ProgressInnerElement::create):
+        (WebCore::ProgressBarElement::create):
+        (WebCore::ProgressValueElement::create):
+        * html/shadow/SpinButtonElement.cpp:
+        (WebCore::SpinButtonElement::SpinButtonElement):
+        (WebCore::SpinButtonElement::create):
+        * html/shadow/SpinButtonElement.h:
+        * html/shadow/TextControlInnerElements.cpp:
+        (WebCore::TextControlInnerContainer::TextControlInnerContainer):
+        (WebCore::TextControlInnerContainer::create):
+        (WebCore::TextControlInnerElement::TextControlInnerElement):
+        (WebCore::TextControlInnerElement::create):
+        (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
+        (WebCore::TextControlInnerTextElement::create):
+        (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
+        (WebCore::SearchFieldResultsButtonElement::create):
+        (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
+        (WebCore::SearchFieldCancelButtonElement::create):
+        (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
+        (WebCore::InputFieldSpeechButtonElement::create):
+        * html/shadow/TextControlInnerElements.h:
+
 2013-09-17  Zoltan Horvath  <zoltan@webkit.org>
 
         [CSS Shapes] Use the float height to determine position in shape-inside
index bf482b6..cc74b20 100644 (file)
@@ -231,11 +231,11 @@ void HTMLMeterElement::didAddUserAgentShadowRoot(ShadowRoot* root)
 {
     ASSERT(!m_value);
 
-    RefPtr<MeterInnerElement> inner = MeterInnerElement::create(&document());
+    RefPtr<MeterInnerElement> inner = MeterInnerElement::create(document());
     root->appendChild(inner);
 
-    RefPtr<MeterBarElement> bar = MeterBarElement::create(&document());
-    m_value = MeterValueElement::create(&document());
+    RefPtr<MeterBarElement> bar = MeterBarElement::create(document());
+    m_value = MeterValueElement::create(document());
     m_value->setWidthPercentage(0);
     m_value->updatePseudo();
     bar->appendChild(m_value, ASSERT_NO_EXCEPTION);
index 784ff4d..af642b2 100644 (file)
@@ -154,11 +154,11 @@ void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot* root)
 {
     ASSERT(!m_value);
 
-    RefPtr<ProgressInnerElement> inner = ProgressInnerElement::create(&document());
+    RefPtr<ProgressInnerElement> inner = ProgressInnerElement::create(document());
     root->appendChild(inner);
 
-    RefPtr<ProgressBarElement> bar = ProgressBarElement::create(&document());
-    RefPtr<ProgressValueElement> value = ProgressValueElement::create(&document());
+    RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document());
+    RefPtr<ProgressValueElement> value = ProgressValueElement::create(document());
     m_value = value.get();
     m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100);
     bar->appendChild(m_value, ASSERT_NO_EXCEPTION);
index a161cea..7f10020 100644 (file)
@@ -109,7 +109,7 @@ PassRefPtr<HTMLTextAreaElement> HTMLTextAreaElement::create(const QualifiedName&
 
 void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
 {
-    root->appendChild(TextControlInnerTextElement::create(&document()), ASSERT_NO_EXCEPTION);
+    root->appendChild(TextControlInnerTextElement::create(document()), ASSERT_NO_EXCEPTION);
 }
 
 const AtomicString& HTMLTextAreaElement::formControlType() const
index 988fbcc..4b100cb 100644 (file)
@@ -105,11 +105,11 @@ void SearchInputType::createShadowSubtree()
     ASSERT(container);
     ASSERT(textWrapper);
 
-    RefPtr<SearchFieldResultsButtonElement> resultsButton = SearchFieldResultsButtonElement::create(&element().document());
+    RefPtr<SearchFieldResultsButtonElement> resultsButton = SearchFieldResultsButtonElement::create(element().document());
     m_resultsButton = resultsButton.get();
     container->insertBefore(m_resultsButton, textWrapper, IGNORE_EXCEPTION);
 
-    RefPtr<SearchFieldCancelButtonElement> cancelButton = SearchFieldCancelButtonElement::create(&element().document());
+    RefPtr<SearchFieldCancelButtonElement> cancelButton = SearchFieldCancelButtonElement::create(element().document());
     m_cancelButton = cancelButton.get();
     container->insertBefore(m_cancelButton, textWrapper->nextSibling(), IGNORE_EXCEPTION);
 }
index 0bf714b..27023a9 100644 (file)
@@ -234,31 +234,31 @@ void TextFieldInputType::createShadowSubtree()
     bool shouldHaveSpinButton = this->shouldHaveSpinButton();
     bool createsContainer = shouldHaveSpinButton || needsContainer();
 
-    m_innerText = TextControlInnerTextElement::create(&document);
+    m_innerText = TextControlInnerTextElement::create(document);
     if (!createsContainer) {
         element().userAgentShadowRoot()->appendChild(m_innerText, IGNORE_EXCEPTION);
         return;
     }
 
     ShadowRoot* shadowRoot = element().userAgentShadowRoot();
-    m_container = TextControlInnerContainer::create(&document);
+    m_container = TextControlInnerContainer::create(document);
     m_container->setPseudo(AtomicString("-webkit-textfield-decoration-container", AtomicString::ConstructFromLiteral));
     shadowRoot->appendChild(m_container, IGNORE_EXCEPTION);
 
-    m_innerBlock = TextControlInnerElement::create(&document);
+    m_innerBlock = TextControlInnerElement::create(document);
     m_innerBlock->appendChild(m_innerText, IGNORE_EXCEPTION);
     m_container->appendChild(m_innerBlock, IGNORE_EXCEPTION);
 
 #if ENABLE(INPUT_SPEECH)
     ASSERT(!m_speechButton);
     if (element().isSpeechEnabled()) {
-        m_speechButton = InputFieldSpeechButtonElement::create(&document);
+        m_speechButton = InputFieldSpeechButtonElement::create(document);
         m_container->appendChild(m_speechButton, IGNORE_EXCEPTION);
     }
 #endif
 
     if (shouldHaveSpinButton) {
-        m_innerSpinButton = SpinButtonElement::create(&document, *this);
+        m_innerSpinButton = SpinButtonElement::create(document, *this);
         m_container->appendChild(m_innerSpinButton, IGNORE_EXCEPTION);
     }
 }
index e597533..7a67410 100644 (file)
@@ -44,8 +44,8 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-MeterShadowElement::MeterShadowElement(Document* document) 
-    : HTMLDivElement(HTMLNames::divTag, *document)
+MeterShadowElement::MeterShadowElement(Document& document)
+    : HTMLDivElement(HTMLNames::divTag, document)
 {
 }
 
@@ -60,7 +60,7 @@ bool MeterShadowElement::rendererIsNeeded(const RenderStyle& style)
     return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(style);
 }
 
-MeterInnerElement::MeterInnerElement(Document* document)
+MeterInnerElement::MeterInnerElement(Document& document)
     : MeterShadowElement(document)
 {
     DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-meter-inner-element", AtomicString::ConstructFromLiteral));
index 3846267..13e8d3a 100644 (file)
@@ -42,35 +42,37 @@ class RenderMeter;
 
 class MeterShadowElement : public HTMLDivElement {
 public:
-    MeterShadowElement(Document*);
     HTMLMeterElement* meterElement() const;
 
+protected:
+    MeterShadowElement(Document&);
+
 private:
     virtual bool rendererIsNeeded(const RenderStyle&);
 };
 
 class MeterInnerElement FINAL : public MeterShadowElement {
 public:
-    static PassRefPtr<MeterInnerElement> create(Document*);
+    static PassRefPtr<MeterInnerElement> create(Document&);
 
 private:
-    MeterInnerElement(Document*);
+    MeterInnerElement(Document&);
 
     virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
     virtual RenderObject* createRenderer(RenderArena&, RenderStyle&) OVERRIDE;
 };
 
-inline PassRefPtr<MeterInnerElement> MeterInnerElement::create(Document* document)
+inline PassRefPtr<MeterInnerElement> MeterInnerElement::create(Document& document)
 {
     return adoptRef(new MeterInnerElement(document));
 }
 
 class MeterBarElement FINAL : public MeterShadowElement {
 public:
-    static PassRefPtr<MeterBarElement> create(Document*);
+    static PassRefPtr<MeterBarElement> create(Document&);
 
 private:
-    MeterBarElement(Document* document) 
+    MeterBarElement(Document& document)
         : MeterShadowElement(document)
     {
         DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-meter-bar", AtomicString::ConstructFromLiteral));
@@ -78,19 +80,19 @@ private:
     }
 };
 
-inline PassRefPtr<MeterBarElement> MeterBarElement::create(Document* document)
+inline PassRefPtr<MeterBarElement> MeterBarElement::create(Document& document)
 {
     return adoptRef(new MeterBarElement(document));
 }
 
 class MeterValueElement FINAL : public MeterShadowElement {
 public:
-    static PassRefPtr<MeterValueElement> create(Document*);
+    static PassRefPtr<MeterValueElement> create(Document&);
     void setWidthPercentage(double);
     void updatePseudo() { setPseudo(valuePseudoId()); }
 
 private:
-    MeterValueElement(Document* document) 
+    MeterValueElement(Document& document)
         : MeterShadowElement(document)
     {
         updatePseudo();
@@ -99,7 +101,7 @@ private:
     const AtomicString& valuePseudoId() const;
 };
 
-inline PassRefPtr<MeterValueElement> MeterValueElement::create(Document* document)
+inline PassRefPtr<MeterValueElement> MeterValueElement::create(Document& document)
 {
     return adoptRef(new MeterValueElement(document));
 }
index 00c31a2..76e5710 100644 (file)
@@ -40,8 +40,8 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-ProgressShadowElement::ProgressShadowElement(Document* document)
-    : HTMLDivElement(HTMLNames::divTag, *document)
+ProgressShadowElement::ProgressShadowElement(Document& document)
+    : HTMLDivElement(HTMLNames::divTag, document)
 {
 }
 
@@ -56,7 +56,7 @@ bool ProgressShadowElement::rendererIsNeeded(const RenderStyle& style)
     return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(style);
 }
 
-ProgressInnerElement::ProgressInnerElement(Document* document)
+ProgressInnerElement::ProgressInnerElement(Document& document)
     : ProgressShadowElement(document)
 {
 }
@@ -75,12 +75,12 @@ bool ProgressInnerElement::rendererIsNeeded(const RenderStyle& style)
     return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(style);    
 }
 
-ProgressBarElement::ProgressBarElement(Document* document)
+ProgressBarElement::ProgressBarElement(Document& document)
     : ProgressShadowElement(document)
 {
 }
 
-ProgressValueElement::ProgressValueElement(Document* document)
+ProgressValueElement::ProgressValueElement(Document& document)
     : ProgressShadowElement(document)
 {
 }
index 1b2b3fc..bfc0b94 100644 (file)
@@ -42,25 +42,27 @@ class HTMLProgressElement;
 
 class ProgressShadowElement : public HTMLDivElement {
 public:
-    ProgressShadowElement(Document*);
     HTMLProgressElement* progressElement() const;
 
 protected:
+    ProgressShadowElement(Document&);
+
+private:
     virtual bool rendererIsNeeded(const RenderStyle&);
 };
 
 class ProgressInnerElement FINAL : public ProgressShadowElement {
 public:
-    static PassRefPtr<ProgressInnerElement> create(Document*);
+    static PassRefPtr<ProgressInnerElement> create(Document&);
 
 private:
-    ProgressInnerElement(Document*);
+    ProgressInnerElement(Document&);
 
     virtual RenderObject* createRenderer(RenderArena&, RenderStyle&) OVERRIDE;
     virtual bool rendererIsNeeded(const RenderStyle&);
 };
 
-inline PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document* document)
+inline PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document& document)
 {
     RefPtr<ProgressInnerElement> result = adoptRef(new ProgressInnerElement(document));
     result->setPseudo(AtomicString("-webkit-progress-inner-element", AtomicString::ConstructFromLiteral));
@@ -69,13 +71,13 @@ inline PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document* d
 
 class ProgressBarElement FINAL : public ProgressShadowElement {
 public:
-    static PassRefPtr<ProgressBarElement> create(Document*);
+    static PassRefPtr<ProgressBarElement> create(Document&);
 
 private:
-    ProgressBarElement(Document*);
+    ProgressBarElement(Document&);
 };
 
-inline PassRefPtr<ProgressBarElement> ProgressBarElement::create(Document* document)
+inline PassRefPtr<ProgressBarElement> ProgressBarElement::create(Document& document)
 {
     RefPtr<ProgressBarElement> result = adoptRef(new ProgressBarElement(document));
     result->setPseudo(AtomicString("-webkit-progress-bar", AtomicString::ConstructFromLiteral));
@@ -84,14 +86,14 @@ inline PassRefPtr<ProgressBarElement> ProgressBarElement::create(Document* docum
 
 class ProgressValueElement FINAL : public ProgressShadowElement {
 public:
-    static PassRefPtr<ProgressValueElement> create(Document*);
+    static PassRefPtr<ProgressValueElement> create(Document&);
     void setWidthPercentage(double);
 
 private:
-    ProgressValueElement(Document*);
+    ProgressValueElement(Document&);
 };
 
-inline PassRefPtr<ProgressValueElement> ProgressValueElement::create(Document* document)
+inline PassRefPtr<ProgressValueElement> ProgressValueElement::create(Document& document)
 {
     RefPtr<ProgressValueElement> result = adoptRef(new ProgressValueElement(document));
     result->setPseudo(AtomicString("-webkit-progress-value", AtomicString::ConstructFromLiteral));
index b911b97..ddf0b43 100644 (file)
@@ -43,8 +43,8 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-inline SpinButtonElement::SpinButtonElement(Document* document, SpinButtonOwner& spinButtonOwner)
-    : HTMLDivElement(divTag, *document)
+inline SpinButtonElement::SpinButtonElement(Document& document, SpinButtonOwner& spinButtonOwner)
+    : HTMLDivElement(divTag, document)
     , m_spinButtonOwner(&spinButtonOwner)
     , m_capturing(false)
     , m_upDownState(Indeterminate)
@@ -54,7 +54,7 @@ inline SpinButtonElement::SpinButtonElement(Document* document, SpinButtonOwner&
     setHasCustomStyleResolveCallbacks();
 }
 
-PassRefPtr<SpinButtonElement> SpinButtonElement::create(Document* document, SpinButtonOwner& spinButtonOwner)
+PassRefPtr<SpinButtonElement> SpinButtonElement::create(Document& document, SpinButtonOwner& spinButtonOwner)
 {
     return adoptRef(new SpinButtonElement(document, spinButtonOwner));
 }
index a6d3238..96a667d 100644 (file)
@@ -54,7 +54,7 @@ public:
     // The owner of SpinButtonElement must call removeSpinButtonOwner
     // because SpinButtonElement can be outlive SpinButtonOwner
     // implementation, e.g. during event handling.
-    static PassRefPtr<SpinButtonElement> create(Document*, SpinButtonOwner&);
+    static PassRefPtr<SpinButtonElement> create(Document&, SpinButtonOwner&);
     UpDownState upDownState() const { return m_upDownState; }
     virtual void releaseCapture();
     void removeSpinButtonOwner() { m_spinButtonOwner = 0; }
@@ -67,7 +67,7 @@ public:
     void forwardEvent(Event*);
 
 private:
-    SpinButtonElement(Document*, SpinButtonOwner&);
+    SpinButtonElement(Document&, SpinButtonOwner&);
 
     virtual const AtomicString& shadowPseudoId() const;
     virtual void willDetachRenderers() OVERRIDE;
index 7fccf9e..4ecd01e 100644 (file)
@@ -48,12 +48,12 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-TextControlInnerContainer::TextControlInnerContainer(Document* document)
-    : HTMLDivElement(divTag, *document)
+TextControlInnerContainer::TextControlInnerContainer(Document& document)
+    : HTMLDivElement(divTag, document)
 {
 }
 
-PassRefPtr<TextControlInnerContainer> TextControlInnerContainer::create(Document* document)
+PassRefPtr<TextControlInnerContainer> TextControlInnerContainer::create(Document& document)
 {
     return adoptRef(new TextControlInnerContainer(document));
 }
@@ -63,13 +63,13 @@ RenderObject* TextControlInnerContainer::createRenderer(RenderArena& arena, Rend
     return new (arena) RenderTextControlInnerContainer(this);
 }
 
-TextControlInnerElement::TextControlInnerElement(Document* document)
-    : HTMLDivElement(divTag, *document)
+TextControlInnerElement::TextControlInnerElement(Document& document)
+    : HTMLDivElement(divTag, document)
 {
     setHasCustomStyleResolveCallbacks();
 }
 
-PassRefPtr<TextControlInnerElement> TextControlInnerElement::create(Document* document)
+PassRefPtr<TextControlInnerElement> TextControlInnerElement::create(Document& document)
 {
     return adoptRef(new TextControlInnerElement(document));
 }
@@ -82,13 +82,13 @@ PassRefPtr<RenderStyle> TextControlInnerElement::customStyleForRenderer()
 
 // ---------------------------
 
-inline TextControlInnerTextElement::TextControlInnerTextElement(Document* document)
-    : HTMLDivElement(divTag, *document)
+inline TextControlInnerTextElement::TextControlInnerTextElement(Document& document)
+    : HTMLDivElement(divTag, document)
 {
     setHasCustomStyleResolveCallbacks();
 }
 
-PassRefPtr<TextControlInnerTextElement> TextControlInnerTextElement::create(Document* document)
+PassRefPtr<TextControlInnerTextElement> TextControlInnerTextElement::create(Document& document)
 {
     return adoptRef(new TextControlInnerTextElement(document));
 }
@@ -125,12 +125,12 @@ PassRefPtr<RenderStyle> TextControlInnerTextElement::customStyleForRenderer()
 
 // ----------------------------
 
-inline SearchFieldResultsButtonElement::SearchFieldResultsButtonElement(Document* document)
-    : HTMLDivElement(divTag, *document)
+inline SearchFieldResultsButtonElement::SearchFieldResultsButtonElement(Document& document)
+    : HTMLDivElement(divTag, document)
 {
 }
 
-PassRefPtr<SearchFieldResultsButtonElement> SearchFieldResultsButtonElement::create(Document* document)
+PassRefPtr<SearchFieldResultsButtonElement> SearchFieldResultsButtonElement::create(Document& document)
 {
     return adoptRef(new SearchFieldResultsButtonElement(document));
 }
@@ -179,14 +179,14 @@ bool SearchFieldResultsButtonElement::willRespondToMouseClickEvents()
 
 // ----------------------------
 
-inline SearchFieldCancelButtonElement::SearchFieldCancelButtonElement(Document* document)
-    : HTMLDivElement(divTag, *document)
+inline SearchFieldCancelButtonElement::SearchFieldCancelButtonElement(Document& document)
+    : HTMLDivElement(divTag, document)
     , m_capturing(false)
 {
     setHasCustomStyleResolveCallbacks();
 }
 
-PassRefPtr<SearchFieldCancelButtonElement> SearchFieldCancelButtonElement::create(Document* document)
+PassRefPtr<SearchFieldCancelButtonElement> SearchFieldCancelButtonElement::create(Document& document)
 {
     return adoptRef(new SearchFieldCancelButtonElement(document));
 }
@@ -258,8 +258,8 @@ bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents()
 
 #if ENABLE(INPUT_SPEECH)
 
-inline InputFieldSpeechButtonElement::InputFieldSpeechButtonElement(Document* document)
-    : HTMLDivElement(divTag, *document)
+inline InputFieldSpeechButtonElement::InputFieldSpeechButtonElement(Document& document)
+    : HTMLDivElement(divTag, document)
     , m_capturing(false)
     , m_state(Idle)
     , m_listenerId(0)
@@ -277,7 +277,7 @@ InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement()
     }
 }
 
-PassRefPtr<InputFieldSpeechButtonElement> InputFieldSpeechButtonElement::create(Document* document)
+PassRefPtr<InputFieldSpeechButtonElement> InputFieldSpeechButtonElement::create(Document& document)
 {
     return adoptRef(new InputFieldSpeechButtonElement(document));
 }
index 1608229..b0912be 100644 (file)
@@ -37,18 +37,18 @@ class SpeechInput;
 
 class TextControlInnerContainer FINAL : public HTMLDivElement {
 public:
-    static PassRefPtr<TextControlInnerContainer> create(Document*);
+    static PassRefPtr<TextControlInnerContainer> create(Document&);
 protected:
-    TextControlInnerContainer(Document*);
+    TextControlInnerContainer(Document&);
     virtual RenderObject* createRenderer(RenderArena&, RenderStyle&);
 };
 
 class TextControlInnerElement FINAL : public HTMLDivElement {
 public:
-    static PassRefPtr<TextControlInnerElement> create(Document*);
+    static PassRefPtr<TextControlInnerElement> create(Document&);
 
 protected:
-    TextControlInnerElement(Document*);
+    TextControlInnerElement(Document&);
     virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
 
 private:
@@ -57,12 +57,12 @@ private:
 
 class TextControlInnerTextElement FINAL : public HTMLDivElement {
 public:
-    static PassRefPtr<TextControlInnerTextElement> create(Document*);
+    static PassRefPtr<TextControlInnerTextElement> create(Document&);
 
     virtual void defaultEventHandler(Event*);
 
 private:
-    TextControlInnerTextElement(Document*);
+    TextControlInnerTextElement(Document&);
     virtual RenderObject* createRenderer(RenderArena&, RenderStyle&);
     virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
     virtual bool isMouseFocusable() const OVERRIDE { return false; }
@@ -70,27 +70,27 @@ private:
 
 class SearchFieldResultsButtonElement FINAL : public HTMLDivElement {
 public:
-    static PassRefPtr<SearchFieldResultsButtonElement> create(Document*);
+    static PassRefPtr<SearchFieldResultsButtonElement> create(Document&);
 
     virtual void defaultEventHandler(Event*);
     virtual bool willRespondToMouseClickEvents() OVERRIDE;
 
 private:
-    SearchFieldResultsButtonElement(Document*);
+    SearchFieldResultsButtonElement(Document&);
     virtual const AtomicString& shadowPseudoId() const;
     virtual bool isMouseFocusable() const OVERRIDE { return false; }
 };
 
 class SearchFieldCancelButtonElement FINAL : public HTMLDivElement {
 public:
-    static PassRefPtr<SearchFieldCancelButtonElement> create(Document*);
+    static PassRefPtr<SearchFieldCancelButtonElement> create(Document&);
 
     virtual void defaultEventHandler(Event*);
     virtual bool isSearchFieldCancelButtonElement() const OVERRIDE { return true; }
     virtual bool willRespondToMouseClickEvents() OVERRIDE;
 
 private:
-    SearchFieldCancelButtonElement(Document*);
+    SearchFieldCancelButtonElement(Document&);
     virtual const AtomicString& shadowPseudoId() const;
     virtual void willDetachRenderers() OVERRIDE;
     virtual bool isMouseFocusable() const OVERRIDE { return false; }
@@ -110,7 +110,7 @@ public:
         Recognizing,
     };
 
-    static PassRefPtr<InputFieldSpeechButtonElement> create(Document*);
+    static PassRefPtr<InputFieldSpeechButtonElement> create(Document&);
     virtual ~InputFieldSpeechButtonElement();
 
     virtual void defaultEventHandler(Event*);
@@ -126,7 +126,7 @@ public:
     void setRecognitionResult(int, const SpeechInputResultArray&);
 
 private:
-    InputFieldSpeechButtonElement(Document*);
+    InputFieldSpeechButtonElement(Document&);
     SpeechInput* speechInput();
     void setState(SpeechInputState state);
     virtual const AtomicString& shadowPseudoId() const;