Title: [99395] trunk/Source/WebCore
Revision
99395
Author
[email protected]
Date
2011-11-06 22:27:30 -0800 (Sun, 06 Nov 2011)

Log 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (99394 => 99395)


--- trunk/Source/WebCore/ChangeLog	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/ChangeLog	2011-11-07 06:27:30 UTC (rev 99395)
@@ -1,5 +1,34 @@
 2011-11-06  Keishi Hattori  <[email protected]>
 
+        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:
+
+2011-11-06  Keishi Hattori  <[email protected]>
+
         Remove ColorInputType::handleClickEvent
         https://bugs.webkit.org/show_bug.cgi?id=71640
 

Modified: trunk/Source/WebCore/html/BaseCheckableInputType.cpp (99394 => 99395)


--- trunk/Source/WebCore/html/BaseCheckableInputType.cpp	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/BaseCheckableInputType.cpp	2011-11-07 06:27:30 UTC (rev 99395)
@@ -94,7 +94,7 @@
     element()->dispatchSimulatedClick(0, sendToAnyElement);
 }
 
-String BaseCheckableInputType::fallbackValue()
+String BaseCheckableInputType::fallbackValue() const
 {
     return "on";
 }

Modified: trunk/Source/WebCore/html/BaseCheckableInputType.h (99394 => 99395)


--- trunk/Source/WebCore/html/BaseCheckableInputType.h	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/BaseCheckableInputType.h	2011-11-07 06:27:30 UTC (rev 99395)
@@ -48,7 +48,7 @@
     virtual void handleKeypressEvent(KeyboardEvent*);
     virtual bool canSetStringValue() const;
     virtual void accessKeyAction(bool sendToAnyElement);
-    virtual String fallbackValue();
+    virtual String fallbackValue() const OVERRIDE;
     virtual bool storesValueSeparateFromAttribute();
     virtual void setValue(const String&, bool, bool);
     virtual bool isCheckable();

Modified: trunk/Source/WebCore/html/ColorInputType.cpp (99394 => 99395)


--- trunk/Source/WebCore/html/ColorInputType.cpp	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/ColorInputType.cpp	2011-11-07 06:27:30 UTC (rev 99395)
@@ -84,7 +84,7 @@
     return false;
 }
 
-String ColorInputType::fallbackValue()
+String ColorInputType::fallbackValue() const
 {
     return String("#000000");
 }

Modified: trunk/Source/WebCore/html/ColorInputType.h (99394 => 99395)


--- trunk/Source/WebCore/html/ColorInputType.h	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/ColorInputType.h	2011-11-07 06:27:30 UTC (rev 99395)
@@ -48,7 +48,7 @@
     virtual bool isColorControl() const;
     virtual const AtomicString& formControlType() const;
     virtual bool supportsRequired() const;
-    virtual String fallbackValue();
+    virtual String fallbackValue() const OVERRIDE;
     virtual String sanitizeValue(const String&) const;
     virtual Color valueAsColor() const;
     virtual void createShadowSubtree();

Modified: trunk/Source/WebCore/html/InputType.cpp (99394 => 99395)


--- trunk/Source/WebCore/html/InputType.cpp	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/InputType.cpp	2011-11-07 06:27:30 UTC (rev 99395)
@@ -508,12 +508,12 @@
     return false;
 }
 
-String InputType::fallbackValue()
+String InputType::fallbackValue() const
 {
     return String();
 }
 
-String InputType::defaultValue()
+String InputType::defaultValue() const
 {
     return String();
 }

Modified: trunk/Source/WebCore/html/InputType.h (99394 => 99395)


--- trunk/Source/WebCore/html/InputType.h	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/InputType.h	2011-11-07 06:27:30 UTC (rev 99395)
@@ -121,8 +121,8 @@
     // DOM property functions
 
     virtual bool getTypeSpecificValue(String&); // Checked first, before internal storage or the value attribute.
-    virtual String fallbackValue(); // Checked last, if both internal storage and value attribute are missing.
-    virtual String defaultValue(); // Checked after even fallbackValue, only when the valueWithDefault function is called.
+    virtual String fallbackValue() const; // Checked last, if both internal storage and value attribute are missing.
+    virtual String defaultValue() const; // Checked after even fallbackValue, only when the valueWithDefault function is called.
     virtual double valueAsDate() const;
     virtual void setValueAsDate(double, ExceptionCode&) const;
     virtual double valueAsNumber() const;

Modified: trunk/Source/WebCore/html/RangeInputType.cpp (99394 => 99395)


--- trunk/Source/WebCore/html/RangeInputType.cpp	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/RangeInputType.cpp	2011-11-07 06:27:30 UTC (rev 99395)
@@ -295,7 +295,7 @@
     sliderThumbElementOf(element())->setPositionFromValue();
 }
 
-String RangeInputType::fallbackValue()
+String RangeInputType::fallbackValue() const
 {
     return serializeForNumberType(StepRange(element()).defaultValue());
 }

Modified: trunk/Source/WebCore/html/RangeInputType.h (99394 => 99395)


--- trunk/Source/WebCore/html/RangeInputType.h	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/RangeInputType.h	2011-11-07 06:27:30 UTC (rev 99395)
@@ -67,7 +67,7 @@
     virtual void accessKeyAction(bool sendToAnyElement);
     virtual void minOrMaxAttributeChanged();
     virtual void setValue(const String&, bool valueChanged, bool sendChangeEvent);
-    virtual String fallbackValue();
+    virtual String fallbackValue() const OVERRIDE;
     virtual String sanitizeValue(const String& proposedValue) const;
     virtual bool shouldRespectListAttribute();
 };

Modified: trunk/Source/WebCore/html/ResetInputType.cpp (99394 => 99395)


--- trunk/Source/WebCore/html/ResetInputType.cpp	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/ResetInputType.cpp	2011-11-07 06:27:30 UTC (rev 99395)
@@ -63,7 +63,7 @@
     event->setDefaultHandled();
 }
 
-String ResetInputType::defaultValue()
+String ResetInputType::defaultValue() const
 {
     return resetButtonDefaultLabel();
 }

Modified: trunk/Source/WebCore/html/ResetInputType.h (99394 => 99395)


--- trunk/Source/WebCore/html/ResetInputType.h	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/ResetInputType.h	2011-11-07 06:27:30 UTC (rev 99395)
@@ -44,7 +44,7 @@
     virtual const AtomicString& formControlType() const;
     virtual bool supportsValidation() const;
     virtual void handleDOMActivateEvent(Event*);
-    virtual String defaultValue();
+    virtual String defaultValue() const OVERRIDE;
     virtual bool isTextButton() const;
 };
 

Modified: trunk/Source/WebCore/html/SubmitInputType.cpp (99394 => 99395)


--- trunk/Source/WebCore/html/SubmitInputType.cpp	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/SubmitInputType.cpp	2011-11-07 06:27:30 UTC (rev 99395)
@@ -80,7 +80,7 @@
     return true;
 }
 
-String SubmitInputType::defaultValue()
+String SubmitInputType::defaultValue() const
 {
     return submitButtonDefaultLabel();
 }

Modified: trunk/Source/WebCore/html/SubmitInputType.h (99394 => 99395)


--- trunk/Source/WebCore/html/SubmitInputType.h	2011-11-07 03:17:12 UTC (rev 99394)
+++ trunk/Source/WebCore/html/SubmitInputType.h	2011-11-07 06:27:30 UTC (rev 99395)
@@ -46,7 +46,7 @@
     virtual bool supportsRequired() const;
     virtual void handleDOMActivateEvent(Event*);
     virtual bool canBeSuccessfulSubmitButton();
-    virtual String defaultValue();
+    virtual String defaultValue() const OVERRIDE;
     virtual bool isSubmitButton() const;
     virtual bool isTextButton() const;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to