Title: [134260] branches/chromium/1271

Diff

Copied: branches/chromium/1271/LayoutTests/fast/forms/range/range-type-change-onchange-expected.txt (from rev 132983, trunk/LayoutTests/fast/forms/range/range-type-change-onchange-expected.txt) (0 => 134260)


--- branches/chromium/1271/LayoutTests/fast/forms/range/range-type-change-onchange-expected.txt	                        (rev 0)
+++ branches/chromium/1271/LayoutTests/fast/forms/range/range-type-change-onchange-expected.txt	2012-11-12 19:10:10 UTC (rev 134260)
@@ -0,0 +1,10 @@
+Check if no problem happens by type change in onchange handler.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS unless crash
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/chromium/1271/LayoutTests/fast/forms/range/range-type-change-onchange.html (from rev 132983, trunk/LayoutTests/fast/forms/range/range-type-change-onchange.html) (0 => 134260)


--- branches/chromium/1271/LayoutTests/fast/forms/range/range-type-change-onchange.html	                        (rev 0)
+++ branches/chromium/1271/LayoutTests/fast/forms/range/range-type-change-onchange.html	2012-11-12 19:10:10 UTC (rev 134260)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<body>
+<script src=""
+
+<input id="range1" type="range" _onchange_="updateType(this)" autofocus>
+<script>
+description('Check if no problem happens by type change in onchange handler.');
+
+function updateType(input) {
+    input.type = 'text';
+    setTimeout(finish, 0);
+}
+
+function finish() {
+    testPassed('unless crash');
+    finishJSTest();
+}
+
+jsTestIsAsync = true;
+eventSender.keyDown('upArrow');
+</script>
+<script src=""
+</body>

Modified: branches/chromium/1271/Source/WebCore/dom/Node.cpp (134259 => 134260)


--- branches/chromium/1271/Source/WebCore/dom/Node.cpp	2012-11-12 19:04:43 UTC (rev 134259)
+++ branches/chromium/1271/Source/WebCore/dom/Node.cpp	2012-11-12 19:10:10 UTC (rev 134260)
@@ -2657,12 +2657,12 @@
 
 void Node::dispatchChangeEvent()
 {
-    dispatchEvent(Event::create(eventNames().changeEvent, true, false));
+    dispatchScopedEvent(Event::create(eventNames().changeEvent, true, false));
 }
 
 void Node::dispatchInputEvent()
 {
-    dispatchEvent(Event::create(eventNames().inputEvent, true, false));
+    dispatchScopedEvent(Event::create(eventNames().inputEvent, true, false));
 }
 
 bool Node::disabled() const

Modified: branches/chromium/1271/Source/WebCore/html/HTMLInputElement.cpp (134259 => 134260)


--- branches/chromium/1271/Source/WebCore/html/HTMLInputElement.cpp	2012-11-12 19:04:43 UTC (rev 134259)
+++ branches/chromium/1271/Source/WebCore/html/HTMLInputElement.cpp	2012-11-12 19:10:10 UTC (rev 134260)
@@ -54,6 +54,7 @@
 #include "NumberInputType.h"
 #include "RenderTextControlSingleLine.h"
 #include "RenderTheme.h"
+#include "ScopedEventQueue.h"
 #include "SearchInputType.h"
 #include "ShadowRoot.h"
 #include "ScriptEventListener.h"
@@ -1012,6 +1013,7 @@
         return;
 
     RefPtr<HTMLInputElement> protector(this);
+    EventQueueScope scope;
     String sanitizedValue = sanitizeValue(value);
     bool valueChanged = sanitizedValue != this->value();
 

Modified: branches/chromium/1271/Source/WebCore/html/RangeInputType.cpp (134259 => 134260)


--- branches/chromium/1271/Source/WebCore/html/RangeInputType.cpp	2012-11-12 19:04:43 UTC (rev 134259)
+++ branches/chromium/1271/Source/WebCore/html/RangeInputType.cpp	2012-11-12 19:10:10 UTC (rev 134260)
@@ -43,6 +43,7 @@
 #include "MouseEvent.h"
 #include "PlatformMouseEvent.h"
 #include "RenderSlider.h"
+#include "ScopedEventQueue.h"
 #include "ShadowRoot.h"
 #include "SliderThumbElement.h"
 #include "StepRange.h"
@@ -235,6 +236,7 @@
     newValue = stepRange.clampValue(newValue);
 
     if (newValue != current) {
+        EventQueueScope scope;
         ExceptionCode ec;
         TextFieldEventBehavior eventBehavior = DispatchChangeEvent;
         setValueAsDecimal(newValue, eventBehavior, ec);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to