⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 99395 in webkit


Ignore:
Timestamp:
Nov 6, 2011, 10:27:30 PM (15 years ago)
Author:
keishi@webkit.org
Message:

InputType::fallbackValue and defaultValue should be const
https://bugs.webkit.org/show_bug.cgi?id=71641

Reviewed by Kent Tamura.

Changing InputType::fallbackValue and defaultValue to const. Also adding OVERRIDE.

  • html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::fallbackValue):

  • html/BaseCheckableInputType.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::fallbackValue):

  • html/ColorInputType.h:
  • html/InputType.cpp:

(WebCore::InputType::fallbackValue):
(WebCore::InputType::defaultValue):

  • html/InputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::fallbackValue):

  • html/RangeInputType.h:
  • html/ResetInputType.cpp:

(WebCore::ResetInputType::defaultValue):

  • html/ResetInputType.h:
  • html/SubmitInputType.cpp:

(WebCore::SubmitInputType::defaultValue):

  • html/SubmitInputType.h:
Location:
trunk/Source/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r99391 r99395  
     12011-11-06  Keishi Hattori  <keishi@webkit.org>
     2
     3        InputType::fallbackValue and defaultValue should be const
     4        https://bugs.webkit.org/show_bug.cgi?id=71641
     5
     6        Reviewed by Kent Tamura.
     7   
     8        Changing InputType::fallbackValue and defaultValue to const. Also adding OVERRIDE.
     9
     10        * html/BaseCheckableInputType.cpp:
     11        (WebCore::BaseCheckableInputType::fallbackValue):
     12        * html/BaseCheckableInputType.h:
     13        * html/ColorInputType.cpp:
     14        (WebCore::ColorInputType::fallbackValue):
     15        * html/ColorInputType.h:
     16        * html/InputType.cpp:
     17        (WebCore::InputType::fallbackValue):
     18        (WebCore::InputType::defaultValue):
     19        * html/InputType.h:
     20        * html/RangeInputType.cpp:
     21        (WebCore::RangeInputType::fallbackValue):
     22        * html/RangeInputType.h:
     23        * html/ResetInputType.cpp:
     24        (WebCore::ResetInputType::defaultValue):
     25        * html/ResetInputType.h:
     26        * html/SubmitInputType.cpp:
     27        (WebCore::SubmitInputType::defaultValue):
     28        * html/SubmitInputType.h:
     29
    1302011-11-06  Keishi Hattori  <keishi@webkit.org>
    231
  • trunk/Source/WebCore/html/BaseCheckableInputType.cpp

    r95901 r99395  
    9595}
    9696
    97 String BaseCheckableInputType::fallbackValue()
     97String BaseCheckableInputType::fallbackValue() const
    9898{
    9999    return "on";
  • trunk/Source/WebCore/html/BaseCheckableInputType.h

    r95901 r99395  
    4949    virtual bool canSetStringValue() const;
    5050    virtual void accessKeyAction(bool sendToAnyElement);
    51     virtual String fallbackValue();
     51    virtual String fallbackValue() const OVERRIDE;
    5252    virtual bool storesValueSeparateFromAttribute();
    5353    virtual void setValue(const String&, bool, bool);
  • trunk/Source/WebCore/html/ColorInputType.cpp

    r99391 r99395  
    8585}
    8686
    87 String ColorInputType::fallbackValue()
     87String ColorInputType::fallbackValue() const
    8888{
    8989    return String("#000000");
  • trunk/Source/WebCore/html/ColorInputType.h

    r99391 r99395  
    4949    virtual const AtomicString& formControlType() const;
    5050    virtual bool supportsRequired() const;
    51     virtual String fallbackValue();
     51    virtual String fallbackValue() const OVERRIDE;
    5252    virtual String sanitizeValue(const String&) const;
    5353    virtual Color valueAsColor() const;
  • trunk/Source/WebCore/html/InputType.cpp

    r98054 r99395  
    509509}
    510510
    511 String InputType::fallbackValue()
     511String InputType::fallbackValue() const
    512512{
    513513    return String();
    514514}
    515515
    516 String InputType::defaultValue()
     516String InputType::defaultValue() const
    517517{
    518518    return String();
  • trunk/Source/WebCore/html/InputType.h

    r98054 r99395  
    122122
    123123    virtual bool getTypeSpecificValue(String&); // Checked first, before internal storage or the value attribute.
    124     virtual String fallbackValue(); // Checked last, if both internal storage and value attribute are missing.
    125     virtual String defaultValue(); // Checked after even fallbackValue, only when the valueWithDefault function is called.
     124    virtual String fallbackValue() const; // Checked last, if both internal storage and value attribute are missing.
     125    virtual String defaultValue() const; // Checked after even fallbackValue, only when the valueWithDefault function is called.
    126126    virtual double valueAsDate() const;
    127127    virtual void setValueAsDate(double, ExceptionCode&) const;
  • trunk/Source/WebCore/html/RangeInputType.cpp

    r97351 r99395  
    296296}
    297297
    298 String RangeInputType::fallbackValue()
     298String RangeInputType::fallbackValue() const
    299299{
    300300    return serializeForNumberType(StepRange(element()).defaultValue());
  • trunk/Source/WebCore/html/RangeInputType.h

    r97351 r99395  
    6868    virtual void minOrMaxAttributeChanged();
    6969    virtual void setValue(const String&, bool valueChanged, bool sendChangeEvent);
    70     virtual String fallbackValue();
     70    virtual String fallbackValue() const OVERRIDE;
    7171    virtual String sanitizeValue(const String& proposedValue) const;
    7272    virtual bool shouldRespectListAttribute();
  • trunk/Source/WebCore/html/ResetInputType.cpp

    r95901 r99395  
    6464}
    6565
    66 String ResetInputType::defaultValue()
     66String ResetInputType::defaultValue() const
    6767{
    6868    return resetButtonDefaultLabel();
  • trunk/Source/WebCore/html/ResetInputType.h

    r95901 r99395  
    4545    virtual bool supportsValidation() const;
    4646    virtual void handleDOMActivateEvent(Event*);
    47     virtual String defaultValue();
     47    virtual String defaultValue() const OVERRIDE;
    4848    virtual bool isTextButton() const;
    4949};
  • trunk/Source/WebCore/html/SubmitInputType.cpp

    r95901 r99395  
    8181}
    8282
    83 String SubmitInputType::defaultValue()
     83String SubmitInputType::defaultValue() const
    8484{
    8585    return submitButtonDefaultLabel();
  • trunk/Source/WebCore/html/SubmitInputType.h

    r95901 r99395  
    4747    virtual void handleDOMActivateEvent(Event*);
    4848    virtual bool canBeSuccessfulSubmitButton();
    49     virtual String defaultValue();
     49    virtual String defaultValue() const OVERRIDE;
    5050    virtual bool isSubmitButton() const;
    5151    virtual bool isTextButton() const;
Note: See TracChangeset for help on using the changeset viewer.