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

Side by Side Diff: Source/core/html/shadow/DateTimeNumericFieldElement.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Range(int minimum, int maximum) : minimum(minimum), maximum(maximum) { } 55 Range(int minimum, int maximum) : minimum(minimum), maximum(maximum) { }
56 int clampValue(int) const; 56 int clampValue(int) const;
57 bool isInRange(int) const; 57 bool isInRange(int) const;
58 bool isSingleton() const { return minimum == maximum; } 58 bool isSingleton() const { return minimum == maximum; }
59 59
60 int minimum; 60 int minimum;
61 int maximum; 61 int maximum;
62 }; 62 };
63 63
64 protected: 64 protected:
65 DateTimeNumericFieldElement(Document*, FieldOwner&, const Range&, const Rang e& hardLimits, const String& placeholder, const Step& = Step()); 65 DateTimeNumericFieldElement(Document&, FieldOwner&, const Range&, const Rang e& hardLimits, const String& placeholder, const Step& = Step());
66 66
67 int clampValue(int value) const { return m_range.clampValue(value); } 67 int clampValue(int value) const { return m_range.clampValue(value); }
68 virtual int defaultValueForStepDown() const; 68 virtual int defaultValueForStepDown() const;
69 virtual int defaultValueForStepUp() const; 69 virtual int defaultValueForStepUp() const;
70 const Range& range() const { return m_range; } 70 const Range& range() const { return m_range; }
71 71
72 // DateTimeFieldElement functions. 72 // DateTimeFieldElement functions.
73 virtual bool hasValue() const OVERRIDE FINAL; 73 virtual bool hasValue() const OVERRIDE FINAL;
74 void initialize(const AtomicString& pseudo, const String& axHelpText); 74 void initialize(const AtomicString& pseudo, const String& axHelpText);
75 int maximum() const; 75 int maximum() const;
(...skipping 23 matching lines...) Expand all
99 const Step m_step; 99 const Step m_step;
100 int m_value; 100 int m_value;
101 bool m_hasValue; 101 bool m_hasValue;
102 mutable StringBuilder m_typeAheadBuffer; 102 mutable StringBuilder m_typeAheadBuffer;
103 }; 103 };
104 104
105 } // namespace WebCore 105 } // namespace WebCore
106 106
107 #endif 107 #endif
108 #endif 108 #endif
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeFieldElements.cpp ('k') | Source/core/html/shadow/DateTimeNumericFieldElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698