Title: [122918] trunk
- Revision
- 122918
- Author
- [email protected]
- Date
- 2012-07-17 21:18:19 -0700 (Tue, 17 Jul 2012)
Log Message
Fix an assertion failure in CalendarPickerElement::hostInput().
https://bugs.webkit.org/show_bug.cgi?id=91568
Reviewed by Hajime Morita.
Source/WebCore:
Test: fast/forms/date/calendar-picker-type-change-onclick.html
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::defaultEventHandler):
It's possible that this function is called when the element is detached
from the document tree.
LayoutTests:
* fast/forms/date/calendar-picker-type-change-onclick-expected.txt: Added.
* fast/forms/date/calendar-picker-type-change-onclick.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (122917 => 122918)
--- trunk/LayoutTests/ChangeLog 2012-07-18 04:16:13 UTC (rev 122917)
+++ trunk/LayoutTests/ChangeLog 2012-07-18 04:18:19 UTC (rev 122918)
@@ -1,3 +1,13 @@
+2012-07-17 Kent Tamura <[email protected]>
+
+ Fix an assertion failure in CalendarPickerElement::hostInput().
+ https://bugs.webkit.org/show_bug.cgi?id=91568
+
+ Reviewed by Hajime Morita.
+
+ * fast/forms/date/calendar-picker-type-change-onclick-expected.txt: Added.
+ * fast/forms/date/calendar-picker-type-change-onclick.html: Added.
+
2012-07-17 MORITA Hajime <[email protected]>
[Shadow DOM] Some distribution invalidation can drop necessary reattachment.
Added: trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt (0 => 122918)
--- trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt 2012-07-18 04:18:19 UTC (rev 122918)
@@ -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
+
Property changes on: trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html (0 => 122918)
--- trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html (rev 0)
+++ trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html 2012-07-18 04:18:19 UTC (rev 122918)
@@ -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>
Property changes on: trunk/LayoutTests/fast/forms/date/calendar-picker-type-change-onclick.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (122917 => 122918)
--- trunk/Source/WebCore/ChangeLog 2012-07-18 04:16:13 UTC (rev 122917)
+++ trunk/Source/WebCore/ChangeLog 2012-07-18 04:18:19 UTC (rev 122918)
@@ -1,5 +1,19 @@
2012-07-17 Kent Tamura <[email protected]>
+ Fix an assertion failure in CalendarPickerElement::hostInput().
+ https://bugs.webkit.org/show_bug.cgi?id=91568
+
+ Reviewed by Hajime Morita.
+
+ Test: fast/forms/date/calendar-picker-type-change-onclick.html
+
+ * html/shadow/CalendarPickerElement.cpp:
+ (WebCore::CalendarPickerElement::defaultEventHandler):
+ It's possible that this function is called when the element is detached
+ from the document tree.
+
+2012-07-17 Kent Tamura <[email protected]>
+
Form state: Make a new class handling HashMap<FormElementKey, Deque<>>
https://bugs.webkit.org/show_bug.cgi?id=91480
Modified: trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp (122917 => 122918)
--- trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp 2012-07-18 04:16:13 UTC (rev 122917)
+++ trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp 2012-07-18 04:18:19 UTC (rev 122918)
@@ -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