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

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

Issue 2733783003: TEXTAREA element: Updating child nodes without updating textContent should do nothing (Closed)
Patch Set: Created 3 years, 9 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 explicit HTMLTextAreaElement(Document&); 68 explicit HTMLTextAreaElement(Document&);
69 69
70 enum WrapMethod { NoWrap, SoftWrap, HardWrap }; 70 enum WrapMethod { NoWrap, SoftWrap, HardWrap };
71 enum SetValueCommonOption { NotSetSelection, SetSeletion };
72 71
73 void didAddUserAgentShadowRoot(ShadowRoot&) override; 72 void didAddUserAgentShadowRoot(ShadowRoot&) override;
74 // FIXME: Author shadows should be allowed 73 // FIXME: Author shadows should be allowed
75 // https://bugs.webkit.org/show_bug.cgi?id=92608 74 // https://bugs.webkit.org/show_bug.cgi?id=92608
76 bool areAuthorShadowsAllowed() const override { return false; } 75 bool areAuthorShadowsAllowed() const override { return false; }
77 76
78 void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) const; 77 void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) const;
79 static String sanitizeUserInputValue(const String&, unsigned maxLength); 78 static String sanitizeUserInputValue(const String&, unsigned maxLength);
80 void updateValue() const; 79 void updateValue() const;
81 void setInnerEditorValue(const String&) override; 80 void setInnerEditorValue(const String&) override;
82 void setNonDirtyValue(const String&); 81 void setNonDirtyValue(const String&);
83 void setValueCommon(const String&, 82 void setValueCommon(const String&, TextFieldEventBehavior);
84 TextFieldEventBehavior,
85 SetValueCommonOption = NotSetSelection);
86 83
87 bool isPlaceholderVisible() const override { return m_isPlaceholderVisible; } 84 bool isPlaceholderVisible() const override { return m_isPlaceholderVisible; }
88 void setPlaceholderVisibility(bool) override; 85 void setPlaceholderVisibility(bool) override;
89 bool supportsPlaceholder() const override { return true; } 86 bool supportsPlaceholder() const override { return true; }
90 void updatePlaceholderText() override; 87 void updatePlaceholderText() override;
91 bool isEmptyValue() const override { return value().isEmpty(); } 88 bool isEmptyValue() const override { return value().isEmpty(); }
92 bool isEmptySuggestedValue() const final { 89 bool isEmptySuggestedValue() const final {
93 return suggestedValue().isEmpty(); 90 return suggestedValue().isEmpty();
94 } 91 }
95 bool supportsAutocapitalize() const override { return true; } 92 bool supportsAutocapitalize() const override { return true; }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 mutable String m_value; 145 mutable String m_value;
149 mutable bool m_isDirty; 146 mutable bool m_isDirty;
150 bool m_valueIsUpToDate; 147 bool m_valueIsUpToDate;
151 unsigned m_isPlaceholderVisible : 1; 148 unsigned m_isPlaceholderVisible : 1;
152 String m_suggestedValue; 149 String m_suggestedValue;
153 }; 150 };
154 151
155 } // namespace blink 152 } // namespace blink
156 153
157 #endif // HTMLTextAreaElement_h 154 #endif // HTMLTextAreaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698