Title: [123531] branches/chromium/1180
- Revision
- 123531
- Author
- [email protected]
- Date
- 2012-07-24 14:48:39 -0700 (Tue, 24 Jul 2012)
Log Message
Merge 122918 - Fix an assertion failure in CalendarPickerElement::hostInput().
https://bugs.webkit.org/show_bug.cgi?id=91568
BUG=137671
Review URL: https://chromiumcodereview.appspot.com/10795098
Modified Paths
Added Paths
Diff
Copied: branches/chromium/1180/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt (from rev 122918, trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt) (0 => 123531)
--- branches/chromium/1180/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt (rev 0)
+++ branches/chromium/1180/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt 2012-07-24 21:48:39 UTC (rev 123531)
@@ -0,0 +1,10 @@
+Check if we have no crash in a case that the input type is changed by clicking the calendar picker indicator.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS unless crash or assertion failure
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: branches/chromium/1180/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html (from rev 122918, trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html) (0 => 123531)
--- branches/chromium/1180/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html (rev 0)
+++ branches/chromium/1180/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html 2012-07-24 21:48:39 UTC (rev 123531)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<body>
+<script src=""
+<input type="date" _onclick_="changeType(this)" />
+<script>
+description('Check if we have no crash in a case that the input type is changed by clicking the calendar picker indicator.');
+
+function changeType(input) {
+ input.type = 'text';
+ testPassed('unless crash or assertion failure');
+ finishJSTest();
+}
+
+jsTestIsAsync = true;
+if (!window.eventSender) {
+ debug('Click on the triangle in the input field.');
+} else {
+ setTimeout(function() {
+ var dateInput = document.getElementsByTagName('input')[0];
+ eventSender.mouseMoveTo(dateInput.offsetLeft + dateInput.offsetWidth - 6,
+ dateInput.offsetTop + dateInput.offsetHeight / 2);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }, 0);
+}
+</script>
+<script src=""
+</body>
Modified: branches/chromium/1180/Source/WebCore/html/shadow/CalendarPickerElement.cpp (123530 => 123531)
--- branches/chromium/1180/Source/WebCore/html/shadow/CalendarPickerElement.cpp 2012-07-24 21:44:50 UTC (rev 123530)
+++ branches/chromium/1180/Source/WebCore/html/shadow/CalendarPickerElement.cpp 2012-07-24 21:48:39 UTC (rev 123531)
@@ -88,6 +88,8 @@
void CalendarPickerElement::defaultEventHandler(Event* event)
{
+ if (!renderer())
+ return;
HTMLInputElement* input = hostInput();
if (input->readOnly() || input->disabled())
return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes