[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
cfleizach at apple.com
cfleizach at apple.com
Wed Dec 22 11:56:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 53e67549256420e046ddc2dac70ddf1fb67b6e9e
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 12 01:24:10 2010 +0000
AX: isNativeCheckbox does not work as advertised
https://bugs.webkit.org/show_bug.cgi?id=43872
Reviewed by Beth Dakin.
WebCore:
Test: platform/mac/accessibility/native-vs-nonnative-checkboxes.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isInputImage):
Only say it's an input image if its role has not been overriden
(WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
* dom/InputElement.h:
Add methods to query if it's a checkbox or radio button type element.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::isCheckbox):
LayoutTests:
* platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt: Added.
* platform/mac/accessibility/native-vs-nonnative-checkboxes.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 90f1ee6..19281b2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-11 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: isNativeCheckbox does not work as advertised
+ https://bugs.webkit.org/show_bug.cgi?id=43872
+
+ * platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt: Added.
+ * platform/mac/accessibility/native-vs-nonnative-checkboxes.html: Added.
+
2010-08-11 Shinichiro Hamaji <hamaji at chromium.org>
Chromium test_expectations update.
diff --git a/LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt b/LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt
new file mode 100644
index 0000000..55c57f4
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt
@@ -0,0 +1,15 @@
+check1
+check2
+check2
+This tests that input types masquerading as checkboxes will use the aria-checked values for its value.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS accessibilityController.focusedElement.intValue is 1
+PASS accessibilityController.focusedElement.intValue is 0
+PASS accessibilityController.focusedElement.intValue is 2
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html b/LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html
new file mode 100644
index 0000000..e3b65ea
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<input type="image" role="checkbox" aria-checked="true" id="check1">check1<BR>
+<input type="image" role="checkbox" aria-checked="mixed" id="check2">check2<BR>
+<input type="image" role="checkbox" id="check3">check2<BR>
+
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that input types masquerading as checkboxes will use the aria-checked values for its value.");
+
+ if (window.accessibilityController) {
+
+ // aria-state=true
+ document.getElementById("check1").focus();
+ shouldBe("accessibilityController.focusedElement.intValue", "1");
+
+ // aria-state=false
+ document.getElementById("check3").focus();
+ shouldBe("accessibilityController.focusedElement.intValue", "0");
+
+ // aria-state=mixed
+ document.getElementById("check2").focus();
+ shouldBe("accessibilityController.focusedElement.intValue", "2");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bdc46ae..68c00c4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-11 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: isNativeCheckbox does not work as advertised
+ https://bugs.webkit.org/show_bug.cgi?id=43872
+
+ Test: platform/mac/accessibility/native-vs-nonnative-checkboxes.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isInputImage):
+ Only say it's an input image if its role has not been overriden
+ (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
+ * dom/InputElement.h:
+ Add methods to query if it's a checkbox or radio button type element.
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::isCheckbox):
+
2010-08-11 Kenneth Russell <kbr at google.com>
Reviewed by David Levin.
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index c4669cd..6b90b63 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -508,8 +508,9 @@ bool AccessibilityRenderObject::isFileUploadButton() const
bool AccessibilityRenderObject::isInputImage() const
{
- if (m_renderer && m_renderer->node() && m_renderer->node()->hasTagName(inputTag)) {
- HTMLInputElement* input = static_cast<HTMLInputElement*>(m_renderer->node());
+ Node* elementNode = node();
+ if (roleValue() == ButtonRole && elementNode && elementNode->hasTagName(inputTag)) {
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(elementNode);
return input->inputType() == HTMLInputElement::IMAGE;
}
@@ -591,8 +592,11 @@ bool AccessibilityRenderObject::isIndeterminate() const
bool AccessibilityRenderObject::isNativeCheckboxOrRadio() const
{
Node* elementNode = node();
- if (elementNode && elementNode->isElementNode())
- return toInputElement(static_cast<Element*>(elementNode));
+ if (elementNode && elementNode->isElementNode()) {
+ InputElement* input = toInputElement(static_cast<Element*>(elementNode));
+ if (input)
+ return input->isCheckbox() || input->isRadioButton();
+ }
return false;
}
diff --git a/WebCore/dom/InputElement.h b/WebCore/dom/InputElement.h
index 14cfda2..56fc99d 100644
--- a/WebCore/dom/InputElement.h
+++ b/WebCore/dom/InputElement.h
@@ -43,6 +43,9 @@ public:
virtual bool isPasswordField() const = 0;
virtual bool isSearchField() const = 0;
virtual bool isTextField() const = 0;
+ virtual bool isRadioButton() const = 0;
+ virtual bool isCheckbox() const = 0;
+
virtual bool supportsMaxLength() const = 0;
virtual bool hasSpinButton() const { return false; }
#if ENABLE(INPUT_SPEECH)
diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h
index 72ac589..18cbaa4 100644
--- a/WebCore/html/HTMLInputElement.h
+++ b/WebCore/html/HTMLInputElement.h
@@ -101,6 +101,7 @@ public:
virtual bool isSearchField() const { return m_type == SEARCH; }
virtual bool isInputTypeHidden() const { return m_type == HIDDEN; }
virtual bool isPasswordField() const { return m_type == PASSWORD; }
+ virtual bool isCheckbox() const { return m_type == CHECKBOX; }
bool isTelephoneField() const { return m_type == TELEPHONE; }
bool isNumberField() const { return m_type == NUMBER; }
bool isEmailField() const { return m_type == EMAIL; }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list