Changeset 284612 in webkit
- Timestamp:
- Oct 21, 2021, 9:49:44 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r284611 r284612 1 2021-10-21 Tyler Wilcock <tyler_w@apple.com> 2 3 AX: Remove redundant insert of autofill button child in AccessibilityRenderObject::addTextFieldChildren 4 https://bugs.webkit.org/show_bug.cgi?id=232033 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/auto-fill-crash-expected.txt: 9 * accessibility/auto-fill-crash.html: 10 * platform/glib/accessibility/auto-fill-crash-expected.txt: 11 Expect one less child because we no longer insert a redundant button 12 into the accessibility tree. Also add an expectation confirming the 13 autofill button is actually a part of the accessibility tree. 14 * platform/win/accessibility/auto-fill-crash-expected.txt: Added. 15 1 16 2021-10-21 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/LayoutTests/accessibility/auto-fill-crash-expected.txt
r198769 r284612 5 5 6 6 7 PASS accessibilityController.accessibleElementById('textfield').childrenCount is 3 8 PASS accessibilityController.accessibleElementById('textfield').childrenCount is 1 7 PASS textFieldAxObject.childrenCount is 2 8 PASS textFieldAxObject.childAtIndex(childrenCountExpected - 1).description is 'AXDescription: contact info AutoFill' 9 PASS textFieldAxObject.childrenCount is 1 9 10 PASS successfullyParsed is true 10 11 -
trunk/LayoutTests/accessibility/auto-fill-crash.html
r225707 r284612 18 18 if (window.accessibilityController) { 19 19 var axTextField = accessibilityController.accessibleElementById("textfield"); 20 var childrenCountExpected = accessibilityController.platformName == "atk" ? " 2" : "3";20 var childrenCountExpected = accessibilityController.platformName == "atk" ? "1" : "2"; 21 21 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts"); 22 shouldBe("accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected); 22 var textFieldAxObject = accessibilityController.accessibleElementById('textfield'); 23 shouldBe("textFieldAxObject.childrenCount", childrenCountExpected); 24 // Verify the autofill button is represented in the accessibility tree. 25 shouldBe("textFieldAxObject.childAtIndex(childrenCountExpected - 1).description", "'AXDescription: contact info AutoFill'"); 26 27 var platform = accessibilityController.platformName; 28 // Windows expects 2 children. 29 childrenCountExpected = "2"; 30 if (platform == "mac" || platform == "ios") 31 childrenCountExpected = "1" 32 else if (platform == "atk") 33 childrenCountExpected = "0" 23 34 24 35 // Don't crash! 25 childrenCountExpected = accessibilityController.platformName == "atk" ? "0" : "1";26 36 window.internals.setShowAutoFillButton(document.getElementById("textfield"), "None"); 27 shouldBe(" accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected);37 shouldBe("textFieldAxObject.childrenCount", childrenCountExpected); 28 38 } 29 39 -
trunk/LayoutTests/platform/glib/accessibility/auto-fill-crash-expected.txt
r261701 r284612 5 5 6 6 7 PASS accessibilityController.accessibleElementById('textfield').childrenCount is 2 8 PASS accessibilityController.accessibleElementById('textfield').childrenCount is 0 7 PASS textFieldAxObject.childrenCount is 1 8 PASS textFieldAxObject.childAtIndex(childrenCountExpected - 1).description is 'AXDescription: contact info AutoFill' 9 PASS textFieldAxObject.childrenCount is 0 9 10 PASS successfullyParsed is true 10 11 -
trunk/LayoutTests/platform/win/accessibility/auto-fill-crash-expected.txt
r284611 r284612 5 5 6 6 7 PASS accessibilityController.accessibleElementById('textfield').childrenCount is 3 8 PASS accessibilityController.accessibleElementById('textfield').childrenCount is 1 7 PASS textFieldAxObject.childrenCount is 2 8 PASS textFieldAxObject.childAtIndex(childrenCountExpected - 1).description is 'AXDescription: contact info AutoFill' 9 PASS textFieldAxObject.childrenCount is 2 9 10 PASS successfullyParsed is true 10 11 -
trunk/Source/WebCore/ChangeLog
r284606 r284612 1 2021-10-21 Tyler Wilcock <tyler_w@apple.com> 2 3 AX: Remove redundant insert of autofill button child in AccessibilityRenderObject::addTextFieldChildren 4 https://bugs.webkit.org/show_bug.cgi?id=232033 5 6 Reviewed by Chris Fleizach. 7 8 Autofill buttons are represented in the DOM, so there's no reason 9 to also insert it in AccessibilityRenderObject::addTextFieldChildren. 10 This results in duplicate objects for this button in the AX tree. 11 12 * accessibility/AccessibilityRenderObject.cpp: 13 (WebCore::AccessibilityRenderObject::addTextFieldChildren): 14 Remove redundant insertion of autofill button element into the 15 accessibility tree. 16 1 17 2021-10-21 Tyler Wilcock <tyler_w@apple.com> 2 18 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r284606 r284612 3304 3304 return; 3305 3305 3306 HTMLInputElement& input = downcast<HTMLInputElement>(*node); 3307 if (HTMLElement* autoFillElement = input.autoFillButtonElement()) { 3308 if (AccessibilityObject* axAutoFill = axObjectCache()->getOrCreate(autoFillElement)) 3309 m_children.append(axAutoFill); 3310 } 3311 3312 HTMLElement* spinButtonElement = input.innerSpinButtonElement(); 3306 HTMLElement* spinButtonElement = downcast<HTMLInputElement>(*node).innerSpinButtonElement(); 3313 3307 if (!is<SpinButtonElement>(spinButtonElement)) 3314 3308 return;
Note:
See TracChangeset
for help on using the changeset viewer.