Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
AX:[Mac] Unable to edit text input, textarea fields in iframe using V…
…O naivgation https://bugs.webkit.org/show_bug.cgi?id=162999 Reviewed by Chris Fleizach. Source/WebCore: In WebKit1, the top web area setting the selection to an input element inside an iframe will make the input field not editable. The issue is that when the web area and the input element have different documents, the setSelection function in FrameSelection will set the selection on the input's frame and cause the caret to disappear. I fixed it by not setting the selection in such case. Test: accessibility/mac/wk1-set-selected-text-marker-range-input-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange): LayoutTests: * accessibility/mac/wk1-set-selected-text-marker-range-input-element-expected.txt: Added. * accessibility/mac/wk1-set-selected-text-marker-range-input-element.html: Added. Canonical link: https://commits.webkit.org/180907@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
109 additions
and 0 deletions.
- +10 −0 LayoutTests/ChangeLog
- +11 −0 LayoutTests/accessibility/mac/wk1-set-selected-text-marker-range-input-element-expected.txt
- +46 −0 LayoutTests/accessibility/mac/wk1-set-selected-text-marker-range-input-element.html
- +17 −0 Source/WebCore/ChangeLog
- +24 −0 Source/WebCore/accessibility/AccessibilityRenderObject.cpp
- +1 −0 Source/WebCore/accessibility/AccessibilityRenderObject.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,11 @@ | ||
|
||
This makes sure that in WK1 after setting selection of an input element on a different webarea, the input element is still editable. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
AXValue: 1 | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script src="../../resources/js-test-pre.js"></script> | ||
<script> | ||
var successfullyParsed = false; | ||
</script> | ||
</head> | ||
<body id="body"> | ||
|
||
<div id="content"> | ||
<iframe id="iframe" onload="startTest();" src="data:text/html,<body><input type='text' name='foo' id='input' aria-label='label'></body>"></iframe> | ||
</div> | ||
|
||
<p id="description"></p> | ||
<div id="console"></div> | ||
|
||
<script> | ||
|
||
description("This makes sure that in WK1 after setting selection of an input element on a different webarea, the input element is still editable."); | ||
|
||
window.jsTestIsAsync = true; | ||
function startTest() { | ||
|
||
if (window.accessibilityController) { | ||
accessibilityController.enableEnhancedAccessibility(true); | ||
var input = accessibilityController.accessibleElementById("input"); | ||
var selectedRange = input.textMarkerRangeForElement(input); | ||
var webArea = accessibilityController.rootElement.childAtIndex(0); | ||
|
||
var iframe = document.getElementById("iframe"); | ||
iframe.contentDocument.getElementById("input").focus(); | ||
webArea.setSelectedVisibleTextRange(selectedRange); | ||
eventSender.keyDown("1"); | ||
debug(input.stringValue); | ||
finishJSTest(); | ||
} | ||
} | ||
|
||
successfullyParsed = true; | ||
</script> | ||
|
||
<script src="../../resources/js-test-post.js"></script> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters