| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // other than HTMLInputElement. | 53 // other than HTMLInputElement. |
| 54 // FIXME: InputType should not inherit InputTypeView. It's conceptually wrong. | 54 // FIXME: InputType should not inherit InputTypeView. It's conceptually wrong. |
| 55 class CORE_EXPORT InputType : public InputTypeView { | 55 class CORE_EXPORT InputType : public InputTypeView { |
| 56 WTF_MAKE_NONCOPYABLE(InputType); | 56 WTF_MAKE_NONCOPYABLE(InputType); |
| 57 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InputType); | 57 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InputType); |
| 58 | 58 |
| 59 public: | 59 public: |
| 60 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&, const Ato
micString&); | 60 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&, const Ato
micString&); |
| 61 static PassRefPtrWillBeRawPtr<InputType> createText(HTMLInputElement&); | 61 static PassRefPtrWillBeRawPtr<InputType> createText(HTMLInputElement&); |
| 62 static const AtomicString& normalizeTypeName(const AtomicString&); | 62 static const AtomicString& normalizeTypeName(const AtomicString&); |
| 63 virtual ~InputType(); | 63 ~InputType() override; |
| 64 | 64 |
| 65 virtual const AtomicString& formControlType() const = 0; | 65 virtual const AtomicString& formControlType() const = 0; |
| 66 | 66 |
| 67 // Type query functions | 67 // Type query functions |
| 68 | 68 |
| 69 // Any time we are using one of these functions it's best to refactor | 69 // Any time we are using one of these functions it's best to refactor |
| 70 // to add a virtual function to allow the input type object to do the | 70 // to add a virtual function to allow the input type object to do the |
| 71 // work instead, or at least make a query function that asks a higher | 71 // work instead, or at least make a query function that asks a higher |
| 72 // level question. These functions make the HTMLInputElement class | 72 // level question. These functions make the HTMLInputElement class |
| 73 // inflexible because it's harder to add new input types if there is | 73 // inflexible because it's harder to add new input types if there is |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 StepRange createStepRange(AnyStepHandling, const Decimal& stepBaseDefault, c
onst Decimal& minimumDefault, const Decimal& maximumDefault, const StepRange::St
epDescription&) const; | 227 StepRange createStepRange(AnyStepHandling, const Decimal& stepBaseDefault, c
onst Decimal& minimumDefault, const Decimal& maximumDefault, const StepRange::St
epDescription&) const; |
| 228 | 228 |
| 229 private: | 229 private: |
| 230 // Helper for stepUp()/stepDown(). Adds step value * count to the current va
lue. | 230 // Helper for stepUp()/stepDown(). Adds step value * count to the current va
lue. |
| 231 void applyStep(const Decimal&, int count, AnyStepHandling, TextFieldEventBeh
avior, ExceptionState&); | 231 void applyStep(const Decimal&, int count, AnyStepHandling, TextFieldEventBeh
avior, ExceptionState&); |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 } // namespace blink | 234 } // namespace blink |
| 235 #endif | 235 #endif |
| OLD | NEW |