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

Side by Side Diff: Source/WebCore/html/shadow/CalendarPickerElement.cpp

Issue 10795098: Merge 122918 - Fix an assertion failure in CalendarPickerElement::hostInput(). (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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 | « LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt ('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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 inline HTMLInputElement* CalendarPickerElement::hostInput() 82 inline HTMLInputElement* CalendarPickerElement::hostInput()
83 { 83 {
84 ASSERT(shadowAncestorNode()); 84 ASSERT(shadowAncestorNode());
85 ASSERT(shadowAncestorNode()->hasTagName(inputTag)); 85 ASSERT(shadowAncestorNode()->hasTagName(inputTag));
86 return static_cast<HTMLInputElement*>(shadowAncestorNode()); 86 return static_cast<HTMLInputElement*>(shadowAncestorNode());
87 } 87 }
88 88
89 void CalendarPickerElement::defaultEventHandler(Event* event) 89 void CalendarPickerElement::defaultEventHandler(Event* event)
90 { 90 {
91 if (!renderer())
92 return;
91 HTMLInputElement* input = hostInput(); 93 HTMLInputElement* input = hostInput();
92 if (input->readOnly() || input->disabled()) 94 if (input->readOnly() || input->disabled())
93 return; 95 return;
94 96
95 if (event->type() == eventNames().clickEvent) { 97 if (event->type() == eventNames().clickEvent) {
96 openPopup(); 98 openPopup();
97 event->setDefaultHandled(); 99 event->setDefaultHandled();
98 } 100 }
99 101
100 if (!event->defaultHandled()) 102 if (!event->defaultHandled())
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 252 }
251 253
252 void CalendarPickerElement::didClosePopup() 254 void CalendarPickerElement::didClosePopup()
253 { 255 {
254 m_popup = 0; 256 m_popup = 0;
255 } 257 }
256 258
257 } 259 }
258 260
259 #endif 261 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698