Title: [165140] branches/safari-537.75-branch
Diff
Modified: branches/safari-537.75-branch/LayoutTests/ChangeLog (165139 => 165140)
--- branches/safari-537.75-branch/LayoutTests/ChangeLog 2014-03-06 00:11:39 UTC (rev 165139)
+++ branches/safari-537.75-branch/LayoutTests/ChangeLog 2014-03-06 00:17:28 UTC (rev 165140)
@@ -1,5 +1,23 @@
2014-03-05 Matthew Hanson <[email protected]>
+ Merge r164367.
+
+ 2014-02-19 Daniel Bates <[email protected]>
+
+ Do not dispatch change event twice in single step action
+ https://bugs.webkit.org/show_bug.cgi?id=116936
+ <rdar://problem/16086828>
+
+ Reviewed by Ryosuke Niwa.
+
+ Merged from Blink (patch by Kent Tamura):
+ https://src.chromium.org/viewvc/blink?view=rev&revision=151175
+
+ * fast/forms/number/number-type-update-by-change-event-expected.txt: Added.
+ * fast/forms/number/number-type-update-by-change-event.html: Added.
+
+2014-03-05 Matthew Hanson <[email protected]>
+
Merge r164204.
2014-02-16 Andreas Kling <[email protected]>
Copied: branches/safari-537.75-branch/LayoutTests/fast/forms/number/number-type-update-by-change-event-expected.txt (from rev 164367, trunk/LayoutTests/fast/forms/number/number-type-update-by-change-event-expected.txt) (0 => 165140)
--- branches/safari-537.75-branch/LayoutTests/fast/forms/number/number-type-update-by-change-event-expected.txt (rev 0)
+++ branches/safari-537.75-branch/LayoutTests/fast/forms/number/number-type-update-by-change-event-expected.txt 2014-03-06 00:17:28 UTC (rev 165140)
@@ -0,0 +1,6 @@
+PASS if not crashed in ASAN build.
+PASS changeEventCounter is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: branches/safari-537.75-branch/LayoutTests/fast/forms/number/number-type-update-by-change-event.html (from rev 164367, trunk/LayoutTests/fast/forms/number/number-type-update-by-change-event.html) (0 => 165140)
--- branches/safari-537.75-branch/LayoutTests/fast/forms/number/number-type-update-by-change-event.html (rev 0)
+++ branches/safari-537.75-branch/LayoutTests/fast/forms/number/number-type-update-by-change-event.html 2014-03-06 00:17:28 UTC (rev 165140)
@@ -0,0 +1,28 @@
+<!DOCTYPE>
+<html>
+<body>
+<script src=""
+<input type="number" _onchange_="handleChange(this);">
+<script>
+function sendKey(keyName) {
+ var event = document.createEvent('KeyboardEvent');
+ event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName);
+ document.activeElement.dispatchEvent(event);
+}
+
+function handleChange(element) {
+ element.type = '';
+ ++changeEventCounter;
+}
+
+var changeEventCounter = 0;
+var numberInput = document.getElementsByTagName('input')[0];
+numberInput.focus();
+sendKey('Up');
+
+testPassed('if not crashed in ASAN build.');
+shouldBe('changeEventCounter', '1');
+</script>
+<script src=""
+</body>
+</html>
Modified: branches/safari-537.75-branch/Source/WebCore/ChangeLog (165139 => 165140)
--- branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-03-06 00:11:39 UTC (rev 165139)
+++ branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-03-06 00:17:28 UTC (rev 165140)
@@ -1,5 +1,25 @@
2014-03-05 Matthew Hanson <[email protected]>
+ Merge r164367.
+
+ 2014-02-19 Daniel Bates <[email protected]>
+
+ Do not dispatch change event twice in single step action
+ https://bugs.webkit.org/show_bug.cgi?id=116936
+ <rdar://problem/16086828>
+
+ Reviewed by Ryosuke Niwa.
+
+ Merged from Blink (patch by Kent Tamura):
+ https://src.chromium.org/viewvc/blink?view=rev&revision=151175
+
+ Test: fast/forms/number/number-type-update-by-change-event.html
+
+ * html/InputType.cpp:
+ (WebCore::InputType::stepUpFromRenderer):
+
+2014-03-05 Matthew Hanson <[email protected]>
+
Merge r164204.
2014-02-16 Andreas Kling <[email protected]>
Modified: branches/safari-537.75-branch/Source/WebCore/html/InputType.cpp (165139 => 165140)
--- branches/safari-537.75-branch/Source/WebCore/html/InputType.cpp 2014-03-06 00:11:39 UTC (rev 165139)
+++ branches/safari-537.75-branch/Source/WebCore/html/InputType.cpp 2014-03-06 00:17:28 UTC (rev 165140)
@@ -66,6 +66,7 @@
#include "RenderTheme.h"
#include "ResetInputType.h"
#include "RuntimeEnabledFeatures.h"
+#include "ScopedEventQueue.h"
#include "SearchInputType.h"
#include "ShadowRoot.h"
#include "SubmitInputType.h"
@@ -1072,6 +1073,7 @@
if (!stepRange.hasStep())
return;
+ EventQueueScope scope;
const Decimal step = stepRange.step();
int sign;
@@ -1091,7 +1093,7 @@
current = stepRange.minimum() - nextDiff;
if (current > stepRange.maximum() - nextDiff)
current = stepRange.maximum() - nextDiff;
- setValueAsDecimal(current, DispatchInputAndChangeEvent, IGNORE_EXCEPTION);
+ setValueAsDecimal(current, DispatchNoEvent, IGNORE_EXCEPTION);
}
if ((sign > 0 && current < stepRange.minimum()) || (sign < 0 && current > stepRange.maximum()))
setValueAsDecimal(sign > 0 ? stepRange.minimum() : stepRange.maximum(), DispatchInputAndChangeEvent, IGNORE_EXCEPTION);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes