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

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

Issue 236033002: Hide textarea placeholder text when showing autofill suggestion (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: now with layout test Created 6 years, 8 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
« no previous file with comments | « LayoutTests/fast/forms/suggested-value-hides-placeholder-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 setInnerTextValue(const String&) OVERRIDE; 77 virtual void setInnerTextValue(const String&) OVERRIDE;
78 void setNonDirtyValue(const String&); 78 void setNonDirtyValue(const String&);
79 void setValueCommon(const String&, TextFieldEventBehavior); 79 void setValueCommon(const String&, TextFieldEventBehavior);
80 80
81 virtual bool supportsPlaceholder() const OVERRIDE { return true; } 81 virtual bool supportsPlaceholder() const OVERRIDE { return true; }
82 virtual void updatePlaceholderText() OVERRIDE; 82 virtual void updatePlaceholderText() OVERRIDE;
83 virtual bool isEmptyValue() const OVERRIDE { return value().isEmpty(); } 83 virtual bool isEmptyValue() const OVERRIDE { return value().isEmpty(); }
84 virtual bool isEmptySuggestedValue() const OVERRIDE FINAL { return suggested Value().isEmpty(); }
84 85
85 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm Control(); } 86 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm Control(); }
86 virtual bool isRequiredFormControl() const OVERRIDE { return isRequired(); } 87 virtual bool isRequiredFormControl() const OVERRIDE { return isRequired(); }
87 88
88 virtual void defaultEventHandler(Event*) OVERRIDE; 89 virtual void defaultEventHandler(Event*) OVERRIDE;
89 virtual void handleFocusEvent(Element* oldFocusedNode, FocusType) OVERRIDE; 90 virtual void handleFocusEvent(Element* oldFocusedNode, FocusType) OVERRIDE;
90 91
91 virtual void subtreeHasChanged() OVERRIDE; 92 virtual void subtreeHasChanged() OVERRIDE;
92 93
93 virtual bool isEnumeratable() const OVERRIDE { return true; } 94 virtual bool isEnumeratable() const OVERRIDE { return true; }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 WrapMethod m_wrap; 129 WrapMethod m_wrap;
129 mutable String m_value; 130 mutable String m_value;
130 mutable bool m_isDirty; 131 mutable bool m_isDirty;
131 bool m_valueIsUpToDate; 132 bool m_valueIsUpToDate;
132 String m_suggestedValue; 133 String m_suggestedValue;
133 }; 134 };
134 135
135 } //namespace 136 } //namespace
136 137
137 #endif 138 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/suggested-value-hides-placeholder-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698