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