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

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

Issue 159893007: Revert of Update of change event for datetime input type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/core/html/shadow/DateTimeFieldElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (event->type() == EventTypeNames::blur) 57 if (event->type() == EventTypeNames::blur)
58 didBlur(); 58 didBlur();
59 59
60 if (event->type() == EventTypeNames::focus) 60 if (event->type() == EventTypeNames::focus)
61 didFocus(); 61 didFocus();
62 62
63 if (event->isKeyboardEvent()) { 63 if (event->isKeyboardEvent()) {
64 KeyboardEvent* keyboardEvent = toKeyboardEvent(event); 64 KeyboardEvent* keyboardEvent = toKeyboardEvent(event);
65 if (!isDisabled() && !isFieldOwnerDisabled() && !isFieldOwnerReadOnly()) { 65 if (!isDisabled() && !isFieldOwnerDisabled() && !isFieldOwnerReadOnly()) {
66 handleKeyboardEvent(keyboardEvent); 66 handleKeyboardEvent(keyboardEvent);
67 if (keyboardEvent->defaultHandled()) { 67 if (keyboardEvent->defaultHandled())
68 if (m_fieldOwner)
69 m_fieldOwner->fieldDidChangeValueByKeyboard();
70 return; 68 return;
71 }
72 } 69 }
73 defaultKeyboardEventHandler(keyboardEvent); 70 defaultKeyboardEventHandler(keyboardEvent);
74 if (m_fieldOwner)
75 m_fieldOwner->fieldDidChangeValueByKeyboard();
76 if (keyboardEvent->defaultHandled()) 71 if (keyboardEvent->defaultHandled())
77 return; 72 return;
78 } 73 }
79 74
80 HTMLElement::defaultEventHandler(event); 75 HTMLElement::defaultEventHandler(event);
81 } 76 }
82 77
83 void DateTimeFieldElement::defaultKeyboardEventHandler(KeyboardEvent* keyboardEv ent) 78 void DateTimeFieldElement::defaultKeyboardEventHandler(KeyboardEvent* keyboardEv ent)
84 { 79 {
85 if (keyboardEvent->type() != EventTypeNames::keydown) 80 if (keyboardEvent->type() != EventTypeNames::keydown)
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 232 }
238 233
239 int DateTimeFieldElement::valueForARIAValueNow() const 234 int DateTimeFieldElement::valueForARIAValueNow() const
240 { 235 {
241 return valueAsInteger(); 236 return valueAsInteger();
242 } 237 }
243 238
244 } // namespace WebCore 239 } // namespace WebCore
245 240
246 #endif 241 #endif
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeFieldElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698