1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)/*
2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Copyright (C) 2010 Google Inc. All rights reserved.
3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Copyright (C) 2011 Apple Inc. All rights reserved.
4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Copyright (C) 2012 Samsung Electronics. All rights reserved.
5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) *
6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without
7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * modification, are permitted provided that the following conditions are
8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * met:
9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) *
10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) *     * Redistributions of source code must retain the above copyright
11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * notice, this list of conditions and the following disclaimer.
12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) *     * Redistributions in binary form must reproduce the above
13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * copyright notice, this list of conditions and the following disclaimer
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * in the documentation and/or other materials provided with the
15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * distribution.
16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) *     * Neither the name of Google Inc. nor the names of its
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * contributors may be used to endorse or promote products derived from
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * this software without specific prior written permission.
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) *
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) */
32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifndef ImageInputType_h
34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#define ImageInputType_h
35f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "core/html/forms/BaseButtonInputType.h"
37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "platform/geometry/IntPoint.h"
38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace blink {
40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class ImageInputType FINAL : public BaseButtonInputType {
42f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)public:
43f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&);
445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)private:
465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    ImageInputType(HTMLInputElement&);
47f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    virtual const AtomicString& formControlType() const OVERRIDE;
48f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    virtual bool isFormDataAppendable() const OVERRIDE;
49f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    virtual bool appendFormData(FormDataList&, bool) const OVERRIDE;
50f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    virtual String resultForDialogSubmit() const OVERRIDE;
515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual bool supportsValidation() const OVERRIDE;
525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE;
535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual void handleDOMActivateEvent(Event*) OVERRIDE;
545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual void altAttributeChanged() OVERRIDE;
555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual void srcAttributeChanged() OVERRIDE;
565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual void startResourceLoading() OVERRIDE;
575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual bool shouldRespectAlignAttribute() OVERRIDE;
585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    virtual bool canBeSuccessfulSubmitButton() OVERRIDE;
59a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    virtual bool isEnumeratable() OVERRIDE;
60a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    virtual bool shouldRespectHeightAndWidthAttributes() OVERRIDE;
61a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    virtual unsigned height() const OVERRIDE;
62a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    virtual unsigned width() const OVERRIDE;
63f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE;
64f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    virtual const QualifiedName& subResourceAttributeName() const OVERRIDE;
65f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
66f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    IntPoint m_clickLocation; // Valid only during HTMLFormElement::prepareForSubmission().
675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)};
685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
69f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} // namespace blink
70f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
71f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif // ImageInputType_h
72f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)