[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

eric at webkit.org eric at webkit.org
Thu Feb 4 21:24:40 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 17e22c61b5f0ce4f3bc0e948c290cdb8799dfde0
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 22 10:48:05 2010 +0000

    2010-01-22  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Maciej Stachowiak.
    
            Improve portability of listbox-deselect-scroll.html
            https://bugs.webkit.org/show_bug.cgi?id=33989
    
            - Convert the test to dumpAsTest
            - Use eventSender.mouseDown(0, ['addSelectionKey'])
            - Avoid hard-coded line-heights.
    
            * fast/forms/listbox-deselect-scroll-expected.txt: Added.
            * fast/forms/listbox-deselect-scroll.html:
            * fast/forms/script-tests/listbox-deselect-scroll.js: Added.
            * platform/mac/fast/forms/listbox-deselect-scroll-expected.checksum: Removed.
            * platform/mac/fast/forms/listbox-deselect-scroll-expected.png: Removed.
            * platform/mac/fast/forms/listbox-deselect-scroll-expected.txt: Removed.
    2010-01-22  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Maciej Stachowiak.
    
            Fix a bug that mouseDown:withModifiers: is never called.
            https://bugs.webkit.org/show_bug.cgi?id=33989
    
            * DumpRenderTree/mac/EventSendingController.mm:
            (+[EventSendingController isSelectorExcludedFromWebScript:]):
            (+[EventSendingController webScriptNameForSelector:]):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53691 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8f81968..bf9544a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-22  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Maciej Stachowiak.
+
+        Improve portability of listbox-deselect-scroll.html
+        https://bugs.webkit.org/show_bug.cgi?id=33989
+
+        - Convert the test to dumpAsTest
+        - Use eventSender.mouseDown(0, ['addSelectionKey'])
+        - Avoid hard-coded line-heights.
+
+        * fast/forms/listbox-deselect-scroll-expected.txt: Added.
+        * fast/forms/listbox-deselect-scroll.html:
+        * fast/forms/script-tests/listbox-deselect-scroll.js: Added.
+        * platform/mac/fast/forms/listbox-deselect-scroll-expected.checksum: Removed.
+        * platform/mac/fast/forms/listbox-deselect-scroll-expected.png: Removed.
+        * platform/mac/fast/forms/listbox-deselect-scroll-expected.txt: Removed.
+
 2010-01-22  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/forms/listbox-deselect-scroll-expected.txt b/LayoutTests/fast/forms/listbox-deselect-scroll-expected.txt
new file mode 100644
index 0000000..b61f6ec
--- /dev/null
+++ b/LayoutTests/fast/forms/listbox-deselect-scroll-expected.txt
@@ -0,0 +1,11 @@
+This tests that deselecting an option won't cause unnecessary scrolling.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS sl.scrollTop is scrollBeforeClick
+PASS selectionPattern(sl) is "11111110111"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/listbox-deselect-scroll.html b/LayoutTests/fast/forms/listbox-deselect-scroll.html
index bef85de..75c9ad2 100644
--- a/LayoutTests/fast/forms/listbox-deselect-scroll.html
+++ b/LayoutTests/fast/forms/listbox-deselect-scroll.html
@@ -1,39 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
-    <head>
-        <script>
-            function test() {
-                var sl = document.getElementById('sl');
-                sl.focus();
-                document.execCommand("SelectAll");
-                sl.scrollTop = 60;
-                mouseDownOnSelect("sl", 3, false, true);
-            }
-            
-            function mouseDownOnSelect(selId, index, shift, meta) {
-                var sl = document.getElementById(selId);
-                var itemHeight = 14;
-                var border = 1;
-                var y = border + index * itemHeight - window.pageYOffset;
-                var event = document.createEvent("MouseEvent");
-                event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft + border, sl.offsetTop + y, sl.offsetLeft + border, sl.offsetTop + y, false, false, shift, meta, 0, document);
-                sl.dispatchEvent(event);
-            }
-        </script>
-    </head>
-    <body onload="test()">
-        This tests that deselecting an option won't cause unnecessary scrolling.<br>
-        <select id="sl" multiple="multiple" size="5">
-            <option value="Accessibility">Accessibility</option>
-            <option value="CSS">CSS</option>
-            <option value="Drosera">Drosera</option>
-            <option value="Evangelism">Evangelism</option>
-            <option value="Forms">Forms</option>
-            <option value="Frames">Frames</option>
-            <option value="History">History</option>
-            <option value="HTML DOM">HTML DOM</option>
-            <option value="HTML Editing">HTML Editing</option>
-            <option value="Images">Images</option>
-            <option>SCROLL UP</option>
-        </select>
-    </body>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/listbox-deselect-scroll.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
 </html>
diff --git a/LayoutTests/fast/forms/script-tests/listbox-deselect-scroll.js b/LayoutTests/fast/forms/script-tests/listbox-deselect-scroll.js
new file mode 100644
index 0000000..452559f
--- /dev/null
+++ b/LayoutTests/fast/forms/script-tests/listbox-deselect-scroll.js
@@ -0,0 +1,47 @@
+description('This tests that deselecting an option won&apos;t cause unnecessary scrolling.');
+
+function mouseDownOnSelect(selId, index, modifier) {
+    var sl = document.getElementById(selId);
+    var itemHeight = Math.floor(sl.offsetHeight / sl.size);
+    var border = 1;
+    var y = border + index * itemHeight - window.pageYOffset;
+    if (window.eventSender) {
+        eventSender.mouseMoveTo(sl.offsetLeft + border, sl.offsetTop + y);
+        eventSender.mouseDown(0, [modifier]);
+        eventSender.mouseUp(0, [modifier]);
+    }
+}
+
+function selectionPattern(select) {
+    var result = '';
+    for (var i = 0; i < select.options.length; i++)
+        result += select.options[i].selected ? '1' : '0';
+    return result;
+}
+
+var parent = document.createElement('div');
+parent.innerHTML = '<select id="sl" multiple="multiple" size="5">'
+    + '<option value="Accessibility">Accessibility</option>'
+    + '<option value="CSS">CSS</option>'
+    + '<option value="Drosera">Drosera</option>'
+    + '<option value="Evangelism">Evangelism</option>'
+    + '<option value="Forms">Forms</option>'
+    + '<option value="Frames">Frames</option>'
+    + '<option value="History">History</option>'
+    + '<option value="HTML DOM">HTML DOM</option>'
+    + '<option value="HTML Editing">HTML Editing</option>'
+    + '<option value="Images">Images</option>'
+    + '<option>SCROLL UP</option>'
+    + '</select>';
+document.body.appendChild(parent);
+
+var sl = document.getElementById('sl');
+sl.focus();
+document.execCommand("SelectAll");
+sl.scrollTop = Math.floor(sl.offsetHeight / sl.size) * 4 + 6;
+var scrollBeforeClick = sl.scrollTop;
+mouseDownOnSelect("sl", 3, "addSelectionKey");
+shouldBe('sl.scrollTop', 'scrollBeforeClick');
+shouldBe('selectionPattern(sl)', '"11111110111"');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.checksum b/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.checksum
deleted file mode 100644
index 3ba73de..0000000
--- a/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.checksum
+++ /dev/null
@@ -1 +0,0 @@
-0443f85190b98ba5a3e14f26086a1d61
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.png b/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.png
deleted file mode 100644
index 3804f84..0000000
Binary files a/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.txt b/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.txt
deleted file mode 100644
index 2da33c8..0000000
--- a/LayoutTests/platform/mac/fast/forms/listbox-deselect-scroll-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderText {#text} at (0,0) size 444x18
-        text run at (0,0) width 444: "This tests that deselecting an option won't cause unnecessary scrolling."
-      RenderBR {BR} at (444,14) size 0x0
-      RenderListBox {SELECT} at (2,20) size 88x71 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
-      RenderText {#text} at (0,0) size 0x0
-      RenderText {#text} at (0,0) size 0x0
-      RenderText {#text} at (0,0) size 0x0
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3734211..18ade1a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-22  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Maciej Stachowiak.
+
+        Fix a bug that mouseDown:withModifiers: is never called.
+        https://bugs.webkit.org/show_bug.cgi?id=33989
+
+        * DumpRenderTree/mac/EventSendingController.mm:
+        (+[EventSendingController isSelectorExcludedFromWebScript:]):
+        (+[EventSendingController webScriptNameForSelector:]):
+
 2010-01-22  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Rubberstamped by Antti Koivisto.
diff --git a/WebKitTools/DumpRenderTree/mac/EventSendingController.mm b/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
index 5d920c6..feaeddc 100644
--- a/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
+++ b/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
@@ -127,10 +127,8 @@ BOOL replayingSavedEvents;
             || aSelector == @selector(fireKeyboardEventsToElement:)
             || aSelector == @selector(keyDown:withModifiers:withLocation:)
             || aSelector == @selector(leapForward:)
-            || aSelector == @selector(mouseDown:)
             || aSelector == @selector(mouseDown:withModifiers:)
             || aSelector == @selector(mouseMoveToX:Y:)
-            || aSelector == @selector(mouseUp:)
             || aSelector == @selector(mouseUp:withModifiers:)
             || aSelector == @selector(scheduleAsynchronousClick)
             || aSelector == @selector(textZoomIn)
@@ -160,9 +158,9 @@ BOOL replayingSavedEvents;
         return @"keyDown";
     if (aSelector == @selector(leapForward:))
         return @"leapForward";
-    if (aSelector == @selector(mouseDown:) || aSelector == @selector(mouseDown:withModifiers:))
+    if (aSelector == @selector(mouseDown:withModifiers:))
         return @"mouseDown";
-    if (aSelector == @selector(mouseUp:) || aSelector == @selector(mouseUp:withModifiers:))
+    if (aSelector == @selector(mouseUp:withModifiers:))
         return @"mouseUp";
     if (aSelector == @selector(mouseMoveToX:Y:))
         return @"mouseMoveTo";

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list