Changeset 229452 in webkit
- Timestamp:
- Mar 8, 2018 11:35:52 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229451 r229452 1 2018-03-08 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: More accessibility events support 4 https://bugs.webkit.org/show_bug.cgi?id=183023 5 <rdar://problem/37764380> 6 7 Reviewed by Chris Fleizach. 8 9 * accessibility/mac/AOM-events-webarea-crash-expected.txt: Added. 10 * accessibility/mac/AOM-events-webarea-crash.html: Added. 11 1 12 2018-03-08 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r229448 r229452 1 2018-03-08 Nan Wang <n_wang@apple.com> 2 3 AX: AOM: More accessibility events support 4 https://bugs.webkit.org/show_bug.cgi?id=183023 5 <rdar://problem/37764380> 6 7 Reviewed by Chris Fleizach. 8 9 Fixed the crash that we shouldn't dispatch the accessibility events if the 10 event path is empty. 11 12 Also added a check to not dispatch events if the runtime flag is not enabled. 13 14 Test: accessibility/mac/AOM-events-webarea-crash.html 15 16 * accessibility/AccessibilityObject.cpp: 17 (WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const): 18 (WebCore::AccessibilityObject::dispatchAccessibilityEvent const): 19 * accessibility/AccessibilityObject.h: 20 1 21 2018-03-08 Megan Gardner <megan_gardner@apple.com> 2 22 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r229310 r229452 71 71 #include "RenderWidget.h" 72 72 #include "RenderedPosition.h" 73 #include "RuntimeEnabledFeatures.h" 73 74 #include "Settings.h" 74 75 #include "TextCheckerClient.h" … … 2153 2154 } 2154 2155 2156 bool AccessibilityObject::shouldDispatchAccessibilityEvent() const 2157 { 2158 return RuntimeEnabledFeatures::sharedFeatures().accessibilityObjectModelEnabled(); 2159 } 2160 2155 2161 bool AccessibilityObject::dispatchAccessibilityEvent(Event& event) const 2156 2162 { 2163 if (!shouldDispatchAccessibilityEvent()) 2164 return false; 2165 2157 2166 Vector<Element*> eventPath; 2158 2167 for (auto* parentObject = this; parentObject; parentObject = parentObject->parentObject()) { … … 2162 2171 eventPath.append(parentElement); 2163 2172 } 2173 2174 if (!eventPath.size()) 2175 return false; 2164 2176 2165 2177 EventDispatcher::dispatchEvent(eventPath, event); -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r229310 r229452 907 907 bool hasTagName(const QualifiedName&) const; 908 908 909 bool shouldDispatchAccessibilityEvent() const; 909 910 bool dispatchAccessibilityEvent(Event&) const; 910 911 bool dispatchAccessibilityEventWithType(AccessibilityEventType) const;
Note: See TracChangeset
for help on using the changeset viewer.