Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: Source/core/html/HTMLTextAreaElement.h

Issue 126793004: Update HTML classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLSummaryElement.h ('k') | Source/core/html/HTMLTextFormControlElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 23 matching lines...) Expand all
34 34
35 class HTMLTextAreaElement FINAL : public HTMLTextFormControlElement { 35 class HTMLTextAreaElement FINAL : public HTMLTextFormControlElement {
36 public: 36 public:
37 static PassRefPtr<HTMLTextAreaElement> create(Document&, HTMLFormElement*); 37 static PassRefPtr<HTMLTextAreaElement> create(Document&, HTMLFormElement*);
38 38
39 int cols() const { return m_cols; } 39 int cols() const { return m_cols; }
40 int rows() const { return m_rows; } 40 int rows() const { return m_rows; }
41 41
42 bool shouldWrapText() const { return m_wrap != NoWrap; } 42 bool shouldWrapText() const { return m_wrap != NoWrap; }
43 43
44 virtual String value() const; 44 virtual String value() const OVERRIDE;
45 void setValue(const String&); 45 void setValue(const String&);
46 String defaultValue() const; 46 String defaultValue() const;
47 void setDefaultValue(const String&); 47 void setDefaultValue(const String&);
48 int textLength() const { return value().length(); } 48 int textLength() const { return value().length(); }
49 virtual int maxLength() const; 49 virtual int maxLength() const OVERRIDE;
50 void setMaxLength(int, ExceptionState&); 50 void setMaxLength(int, ExceptionState&);
51 51
52 String suggestedValue() const; 52 String suggestedValue() const;
53 void setSuggestedValue(const String&); 53 void setSuggestedValue(const String&);
54 54
55 // For ValidityState 55 // For ValidityState
56 virtual String validationMessage() const OVERRIDE; 56 virtual String validationMessage() const OVERRIDE;
57 virtual bool valueMissing() const OVERRIDE; 57 virtual bool valueMissing() const OVERRIDE;
58 virtual bool tooLong() const OVERRIDE; 58 virtual bool tooLong() const OVERRIDE;
59 bool isValidValue(const String&) const; 59 bool isValidValue(const String&) const;
(...skipping 10 matching lines...) Expand all
70 // FIXME: Author shadows should be allowed 70 // FIXME: Author shadows should be allowed
71 // https://bugs.webkit.org/show_bug.cgi?id=92608 71 // https://bugs.webkit.org/show_bug.cgi?id=92608
72 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } 72 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
73 73
74 void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) const; 74 void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) const;
75 static String sanitizeUserInputValue(const String&, unsigned maxLength); 75 static String sanitizeUserInputValue(const String&, unsigned maxLength);
76 void updateValue() const; 76 void updateValue() const;
77 void setNonDirtyValue(const String&); 77 void setNonDirtyValue(const String&);
78 void setValueCommon(const String&); 78 void setValueCommon(const String&);
79 79
80 virtual bool supportsPlaceholder() const { return true; } 80 virtual bool supportsPlaceholder() const OVERRIDE { return true; }
81 virtual void updatePlaceholderText(); 81 virtual void updatePlaceholderText() OVERRIDE;
82 virtual bool isEmptyValue() const { return value().isEmpty(); } 82 virtual bool isEmptyValue() const OVERRIDE { return value().isEmpty(); }
83 83
84 virtual bool isOptionalFormControl() const { return !isRequiredFormControl() ; } 84 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm Control(); }
85 virtual bool isRequiredFormControl() const { return isRequired(); } 85 virtual bool isRequiredFormControl() const OVERRIDE { return isRequired(); }
86 86
87 virtual void defaultEventHandler(Event*); 87 virtual void defaultEventHandler(Event*) OVERRIDE;
88 virtual void handleFocusEvent(Element* oldFocusedNode, FocusDirection) OVERR IDE; 88 virtual void handleFocusEvent(Element* oldFocusedNode, FocusDirection) OVERR IDE;
89 89
90 virtual void subtreeHasChanged(); 90 virtual void subtreeHasChanged() OVERRIDE;
91 91
92 virtual bool isEnumeratable() const { return true; } 92 virtual bool isEnumeratable() const OVERRIDE { return true; }
93 virtual bool isInteractiveContent() const OVERRIDE; 93 virtual bool isInteractiveContent() const OVERRIDE;
94 virtual bool supportLabels() const OVERRIDE { return true; } 94 virtual bool supportLabels() const OVERRIDE { return true; }
95 95
96 virtual const AtomicString& formControlType() const; 96 virtual const AtomicString& formControlType() const OVERRIDE;
97 97
98 virtual FormControlState saveFormControlState() const OVERRIDE; 98 virtual FormControlState saveFormControlState() const OVERRIDE;
99 virtual void restoreFormControlState(const FormControlState&) OVERRIDE; 99 virtual void restoreFormControlState(const FormControlState&) OVERRIDE;
100 100
101 virtual bool isTextFormControl() const { return true; } 101 virtual bool isTextFormControl() const OVERRIDE { return true; }
102 102
103 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0); 103 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
104 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 104 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
105 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 105 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
106 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; 106 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE;
107 virtual RenderObject* createRenderer(RenderStyle*); 107 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
108 virtual bool appendFormData(FormDataList&, bool); 108 virtual bool appendFormData(FormDataList&, bool) OVERRIDE;
109 virtual void resetImpl() OVERRIDE; 109 virtual void resetImpl() OVERRIDE;
110 virtual bool hasCustomFocusLogic() const OVERRIDE; 110 virtual bool hasCustomFocusLogic() const OVERRIDE;
111 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; 111 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE;
112 virtual bool isKeyboardFocusable() const OVERRIDE; 112 virtual bool isKeyboardFocusable() const OVERRIDE;
113 virtual void updateFocusAppearance(bool restorePreviousSelection); 113 virtual void updateFocusAppearance(bool restorePreviousSelection) OVERRIDE;
114 114
115 virtual void accessKeyAction(bool sendMouseEvents); 115 virtual void accessKeyAction(bool sendMouseEvents) OVERRIDE;
116 116
117 virtual bool shouldUseInputMethod(); 117 virtual bool shouldUseInputMethod() OVERRIDE;
118 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; 118 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE;
119 virtual bool matchesReadWritePseudoClass() const OVERRIDE; 119 virtual bool matchesReadWritePseudoClass() const OVERRIDE;
120 120
121 bool valueMissing(const String& value) const { return isRequiredFormControl( ) && !isDisabledOrReadOnly() && value.isEmpty(); } 121 bool valueMissing(const String& value) const { return isRequiredFormControl( ) && !isDisabledOrReadOnly() && value.isEmpty(); }
122 bool tooLong(const String&, NeedsToCheckDirtyFlag) const; 122 bool tooLong(const String&, NeedsToCheckDirtyFlag) const;
123 123
124 int m_rows; 124 int m_rows;
125 int m_cols; 125 int m_cols;
126 WrapMethod m_wrap; 126 WrapMethod m_wrap;
127 mutable String m_value; 127 mutable String m_value;
128 mutable bool m_isDirty; 128 mutable bool m_isDirty;
129 String m_suggestedValue; 129 String m_suggestedValue;
130 }; 130 };
131 131
132 DEFINE_NODE_TYPE_CASTS(HTMLTextAreaElement, hasTagName(HTMLNames::textareaTag)); 132 DEFINE_NODE_TYPE_CASTS(HTMLTextAreaElement, hasTagName(HTMLNames::textareaTag));
133 133
134 } //namespace 134 } //namespace
135 135
136 #endif 136 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLSummaryElement.h ('k') | Source/core/html/HTMLTextFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698