OLD | NEW |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; | 77 virtual void setInnerEditorValue(const String&) OVERRIDE; |
78 void setNonDirtyValue(const String&); | 78 void setNonDirtyValue(const String&); |
79 void setValueCommon(const String&, TextFieldEventBehavior); | 79 // Returns true if |m_value| is updated. |
| 80 bool setValueCommon(const String&, TextFieldEventBehavior); |
80 | 81 |
81 virtual bool supportsPlaceholder() const OVERRIDE { return true; } | 82 virtual bool supportsPlaceholder() const OVERRIDE { return true; } |
82 virtual void updatePlaceholderText() OVERRIDE; | 83 virtual void updatePlaceholderText() OVERRIDE; |
83 virtual bool isEmptyValue() const OVERRIDE { return value().isEmpty(); } | 84 virtual bool isEmptyValue() const OVERRIDE { return value().isEmpty(); } |
84 virtual bool isEmptySuggestedValue() const OVERRIDE FINAL { return suggested
Value().isEmpty(); } | 85 virtual bool isEmptySuggestedValue() const OVERRIDE FINAL { return suggested
Value().isEmpty(); } |
85 | 86 |
86 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm
Control(); } | 87 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm
Control(); } |
87 virtual bool isRequiredFormControl() const OVERRIDE { return isRequired(); } | 88 virtual bool isRequiredFormControl() const OVERRIDE { return isRequired(); } |
88 | 89 |
89 virtual void defaultEventHandler(Event*) OVERRIDE; | 90 virtual void defaultEventHandler(Event*) OVERRIDE; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 WrapMethod m_wrap; | 130 WrapMethod m_wrap; |
130 mutable String m_value; | 131 mutable String m_value; |
131 mutable bool m_isDirty; | 132 mutable bool m_isDirty; |
132 bool m_valueIsUpToDate; | 133 bool m_valueIsUpToDate; |
133 String m_suggestedValue; | 134 String m_suggestedValue; |
134 }; | 135 }; |
135 | 136 |
136 } //namespace | 137 } //namespace |
137 | 138 |
138 #endif | 139 #endif |
OLD | NEW |