Title: [116611] trunk
- Revision
- 116611
- Author
- tk...@chromium.org
- Date
- 2012-05-09 23:13:00 -0700 (Wed, 09 May 2012)
Log Message
Calendar Picker: Fix a crash by changing input type.
https://bugs.webkit.org/show_bug.cgi?id=86007
Reviewed by Hajime Morita.
.:
* ManualTests/forms/calendar-picker-crash-by-type-change.html: Added.
Source/WebCore:
Manual test: forms/calendar-picker-crash-by-type-change.html
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::~CalendarPickerElement):
Added. Make sure the popup is closed.
* html/shadow/CalendarPickerElement.h:
(CalendarPickerElement): Add declaration of the destructor.
Modified Paths
Added Paths
Diff
Modified: trunk/ChangeLog (116610 => 116611)
--- trunk/ChangeLog 2012-05-10 06:11:21 UTC (rev 116610)
+++ trunk/ChangeLog 2012-05-10 06:13:00 UTC (rev 116611)
@@ -1,3 +1,12 @@
+2012-05-09 Kent Tamura <tk...@chromium.org>
+
+ Calendar Picker: Fix a crash by changing input type.
+ https://bugs.webkit.org/show_bug.cgi?id=86007
+
+ Reviewed by Hajime Morita.
+
+ * ManualTests/forms/calendar-picker-crash-by-type-change.html: Added.
+
2012-05-09 Gyuyoung Kim <gyuyoung....@samsung.com>
Move suspendAnimations to use Internals interface.
Added: trunk/ManualTests/forms/calendar-picker-crash-by-type-change.html (0 => 116611)
--- trunk/ManualTests/forms/calendar-picker-crash-by-type-change.html (rev 0)
+++ trunk/ManualTests/forms/calendar-picker-crash-by-type-change.html 2012-05-10 06:13:00 UTC (rev 116611)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script>
+var input = document.createElement('input')
+input.type = 'date'
+var event = document.createEvent('KeyboardEvent')
+event.initKeyboardEvent('keydown', false, false, null, 'Down')
+input.dispatchEvent(event)
+input.type = 'color'
+</script>
+<p>Success if the browser didn't crash.</p>
Property changes on: trunk/ManualTests/forms/calendar-picker-crash-by-type-change.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (116610 => 116611)
--- trunk/Source/WebCore/ChangeLog 2012-05-10 06:11:21 UTC (rev 116610)
+++ trunk/Source/WebCore/ChangeLog 2012-05-10 06:13:00 UTC (rev 116611)
@@ -1,3 +1,18 @@
+2012-05-09 Kent Tamura <tk...@chromium.org>
+
+ Calendar Picker: Fix a crash by changing input type.
+ https://bugs.webkit.org/show_bug.cgi?id=86007
+
+ Reviewed by Hajime Morita.
+
+ Manual test: forms/calendar-picker-crash-by-type-change.html
+
+ * html/shadow/CalendarPickerElement.cpp:
+ (WebCore::CalendarPickerElement::~CalendarPickerElement):
+ Added. Make sure the popup is closed.
+ * html/shadow/CalendarPickerElement.h:
+ (CalendarPickerElement): Add declaration of the destructor.
+
2012-05-09 Gyuyoung Kim <gyuyoung....@samsung.com>
Move suspendAnimations to use Internals interface.
Modified: trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp (116610 => 116611)
--- trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp 2012-05-10 06:11:21 UTC (rev 116610)
+++ trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp 2012-05-10 06:13:00 UTC (rev 116611)
@@ -68,6 +68,12 @@
return adoptRef(new CalendarPickerElement(document));
}
+CalendarPickerElement::~CalendarPickerElement()
+{
+ closePopup();
+ ASSERT(!m_popup);
+}
+
RenderObject* CalendarPickerElement::createRenderer(RenderArena* arena, RenderStyle*)
{
return new (arena) RenderDetailsMarker(this);
Modified: trunk/Source/WebCore/html/shadow/CalendarPickerElement.h (116610 => 116611)
--- trunk/Source/WebCore/html/shadow/CalendarPickerElement.h 2012-05-10 06:11:21 UTC (rev 116610)
+++ trunk/Source/WebCore/html/shadow/CalendarPickerElement.h 2012-05-10 06:13:00 UTC (rev 116611)
@@ -43,6 +43,7 @@
class CalendarPickerElement : public HTMLDivElement, public PagePopupClient {
public:
static PassRefPtr<CalendarPickerElement> create(Document*);
+ virtual ~CalendarPickerElement();
void openPopup();
void closePopup();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes