19401deb32079a855d291d041901c57bd332bfa87Misha Brukman/* 2fd93908ae8b9684fe71c239e3c6cfe13ff6a2663Misha Brukman * Copyright (C) 2010 Google Inc. All rights reserved. 3efddcfa0df921ebca3e316120480df7df3e6e405Chris Lattner * 4efddcfa0df921ebca3e316120480df7df3e6e405Chris Lattner * Redistribution and use in source and binary forms, with or without 54ee451de366474b9c228b4e5fa573795a715216dChris Lattner * modification, are permitted provided that the following conditions are 64ee451de366474b9c228b4e5fa573795a715216dChris Lattner * met: 7fd93908ae8b9684fe71c239e3c6cfe13ff6a2663Misha Brukman * 8efddcfa0df921ebca3e316120480df7df3e6e405Chris Lattner * * Redistributions of source code must retain the above copyright 99401deb32079a855d291d041901c57bd332bfa87Misha Brukman * notice, this list of conditions and the following disclaimer. 109401deb32079a855d291d041901c57bd332bfa87Misha Brukman * * Redistributions in binary form must reproduce the above 119401deb32079a855d291d041901c57bd332bfa87Misha Brukman * copyright notice, this list of conditions and the following disclaimer 1238b8fd107816b94df1cd5b89123964103498767cMisha Brukman * in the documentation and/or other materials provided with the 1338b8fd107816b94df1cd5b89123964103498767cMisha Brukman * distribution. 149401deb32079a855d291d041901c57bd332bfa87Misha Brukman * * Neither the name of Google Inc. nor the names of its 159401deb32079a855d291d041901c57bd332bfa87Misha Brukman * contributors may be used to endorse or promote products derived from 169401deb32079a855d291d041901c57bd332bfa87Misha Brukman * this software without specific prior written permission. 171e3cb34753a0cf6b8d99ebf3ada17c87dcebed79Chris Lattner * 18d04a8d4b33ff316ca4cf961e06c9e312eff8e64fChandler Carruth * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19d04a8d4b33ff316ca4cf961e06c9e312eff8e64fChandler Carruth * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2036b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 210b8c9a80f20772c3793201ab5b251d3520b9cea3Chandler Carruth * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 220b8c9a80f20772c3793201ab5b251d3520b9cea3Chandler Carruth * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 239401deb32079a855d291d041901c57bd332bfa87Misha Brukman * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 246fa98b13206583e6eb90b8304758b35548914944Nick Lewycky * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2516d0eb04688d283dc70a8f4a9905cb19d8636cd2Chris Lattner * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 262f1cd85598d260e5567804460e87f8bee0c5e1e5Bill Wendling * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2799650c9088c5dd4b6788a99b63c82d13e0518961Chandler Carruth * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 286fa98b13206583e6eb90b8304758b35548914944Nick Lewycky * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 296fa98b13206583e6eb90b8304758b35548914944Nick Lewycky */ 309401deb32079a855d291d041901c57bd332bfa87Misha Brukman 319401deb32079a855d291d041901c57bd332bfa87Misha Brukman#ifndef BaseTextInputType_h 32dce4a407a24b04eebc6a376f8e62b41aaa7b071fStephen Hines#define BaseTextInputType_h 33dce4a407a24b04eebc6a376f8e62b41aaa7b071fStephen Hines 3486453c52ba02e743d29c08456e51006500041456Chris Lattner#include "core/html/forms/TextFieldInputType.h" 35fd93908ae8b9684fe71c239e3c6cfe13ff6a2663Misha Brukman 3686453c52ba02e743d29c08456e51006500041456Chris Lattnernamespace blink { 376726b6d75a8b679068a58cb954ba97cf9d1690baNick Lewycky 38ecd94c804a563f2a86572dcf1d2e81f397e19daaNick Lewycky// Base of email, password, search, tel, text, and URL types. 3941bc0b069c74afa05e92a97ff2c5d3cfa7426505Chris Lattner// They support maxlength, selection functions, and so on. 4041bc0b069c74afa05e92a97ff2c5d3cfa7426505Chris Lattnerclass BaseTextInputType : public TextFieldInputType { 41c2bbfc18e9adbbdcf5b3375d8d25e2452f7df7f1Dan Gohmanprotected: 42081c34b725980f995be9080eaec24cd3dfaaf065Owen Anderson BaseTextInputType(HTMLInputElement& element) : TextFieldInputType(element) { } 43081c34b725980f995be9080eaec24cd3dfaaf065Owen Anderson 44081c34b725980f995be9080eaec24cd3dfaaf065Owen Andersonprivate: 4541bc0b069c74afa05e92a97ff2c5d3cfa7426505Chris Lattner virtual bool tooLong(const String&, HTMLTextFormControlElement::NeedsToCheckDirtyFlag) const OVERRIDE FINAL; 4636b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines virtual int maxLength() const OVERRIDE FINAL; 47fd93908ae8b9684fe71c239e3c6cfe13ff6a2663Misha Brukman virtual bool patternMismatch(const String&) const OVERRIDE FINAL; 4836b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines virtual bool supportsPlaceholder() const OVERRIDE FINAL; 49fdded9f95ae6233ec553fd54acc11f2dac1aee9dChris Lattner virtual bool supportsSelectionAPI() const OVERRIDE; 50fdded9f95ae6233ec553fd54acc11f2dac1aee9dChris Lattner}; 5136b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines 52efddcfa0df921ebca3e316120480df7df3e6e405Chris Lattner} // namespace blink 53efddcfa0df921ebca3e316120480df7df3e6e405Chris Lattner 54844731a7f1909f55935e3514c9e713a62d67662eDan Gohman#endif // BaseTextInputType_h 55efddcfa0df921ebca3e316120480df7df3e6e405Chris Lattner