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

Side by Side Diff: Source/core/html/forms/InputTypeView.cpp

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/forms/InputTypeView.h ('k') | Source/core/html/forms/MonthInputType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 9 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
10 * 10 *
(...skipping 16 matching lines...) Expand all
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "core/html/forms/InputTypeView.h" 29 #include "core/html/forms/InputTypeView.h"
30 30
31 #include "core/html/HTMLFormElement.h" 31 #include "core/html/HTMLFormElement.h"
32 #include "core/html/HTMLInputElement.h" 32 #include "core/html/HTMLInputElement.h"
33 #include "core/rendering/RenderObject.h" 33 #include "core/rendering/RenderObject.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 PassRefPtr<InputTypeView> InputTypeView::create(HTMLInputElement* input) 37 PassRefPtr<InputTypeView> InputTypeView::create(HTMLInputElement& input)
38 { 38 {
39 return adoptRef(new InputTypeView(input)); 39 return adoptRef(new InputTypeView(input));
40 } 40 }
41 41
42 InputTypeView::~InputTypeView() 42 InputTypeView::~InputTypeView()
43 { 43 {
44 } 44 }
45 45
46 bool InputTypeView::sizeShouldIncludeDecoration(int, int& preferredSize) const 46 bool InputTypeView::sizeShouldIncludeDecoration(int, int& preferredSize) const
47 { 47 {
48 preferredSize = element()->size(); 48 preferredSize = element().size();
49 return false; 49 return false;
50 } 50 }
51 51
52 void InputTypeView::handleClickEvent(MouseEvent*) 52 void InputTypeView::handleClickEvent(MouseEvent*)
53 { 53 {
54 } 54 }
55 55
56 void InputTypeView::handleMouseDownEvent(MouseEvent*) 56 void InputTypeView::handleMouseDownEvent(MouseEvent*)
57 { 57 {
58 } 58 }
(...skipping 22 matching lines...) Expand all
81 { 81 {
82 } 82 }
83 83
84 bool InputTypeView::shouldSubmitImplicitly(Event* event) 84 bool InputTypeView::shouldSubmitImplicitly(Event* event)
85 { 85 {
86 return false; 86 return false;
87 } 87 }
88 88
89 PassRefPtr<HTMLFormElement> InputTypeView::formForSubmission() const 89 PassRefPtr<HTMLFormElement> InputTypeView::formForSubmission() const
90 { 90 {
91 return element()->form(); 91 return element().form();
92 } 92 }
93 93
94 RenderObject* InputTypeView::createRenderer(RenderStyle* style) const 94 RenderObject* InputTypeView::createRenderer(RenderStyle* style) const
95 { 95 {
96 return RenderObject::createObject(element(), style); 96 return RenderObject::createObject(&element(), style);
97 } 97 }
98 98
99 PassRefPtr<RenderStyle> InputTypeView::customStyleForRenderer(PassRefPtr<RenderS tyle> originalStyle) 99 PassRefPtr<RenderStyle> InputTypeView::customStyleForRenderer(PassRefPtr<RenderS tyle> originalStyle)
100 { 100 {
101 return originalStyle; 101 return originalStyle;
102 } 102 }
103 103
104 void InputTypeView::blur() 104 void InputTypeView::blur()
105 { 105 {
106 element()->defaultBlur(); 106 element().defaultBlur();
107 } 107 }
108 108
109 bool InputTypeView::hasCustomFocusLogic() const 109 bool InputTypeView::hasCustomFocusLogic() const
110 { 110 {
111 return false; 111 return false;
112 } 112 }
113 113
114 void InputTypeView::handleFocusEvent(Element*, FocusDirection) 114 void InputTypeView::handleFocusEvent(Element*, FocusDirection)
115 { 115 {
116 } 116 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 void InputTypeView::listAttributeTargetChanged() 189 void InputTypeView::listAttributeTargetChanged()
190 { 190 {
191 } 191 }
192 192
193 void InputTypeView::updateClearButtonVisibility() 193 void InputTypeView::updateClearButtonVisibility()
194 { 194 {
195 } 195 }
196 196
197 } // namespace WebCore 197 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/forms/InputTypeView.h ('k') | Source/core/html/forms/MonthInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698