https://bugs.webkit.org/show_bug.cgi?id=120366
Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-08-27
Reviewed by Darin Adler.
Adding "explicit" keyword in constructors.
* html/BaseButtonInputType.h:
(WebCore::BaseButtonInputType::BaseButtonInputType):
* html/BaseCheckableInputType.h:
(WebCore::BaseCheckableInputType::BaseCheckableInputType):
* html/BaseChooserOnlyDateAndTimeInputType.h:
(WebCore::BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType):
* html/BaseClickableWithKeyInputType.h:
(WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):
* html/BaseTextInputType.h:
(WebCore::BaseTextInputType::BaseTextInputType):
* html/ColorInputType.h:
(WebCore::ColorInputType::ColorInputType):
* html/DateInputType.h:
* html/DateTimeInputType.h:
(WebCore::DateTimeInputType::DateTimeInputType):
* html/DateTimeLocalInputType.h:
(WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
* html/EmailInputType.h:
(WebCore::EmailInputType::EmailInputType):
* html/FileInputType.h:
* html/HiddenInputType.h:
(WebCore::HiddenInputType::HiddenInputType):
* html/ImageData.h:
* html/ImageInputType.h:
* html/InputType.h:
(WebCore::InputType::InputType):
* html/MediaController.h:
* html/MonthInputType.h:
(WebCore::MonthInputType::MonthInputType):
* html/RadioInputType.h:
(WebCore::RadioInputType::RadioInputType):
* html/RangeInputType.h:
* html/ResetInputType.h:
(WebCore::ResetInputType::ResetInputType):
* html/SearchInputType.h:
* html/SubmitInputType.h:
(WebCore::SubmitInputType::SubmitInputType):
* html/TelephoneInputType.h:
(WebCore::TelephoneInputType::TelephoneInputType):
* html/TextFieldInputType.h:
* html/TextInputType.h:
(WebCore::TextInputType::TextInputType):
* html/TimeInputType.h:
* html/URLInputType.h:
(WebCore::URLInputType::URLInputType):
* html/ValidationMessage.h:
* html/WeekInputType.h:
(WebCore::WeekInputType::WeekInputType):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154721
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-08-27 Santosh Mahto <santosh.ma@samsung.com>
+
+ Adding "explicit" keyword in forms related classes constructor
+ https://bugs.webkit.org/show_bug.cgi?id=120366
+
+ Reviewed by Darin Adler.
+
+ Adding "explicit" keyword in constructors.
+
+ * html/BaseButtonInputType.h:
+ (WebCore::BaseButtonInputType::BaseButtonInputType):
+ * html/BaseCheckableInputType.h:
+ (WebCore::BaseCheckableInputType::BaseCheckableInputType):
+ * html/BaseChooserOnlyDateAndTimeInputType.h:
+ (WebCore::BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType):
+ * html/BaseClickableWithKeyInputType.h:
+ (WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):
+ * html/BaseTextInputType.h:
+ (WebCore::BaseTextInputType::BaseTextInputType):
+ * html/ColorInputType.h:
+ (WebCore::ColorInputType::ColorInputType):
+ * html/DateInputType.h:
+ * html/DateTimeInputType.h:
+ (WebCore::DateTimeInputType::DateTimeInputType):
+ * html/DateTimeLocalInputType.h:
+ (WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
+ * html/EmailInputType.h:
+ (WebCore::EmailInputType::EmailInputType):
+ * html/FileInputType.h:
+ * html/HiddenInputType.h:
+ (WebCore::HiddenInputType::HiddenInputType):
+ * html/ImageData.h:
+ * html/ImageInputType.h:
+ * html/InputType.h:
+ (WebCore::InputType::InputType):
+ * html/MediaController.h:
+ * html/MonthInputType.h:
+ (WebCore::MonthInputType::MonthInputType):
+ * html/RadioInputType.h:
+ (WebCore::RadioInputType::RadioInputType):
+ * html/RangeInputType.h:
+ * html/ResetInputType.h:
+ (WebCore::ResetInputType::ResetInputType):
+ * html/SearchInputType.h:
+ * html/SubmitInputType.h:
+ (WebCore::SubmitInputType::SubmitInputType):
+ * html/TelephoneInputType.h:
+ (WebCore::TelephoneInputType::TelephoneInputType):
+ * html/TextFieldInputType.h:
+ * html/TextInputType.h:
+ (WebCore::TextInputType::TextInputType):
+ * html/TimeInputType.h:
+ * html/URLInputType.h:
+ (WebCore::URLInputType::URLInputType):
+ * html/ValidationMessage.h:
+ * html/WeekInputType.h:
+ (WebCore::WeekInputType::WeekInputType):
+
2013-08-27 Benjamin Poulain <benjamin@webkit.org>
Fix the indentation of SpaceSplitString
// Base of button, file, image, reset, and submit types.
class BaseButtonInputType : public BaseClickableWithKeyInputType {
protected:
- BaseButtonInputType(HTMLInputElement* element) : BaseClickableWithKeyInputType(element) { }
+ explicit BaseButtonInputType(HTMLInputElement* element) : BaseClickableWithKeyInputType(element) { }
private:
virtual bool shouldSaveAndRestoreFormControlState() const OVERRIDE;
// Base of checkbox and radio types.
class BaseCheckableInputType : public InputType {
protected:
- BaseCheckableInputType(HTMLInputElement* element) : InputType(element) { }
+ explicit BaseCheckableInputType(HTMLInputElement* element) : InputType(element) { }
virtual void handleKeydownEvent(KeyboardEvent*);
private:
class BaseChooserOnlyDateAndTimeInputType : public BaseDateAndTimeInputType, public DateTimeChooserClient {
protected:
- BaseChooserOnlyDateAndTimeInputType(HTMLInputElement* element) : BaseDateAndTimeInputType(element) { }
+ explicit BaseChooserOnlyDateAndTimeInputType(HTMLInputElement* element) : BaseDateAndTimeInputType(element) { }
virtual ~BaseChooserOnlyDateAndTimeInputType();
private:
static void accessKeyAction(HTMLInputElement*, bool sendMouseEvents);
protected:
- BaseClickableWithKeyInputType(HTMLInputElement* element) : InputType(element) { }
+ explicit BaseClickableWithKeyInputType(HTMLInputElement* element) : InputType(element) { }
private:
virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE;
// They support maxlength, selection functions, and so on.
class BaseTextInputType : public TextFieldInputType {
protected:
- BaseTextInputType(HTMLInputElement* element) : TextFieldInputType(element) { }
+ explicit BaseTextInputType(HTMLInputElement* element) : TextFieldInputType(element) { }
private:
virtual bool isTextType() const OVERRIDE;
virtual Vector<Color> suggestions() const OVERRIDE;
private:
- ColorInputType(HTMLInputElement* element) : BaseClickableWithKeyInputType(element) { }
+ explicit ColorInputType(HTMLInputElement* element) : BaseClickableWithKeyInputType(element) { }
virtual void attach() OVERRIDE;
virtual bool isColorControl() const OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- DateInputType(HTMLInputElement*);
+ explicit DateInputType(HTMLInputElement*);
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual DateComponents::Type dateType() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- DateTimeInputType(HTMLInputElement* element) : BaseDateTimeInputType(element) { }
+ explicit DateTimeInputType(HTMLInputElement* element) : BaseDateTimeInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual DateComponents::Type dateType() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- DateTimeLocalInputType(HTMLInputElement* element) : BaseDateTimeLocalInputType(element) { }
+ explicit DateTimeLocalInputType(HTMLInputElement* element) : BaseDateTimeLocalInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual DateComponents::Type dateType() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- EmailInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
+ explicit EmailInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool typeMismatchFor(const String&) const OVERRIDE;
static Vector<FileChooserFileInfo> filesFromFormControlState(const FormControlState&);
private:
- FileInputType(HTMLInputElement*);
+ explicit FileInputType(HTMLInputElement*);
virtual const AtomicString& formControlType() const OVERRIDE;
virtual FormControlState saveFormControlState() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- HiddenInputType(HTMLInputElement* element) : InputType(element) { }
+ explicit HiddenInputType(HTMLInputElement* element) : InputType(element) { }
virtual const AtomicString& formControlType() const OVERRIDE;
virtual FormControlState saveFormControlState() const OVERRIDE;
virtual void restoreFormControlState(const FormControlState&) OVERRIDE;
Uint8ClampedArray* data() const { return m_data.get(); }
private:
- ImageData(const IntSize&);
+ explicit ImageData(const IntSize&);
ImageData(const IntSize&, PassRefPtr<Uint8ClampedArray>);
IntSize m_size;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- ImageInputType(HTMLInputElement*);
+ explicit ImageInputType(HTMLInputElement*);
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool isFormDataAppendable() const OVERRIDE;
virtual bool appendFormData(FormDataList&, bool) const OVERRIDE;
void dispatchSimulatedClickIfActive(KeyboardEvent*) const;
protected:
- InputType(HTMLInputElement* element) : m_element(element) { }
+ explicit InputType(HTMLInputElement* element) : m_element(element) { }
HTMLInputElement* element() const { return m_element; }
Chrome* chrome() const;
Decimal parseToNumberOrNaN(const String&) const;
using RefCounted<MediaController>::deref;
private:
- MediaController(ScriptExecutionContext*);
+ explicit MediaController(ScriptExecutionContext*);
void reportControllerState();
void updateReadyState();
void updatePlaybackState();
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- MonthInputType(HTMLInputElement* element) : BaseMonthInputType(element) { }
+ explicit MonthInputType(HTMLInputElement* element) : BaseMonthInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual DateComponents::Type dateType() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- RadioInputType(HTMLInputElement* element) : BaseCheckableInputType(element) { }
+ explicit RadioInputType(HTMLInputElement* element) : BaseCheckableInputType(element) { }
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool valueMissing(const String&) const OVERRIDE;
virtual String valueMissingText() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- RangeInputType(HTMLInputElement*);
+ explicit RangeInputType(HTMLInputElement*);
virtual void attach() OVERRIDE;
virtual bool isRangeControl() const OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- ResetInputType(HTMLInputElement* element) : BaseButtonInputType(element) { }
+ explicit ResetInputType(HTMLInputElement* element) : BaseButtonInputType(element) { }
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool supportsValidation() const OVERRIDE;
virtual void handleDOMActivateEvent(Event*) OVERRIDE;
void stopSearchEventTimer();
private:
- SearchInputType(HTMLInputElement*);
+ explicit SearchInputType(HTMLInputElement*);
virtual void attach() OVERRIDE;
virtual void addSearchResult() OVERRIDE;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- SubmitInputType(HTMLInputElement* element) : BaseButtonInputType(element) { }
+ explicit SubmitInputType(HTMLInputElement* element) : BaseButtonInputType(element) { }
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool appendFormData(FormDataList&, bool) const OVERRIDE;
virtual bool supportsRequired() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- TelephoneInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
+ explicit TelephoneInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool shouldRespectSpeechAttribute() OVERRIDE;
// It supports not only the types for BaseTextInputType but also type=number.
class TextFieldInputType : public InputType, protected SpinButtonElement::SpinButtonOwner {
protected:
- TextFieldInputType(HTMLInputElement*);
+ explicit TextFieldInputType(HTMLInputElement*);
virtual ~TextFieldInputType();
virtual bool canSetSuggestedValue() OVERRIDE;
virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- TextInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
+ explicit TextInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool shouldRespectSpeechAttribute() OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- TimeInputType(HTMLInputElement*);
+ explicit TimeInputType(HTMLInputElement*);
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual DateComponents::Type dateType() const OVERRIDE;
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- URLInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
+ explicit URLInputType(HTMLInputElement* element) : BaseTextInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual bool typeMismatchFor(const String&) const OVERRIDE;
bool shadowTreeContains(const Node*) const;
private:
- ValidationMessage(HTMLFormControlElement*);
+ explicit ValidationMessage(HTMLFormControlElement*);
ValidationMessageClient* validationMessageClient() const;
void setMessage(const String&);
void setMessageDOMAndStartTimer(Timer<ValidationMessage>* = 0);
static PassOwnPtr<InputType> create(HTMLInputElement*);
private:
- WeekInputType(HTMLInputElement* element) : BaseWeekInputType(element) { }
+ explicit WeekInputType(HTMLInputElement* element) : BaseWeekInputType(element) { }
virtual void attach() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual DateComponents::Type dateType() const OVERRIDE;