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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormControlElement.h

Issue 1490973002: Remove HTMLFormControlElement::m_disabled, m_isReadOnly, and m_isRequired. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attr-hook-2
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLFormControlElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElement.h b/third_party/WebKit/Source/core/html/HTMLFormControlElement.h
index 1809c8af089f55ae50906f6cfec6ce4af79e790a..c9934aec2db8ea6517801210d566b1ddfd46e6b2 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormControlElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLFormControlElement.h
@@ -100,8 +100,8 @@ public:
void setCustomValidity(const String&) final;
void findCustomValidationMessageTextDirection(const String& message, TextDirection &messageDir, String& subMessage, TextDirection& subMessageDir);
- bool isReadOnly() const { return m_isReadOnly; }
- bool isDisabledOrReadOnly() const { return isDisabledFormControl() || m_isReadOnly; }
+ bool isReadOnly() const { return fastHasAttribute(HTMLNames::readonlyAttr); }
kochi 2015/12/03 03:38:59 isRequired() is just { return fastHasAttribute(...
tkent 2015/12/03 04:05:29 Ok, I took out-of-line.
+ bool isDisabledOrReadOnly() const { return isDisabledFormControl() || isReadOnly(); }
bool isAutofocusable() const;
@@ -174,10 +174,7 @@ private:
// Requests validity recalc for all ancestor fieldsets, if exist.
void fieldSetAncestorsSetNeedsValidityCheck(Node*);
- bool m_disabled : 1;
bool m_isAutofilled : 1;
kochi 2015/12/03 03:38:59 Can these 2 bitfields move to below so that it cou
tkent 2015/12/03 04:05:29 Good suggestion. Done.
- bool m_isReadOnly : 1;
- bool m_isRequired : 1;
bool m_hasValidationMessage : 1;
enum AncestorDisabledState { AncestorDisabledStateUnknown, AncestorDisabledStateEnabled, AncestorDisabledStateDisabled };
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698