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
create(HTMLInputElement & input)38 PassRefPtrWillBeRawPtr<InputTypeView> InputTypeView::create(HTMLInputElement& input)
39 {
40 return adoptRefWillBeNoop(new InputTypeView(input));
41 }
42
~InputTypeView()43 InputTypeView::~InputTypeView()
44 {
45 }
46
trace(Visitor * visitor)47 void InputTypeView::trace(Visitor* visitor)
48 {
49 visitor->trace(m_element);
50 }
51
sizeShouldIncludeDecoration(int,int & preferredSize) const52 bool InputTypeView::sizeShouldIncludeDecoration(int, int& preferredSize) const
53 {
54 preferredSize = element().size();
55 return false;
56 }
57
handleClickEvent(MouseEvent *)58 void InputTypeView::handleClickEvent(MouseEvent*)
59 {
60 }
61
handleMouseDownEvent(MouseEvent *)62 void InputTypeView::handleMouseDownEvent(MouseEvent*)
63 {
64 }
65
handleKeydownEvent(KeyboardEvent *)66 void InputTypeView::handleKeydownEvent(KeyboardEvent*)
67 {
68 }
69
handleKeypressEvent(KeyboardEvent *)70 void InputTypeView::handleKeypressEvent(KeyboardEvent*)
71 {
72 }
73
handleKeyupEvent(KeyboardEvent *)74 void InputTypeView::handleKeyupEvent(KeyboardEvent*)
75 {
76 }
77
handleBeforeTextInsertedEvent(BeforeTextInsertedEvent *)78 void InputTypeView::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*)
79 {
80 }
81
handleTouchEvent(TouchEvent *)82 void InputTypeView::handleTouchEvent(TouchEvent*)
83 {
84 }
85
forwardEvent(Event *)86 void InputTypeView::forwardEvent(Event*)
87 {
88 }
89
shouldSubmitImplicitly(Event * event)90 bool InputTypeView::shouldSubmitImplicitly(Event* event)
91 {
92 return false;
93 }
94
formForSubmission() const95 PassRefPtrWillBeRawPtr<HTMLFormElement> InputTypeView::formForSubmission() const
96 {
97 return element().form();
98 }
99
createRenderer(RenderStyle * style) const100 RenderObject* InputTypeView::createRenderer(RenderStyle* style) const
101 {
102 return RenderObject::createObject(&element(), style);
103 }
104
customStyleForRenderer(PassRefPtr<RenderStyle> originalStyle)105 PassRefPtr<RenderStyle> InputTypeView::customStyleForRenderer(PassRefPtr<RenderStyle> originalStyle)
106 {
107 return originalStyle;
108 }
109
blur()110 void InputTypeView::blur()
111 {
112 element().defaultBlur();
113 }
114
hasCustomFocusLogic() const115 bool InputTypeView::hasCustomFocusLogic() const
116 {
117 return false;
118 }
119
handleFocusEvent(Element *,FocusType)120 void InputTypeView::handleFocusEvent(Element*, FocusType)
121 {
122 }
123
handleBlurEvent()124 void InputTypeView::handleBlurEvent()
125 {
126 }
127
startResourceLoading()128 void InputTypeView::startResourceLoading()
129 {
130 }
131
closePopupView()132 void InputTypeView::closePopupView()
133 {
134 }
135
createShadowSubtree()136 void InputTypeView::createShadowSubtree()
137 {
138 }
139
destroyShadowSubtree()140 void InputTypeView::destroyShadowSubtree()
141 {
142 if (ShadowRoot* root = element().userAgentShadowRoot())
143 root->removeChildren();
144 }
145
altAttributeChanged()146 void InputTypeView::altAttributeChanged()
147 {
148 }
149
srcAttributeChanged()150 void InputTypeView::srcAttributeChanged()
151 {
152 }
153
minOrMaxAttributeChanged()154 void InputTypeView::minOrMaxAttributeChanged()
155 {
156 }
157
stepAttributeChanged()158 void InputTypeView::stepAttributeChanged()
159 {
160 }
161
willDispatchClick()162 PassOwnPtrWillBeRawPtr<ClickHandlingState> InputTypeView::willDispatchClick()
163 {
164 return nullptr;
165 }
166
didDispatchClick(Event *,const ClickHandlingState &)167 void InputTypeView::didDispatchClick(Event*, const ClickHandlingState&)
168 {
169 }
170
updateView()171 void InputTypeView::updateView()
172 {
173 }
174
attributeChanged()175 void InputTypeView::attributeChanged()
176 {
177 }
178
multipleAttributeChanged()179 void InputTypeView::multipleAttributeChanged()
180 {
181 }
182
disabledAttributeChanged()183 void InputTypeView::disabledAttributeChanged()
184 {
185 }
186
readonlyAttributeChanged()187 void InputTypeView::readonlyAttributeChanged()
188 {
189 }
190
requiredAttributeChanged()191 void InputTypeView::requiredAttributeChanged()
192 {
193 }
194
valueAttributeChanged()195 void InputTypeView::valueAttributeChanged()
196 {
197 }
198
subtreeHasChanged()199 void InputTypeView::subtreeHasChanged()
200 {
201 ASSERT_NOT_REACHED();
202 }
203
hasTouchEventHandler() const204 bool InputTypeView::hasTouchEventHandler() const
205 {
206 return false;
207 }
208
listAttributeTargetChanged()209 void InputTypeView::listAttributeTargetChanged()
210 {
211 }
212
updateClearButtonVisibility()213 void InputTypeView::updateClearButtonVisibility()
214 {
215 }
216
updatePlaceholderText()217 void InputTypeView::updatePlaceholderText()
218 {
219 }
220
trace(Visitor * visitor)221 void ClickHandlingState::trace(Visitor* visitor)
222 {
223 visitor->trace(checkedRadioButton);
224 }
225
226 } // namespace WebCore
227