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

Unified Diff: Source/core/html/forms/InputTypeView.h

Issue 27746003: Have InputType factories take an HTMLInputElement reference in parameter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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/forms/InputType.cpp ('k') | Source/core/html/forms/InputTypeView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/InputTypeView.h
diff --git a/Source/core/html/forms/InputTypeView.h b/Source/core/html/forms/InputTypeView.h
index 2b880d051a6258387cce5cd8ce8f2e84613fe997..43528cb4e417d0e17bfc6ef8bcfc9b82661eef3c 100644
--- a/Source/core/html/forms/InputTypeView.h
+++ b/Source/core/html/forms/InputTypeView.h
@@ -70,7 +70,7 @@ class InputTypeView : public RefCounted<InputTypeView> {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassRefPtr<InputTypeView> create(HTMLInputElement*);
+ static PassRefPtr<InputTypeView> create(HTMLInputElement&);
virtual ~InputTypeView();
virtual bool sizeShouldIncludeDecoration(int defaultSize, int& preferredSize) const;
@@ -110,13 +110,13 @@ public:
virtual void updateClearButtonVisibility();
protected:
- InputTypeView(HTMLInputElement* element) : m_element(element) { }
- HTMLInputElement* element() const { return m_element; }
+ InputTypeView(HTMLInputElement& element) : m_element(element) { }
+ HTMLInputElement& element() const { return m_element; }
private:
- // Raw pointer because the HTMLInputElement object owns this InputTypeView
+ // Not a RefPtr because the HTMLInputElement object owns this InputTypeView
// object.
- HTMLInputElement* m_element;
+ HTMLInputElement& m_element;
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/forms/InputType.cpp ('k') | Source/core/html/forms/InputTypeView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698