Changeset 68680 in webkit
- Timestamp:
- Sep 29, 2010 12:59:56 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r68678 r68680 1 2010-09-29 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Darin Adler. 4 5 AX: implement CSS3 Speech "speak" 6 https://bugs.webkit.org/show_bug.cgi?id=46827 7 8 * platform/mac/accessibility/css-speech-speak-expected.txt: Added. 9 * platform/mac/accessibility/css-speech-speak.html: Added. 10 1 11 2010-09-29 David Hyatt <hyatt@apple.com> 2 12 -
trunk/WebCore/ChangeLog
r68679 r68680 1 2010-09-29 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Darin Adler. 4 5 AX: implement CSS3 Speech "speak" 6 https://bugs.webkit.org/show_bug.cgi?id=46827 7 8 Support the "speak" style as defined in 9 http://www.w3.org/TR/css3-speech/#speak 10 11 This puts all the pieces in place for a platform to support this ability, but there's no platform implementation yet. 12 13 Test: platform/mac/accessibility/css-speech-speak.html 14 15 * accessibility/AccessibilityObject.h: 16 (WebCore::AccessibilityObject::speakProperty): 17 * accessibility/AccessibilityRenderObject.cpp: 18 (WebCore::AccessibilityRenderObject::speakProperty): 19 * accessibility/AccessibilityRenderObject.h: 20 * accessibility/mac/AccessibilityObjectWrapper.mm: 21 (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 22 * css/CSSComputedStyleDeclaration.cpp: 23 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 24 * css/CSSPrimitiveValueMappings.h: 25 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 26 (WebCore::CSSPrimitiveValue::operator ESpeak): 27 * css/CSSPropertyNames.in: 28 * css/CSSStyleSelector.cpp: 29 (WebCore::CSSStyleSelector::applyProperty): 30 * css/CSSValueKeywords.in: 31 * rendering/style/RenderStyle.h: 32 (WebCore::InheritedFlags::speak): 33 (WebCore::InheritedFlags::setSpeak): 34 (WebCore::InheritedFlags::initialSpeak): 35 * rendering/style/RenderStyleConstants.h: 36 * rendering/style/StyleRareInheritedData.cpp: 37 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 38 (WebCore::StyleRareInheritedData::operator==): 39 * rendering/style/StyleRareInheritedData.h: 40 1 41 2010-09-29 João Paulo Rechi Vita <jprvita@profusion.mobi> 2 42 -
trunk/WebCore/accessibility/AccessibilityObject.h
r67383 r68680 537 537 bool supportsARIAAttributes() const; 538 538 539 // CSS3 Speech properties. 540 virtual ESpeak speakProperty() const { return SpeakNormal; } 541 539 542 #if HAVE(ACCESSIBILITY) 540 543 #if PLATFORM(GTK) -
trunk/WebCore/accessibility/AccessibilityRenderObject.cpp
r67653 r68680 1488 1488 } 1489 1489 1490 ESpeak AccessibilityRenderObject::speakProperty() const 1491 { 1492 if (!m_renderer) 1493 return AccessibilityObject::speakProperty(); 1494 1495 return m_renderer->style()->speak(); 1496 } 1497 1490 1498 void AccessibilityRenderObject::addRadioButtonGroupMembers(AccessibilityChildrenVector& linkedUIElements) const 1491 1499 { -
trunk/WebCore/accessibility/AccessibilityRenderObject.h
r68078 r68680 302 302 void elementsFromAttribute(Vector<Element*>& elements, const QualifiedName& name) const; 303 303 304 virtual ESpeak speakProperty() const; 305 304 306 virtual const AtomicString& ariaLiveRegionStatus() const; 305 307 virtual const AtomicString& ariaLiveRegionRelevant() const; -
trunk/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
r68541 r68680 1909 1909 return [NSValue valueWithPoint:m_object->clickPoint()]; 1910 1910 1911 // This is used by DRT to verify CSS3 speech works. 1912 if ([attributeName isEqualToString:@"AXDRTSpeechAttribute"]) { 1913 ESpeak speakProperty = m_object->speakProperty(); 1914 switch (speakProperty) { 1915 case SpeakNone: 1916 return @"none"; 1917 case SpeakSpellOut: 1918 return @"spell-out"; 1919 case SpeakDigits: 1920 return @"digits"; 1921 case SpeakLiteralPunctuation: 1922 return @"literal-punctuation"; 1923 case SpeakNoPunctuation: 1924 return @"no-punctuation"; 1925 default: 1926 case SpeakNormal: 1927 return @"normal"; 1928 } 1929 } 1930 1911 1931 return nil; 1912 1932 } -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r68561 r68680 124 124 CSSPropertyResize, 125 125 CSSPropertyRight, 126 CSSPropertySpeak, 126 127 CSSPropertyTableLayout, 127 128 CSSPropertyTextAlign, … … 1410 1411 return CSSPrimitiveValue::create(rect.release()); 1411 1412 } 1413 case CSSPropertySpeak: 1414 return CSSPrimitiveValue::create(style->speak()); 1412 1415 case CSSPropertyWebkitTransform: 1413 1416 return computedTransform(renderer, style.get()); -
trunk/WebCore/css/CSSPrimitiveValueMappings.h
r68640 r68680 2731 2731 } 2732 2732 2733 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ESpeak e) 2734 : m_type(CSS_IDENT) 2735 , m_hasCachedCSSText(false) 2736 { 2737 switch (e) { 2738 case SpeakNone: 2739 m_value.ident = CSSValueNone; 2740 break; 2741 case SpeakNormal: 2742 m_value.ident = CSSValueNormal; 2743 break; 2744 case SpeakSpellOut: 2745 m_value.ident = CSSValueSpellOut; 2746 break; 2747 case SpeakDigits: 2748 m_value.ident = CSSValueDigits; 2749 break; 2750 case SpeakLiteralPunctuation: 2751 m_value.ident = CSSValueLiteralPunctuation; 2752 break; 2753 case SpeakNoPunctuation: 2754 m_value.ident = CSSValueNoPunctuation; 2755 break; 2756 } 2757 } 2758 2759 template<> inline CSSPrimitiveValue::operator ESpeak() const 2760 { 2761 switch (m_value.ident) { 2762 case CSSValueNone: 2763 return SpeakNone; 2764 case CSSValueNormal: 2765 return SpeakNormal; 2766 case CSSValueSpellOut: 2767 return SpeakSpellOut; 2768 case CSSValueDigits: 2769 return SpeakDigits; 2770 case CSSValueLiteralPunctuation: 2771 return SpeakLiteralPunctuation; 2772 case CSSValueNoPunctuation: 2773 return SpeakNoPunctuation; 2774 default: 2775 ASSERT_NOT_REACHED(); 2776 return SpeakNormal; 2777 } 2778 } 2779 2733 2780 #endif 2734 2781 -
trunk/WebCore/css/CSSPropertyNames.in
r68561 r68680 124 124 size 125 125 src 126 speak 126 127 table-layout 127 128 text-align -
trunk/WebCore/css/CSSStyleSelector.cpp
r68561 r68680 5484 5484 applyPageSizeProperty(value); 5485 5485 return; 5486 5487 case CSSPropertySpeak: 5488 HANDLE_INHERIT_AND_INITIAL(speak, Speak); 5489 m_style->setSpeak(*primitiveValue); 5490 return; 5491 5486 5492 case CSSPropertyInvalid: 5487 5493 return; -
trunk/WebCore/css/CSSValueKeywords.in
r68640 r68680 715 715 716 716 # 717 # CSS_PROP_SPEECH 718 # 719 spell-out 720 digits 721 literal-punctuation 722 no-punctuation 723 724 # 717 725 # -webkit-font-smoothing 718 726 # -
trunk/WebCore/rendering/style/RenderStyle.h
r68561 r68680 746 746 bool isVerticalBlockFlow() const { return blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow; } 747 747 748 ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); } 749 748 750 // attribute setter methods 749 751 … … 1038 1040 void setTransformOriginY(Length l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_y, l); } 1039 1041 void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m_transform, m_z, f); } 1042 void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); } 1040 1043 // End CSS3 Setters 1041 1044 … … 1227 1230 static EMatchNearestMailBlockquoteColor initialMatchNearestMailBlockquoteColor() { return BCNORMAL; } 1228 1231 static const AtomicString& initialHighlight() { return nullAtom; } 1232 static ESpeak initialSpeak() { return SpeakNormal; } 1229 1233 static Hyphens initialHyphens() { return HyphensManual; } 1230 1234 static const AtomicString& initialHyphenationString() { return nullAtom; } -
trunk/WebCore/rendering/style/RenderStyleConstants.h
r67667 r68680 416 416 enum Hyphens { HyphensNone, HyphensManual, HyphensAuto }; 417 417 418 enum ESpeak { SpeakNone, SpeakNormal, SpeakSpellOut, SpeakDigits, SpeakLiteralPunctuation, SpeakNoPunctuation }; 419 418 420 } // namespace WebCore 419 421 -
trunk/WebCore/rendering/style/StyleRareInheritedData.cpp
r64677 r68680 45 45 , userSelect(RenderStyle::initialUserSelect()) 46 46 , colorSpace(DeviceColorSpace) 47 , speak(SpeakNormal) 47 48 , hyphens(HyphensManual) 48 49 { … … 71 72 , userSelect(o.userSelect) 72 73 , colorSpace(o.colorSpace) 74 , speak(o.speak) 73 75 , hyphens(o.hyphens) 74 76 , hyphenationString(o.hyphenationString) … … 113 115 && userSelect == o.userSelect 114 116 && colorSpace == o.colorSpace 117 && speak == o.speak 115 118 && hyphens == o.hyphens 116 119 && hyphenationString == o.hyphenationString -
trunk/WebCore/rendering/style/StyleRareInheritedData.h
r65077 r68680 78 78 unsigned userSelect : 1; // EUserSelect 79 79 unsigned colorSpace : 1; // ColorSpace 80 unsigned speak : 3; // ESpeak 80 81 unsigned hyphens : 2; // Hyphens 81 82 -
trunk/WebKitTools/ChangeLog
r68673 r68680 1 2010-09-29 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Darin Adler. 4 5 AX: implement CSS3 Speech "speak" 6 https://bugs.webkit.org/show_bug.cgi?id=46827 7 8 * DumpRenderTree/AccessibilityUIElement.cpp: 9 (speakCallback): 10 (AccessibilityUIElement::speak): 11 (AccessibilityUIElement::getJSClass): 12 * DumpRenderTree/AccessibilityUIElement.h: 13 * DumpRenderTree/mac/AccessibilityUIElementMac.mm: 14 (AccessibilityUIElement::speak): 15 1 16 2010-09-29 Mihai Parparita <mihaip@chromium.org> 2 17 -
trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
r67408 r68680 680 680 } 681 681 682 static JSValueRef speakCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*) 683 { 684 JSRetainPtr<JSStringRef> speakString(Adopt, toAXElement(thisObject)->speak()); 685 return JSValueMakeString(context, speakString.get()); 686 } 687 682 688 static JSValueRef getHasPopupCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*) 683 689 { … … 737 743 738 744 // Implementation 745 746 // Unsupported methods on various platforms. 747 #if !PLATFORM(MAC) 748 JSStringRef AccessibilityUIElement::speak() { return 0; } 749 #endif 739 750 740 751 #if !SUPPORTS_AX_TEXTMARKERS … … 838 849 { "ariaDropEffects", getARIADropEffectsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 839 850 { "isIgnored", isIgnoredCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 851 { "speak", speakCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 840 852 { 0, 0, 0, 0 } 841 853 }; -
trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
r67408 r68680 148 148 JSStringRef url(); 149 149 150 // CSS3-speech properties. 151 JSStringRef speak(); 152 150 153 // Table-specific attributes 151 154 JSStringRef attributesOfColumnHeaders(); -
trunk/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
r67408 r68680 781 781 } 782 782 783 JSStringRef AccessibilityUIElement::speak() 784 { 785 BEGIN_AX_OBJC_EXCEPTIONS 786 id value = [m_element accessibilityAttributeValue:@"AXDRTSpeechAttribute"]; 787 if ([value isKindOfClass:[NSString class]]) 788 return [value createJSStringRef]; 789 END_AX_OBJC_EXCEPTIONS 790 791 return 0; 792 } 793 783 794 bool AccessibilityUIElement::ariaIsGrabbed() const 784 795 {
Note: See TracChangeset
for help on using the changeset viewer.