Commit b2872fe3 authored by cfleizach@apple.com's avatar cfleizach@apple.com

Bug 25304: AX: Safari not identifying a secure text field

https://bugs.webkit.org/show_bug.cgi?id=25304



git-svn-id: svn://svn.chromium.org/blink/trunk@42713 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 494f148c
2009-04-21 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
Bug 25304: AX: Safari not identifying a secure text field
https://bugs.webkit.org/show_bug.cgi?id=25304
* accessibility/secure-textfield-title-ui-expected.txt: Added.
* accessibility/secure-textfield-title-ui.html: Added.
2009-04-21 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Darin Adler.
......
<html>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<body id="body">
<!-- This test makes sure that a secure text field has the correct title ui element -->
<label for="accountpassword"><span class="dslabel">Password</span></label><br>
<input size="30" maxlength="32" id="accountpassword" type="password" name="theAccountPW">
<div id="result"></div>
<script>
if (window.accessibilityController) {
var result = document.getElementById("result");
var pass = document.getElementById("accountpassword");
pass.focus();
var titleUIElement = accessibilityController.focusedElement.titleUIElement();
var titleText = titleUIElement.childAtIndex(0);
var pattern = "AXValue: Password";
if (titleText.allAttributes().indexOf(pattern) != -1) {
result.innerText += "Test passed\n";
}
else {
result.innerText += "Test failed\n";
}
}
</script>
</body>
</html>
2009-04-21 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
Bug 25304: AX: Safari not identifying a secure text field
https://bugs.webkit.org/show_bug.cgi?id=25304
Secure text fields need to be able to return AXTitleUIElements.
Test: accessibility/secure-textfield-title-ui.html
* page/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2009-04-21 Dan Bernstein <mitz@apple.com>
- fix the Tiger build
......@@ -632,6 +632,7 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
static NSArray* tableCellAttrs = nil;
static NSArray* groupAttrs = nil;
static NSArray* inputImageAttrs = nil;
static NSArray* passwordFieldAttrs = nil;
NSMutableArray* tempArray;
if (attributes == nil) {
attributes = [[NSArray alloc] initWithObjects: NSAccessibilityRoleAttribute,
......@@ -814,9 +815,15 @@ static WebCoreTextMarkerRange* textMarkerRangeFromVisiblePositions(VisiblePositi
inputImageAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release];
}
if (passwordFieldAttrs == nil) {
tempArray = [[NSMutableArray alloc] initWithArray:attributes];
[tempArray addObject:NSAccessibilityTitleUIElementAttribute];
passwordFieldAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release];
}
if (m_object->isPasswordField())
return attributes;
return passwordFieldAttrs;
if (m_object->isWebArea())
return webAreaAttrs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment