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

Unified Diff: third_party/WebKit/Source/core/html/forms/BaseTextInputType.h

Issue 2037553002: INPUT pattern attribute: Enable "unicode" flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment about |mutable|, remove unnecessary #include Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/forms/BaseTextInputType.h
diff --git a/third_party/WebKit/Source/core/html/forms/BaseTextInputType.h b/third_party/WebKit/Source/core/html/forms/BaseTextInputType.h
index 1e73e6382014ba7c951a543a4cb1f89d30d8b5ba..b83977ec188b9b9c7ed182c94ea796809b0598ac 100644
--- a/third_party/WebKit/Source/core/html/forms/BaseTextInputType.h
+++ b/third_party/WebKit/Source/core/html/forms/BaseTextInputType.h
@@ -35,11 +35,14 @@
namespace blink {
+class ScriptRegexp;
+
// Base of email, password, search, tel, text, and URL types.
// They support maxlength, selection functions, and so on.
class BaseTextInputType : public TextFieldInputType {
protected:
- BaseTextInputType(HTMLInputElement& element) : TextFieldInputType(element) { }
+ BaseTextInputType(HTMLInputElement&);
+ ~BaseTextInputType() override;
private:
bool tooLong(const String&, HTMLTextFormControlElement::NeedsToCheckDirtyFlag) const final;
@@ -50,6 +53,11 @@ private:
bool supportsPlaceholder() const final;
bool supportsSelectionAPI() const override;
bool supportsAutocapitalize() const override;
+
+ // m_regexp and m_patternForRegexp are mutable because they are kinds of
+ // cache.
+ mutable std::unique_ptr<ScriptRegexp> m_regexp;
+ mutable AtomicString m_patternForRegexp;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/html/forms/BaseTextInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698