[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

mario at webkit.org mario at webkit.org
Wed Dec 22 17:47:26 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 01ecb69a16e4f0d033b75ec24acd8ecd9fa5bd55
Author: mario at webkit.org <mario at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 30 10:55:35 2010 +0000

    2010-11-30  Mario Sanchez Prada  <msanchez at igalia.com>
    
            Reviewed by Darin Adler.
    
            ASSERT failing for combo boxes when selection changes
            https://bugs.webkit.org/show_bug.cgi?id=50062
    
            * accessibility/select-menulist-crash-expected.txt: Added.
            * accessibility/select-menulist-crash.html: Added.
    2010-11-30  Mario Sanchez Prada  <msanchez at igalia.com>
    
            Reviewed by Darin Adler.
    
            ASSERT failing for combo boxes when selection changes
            https://bugs.webkit.org/show_bug.cgi?id=50062
    
            Don't call listBoxOnChange for elements using menu lists.
    
            Test: accessibility/select-menulist-crash.html
    
            * dom/SelectElement.cpp:
            (WebCore::SelectElement::accessKeySetSelectedIndex): Extra check
            to decide whether to call menuListOnChange() or listBoxOnChange()
            instead of always calling listBoxOnChange().
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72902 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5ed6719..206e847 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-30  Mario Sanchez Prada  <msanchez at igalia.com>
+
+        Reviewed by Darin Adler.
+
+        ASSERT failing for combo boxes when selection changes
+        https://bugs.webkit.org/show_bug.cgi?id=50062
+
+        * accessibility/select-menulist-crash-expected.txt: Added.
+        * accessibility/select-menulist-crash.html: Added.
+
 2010-11-30  Helder Correia  <helder at sencha.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/LayoutTests/accessibility/select-menulist-crash-expected.txt b/LayoutTests/accessibility/select-menulist-crash-expected.txt
new file mode 100644
index 0000000..fc702a1
--- /dev/null
+++ b/LayoutTests/accessibility/select-menulist-crash-expected.txt
@@ -0,0 +1,15 @@
+
+This test is to ensure that we do not crash when selecting an item from a menu list in a list box through the accessibility API.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS selectElement.role is 'AXRole: combo box'
+PASS menuList.role is 'AXRole: menu'
+PASS item1.role is 'AXRole: menu item'
+PASS item2.role is 'AXRole: menu item'
+PASS Did not crash
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/accessibility/select-menulist-crash.html b/LayoutTests/accessibility/select-menulist-crash.html
new file mode 100644
index 0000000..ba22a63
--- /dev/null
+++ b/LayoutTests/accessibility/select-menulist-crash.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
+<script src="../fast/js/resources/js-test-pre.js"></script>
+<script>
+var successfullyParsed = false;
+</script>
+</head>
+<body>
+<form>
+<select id="target">
+<option selected>foo</option>
+<option>bar</option>
+</select>
+</form>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('This test is to ensure that we do not crash when selecting an item from a menu list in a list box through the accessibility API.')
+
+if (window.layoutTestController) {
+  layoutTestController.dumpAsText();
+
+  if (window.accessibilityController) {
+    document.getElementById("target").focus();
+    var selectElement = accessibilityController.focusedElement;
+    var menuList = selectElement.childAtIndex(0);
+    var item1 = menuList.childAtIndex(0);
+    var item2 = menuList.childAtIndex(1);
+
+    // Check roles.
+    shouldBe("selectElement.role", "'AXRole: combo box'");
+    shouldBe("menuList.role", "'AXRole: menu'");
+    shouldBe("item1.role", "'AXRole: menu item'");
+    shouldBe("item2.role", "'AXRole: menu item'");
+
+    // Execute the press() method for every item in the menu list.
+    item1.press();
+    item2.press()
+
+    testPassed("Did not crash");
+  }
+}
+
+successfullyParsed = true;
+</script>
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0362f29..eda0ba3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-30  Mario Sanchez Prada  <msanchez at igalia.com>
+
+        Reviewed by Darin Adler.
+
+        ASSERT failing for combo boxes when selection changes
+        https://bugs.webkit.org/show_bug.cgi?id=50062
+
+        Don't call listBoxOnChange for elements using menu lists.
+
+        Test: accessibility/select-menulist-crash.html
+
+        * dom/SelectElement.cpp:
+        (WebCore::SelectElement::accessKeySetSelectedIndex): Extra check
+        to decide whether to call menuListOnChange() or listBoxOnChange()
+        instead of always calling listBoxOnChange().
+
 2010-11-30  Helder Correia  <helder at sencha.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/dom/SelectElement.cpp b/WebCore/dom/SelectElement.cpp
index 34a4961..d236c96 100644
--- a/WebCore/dom/SelectElement.cpp
+++ b/WebCore/dom/SelectElement.cpp
@@ -949,8 +949,12 @@ void SelectElement::accessKeySetSelectedIndex(SelectElementData& data, Element*
         else
             setSelectedIndex(data, element, index, false, true);
     }
- 
-    listBoxOnChange(data, element);
+
+    if (data.usesMenuList())
+        menuListOnChange(data, element);
+    else
+        listBoxOnChange(data, element);
+
     scrollToSelection(data, element);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list