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

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

Issue 191293011: Value set in onblur should not keep element in focus (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: SetFocus handler implementation for DateTimeFieldElement Created 6 years, 9 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
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 virtual void setValueAsDate(const DateComponents&) = 0; 72 virtual void setValueAsDate(const DateComponents&) = 0;
73 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) = 0; 73 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) = 0;
74 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) = 0; 74 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) = 0;
75 virtual void stepDown() = 0; 75 virtual void stepDown() = 0;
76 virtual void stepUp() = 0; 76 virtual void stepUp() = 0;
77 virtual String value() const = 0; 77 virtual String value() const = 0;
78 virtual String visibleValue() const = 0; 78 virtual String visibleValue() const = 0;
79 79
80 protected: 80 protected:
81 DateTimeFieldElement(Document&, FieldOwner&); 81 DateTimeFieldElement(Document&, FieldOwner&);
82 virtual void didBlur(); 82 virtual void setFocus(bool) OVERRIDE;
83 virtual void didFocus();
84 void focusOnNextField(); 83 void focusOnNextField();
85 virtual void handleKeyboardEvent(KeyboardEvent*) = 0; 84 virtual void handleKeyboardEvent(KeyboardEvent*) = 0;
86 void initialize(const AtomicString& pseudo, const String& axHelpText, int ax Minimum, int axMaximum); 85 void initialize(const AtomicString& pseudo, const String& axHelpText, int ax Minimum, int axMaximum);
87 Locale& localeForOwner() const; 86 Locale& localeForOwner() const;
88 AtomicString localeIdentifier() const; 87 AtomicString localeIdentifier() const;
89 void updateVisibleValue(EventBehavior); 88 void updateVisibleValue(EventBehavior);
90 virtual int valueAsInteger() const = 0; 89 virtual int valueAsInteger() const = 0;
91 virtual int valueForARIAValueNow() const; 90 virtual int valueForARIAValueNow() const;
92 91
93 private: 92 private:
94 void defaultKeyboardEventHandler(KeyboardEvent*); 93 void defaultKeyboardEventHandler(KeyboardEvent*);
95 virtual bool isDateTimeFieldElement() const OVERRIDE FINAL; 94 virtual bool isDateTimeFieldElement() const OVERRIDE FINAL;
96 bool isFieldOwnerDisabled() const; 95 bool isFieldOwnerDisabled() const;
97 bool isFieldOwnerReadOnly() const; 96 bool isFieldOwnerReadOnly() const;
98 virtual bool supportsFocus() const OVERRIDE FINAL; 97 virtual bool supportsFocus() const OVERRIDE FINAL;
99
tkent 2014/03/31 04:17:08 nit: Please do not remove the blank line. We usua
Habib Virji 2014/03/31 09:05:51 Done.
100 FieldOwner* m_fieldOwner; 98 FieldOwner* m_fieldOwner;
101 }; 99 };
102 100
103 } // namespace WebCore 101 } // namespace WebCore
104 102
105 #endif 103 #endif
106 #endif 104 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698