Changeset 234112 in webkit
- Timestamp:
- Jul 23, 2018 2:24:19 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r234109 r234112 1 2018-07-23 Nan Wang <n_wang@apple.com> 2 3 AX: Press tab to highlight items on a webpage is not working with voiceover enabled 4 https://bugs.webkit.org/show_bug.cgi?id=187824 5 6 Reviewed by Zalan Bujtas. 7 8 * accessibility/mac/tab-focus-post-notification-expected.txt: Added. 9 * accessibility/mac/tab-focus-post-notification.html: Added. 10 1 11 2018-07-23 Antoine Quint <graouts@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r234111 r234112 1 2018-07-23 Nan Wang <n_wang@apple.com> 2 3 AX: Press tab to highlight items on a webpage is not working with voiceover enabled 4 https://bugs.webkit.org/show_bug.cgi?id=187824 5 6 Reviewed by Zalan Bujtas. 7 8 We are deferring posting focused element change notification when the document needs a 9 style recalculation. However, we only perform the cache update after a layout is completed. 10 Added a timer to perform the cache update in the next runloop when non-layout type of mutation 11 happens. 12 13 Test: accessibility/mac/tab-focus-post-notification.html 14 15 * accessibility/AXObjectCache.cpp: 16 (WebCore::AXObjectCache::AXObjectCache): 17 (WebCore::AXObjectCache::~AXObjectCache): 18 (WebCore::AXObjectCache::deferFocusedUIElementChangeIfNeeded): 19 (WebCore::AXObjectCache::performCacheUpdateTimerFired): 20 * accessibility/AXObjectCache.h: 21 (WebCore::AXObjectCache::AXObjectCache): 22 (WebCore::AXObjectCache::performCacheUpdateTimerFired): 23 1 24 2018-07-23 Chris Dumez <cdumez@apple.com> 2 25 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r233699 r234112 211 211 , m_focusModalNodeTimer(*this, &AXObjectCache::focusModalNodeTimerFired) 212 212 , m_currentModalNode(nullptr) 213 , m_performCacheUpdateTimer(*this, &AXObjectCache::performCacheUpdateTimerFired) 213 214 { 214 215 findModalNodes(); … … 220 221 m_liveRegionChangedPostTimer.stop(); 221 222 m_focusModalNodeTimer.stop(); 223 m_performCacheUpdateTimer.stop(); 222 224 223 225 for (const auto& object : m_objects.values()) { … … 1023 1025 void AXObjectCache::deferFocusedUIElementChangeIfNeeded(Node* oldNode, Node* newNode) 1024 1026 { 1025 if (nodeAndRendererAreValid(newNode) && rendererNeedsDeferredUpdate(*newNode->renderer())) 1027 if (nodeAndRendererAreValid(newNode) && rendererNeedsDeferredUpdate(*newNode->renderer())) { 1026 1028 m_deferredFocusedNodeChange.append({ oldNode, newNode }); 1027 else 1029 if (!newNode->renderer()->needsLayout() && !m_performCacheUpdateTimer.isActive()) 1030 m_performCacheUpdateTimer.startOneShot(0_s); 1031 } else 1028 1032 handleFocusedUIElementChanged(oldNode, newNode); 1029 1033 } … … 2854 2858 return axObject && axObject->isTextControl(); 2855 2859 } 2860 2861 void AXObjectCache::performCacheUpdateTimerFired() 2862 { 2863 // If there's a pending layout, let the layout trigger the AX update. 2864 if (!document().view() || document().view()->needsLayout()) 2865 return; 2866 2867 performDeferredCacheUpdate(); 2868 } 2856 2869 2857 2870 void AXObjectCache::performDeferredCacheUpdate() -
trunk/Source/WebCore/accessibility/AXObjectCache.h
r228607 r234112 393 393 394 394 void focusModalNodeTimerFired(); 395 396 void performCacheUpdateTimerFired(); 395 397 396 398 void postTextStateChangeNotification(AccessibilityObject*, const AXTextStateChangeIntent&, const VisibleSelection&); … … 444 446 Node* m_currentModalNode; 445 447 ListHashSet<Node*> m_modalNodesSet; 448 449 Timer m_performCacheUpdateTimer; 446 450 447 451 AXTextStateChangeIntent m_textSelectionIntent; … … 477 481 inline void AccessibilityReplacedText::postTextStateChangeNotification(AXObjectCache*, AXTextEditType, const String&, const VisibleSelection&) { } 478 482 inline void AXComputedObjectAttributeCache::setIgnored(AXID, AccessibilityObjectInclusion) { } 479 inline AXObjectCache::AXObjectCache(Document& document) : m_document(document), m_notificationPostTimer(*this, &AXObjectCache::notificationPostTimerFired), m_passwordNotificationPostTimer(*this, &AXObjectCache::passwordNotificationPostTimerFired), m_liveRegionChangedPostTimer(*this, &AXObjectCache::liveRegionChangedNotificationPostTimerFired), m_focusModalNodeTimer(*this, &AXObjectCache::focusModalNodeTimerFired ) { }483 inline AXObjectCache::AXObjectCache(Document& document) : m_document(document), m_notificationPostTimer(*this, &AXObjectCache::notificationPostTimerFired), m_passwordNotificationPostTimer(*this, &AXObjectCache::passwordNotificationPostTimerFired), m_liveRegionChangedPostTimer(*this, &AXObjectCache::liveRegionChangedNotificationPostTimerFired), m_focusModalNodeTimer(*this, &AXObjectCache::focusModalNodeTimerFired, m_performCacheUpdateTimer(*this, &AXObjectCache::performCacheUpdateTimerFired)) { } 480 484 inline AXObjectCache::~AXObjectCache() { } 481 485 inline AccessibilityObject* AXObjectCache::focusedUIElementForPage(const Page*) { return nullptr; } … … 508 512 inline void AXObjectCache::detachWrapper(AccessibilityObject*, AccessibilityDetachmentType) { } 509 513 inline void AXObjectCache::focusModalNodeTimerFired() { } 514 inline void AXObjectCache::performCacheUpdateTimerFired() { } 510 515 inline void AXObjectCache::frameLoadingEventNotification(Frame*, AXLoadingEvent) { } 511 516 inline void AXObjectCache::frameLoadingEventPlatformNotification(AccessibilityObject*, AXLoadingEvent) { }
Note: See TracChangeset
for help on using the changeset viewer.