OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 29 matching lines...) Expand all Loading... |
40 DateTimeSymbolicFieldElement(Document*, FieldOwner&, const Vector<String>&); | 40 DateTimeSymbolicFieldElement(Document*, FieldOwner&, const Vector<String>&); |
41 size_t symbolsSize() const { return m_symbols.size(); } | 41 size_t symbolsSize() const { return m_symbols.size(); } |
42 virtual bool hasValue() const OVERRIDE FINAL; | 42 virtual bool hasValue() const OVERRIDE FINAL; |
43 virtual void setEmptyValue(EventBehavior = DispatchNoEvent) OVERRIDE FINAL; | 43 virtual void setEmptyValue(EventBehavior = DispatchNoEvent) OVERRIDE FINAL; |
44 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID
E FINAL; | 44 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) OVERRID
E FINAL; |
45 virtual int valueAsInteger() const OVERRIDE FINAL; | 45 virtual int valueAsInteger() const OVERRIDE FINAL; |
46 | 46 |
47 private: | 47 private: |
48 static const int invalidIndex = -1; | 48 static const int invalidIndex = -1; |
49 | 49 |
50 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE FINAL; | |
51 String visibleEmptyValue() const; | 50 String visibleEmptyValue() const; |
52 | 51 |
53 // DateTimeFieldElement functions. | 52 // DateTimeFieldElement functions. |
54 virtual void handleKeyboardEvent(KeyboardEvent*) OVERRIDE FINAL; | 53 virtual void handleKeyboardEvent(KeyboardEvent*) OVERRIDE FINAL; |
55 virtual int maximum() const OVERRIDE FINAL; | 54 virtual int maximum() const OVERRIDE FINAL; |
| 55 virtual float maximumWidth(const Font&) OVERRIDE; |
56 virtual int minimum() const OVERRIDE FINAL; | 56 virtual int minimum() const OVERRIDE FINAL; |
57 virtual void stepDown() OVERRIDE FINAL; | 57 virtual void stepDown() OVERRIDE FINAL; |
58 virtual void stepUp() OVERRIDE FINAL; | 58 virtual void stepUp() OVERRIDE FINAL; |
59 virtual String value() const OVERRIDE FINAL; | 59 virtual String value() const OVERRIDE FINAL; |
60 virtual String visibleValue() const OVERRIDE FINAL; | 60 virtual String visibleValue() const OVERRIDE FINAL; |
61 | 61 |
62 const Vector<String> m_symbols; | 62 const Vector<String> m_symbols; |
63 | 63 |
64 // We use AtomicString to share visible empty value among multiple | 64 // We use AtomicString to share visible empty value among multiple |
65 // DateTimeEditElements in the page. | 65 // DateTimeEditElements in the page. |
66 const AtomicString m_visibleEmptyValue; | 66 const AtomicString m_visibleEmptyValue; |
67 int m_selectedIndex; | 67 int m_selectedIndex; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace WebCore | 70 } // namespace WebCore |
71 | 71 |
72 #endif | 72 #endif |
73 #endif | 73 #endif |
OLD | NEW |