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

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

Issue 460343004: Fix update of validity cache value, so that it reflects the correct state of any FormControlElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP2 Created 6 years, 3 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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 enum WrapMethod { NoWrap, SoftWrap, HardWrap }; 67 enum WrapMethod { NoWrap, SoftWrap, HardWrap };
68 68
69 virtual void didAddUserAgentShadowRoot(ShadowRoot&) OVERRIDE; 69 virtual void didAddUserAgentShadowRoot(ShadowRoot&) OVERRIDE;
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 virtual void setInnerEditorValue(const String&) OVERRIDE;
78 void setNonDirtyValue(const String&); 77 void setNonDirtyValue(const String&);
79 void setValueCommon(const String&, TextFieldEventBehavior, SelectionOption = NotChangeSelection); 78 void setValueCommon(const String&, TextFieldEventBehavior, SelectionOption = NotChangeSelection);
80 79
81 virtual bool supportsPlaceholder() const OVERRIDE { return true; } 80 virtual bool supportsPlaceholder() const OVERRIDE { return true; }
82 virtual void updatePlaceholderText() OVERRIDE; 81 virtual void updatePlaceholderText() OVERRIDE;
83 virtual bool isEmptyValue() const OVERRIDE { return value().isEmpty(); } 82 virtual bool isEmptyValue() const OVERRIDE { return value().isEmpty(); }
84 virtual bool isEmptySuggestedValue() const OVERRIDE FINAL { return suggested Value().isEmpty(); } 83 virtual bool isEmptySuggestedValue() const OVERRIDE FINAL { return suggested Value().isEmpty(); }
85 84
86 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm Control(); } 85 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm Control(); }
87 virtual bool isRequiredFormControl() const OVERRIDE { return isRequired(); } 86 virtual bool isRequiredFormControl() const OVERRIDE { return isRequired(); }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 virtual bool matchesReadWritePseudoClass() const OVERRIDE; 120 virtual bool matchesReadWritePseudoClass() const OVERRIDE;
122 121
123 bool valueMissing(const String& value) const { return isRequiredFormControl( ) && !isDisabledOrReadOnly() && value.isEmpty(); } 122 bool valueMissing(const String& value) const { return isRequiredFormControl( ) && !isDisabledOrReadOnly() && value.isEmpty(); }
124 bool tooLong(const String&, NeedsToCheckDirtyFlag) const; 123 bool tooLong(const String&, NeedsToCheckDirtyFlag) const;
125 124
126 int m_rows; 125 int m_rows;
127 int m_cols; 126 int m_cols;
128 WrapMethod m_wrap; 127 WrapMethod m_wrap;
129 mutable String m_value; 128 mutable String m_value;
130 mutable bool m_isDirty; 129 mutable bool m_isDirty;
131 bool m_valueIsUpToDate;
spartha 2014/09/02 14:09:55 The flag is set in subTreeChanged() and the value
tkent 2014/09/03 02:16:35 Don't change this. The change will cause performa
spartha 2014/09/03 06:14:47 I have not come across m_valueIsUpToDate being set
tkent 2014/09/03 07:56:43 - If willValidate() is false, updateValue() should
132 String m_suggestedValue; 130 String m_suggestedValue;
133 }; 131 };
134 132
135 } //namespace 133 } //namespace
136 134
137 #endif 135 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698