Diff
Modified: trunk/LayoutTests/ChangeLog (226431 => 226432)
--- trunk/LayoutTests/ChangeLog 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/ChangeLog 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1,3 +1,24 @@
+2018-01-04 Chris Fleizach <[email protected]>
+
+ AX: Implement updated CSS3 Speech for 'speak' and 'speak-as' properties
+ https://bugs.webkit.org/show_bug.cgi?id=180361
+
+ Reviewed by Zalan Bujtas.
+
+ * accessibility/mac/css-speech-speak-expected.txt:
+ * accessibility/mac/css-speech-speak.html:
+ * fast/css/getComputedStyle/computed-style-expected.txt:
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
+ * platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt:
+ * platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt:
+ * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
+ * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * platform/mac/svg/css/getComputedStyle-basic-expected.txt:
+ * svg/css/getComputedStyle-basic-expected.txt:
+
2018-01-04 Brian Burg <[email protected]>
Web Inspector: Capture Element Screenshot looks fuzzy
Modified: trunk/LayoutTests/accessibility/mac/css-speech-speak-expected.txt (226431 => 226432)
--- trunk/LayoutTests/accessibility/mac/css-speech-speak-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/accessibility/mac/css-speech-speak-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1,24 +1,26 @@
Initial
-No speech
Normal
Spellout
Digits
Literal
No punctuation
+Digits and Literal
+Spell and Literal
test
-This tests that using the CSS3-speech property 'speak' works as from a WebCore level (not a platform level, that is up to the platforms)
+This tests that using the CSS3-speech property 'speak-as' works as from a WebCore level (not a platform level, that is up to the platforms)
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'normal'
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'none'
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'normal'
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'spell-out'
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'digits'
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'literal-punctuation'
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'no-punctuation'
-PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'digits'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'spell-out'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, digits'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, literal-punctuation'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, no-punctuation'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, digits, literal-punctuation'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'spell-out, literal-punctuation'
+PASS accessibilityController.focusedElement.childAtIndex(0).speakAs is 'normal, digits'
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/accessibility/mac/css-speech-speak.html (226431 => 226432)
--- trunk/LayoutTests/accessibility/mac/css-speech-speak.html 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/accessibility/mac/css-speech-speak.html 2018-01-05 00:32:53 UTC (rev 226432)
@@ -3,12 +3,13 @@
<head>
<script src=""
<style>
-div.speech-none { speak: none; }
-div.speech-normal { speak: normal; }
-div.speech-spellout { speak: spell-out; }
-div.speech-digits { speak: digits; }
-div.speech-literalpunc { speak: literal-punctuation; }
-div.speech-nopunc { speak: no-punctuation; }
+div.speech-normal { speak-as: normal; }
+div.speech-spellout { speak-as: spell-out; }
+div.speech-digits { speak-as: digits; }
+div.speech-literalpunc { speak-as: literal-punctuation; }
+div.speech-nopunc { speak-as: no-punctuation; }
+div.digits-and-literal { speak-as: digits literal-punctuation; }
+div.spell-and-literal { speak-as: spell-out literal-punctuation; }
</style>
</head>
<body id="body">
@@ -15,14 +16,15 @@
<div tabindex="0" id="initial" >Initial</div>
-<div tabindex="0" id="speech-none" class="speech-none">No speech</div>
<div tabindex="0" id="speech-normal" class="speech-normal">Normal</div>
<div tabindex="0" id="speech-spellout" class="speech-spellout">Spellout</div>
<div tabindex="0" id="speech-digits" class="speech-digits">Digits</div>
<div tabindex="0" id="speech-literalpunc" class="speech-literalpunc">Literal</div>
<div tabindex="0" id="speech-nopunc" class="speech-nopunc">No punctuation</div>
+<div tabindex="0" id="speech-digits-and-literal" class="digits-and-literal">Digits and Literal</div>
+<div tabindex="0" id="speech-spell-and-literal" class="spell-and-literal">Spell and Literal</div>
-<div style='speak: digits;'>
+<div style='speak-as: digits;'>
<div>
<div>
<a id="testlink" tabindex="0" href=""
@@ -35,33 +37,36 @@
<script>
- description("This tests that using the CSS3-speech property 'speak' works as from a WebCore level (not a platform level, that is up to the platforms)");
+ description("This tests that using the CSS3-speech property 'speak-as' works as from a WebCore level (not a platform level, that is up to the platforms)");
if (window.accessibilityController) {
document.getElementById("initial").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'normal'");
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal'");
- document.getElementById("speech-none").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'none'");
-
document.getElementById("speech-normal").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'normal'");
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal'");
document.getElementById("speech-spellout").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'spell-out'");
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'spell-out'");
document.getElementById("speech-digits").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'digits'");
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, digits'");
document.getElementById("speech-literalpunc").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'literal-punctuation'");
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, literal-punctuation'");
document.getElementById("speech-nopunc").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'no-punctuation'");
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, no-punctuation'");
+ document.getElementById("speech-digits-and-literal").focus();
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, digits, literal-punctuation'");
+
+ document.getElementById("speech-spell-and-literal").focus();
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'spell-out, literal-punctuation'");
+
document.getElementById("testlink").focus();
- shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'digits'");
+ shouldBe("accessibilityController.focusedElement.childAtIndex(0).speakAs", "'normal, digits'");
}
</script>
Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (226431 => 226432)
--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -89,7 +89,6 @@
position: static;
resize: none;
right: auto;
-speak: normal;
table-layout: auto;
tab-size: 8;
text-align: start;
Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (226431 => 226432)
--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -88,7 +88,6 @@
position: static
resize: none
right: auto
-speak: normal
table-layout: auto
tab-size: 8
text-align: start
Modified: trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -90,7 +90,6 @@
position: static;
resize: none;
right: auto;
-speak: normal;
table-layout: auto;
tab-size: 8;
text-align: start;
Modified: trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -89,7 +89,6 @@
position: static
resize: none
right: auto
-speak: normal
table-layout: auto
tab-size: 8
text-align: start
Modified: trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -90,7 +90,6 @@
position: static;
resize: none;
right: auto;
-speak: normal;
table-layout: auto;
tab-size: 8;
text-align: start;
Modified: trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -89,7 +89,6 @@
position: static
resize: none
right: auto
-speak: normal
table-layout: auto
tab-size: 8
text-align: start
Modified: trunk/LayoutTests/platform/mac/svg/css/getComputedStyle-basic-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/mac/svg/css/getComputedStyle-basic-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/mac/svg/css/getComputedStyle-basic-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -178,8 +178,6 @@
rect: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(right) : auto
rect: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(speak) : normal
-rect: style.getPropertyCSSValue(speak) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(table-layout) : auto
rect: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(tab-size) : 8
@@ -732,8 +730,6 @@
g: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
g: style.getPropertyValue(right) : auto
g: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(speak) : normal
-g: style.getPropertyCSSValue(speak) : [object CSSPrimitiveValue]
g: style.getPropertyValue(table-layout) : auto
g: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
g: style.getPropertyValue(tab-size) : 8
Modified: trunk/LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -89,7 +89,6 @@
position: static;
resize: none;
right: auto;
-speak: normal;
table-layout: auto;
tab-size: 8;
text-align: start;
Modified: trunk/LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -88,7 +88,6 @@
position: static
resize: none
right: auto
-speak: normal
table-layout: auto
tab-size: 8
text-align: start
Modified: trunk/LayoutTests/platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt (226431 => 226432)
--- trunk/LayoutTests/platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -176,8 +176,6 @@
rect: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(right) : auto
rect: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(speak) : normal
-rect: style.getPropertyCSSValue(speak) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(table-layout) : auto
rect: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(tab-size) : 8
@@ -728,8 +726,6 @@
g: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
g: style.getPropertyValue(right) : auto
g: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(speak) : normal
-g: style.getPropertyCSSValue(speak) : [object CSSPrimitiveValue]
g: style.getPropertyValue(table-layout) : auto
g: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
g: style.getPropertyValue(tab-size) : 8
Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (226431 => 226432)
--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt 2018-01-05 00:32:53 UTC (rev 226432)
@@ -176,8 +176,6 @@
rect: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(right) : auto
rect: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(speak) : normal
-rect: style.getPropertyCSSValue(speak) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(table-layout) : auto
rect: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(tab-size) : 8
@@ -728,8 +726,6 @@
g: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
g: style.getPropertyValue(right) : auto
g: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(speak) : normal
-g: style.getPropertyCSSValue(speak) : [object CSSPrimitiveValue]
g: style.getPropertyValue(table-layout) : auto
g: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
g: style.getPropertyValue(tab-size) : 8
Modified: trunk/Source/WebCore/ChangeLog (226431 => 226432)
--- trunk/Source/WebCore/ChangeLog 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/ChangeLog 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1,3 +1,59 @@
+2018-01-04 Chris Fleizach <[email protected]>
+
+ AX: Implement updated CSS3 Speech for 'speak' and 'speak-as' properties
+ https://bugs.webkit.org/show_bug.cgi?id=180361
+
+ Reviewed by Zalan Bujtas.
+
+ Change speak -> speakAs, and allow a combination of properties.
+
+ Tests: Updated accessibility/mac/css-speech-speak.html
+
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::speakAsProperty const):
+ (WebCore::AccessibilityObject::speakProperty const): Deleted.
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::speakAsProperty const):
+ (WebCore::AccessibilityRenderObject::speakProperty const): Deleted.
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]):
+ * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
+ * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
+ (-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::speakAsToCSSValue):
+ (WebCore::ComputedStyleExtractor::propertyValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator ESpeakAs const):
+ (WebCore::CSSPrimitiveValue::operator ESpeak const): Deleted.
+ * css/CSSProperties.json:
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertSpeakAs):
+ * css/parser/CSSParserFastPaths.cpp:
+ (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+ (WebCore::CSSParserFastPaths::isKeywordPropertyID):
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeSpeakAs):
+ (WebCore::CSSPropertyParser::parseSingleValue):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::speakAs const):
+ (WebCore::RenderStyle::setSpeakAs):
+ (WebCore::RenderStyle::initialSpeakAs):
+ (WebCore::RenderStyle::speak const): Deleted.
+ (WebCore::RenderStyle::setSpeak): Deleted.
+ (WebCore::RenderStyle::initialSpeak): Deleted.
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::operator| ):
+ (WebCore::operator|= ):
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+ (WebCore::StyleRareInheritedData::operator== const):
+ * rendering/style/StyleRareInheritedData.h:
+
2018-01-04 Brian Burg <[email protected]>
Web Inspector: Capture Element Screenshot looks fuzzy
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (226431 => 226432)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1004,7 +1004,7 @@
bool supportsARIAAttributes() const;
// CSS3 Speech properties.
- virtual ESpeak speakProperty() const { return SpeakNormal; }
+ virtual ESpeakAs speakAsProperty() const { return SpeakNormal; }
// Make this object visible by scrolling as many nested scrollable views as needed.
virtual void scrollToMakeVisible() const;
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (226431 => 226432)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2018-01-05 00:32:53 UTC (rev 226432)
@@ -944,12 +944,12 @@
return firstAccessibleObjectFromNode(linkedNode);
}
-ESpeak AccessibilityRenderObject::speakProperty() const
+ESpeakAs AccessibilityRenderObject::speakAsProperty() const
{
if (!m_renderer)
- return AccessibilityObject::speakProperty();
+ return AccessibilityObject::speakAsProperty();
- return m_renderer->style().speak();
+ return m_renderer->style().speakAs();
}
void AccessibilityRenderObject::addRadioButtonGroupChildren(AccessibilityObject* parent, AccessibilityChildrenVector& linkedUIElements) const
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h (226431 => 226432)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -274,7 +274,7 @@
bool elementAttributeValue(const QualifiedName&) const;
void setElementAttributeValue(const QualifiedName&, bool);
- ESpeak speakProperty() const override;
+ ESpeakAs speakAsProperty() const override;
const String liveRegionStatus() const override;
const String liveRegionRelevant() const override;
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (226431 => 226432)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2018-01-05 00:32:53 UTC (rev 226432)
@@ -2843,28 +2843,12 @@
return m_object->getAttribute(HTMLNames::idAttr);
}
-- (NSString *)accessibilitySpeechHint
+- (NSArray<NSString *> *)accessibilitySpeechHint
{
if (![self _prepareAccessibilityCall])
return nil;
- switch (m_object->speakProperty()) {
- default:
- case SpeakNormal:
- return @"normal";
- case SpeakNone:
- return @"none";
- case SpeakSpellOut:
- return @"spell-out";
- case SpeakDigits:
- return @"digits";
- case SpeakLiteralPunctuation:
- return @"literal-punctuation";
- case SpeakNoPunctuation:
- return @"no-punctuation";
- }
-
- return nil;
+ return [self baseAccessibilitySpeechHint];
}
- (BOOL)accessibilityARIAIsBusy
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h (226431 => 226432)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -55,6 +55,7 @@
- (NSString *)baseAccessibilityTitle;
- (NSString *)baseAccessibilityDescription;
- (NSString *)baseAccessibilityHelpText;
+- (NSArray<NSString *> *)baseAccessibilitySpeechHint;
- (NSString *)ariaLandmarkRoleDescription;
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (226431 => 226432)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2018-01-05 00:32:53 UTC (rev 226432)
@@ -403,6 +403,25 @@
return returnText;
}
+- (NSArray<NSString *> *)baseAccessibilitySpeechHint
+{
+ ESpeakAs speak = m_object->speakAsProperty();
+ NSMutableArray<NSString *> *hints = [NSMutableArray array];
+ if (speak & SpeakSpellOut)
+ [hints addObject:@"spell-out"];
+ else
+ [hints addObject:@"normal"];
+
+ if (speak & SpeakDigits)
+ [hints addObject:@"digits"];
+ if (speak & SpeakLiteralPunctuation)
+ [hints addObject:@"literal-punctuation"];
+ if (speak & SpeakNoPunctuation)
+ [hints addObject:@"no-punctuation"];
+
+ return hints;
+}
+
- (NSString *)baseAccessibilityHelpText
{
Vector<AccessibilityText> textOrder;
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (226431 => 226432)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2018-01-05 00:32:53 UTC (rev 226432)
@@ -3168,24 +3168,8 @@
return [NSValue valueWithPoint:m_object->clickPoint()];
// This is used by DRT to verify CSS3 speech works.
- if ([attributeName isEqualToString:@"AXDRTSpeechAttribute"]) {
- ESpeak speakProperty = m_object->speakProperty();
- switch (speakProperty) {
- case SpeakNone:
- return @"none";
- case SpeakSpellOut:
- return @"spell-out";
- case SpeakDigits:
- return @"digits";
- case SpeakLiteralPunctuation:
- return @"literal-punctuation";
- case SpeakNoPunctuation:
- return @"no-punctuation";
- default:
- case SpeakNormal:
- return @"normal";
- }
- }
+ if ([attributeName isEqualToString:@"AXDRTSpeechAttribute"])
+ return [self baseAccessibilitySpeechHint];
// Used by DRT to find an accessible node by its element id.
if ([attributeName isEqualToString:@"AXDRTElementIdAttribute"])
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (226431 => 226432)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2018-01-05 00:32:53 UTC (rev 226432)
@@ -205,7 +205,7 @@
CSSPropertyPosition,
CSSPropertyResize,
CSSPropertyRight,
- CSSPropertySpeak,
+ CSSPropertySpeakAs,
CSSPropertyTableLayout,
CSSPropertyTabSize,
CSSPropertyTextAlign,
@@ -1827,6 +1827,25 @@
return WTFMove(list);
}
+static Ref<CSSValue> speakAsToCSSValue(ESpeakAs speakAs)
+{
+ auto& cssValuePool = CSSValuePool::singleton();
+ auto list = CSSValueList::createSpaceSeparated();
+ if (speakAs & SpeakNormal)
+ list->append(cssValuePool.createIdentifierValue(CSSValueNormal));
+ if (speakAs & SpeakSpellOut)
+ list->append(cssValuePool.createIdentifierValue(CSSValueSpellOut));
+ if (speakAs & SpeakDigits)
+ list->append(cssValuePool.createIdentifierValue(CSSValueDigits));
+ if (speakAs & SpeakLiteralPunctuation)
+ list->append(cssValuePool.createIdentifierValue(CSSValueLiteralPunctuation));
+ if (speakAs & SpeakNoPunctuation)
+ list->append(cssValuePool.createIdentifierValue(CSSValueNoPunctuation));
+ if (!list->length())
+ return cssValuePool.createIdentifierValue(CSSValueNormal);
+ return WTFMove(list);
+}
+
static Ref<CSSValue> hangingPunctuationToCSSValue(HangingPunctuation hangingPunctuation)
{
auto& cssValuePool = CSSValuePool::singleton();
@@ -3694,8 +3713,8 @@
rect->setLeft(autoOrZoomAdjustedValue(style->clip().left(), *style));
return cssValuePool.createValue(WTFMove(rect));
}
- case CSSPropertySpeak:
- return cssValuePool.createValue(style->speak());
+ case CSSPropertySpeakAs:
+ return speakAsToCSSValue(style->speakAs());
case CSSPropertyTransform:
return computedTransform(renderer, *style);
case CSSPropertyTransformBox:
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (226431 => 226432)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -3819,14 +3819,11 @@
return LineAlignNone;
}
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ESpeak e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ESpeakAs e)
: CSSValue(PrimitiveClass)
{
m_primitiveUnitType = CSS_VALUE_ID;
switch (e) {
- case SpeakNone:
- m_value.valueID = CSSValueNone;
- break;
case SpeakNormal:
m_value.valueID = CSSValueNormal;
break;
@@ -3876,13 +3873,11 @@
}
}
-template<> inline CSSPrimitiveValue::operator ESpeak() const
+template<> inline CSSPrimitiveValue::operator ESpeakAs() const
{
ASSERT(isValueID());
switch (m_value.valueID) {
- case CSSValueNone:
- return SpeakNone;
case CSSValueNormal:
return SpeakNormal;
case CSSValueSpellOut:
Modified: trunk/Source/WebCore/css/CSSProperties.json (226431 => 226432)
--- trunk/Source/WebCore/css/CSSProperties.json 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/css/CSSProperties.json 2018-01-05 00:32:53 UTC (rev 226432)
@@ -3085,19 +3085,14 @@
"obsolete-url": "https://www.w3.org/TR/SVG11/painting.html#StrokeWidthProperty"
}
},
- "speak": {
+ "speak-as": {
"inherited": true,
- "values": [
- "none",
- "normal",
- "spell-out",
- "digits",
- "literal-punctuation",
- "no-punctuation"
- ],
+ "codegen-properties": {
+ "converter": "SpeakAs"
+ },
"specification": {
"category": "css-speech",
- "url": "https://www.w3.org/TR/css3-speech/#speak"
+ "url": "https://www.w3.org/TR/css3-speech/#speak-as"
}
},
"table-layout": {
Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (226431 => 226432)
--- trunk/Source/WebCore/css/StyleBuilderConverter.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -146,6 +146,8 @@
static HangingPunctuation convertHangingPunctuation(StyleResolver&, const CSSValue&);
+ static ESpeakAs convertSpeakAs(StyleResolver&, const CSSValue&);
+
static Length convertPositionComponentX(StyleResolver&, const CSSValue&);
static Length convertPositionComponentY(StyleResolver&, const CSSValue&);
@@ -1515,6 +1517,16 @@
return AvoidColumnBreakInside;
return primitiveValue;
}
+
+inline ESpeakAs StyleBuilderConverter::convertSpeakAs(StyleResolver&, const CSSValue& value)
+{
+ ESpeakAs result = RenderStyle::initialSpeakAs();
+ if (is<CSSValueList>(value)) {
+ for (auto& currentValue : downcast<CSSValueList>(value))
+ result |= downcast<CSSPrimitiveValue>(currentValue.get());
+ }
+ return result;
+}
inline HangingPunctuation StyleBuilderConverter::convertHangingPunctuation(StyleResolver&, const CSSValue& value)
{
Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (226431 => 226432)
--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp 2018-01-05 00:32:53 UTC (rev 226432)
@@ -630,8 +630,6 @@
// return valueID == CSSValueAuto || valueID == CSSValueSmooth;
case CSSPropertyShapeRendering:
return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || valueID == CSSValueCrispedges || valueID == CSSValueGeometricPrecision;
- case CSSPropertySpeak: // none | normal | spell-out | digits | literal-punctuation | no-punctuation
- return valueID == CSSValueNone || valueID == CSSValueNormal || valueID == CSSValueSpellOut || valueID == CSSValueDigits || valueID == CSSValueLiteralPunctuation || valueID == CSSValueNoPunctuation;
case CSSPropertyStrokeLinejoin:
return valueID == CSSValueMiter || valueID == CSSValueRound || valueID == CSSValueBevel;
case CSSPropertyStrokeLinecap:
@@ -861,7 +859,6 @@
case CSSPropertyPointerEvents:
case CSSPropertyPosition:
case CSSPropertyResize:
- case CSSPropertySpeak:
case CSSPropertyTableLayout:
case CSSPropertyTextAlign:
case CSSPropertyTextOverflow:
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (226431 => 226432)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2018-01-05 00:32:53 UTC (rev 226432)
@@ -3567,6 +3567,52 @@
return createPrimitiveValuePair(position.releaseNonNull(), WTFMove(height));
}
+static RefPtr<CSSValue> consumeSpeakAs(CSSParserTokenRange& range)
+{
+ if (range.peek().id() == CSSValueNone)
+ return consumeIdent(range);
+
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ std::bitset<numCSSValueKeywords> seenValues;
+
+ bool seenNormal = false;
+ bool seenSpellOut = false;
+ bool seenLiteralPunctuation = false;
+ bool seenNoPunctuation = false;
+
+ // normal | spell-out || digits || [ literal-punctuation | no-punctuation ]
+ while (!range.atEnd()) {
+ CSSValueID valueID = range.peek().id();
+ if ((valueID == CSSValueNormal && seenSpellOut)
+ || (valueID == CSSValueSpellOut && seenNormal)
+ || (valueID == CSSValueLiteralPunctuation && seenNoPunctuation)
+ || (valueID == CSSValueNoPunctuation && seenLiteralPunctuation))
+ return nullptr;
+ RefPtr<CSSValue> ident = consumeIdent<CSSValueNormal, CSSValueSpellOut, CSSValueDigits, CSSValueLiteralPunctuation, CSSValueNoPunctuation>(range);
+ if (!ident)
+ return nullptr;
+ switch (valueID) {
+ case CSSValueNormal:
+ seenNormal = true;
+ break;
+ case CSSValueSpellOut:
+ seenSpellOut = true;
+ break;
+ case CSSValueLiteralPunctuation:
+ seenLiteralPunctuation = true;
+ break;
+ case CSSValueNoPunctuation:
+ seenNoPunctuation = true;
+ break;
+ default:
+ break;
+ }
+ list->append(ident.releaseNonNull());
+ }
+
+ return list->length() ? list : nullptr;
+}
+
static RefPtr<CSSValue> consumeHangingPunctuation(CSSParserTokenRange& range)
{
if (range.peek().id() == CSSValueNone)
@@ -4238,6 +4284,8 @@
return consumeLineGrid(m_range);
case CSSPropertyWebkitInitialLetter:
return consumeInitialLetter(m_range);
+ case CSSPropertySpeakAs:
+ return consumeSpeakAs(m_range);
case CSSPropertyHangingPunctuation:
return consumeHangingPunctuation(m_range);
case CSSPropertyWebkitMarqueeIncrement:
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (226431 => 226432)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -745,7 +745,7 @@
float imageResolution() const { return m_rareInheritedData->imageResolution; }
#endif
- ESpeak speak() const { return static_cast<ESpeak>(m_rareInheritedData->speak); }
+ ESpeakAs speakAs() const { return static_cast<ESpeakAs>(m_rareInheritedData->speakAs); }
FilterOperations& mutableFilter() { return m_rareNonInheritedData.access().filter.access().operations; }
const FilterOperations& filter() const { return m_rareNonInheritedData->filter->operations; }
@@ -1142,7 +1142,7 @@
void setTransformOriginZ(float f) { SET_NESTED_VAR(m_rareNonInheritedData, transform, z, f); }
void setTransformBox(TransformBox box) { SET_NESTED_VAR(m_rareNonInheritedData, transform, transformBox, box); }
- void setSpeak(ESpeak s) { SET_VAR(m_rareInheritedData, speak, s); }
+ void setSpeakAs(ESpeakAs s) { SET_VAR(m_rareInheritedData, speakAs, s); }
void setTextCombine(TextCombine v) { SET_VAR(m_rareNonInheritedData, textCombine, v); }
void setTextDecorationColor(const Color& c) { SET_VAR(m_rareNonInheritedData, textDecorationColor, c); }
void setTextEmphasisColor(const Color& c) { SET_VAR(m_rareInheritedData, textEmphasisColor, c); }
@@ -1514,7 +1514,7 @@
static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; }
static ENBSPMode initialNBSPMode() { return NBNORMAL; }
static LineBreak initialLineBreak() { return LineBreakAuto; }
- static ESpeak initialSpeak() { return SpeakNormal; }
+ static ESpeakAs initialSpeakAs() { return SpeakNormal; }
static Hyphens initialHyphens() { return HyphensManual; }
static short initialHyphenationLimitBefore() { return -1; }
static short initialHyphenationLimitAfter() { return -1; }
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (226431 => 226432)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -596,7 +596,15 @@
enum Hyphens { HyphensNone, HyphensManual, HyphensAuto };
-enum ESpeak { SpeakNone, SpeakNormal, SpeakSpellOut, SpeakDigits, SpeakLiteralPunctuation, SpeakNoPunctuation };
+enum ESpeakAs {
+ SpeakNormal = 0,
+ SpeakSpellOut = 1 << 0,
+ SpeakDigits = 1 << 1,
+ SpeakLiteralPunctuation = 1 << 2,
+ SpeakNoPunctuation = 1 << 3
+};
+inline ESpeakAs operator| (ESpeakAs a, ESpeakAs b) { return ESpeakAs(int(a) | int(b)); }
+inline ESpeakAs& operator|= (ESpeakAs& a, ESpeakAs b) { return a = a | b; }
enum TextEmphasisFill { TextEmphasisFillFilled, TextEmphasisFillOpen };
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (226431 => 226432)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2018-01-05 00:32:53 UTC (rev 226432)
@@ -86,7 +86,7 @@
, nbspMode(NBNORMAL)
, lineBreak(LineBreakAuto)
, userSelect(RenderStyle::initialUserSelect())
- , speak(SpeakNormal)
+ , speakAs(SpeakNormal)
, hyphens(HyphensManual)
, textEmphasisFill(TextEmphasisFillFilled)
, textEmphasisMark(TextEmphasisMarkNone)
@@ -178,7 +178,7 @@
, nbspMode(o.nbspMode)
, lineBreak(o.lineBreak)
, userSelect(o.userSelect)
- , speak(o.speak)
+ , speakAs(o.speakAs)
, hyphens(o.hyphens)
, textEmphasisFill(o.textEmphasisFill)
, textEmphasisMark(o.textEmphasisMark)
@@ -287,7 +287,7 @@
&& textSizeAdjust == o.textSizeAdjust
#endif
&& userSelect == o.userSelect
- && speak == o.speak
+ && speakAs == o.speakAs
&& hyphens == o.hyphens
&& hyphenationLimitBefore == o.hyphenationLimitBefore
&& hyphenationLimitAfter == o.hyphenationLimitAfter
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (226431 => 226432)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -95,7 +95,7 @@
unsigned lineBreak : 3; // LineBreak
unsigned userSelect : 2; // EUserSelect
unsigned colorSpace : 1; // ColorSpace
- unsigned speak : 3; // ESpeak
+ unsigned speakAs : 4; // ESpeakAs
unsigned hyphens : 2; // Hyphens
unsigned textEmphasisFill : 1; // TextEmphasisFill
unsigned textEmphasisMark : 3; // TextEmphasisMark
Modified: trunk/Tools/ChangeLog (226431 => 226432)
--- trunk/Tools/ChangeLog 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/ChangeLog 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1,3 +1,31 @@
+2018-01-04 Chris Fleizach <[email protected]>
+
+ AX: Implement updated CSS3 Speech for 'speak' and 'speak-as' properties
+ https://bugs.webkit.org/show_bug.cgi?id=180361
+
+ Reviewed by Zalan Bujtas.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (speakAsCallback):
+ (AccessibilityUIElement::speakAs):
+ (AccessibilityUIElement::getJSClass):
+ (speakCallback): Deleted.
+ (AccessibilityUIElement::speak): Deleted.
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::speakAs):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::speakAs):
+ (AccessibilityUIElement::speak): Deleted.
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+ (WTR::AccessibilityUIElement::speakAs):
+ (WTR::AccessibilityUIElement::speak): Deleted.
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::speakAs):
+ (WTR::AccessibilityUIElement::speak): Deleted.
+
2018-01-04 Jonathan Bedard <[email protected]>
REGRESSION (r226395): test-webkitperl test expectations incorrect
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (226431 => 226432)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1319,10 +1319,10 @@
return JSValueMakeBoolean(context, toAXElement(thisObject)->isIgnored());
}
-static JSValueRef speakCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+static JSValueRef speakAsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
{
- JSRetainPtr<JSStringRef> speakString(Adopt, toAXElement(thisObject)->speak());
- return JSValueMakeString(context, speakString.get());
+ JSRetainPtr<JSStringRef> speakAsString(Adopt, toAXElement(thisObject)->speakAs());
+ return JSValueMakeString(context, speakAsString.get());
}
static JSValueRef selectedChildrenCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
@@ -1527,7 +1527,6 @@
// Unsupported methods on various platforms.
#if !PLATFORM(MAC) || PLATFORM(IOS)
-JSStringRef AccessibilityUIElement::speak() { return 0; }
JSStringRef AccessibilityUIElement::rangeForLine(int line) { return 0; }
JSStringRef AccessibilityUIElement::rangeForPosition(int, int) { return 0; }
void AccessibilityUIElement::setSelectedChild(AccessibilityUIElement*) const { }
@@ -1557,6 +1556,7 @@
#endif
#if !PLATFORM(MAC)
+JSStringRef AccessibilityUIElement::speakAs() { return nullptr; }
void AccessibilityUIElement::setBoolAttributeValue(JSStringRef, bool) { }
#endif
@@ -1801,7 +1801,7 @@
{ "ariaDropEffects", getARIADropEffectsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "classList", getClassListCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isIgnored", isIgnoredCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "speak", speakCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "speakAs", speakAsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "selectedChildrenCount", selectedChildrenCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "horizontalScrollbar", horizontalScrollbarCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "verticalScrollbar", verticalScrollbarCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (226431 => 226432)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -173,7 +173,7 @@
JSStringRef classList() const;
// CSS3-speech properties.
- JSStringRef speak();
+ JSStringRef speakAs();
// Table-specific attributes
JSStringRef attributesOfColumnHeaders();
Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (226431 => 226432)
--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm 2018-01-05 00:32:53 UTC (rev 226432)
@@ -101,6 +101,7 @@
- (BOOL)accessibilityIsExpanded;
- (NSUInteger)accessibilityBlockquoteLevel;
- (NSArray *)accessibilityFindMatchingObjects:(NSDictionary *)parameters;
+- (NSArray *)accessibilitySpeechHint;
// TextMarker related
- (NSArray *)textMarkerRange;
@@ -357,6 +358,11 @@
[m_element accessibilityModifySelection:WebCore::CharacterGranularity increase:NO];
}
+JSStringRef AccessibilityUIElement::speakAs()
+{
+ return [[[m_element accessibilitySpeechHint] componentsJoinedByString:@", "] createJSStringRef];
+}
+
JSStringRef AccessibilityUIElement::stringForSelection()
{
NSString *stringForRange = [m_element selectionRangeString];
Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (226431 => 226432)
--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2018-01-05 00:32:53 UTC (rev 226432)
@@ -894,12 +894,12 @@
return 0;
}
-JSStringRef AccessibilityUIElement::speak()
+JSStringRef AccessibilityUIElement::speakAs()
{
BEGIN_AX_OBJC_EXCEPTIONS
id value = [m_element accessibilityAttributeValue:@"AXDRTSpeechAttribute"];
- if ([value isKindOfClass:[NSString class]])
- return [value createJSStringRef];
+ if ([value isKindOfClass:[NSArray class]])
+ return [[value componentsJoinedByString:@", "] createJSStringRef];
END_AX_OBJC_EXCEPTIONS
return nullptr;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (226431 => 226432)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2018-01-05 00:32:53 UTC (rev 226432)
@@ -168,7 +168,7 @@
JSRetainPtr<JSStringRef> classList() const;
// CSS3-speech properties.
- JSRetainPtr<JSStringRef> speak();
+ JSRetainPtr<JSStringRef> speakAs();
// Table-specific attributes
JSRetainPtr<JSStringRef> attributesOfColumnHeaders();
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (226431 => 226432)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2018-01-05 00:32:53 UTC (rev 226432)
@@ -53,7 +53,7 @@
readonly attribute DOMString helpText;
readonly attribute DOMString valueDescription;
readonly attribute DOMString url;
- readonly attribute DOMString speak;
+ readonly attribute DOMString speakAs;
readonly attribute DOMString orientation;
readonly attribute long insertionPointLineNumber;
readonly attribute DOMString selectedTextRange;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (226431 => 226432)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1688,7 +1688,7 @@
return 0;
}
-JSRetainPtr<JSStringRef> AccessibilityUIElement::speak()
+JSRetainPtr<JSStringRef> AccessibilityUIElement::speakAs()
{
// FIXME: implement
return JSStringCreateWithCharacters(0, 0);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (226431 => 226432)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2018-01-05 00:32:53 UTC (rev 226432)
@@ -79,6 +79,7 @@
- (BOOL)accessibilityIsExpanded;
- (NSUInteger)accessibilityBlockquoteLevel;
- (NSArray *)accessibilityFindMatchingObjects:(NSDictionary *)parameters;
+- (NSArray<NSString *> *)accessibilitySpeechHint;
// TextMarker related
- (NSArray *)textMarkerRange;
@@ -597,9 +598,9 @@
return nullptr;
}
-JSRetainPtr<JSStringRef> AccessibilityUIElement::speak()
+JSRetainPtr<JSStringRef> AccessibilityUIElement::speakAs()
{
- return nullptr;
+ return [[[m_element accessibilitySpeechHint] componentsJoinedByString:@", "] createJSStringRef];
}
bool AccessibilityUIElement::ariaIsGrabbed() const
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (226431 => 226432)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2018-01-05 00:18:27 UTC (rev 226431)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2018-01-05 00:32:53 UTC (rev 226432)
@@ -1003,12 +1003,12 @@
return nullptr;
}
-JSRetainPtr<JSStringRef> AccessibilityUIElement::speak()
+JSRetainPtr<JSStringRef> AccessibilityUIElement::speakAs()
{
BEGIN_AX_OBJC_EXCEPTIONS
id value = [m_element accessibilityAttributeValue:@"AXDRTSpeechAttribute"];
- if ([value isKindOfClass:[NSString class]])
- return [value createJSStringRef];
+ if ([value isKindOfClass:[NSArray class]])
+ return [[(NSArray *)value componentsJoinedByString:@", "] createJSStringRef];
END_AX_OBJC_EXCEPTIONS
return nullptr;