Changeset 228390 in webkit
- Timestamp:
- Feb 12, 2018 12:40:23 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r228384 r228390 1 2018-02-12 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r228376. 4 5 This caused accessibility/mac/selection-notification-focus- 6 change.html to become flaky on macOS. 7 8 Reverted changeset: 9 10 "AX: defer focusedUIElement notifications" 11 https://bugs.webkit.org/show_bug.cgi?id=182643 12 https://trac.webkit.org/changeset/228376 13 1 14 2018-02-12 Per Arne Vollan <pvollan@apple.com> 2 15 -
trunk/LayoutTests/accessibility/mac/aria-menu-item-selected-notification.html
r228376 r228390 47 47 document.getElementById("item1").focus(); 48 48 49 setTimeout(function() { 50 // Trigger notification through aria-selected. 51 document.getElementById("item2").setAttribute("aria-selected", "true"); 49 // Trigger notification through aria-selected. 50 document.getElementById("item2").setAttribute("aria-selected", "true"); 52 51 53 setTimeout(function() { 54 // Ensure we don't get a notification when aria-selected is false. 55 document.getElementById("item2").setAttribute("aria-selected", "false"); 52 // Ensure we don't get a notification when aria-selected is false. 53 document.getElementById("item2").setAttribute("aria-selected", "false"); 56 54 57 setTimeout(function() { 58 // Trigger another notification through focus to ensure we don't 59 document.getElementById("item3").focus(); 60 }, 1); 61 }, 1); 62 }, 1); 55 // Trigger another notification through focus to ensure we don't 56 document.getElementById("item3").focus(); 63 57 } 64 58 -
trunk/LayoutTests/accessibility/mac/selection-notification-focus-change-expected.txt
r228376 r228390 17 17 18 18 eventSender.keyDown(tabCharacter) 19 Received AXFocusChanged 19 20 Received AXSelectedTextChanged 20 21 PASS userInfo["AXTextSelectionChangedFocus"] is true 21 Received AXFocusChanged22 22 Received AXSelectedTextChanged 23 23 PASS userInfo["AXTextSelectionChangedFocus"] is true -
trunk/Source/WebCore/ChangeLog
r228389 r228390 1 2018-02-12 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r228376. 4 5 This caused accessibility/mac/selection-notification-focus- 6 change.html to become flaky on macOS. 7 8 Reverted changeset: 9 10 "AX: defer focusedUIElement notifications" 11 https://bugs.webkit.org/show_bug.cgi?id=182643 12 https://trac.webkit.org/changeset/228376 13 1 14 2018-02-12 Ryan Haddad <ryanhaddad@apple.com> 2 15 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r228376 r228390 1016 1016 1017 1017 postNotification(getOrCreate(node), &document(), AXMenuListItemSelected); 1018 }1019 1020 void AXObjectCache::deferFocusedUIElementChangeIfNeeded(Node* oldNode, Node* newNode)1021 {1022 if (nodeAndRendererAreValid(newNode) && rendererNeedsDeferredUpdate(*newNode->renderer()))1023 m_deferredFocusedNodeChange.append({ oldNode, newNode });1024 else1025 handleFocusedUIElementChanged(oldNode, newNode);1026 1018 } 1027 1019 … … 2786 2778 } 2787 2779 2788 static void conditionallyAddNodeToFilterList(Node* node, const Document& document, HashSet<Node*>& nodesToRemove)2789 {2790 if (!node->isConnected() || &node->document() == &document)2791 nodesToRemove.add(node);2792 }2793 2794 template<typename T>2795 static void filterVectorPairForRemoval(const Vector<std::pair<T, T>>& list, const Document& document, HashSet<Node*>& nodesToRemove)2796 {2797 for (auto& entry : list) {2798 conditionallyAddNodeToFilterList(entry.first, document, nodesToRemove);2799 conditionallyAddNodeToFilterList(entry.second, document, nodesToRemove);2800 }2801 }2802 2803 2780 template<typename T, typename U> 2804 2781 static void filterMapForRemoval(const HashMap<T, U>& list, const Document& document, HashSet<Node*>& nodesToRemove) 2805 2782 { 2806 for (auto& entry : list) 2807 conditionallyAddNodeToFilterList(entry.key, document, nodesToRemove); 2783 for (auto& entry : list) { 2784 auto* node = entry.key; 2785 if (node->isConnected() && &node->document() != &document) 2786 continue; 2787 nodesToRemove.add(node); 2788 } 2808 2789 } 2809 2790 … … 2811 2792 static void filterListForRemoval(const ListHashSet<T>& list, const Document& document, HashSet<Node*>& nodesToRemove) 2812 2793 { 2813 for (auto* node : list) 2814 conditionallyAddNodeToFilterList(node, document, nodesToRemove); 2794 for (auto* node : list) { 2795 if (node->isConnected() && &node->document() != &document) 2796 continue; 2797 nodesToRemove.add(node); 2798 } 2815 2799 } 2816 2800 … … 2825 2809 filterMapForRemoval(m_deferredTextFormControlValue, document, nodesToRemove); 2826 2810 filterMapForRemoval(m_deferredAttributeChange, document, nodesToRemove); 2827 filterVectorPairForRemoval(m_deferredFocusedNodeChange, document, nodesToRemove);2828 2811 2829 2812 for (auto* node : nodesToRemove) … … 2869 2852 handleAttributeChange(deferredAttributeChangeContext.value, deferredAttributeChangeContext.key); 2870 2853 m_deferredAttributeChange.clear(); 2871 2872 for (auto& deferredFocusedChangeContext : m_deferredFocusedNodeChange)2873 handleFocusedUIElementChanged(deferredFocusedChangeContext.first, deferredFocusedChangeContext.second);2874 m_deferredFocusedNodeChange.clear();2875 2854 } 2876 2855 -
trunk/Source/WebCore/accessibility/AXObjectCache.h
r228376 r228390 169 169 void childrenChanged(AccessibilityObject*); 170 170 void checkedStateChanged(Node*); 171 void selectedChildrenChanged(Node*); 172 void selectedChildrenChanged(RenderObject*); 173 // Called by a node when text or a text equivalent (e.g. alt) attribute is changed. 174 void textChanged(Node*); 171 175 // Called when a node has just been attached, so we can make sure we have the right subclass of AccessibilityObject. 172 176 void updateCacheAfterNodeIsAttached(Node*); 173 177 174 void deferFocusedUIElementChangeIfNeeded(Node* oldFocusedNode, Node* newFocusedNode); 178 void handleActiveDescendantChanged(Node*); 179 void handleAriaRoleChanged(Node*); 180 void handleFocusedUIElementChanged(Node* oldFocusedNode, Node* newFocusedNode); 175 181 void handleScrolledToAnchor(const Node* anchorNode); 182 void handleAriaExpandedChange(Node*); 176 183 void handleScrollbarUpdate(ScrollView*); 177 184 185 void handleModalChange(Node*); 178 186 Node* modalNode(); 179 187 … … 404 412 void handleAttributeChange(const QualifiedName&, Element*); 405 413 bool shouldProcessAttributeChange(const QualifiedName&, Element*); 406 void selectedChildrenChanged(Node*); 407 void selectedChildrenChanged(RenderObject*); 408 // Called by a node when text or a text equivalent (e.g. alt) attribute is changed. 409 void textChanged(Node*); 410 void handleActiveDescendantChanged(Node*); 411 void handleAriaRoleChanged(Node*); 412 void handleAriaExpandedChange(Node*); 413 void handleFocusedUIElementChanged(Node* oldFocusedNode, Node* newFocusedNode); 414 414 415 415 // aria-modal related 416 416 void findModalNodes(); 417 417 void updateCurrentModalNode(); 418 418 bool isNodeVisible(Node*) const; 419 void handleModalChange(Node*);420 419 421 420 Document& m_document; … … 451 450 HashMap<Element*, String> m_deferredTextFormControlValue; 452 451 HashMap<Element*, QualifiedName> m_deferredAttributeChange; 453 Vector<std::pair<Node*, Node*>> m_deferredFocusedNodeChange;454 452 bool m_isSynchronizingSelection { false }; 455 453 bool m_performingDeferredCacheUpdate { false }; -
trunk/Source/WebCore/dom/Document.cpp
r228387 r228390 3969 3969 // Create the AXObject cache in a focus change because GTK relies on it. 3970 3970 if (AXObjectCache* cache = axObjectCache()) 3971 cache-> deferFocusedUIElementChangeIfNeeded(oldFocusedElement.get(), newFocusedElement.get());3971 cache->handleFocusedUIElementChanged(oldFocusedElement.get(), newFocusedElement.get()); 3972 3972 } 3973 3973
Note: See TracChangeset
for help on using the changeset viewer.