Title: [240939] trunk
- Revision
- 240939
- Author
- [email protected]
- Date
- 2019-02-04 13:03:20 -0800 (Mon, 04 Feb 2019)
Log Message
Source/WebCore:
When performing Increment or Decrement on sliders, check to see if the slider is disabled.
https://bugs.webkit.org/show_bug.cgi?id=173497
Patch by Eric Liang <[email protected]> on 2019-02-04
Reviewed by Chris Fleizach.
Test: accessibility/set-value-not-work-for-disabled-sliders.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alterSliderValue):
LayoutTests:
Check if slider value changed after calling AX Increment or Decrement on disabled sliders.
https://bugs.webkit.org/show_bug.cgi?id=193497
Patch by Eric Liang <[email protected]> on 2019-02-04
Reviewed by Chris Fleizach.
* accessibility/set-value-not-work-for-disabled-sliders.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (240938 => 240939)
--- trunk/LayoutTests/ChangeLog 2019-02-04 21:02:27 UTC (rev 240938)
+++ trunk/LayoutTests/ChangeLog 2019-02-04 21:03:20 UTC (rev 240939)
@@ -1,3 +1,12 @@
+2019-02-04 Eric Liang <[email protected]>
+
+ Check if slider value changed after calling AX Increment or Decrement on disabled sliders.
+ https://bugs.webkit.org/show_bug.cgi?id=193497
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/set-value-not-work-for-disabled-sliders.html: Added.
+
2019-02-04 Frederic Wang <[email protected]>
[css-scroll-snap] scroll-snap-align not honored on child with non-visible overflow
Added: trunk/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders-expected.txt (0 => 240939)
--- trunk/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders-expected.txt 2019-02-04 21:03:20 UTC (rev 240939)
@@ -0,0 +1,28 @@
+
+This tests that disabled sliders can't be incremented or decremented.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 50
+PASS slider.intValue is 55
+PASS slider.intValue is 45
+PASS slider.intValue is 50
+PASS slider.intValue is 55
+PASS slider.intValue is 45
+PASS slider.intValue is 50
+PASS slider.intValue is 55
+PASS slider.intValue is 45
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders.html (0 => 240939)
--- trunk/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders.html (rev 0)
+++ trunk/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders.html 2019-02-04 21:03:20 UTC (rev 240939)
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+<div id="content">
+
+<input id="test0" type='range' should-change="false" disabled>
+<input id="test1" type='range' should-change="false" disabled aria-disabled="true">
+<input id="test2" type='range' should-change="false" disabled aria-disabled="false">
+<input id="test3" type='range' should-change="true" >
+<input id="test4" type='range' should-change="true" aria-disabled="true">
+<input id="test5" type='range' should-change="true" aria-disabled="false">
+
+<p id="description"></p>
+<div id="console"></div>
+
+</div>
+<script>
+ description("This tests that disabled sliders can't be incremented or decremented.");
+
+ if (window.accessibilityController) {
+ var numOfTests = 6;
+ for (var testId = 0; testId < numOfTests; testId++) {
+ var slider = accessibilityController.accessibleElementById("test" + testId);
+ var shouldChange = document.getElementById("test" + testId).getAttribute("should-change") == "true" ? true : false;
+ shouldBe("slider.intValue", "50");
+
+ slider.increment();
+ shouldBe("slider.intValue", shouldChange ? "55" : "50");
+
+ slider.decrement();
+ slider.decrement();
+ shouldBe("slider.intValue", shouldChange ? "45" : "50");
+ }
+ }
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (240938 => 240939)
--- trunk/Source/WebCore/ChangeLog 2019-02-04 21:02:27 UTC (rev 240938)
+++ trunk/Source/WebCore/ChangeLog 2019-02-04 21:03:20 UTC (rev 240939)
@@ -1,3 +1,15 @@
+2019-02-04 Eric Liang <[email protected]>
+
+ When performing Increment or Decrement on sliders, check to see if the slider is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=173497
+
+ Reviewed by Chris Fleizach.
+
+ Test: accessibility/set-value-not-work-for-disabled-sliders.html
+
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::alterSliderValue):
+
2019-02-04 Sihui Liu <[email protected]>
IndexedDB: leak WebIDBConnectionToServer in layout tests
Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (240938 => 240939)
--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2019-02-04 21:02:27 UTC (rev 240938)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2019-02-04 21:03:20 UTC (rev 240939)
@@ -1063,6 +1063,10 @@
{
if (roleValue() != AccessibilityRole::Slider)
return;
+
+ auto element = this->element();
+ if (!element || element->isDisabledFormControl())
+ return;
if (!getAttribute(stepAttr).isEmpty())
changeValueByStep(increase);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes