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

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

Issue 2561043002: Clean-up after Form Association Refactoring (Closed)
Patch Set: Removed constructorNeedsFormElement from scripts and HTMLTagNames Created 4 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 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 18 matching lines...) Expand all
29 #include "core/html/TextControlElement.h" 29 #include "core/html/TextControlElement.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class BeforeTextInsertedEvent; 33 class BeforeTextInsertedEvent;
34 34
35 class CORE_EXPORT HTMLTextAreaElement final : public TextControlElement { 35 class CORE_EXPORT HTMLTextAreaElement final : public TextControlElement {
36 DEFINE_WRAPPERTYPEINFO(); 36 DEFINE_WRAPPERTYPEINFO();
37 37
38 public: 38 public:
39 static HTMLTextAreaElement* create(Document&, HTMLFormElement*); 39 static HTMLTextAreaElement* create(Document&);
40 40
41 unsigned cols() const { return m_cols; } 41 unsigned cols() const { return m_cols; }
42 unsigned rows() const { return m_rows; } 42 unsigned rows() const { return m_rows; }
43 43
44 bool shouldWrapText() const { return m_wrap != NoWrap; } 44 bool shouldWrapText() const { return m_wrap != NoWrap; }
45 45
46 String value() const override; 46 String value() const override;
47 void setValue(const String&, 47 void setValue(const String&,
48 TextFieldEventBehavior = DispatchNoEvent) override; 48 TextFieldEventBehavior = DispatchNoEvent) override;
49 String defaultValue() const; 49 String defaultValue() const;
50 void setDefaultValue(const String&); 50 void setDefaultValue(const String&);
51 int textLength() const { return value().length(); } 51 int textLength() const { return value().length(); }
52 52
53 String suggestedValue() const; 53 String suggestedValue() const;
54 void setSuggestedValue(const String&); 54 void setSuggestedValue(const String&);
55 55
56 // For ValidityState 56 // For ValidityState
57 String validationMessage() const override; 57 String validationMessage() const override;
58 bool valueMissing() const override; 58 bool valueMissing() const override;
59 bool tooLong() const override; 59 bool tooLong() const override;
60 bool tooShort() const override; 60 bool tooShort() const override;
61 bool isValidValue(const String&) const; 61 bool isValidValue(const String&) const;
62 62
63 void setCols(unsigned); 63 void setCols(unsigned);
64 void setRows(unsigned); 64 void setRows(unsigned);
65 65
66 private: 66 private:
67 FRIEND_TEST_ALL_PREFIXES(HTMLTextAreaElementTest, SanitizeUserInputValue); 67 FRIEND_TEST_ALL_PREFIXES(HTMLTextAreaElementTest, SanitizeUserInputValue);
68 HTMLTextAreaElement(Document&, HTMLFormElement*); 68 explicit HTMLTextAreaElement(Document&);
69 69
70 enum WrapMethod { NoWrap, SoftWrap, HardWrap }; 70 enum WrapMethod { NoWrap, SoftWrap, HardWrap };
71 enum SetValueCommonOption { NotSetSelection, SetSeletion }; 71 enum SetValueCommonOption { NotSetSelection, SetSeletion };
72 72
73 void didAddUserAgentShadowRoot(ShadowRoot&) override; 73 void didAddUserAgentShadowRoot(ShadowRoot&) override;
74 // FIXME: Author shadows should be allowed 74 // FIXME: Author shadows should be allowed
75 // https://bugs.webkit.org/show_bug.cgi?id=92608 75 // https://bugs.webkit.org/show_bug.cgi?id=92608
76 bool areAuthorShadowsAllowed() const override { return false; } 76 bool areAuthorShadowsAllowed() const override { return false; }
77 77
78 void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) const; 78 void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) const;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 mutable String m_value; 150 mutable String m_value;
151 mutable bool m_isDirty; 151 mutable bool m_isDirty;
152 bool m_valueIsUpToDate; 152 bool m_valueIsUpToDate;
153 unsigned m_isPlaceholderVisible : 1; 153 unsigned m_isPlaceholderVisible : 1;
154 String m_suggestedValue; 154 String m_suggestedValue;
155 }; 155 };
156 156
157 } // namespace blink 157 } // namespace blink
158 158
159 #endif // HTMLTextAreaElement_h 159 #endif // HTMLTextAreaElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTagNames.in ('k') | third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698