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

Side by Side Diff: Source/core/html/shadow/DateTimeEditElement.h

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 String placeholderForMonth; 72 String placeholderForMonth;
73 String placeholderForYear; 73 String placeholderForYear;
74 74
75 LayoutParameters(Locale& locale, const StepRange& stepRange) 75 LayoutParameters(Locale& locale, const StepRange& stepRange)
76 : locale(locale) 76 : locale(locale)
77 , stepRange(stepRange) 77 , stepRange(stepRange)
78 { 78 {
79 } 79 }
80 }; 80 };
81 81
82 static PassRefPtr<DateTimeEditElement> create(Document*, EditControlOwner&); 82 static PassRefPtr<DateTimeEditElement> create(Document&, EditControlOwner&);
83 83
84 virtual ~DateTimeEditElement(); 84 virtual ~DateTimeEditElement();
85 void addField(PassRefPtr<DateTimeFieldElement>); 85 void addField(PassRefPtr<DateTimeFieldElement>);
86 bool anyEditableFieldsHaveValues() const; 86 bool anyEditableFieldsHaveValues() const;
87 void blurByOwner(); 87 void blurByOwner();
88 virtual void defaultEventHandler(Event*) OVERRIDE; 88 virtual void defaultEventHandler(Event*) OVERRIDE;
89 void disabledStateChanged(); 89 void disabledStateChanged();
90 Element* fieldsWrapperElement() const; 90 Element* fieldsWrapperElement() const;
91 void focusIfNoFocus(); 91 void focusIfNoFocus();
92 // If oldFocusedNode is one of sub-fields, focus on it. Otherwise focus on 92 // If oldFocusedNode is one of sub-fields, focus on it. Otherwise focus on
(...skipping 19 matching lines...) Expand all
112 // 1. year 112 // 1. year
113 // 2. month 113 // 2. month
114 // 3. day-of-month 114 // 3. day-of-month
115 // 4. hour 115 // 4. hour
116 // 5. minute 116 // 5. minute
117 // 6. second 117 // 6. second
118 // 7. millisecond 118 // 7. millisecond
119 // 8. AM/PM 119 // 8. AM/PM
120 static const int maximumNumberOfFields = 8; 120 static const int maximumNumberOfFields = 8;
121 121
122 DateTimeEditElement(Document*, EditControlOwner&); 122 DateTimeEditElement(Document&, EditControlOwner&);
123 123
124 DateTimeFieldElement* fieldAt(size_t) const; 124 DateTimeFieldElement* fieldAt(size_t) const;
125 size_t fieldIndexOf(const DateTimeFieldElement&) const; 125 size_t fieldIndexOf(const DateTimeFieldElement&) const;
126 DateTimeFieldElement* focusedField() const; 126 DateTimeFieldElement* focusedField() const;
127 size_t focusedFieldIndex() const; 127 size_t focusedFieldIndex() const;
128 bool focusOnNextFocusableField(size_t startIndex); 128 bool focusOnNextFocusableField(size_t startIndex);
129 bool isDisabled() const; 129 bool isDisabled() const;
130 bool isReadOnly() const; 130 bool isReadOnly() const;
131 void layout(const LayoutParameters&, const DateComponents&); 131 void layout(const LayoutParameters&, const DateComponents&);
132 void updateUIState(); 132 void updateUIState();
(...skipping 19 matching lines...) Expand all
152 inline DateTimeEditElement* toDateTimeEditElement(Element* element) 152 inline DateTimeEditElement* toDateTimeEditElement(Element* element)
153 { 153 {
154 ASSERT_WITH_SECURITY_IMPLICATION(!element || element->isDateTimeEditElement( )); 154 ASSERT_WITH_SECURITY_IMPLICATION(!element || element->isDateTimeEditElement( ));
155 return static_cast<DateTimeEditElement*>(element); 155 return static_cast<DateTimeEditElement*>(element);
156 } 156 }
157 157
158 } // namespace WebCore 158 } // namespace WebCore
159 159
160 #endif 160 #endif
161 #endif 161 #endif
OLDNEW
« no previous file with comments | « Source/core/html/shadow/ClearButtonElement.cpp ('k') | Source/core/html/shadow/DateTimeEditElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698