Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / forms / InputTypeView.cpp
1 /*
2  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
4  *           (C) 2001 Dirk Mueller (mueller@kde.org)
5  * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6  *           (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7  * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8  * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved.
9  * Copyright (C) 2012 Samsung Electronics. All rights reserved.
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public License
22  * along with this library; see the file COPYING.LIB.  If not, write to
23  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  * Boston, MA 02110-1301, USA.
25  *
26  */
27
28 #include "config.h"
29 #include "core/html/forms/InputTypeView.h"
30
31 #include "core/dom/shadow/ShadowRoot.h"
32 #include "core/html/HTMLFormElement.h"
33 #include "core/html/HTMLInputElement.h"
34 #include "core/rendering/RenderObject.h"
35
36 namespace WebCore {
37
38 PassRefPtr<InputTypeView> InputTypeView::create(HTMLInputElement& input)
39 {
40     return adoptRef(new InputTypeView(input));
41 }
42
43 InputTypeView::~InputTypeView()
44 {
45 }
46
47 bool InputTypeView::sizeShouldIncludeDecoration(int, int& preferredSize) const
48 {
49     preferredSize = element().size();
50     return false;
51 }
52
53 void InputTypeView::handleClickEvent(MouseEvent*)
54 {
55 }
56
57 void InputTypeView::handleMouseDownEvent(MouseEvent*)
58 {
59 }
60
61 void InputTypeView::handleKeydownEvent(KeyboardEvent*)
62 {
63 }
64
65 void InputTypeView::handleKeypressEvent(KeyboardEvent*)
66 {
67 }
68
69 void InputTypeView::handleKeyupEvent(KeyboardEvent*)
70 {
71 }
72
73 void InputTypeView::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*)
74 {
75 }
76
77 void InputTypeView::handleTouchEvent(TouchEvent*)
78 {
79 }
80
81 void InputTypeView::forwardEvent(Event*)
82 {
83 }
84
85 bool InputTypeView::shouldSubmitImplicitly(Event* event)
86 {
87     return false;
88 }
89
90 PassRefPtr<HTMLFormElement> InputTypeView::formForSubmission() const
91 {
92     return element().form();
93 }
94
95 RenderObject* InputTypeView::createRenderer(RenderStyle* style) const
96 {
97     return RenderObject::createObject(&element(), style);
98 }
99
100 PassRefPtr<RenderStyle> InputTypeView::customStyleForRenderer(PassRefPtr<RenderStyle> originalStyle)
101 {
102     return originalStyle;
103 }
104
105 void InputTypeView::blur()
106 {
107     element().defaultBlur();
108 }
109
110 bool InputTypeView::hasCustomFocusLogic() const
111 {
112     return false;
113 }
114
115 void InputTypeView::handleFocusEvent(Element*, FocusType)
116 {
117 }
118
119 void InputTypeView::handleBlurEvent()
120 {
121 }
122
123 void InputTypeView::startResourceLoading()
124 {
125 }
126
127 void InputTypeView::closePopupView()
128 {
129 }
130
131 void InputTypeView::createShadowSubtree()
132 {
133 }
134
135 void InputTypeView::destroyShadowSubtree()
136 {
137     if (ShadowRoot* root = element().userAgentShadowRoot())
138         root->removeChildren();
139 }
140
141 void InputTypeView::altAttributeChanged()
142 {
143 }
144
145 void InputTypeView::srcAttributeChanged()
146 {
147 }
148
149 void InputTypeView::minOrMaxAttributeChanged()
150 {
151 }
152
153 void InputTypeView::stepAttributeChanged()
154 {
155 }
156
157 PassOwnPtr<ClickHandlingState> InputTypeView::willDispatchClick()
158 {
159     return nullptr;
160 }
161
162 void InputTypeView::didDispatchClick(Event*, const ClickHandlingState&)
163 {
164 }
165
166 void InputTypeView::updateView()
167 {
168 }
169
170 void InputTypeView::attributeChanged()
171 {
172 }
173
174 void InputTypeView::multipleAttributeChanged()
175 {
176 }
177
178 void InputTypeView::disabledAttributeChanged()
179 {
180 }
181
182 void InputTypeView::readonlyAttributeChanged()
183 {
184 }
185
186 void InputTypeView::requiredAttributeChanged()
187 {
188 }
189
190 void InputTypeView::valueAttributeChanged()
191 {
192 }
193
194 void InputTypeView::subtreeHasChanged()
195 {
196     ASSERT_NOT_REACHED();
197 }
198
199 bool InputTypeView::hasTouchEventHandler() const
200 {
201     return false;
202 }
203
204 void InputTypeView::listAttributeTargetChanged()
205 {
206 }
207
208 void InputTypeView::updateClearButtonVisibility()
209 {
210 }
211
212 void InputTypeView::updatePlaceholderText()
213 {
214 }
215
216 } // namespace WebCore