Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014, Google Inc. All rights reserved. 2 * Copyright (C) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 focusedNode = focusedDocument; 171 focusedNode = focusedDocument;
172 172
173 // If it's an image map, get the focused link within the image map. 173 // If it's an image map, get the focused link within the image map.
174 if (isHTMLAreaElement(focusedNode)) 174 if (isHTMLAreaElement(focusedNode))
175 return focusedImageMapUIElement(toHTMLAreaElement(focusedNode)); 175 return focusedImageMapUIElement(toHTMLAreaElement(focusedNode));
176 176
177 // See if there's a page popup, for example a calendar picker. 177 // See if there's a page popup, for example a calendar picker.
178 Element* adjustedFocusedElement = focusedDocument->adjustedFocusedElement(); 178 Element* adjustedFocusedElement = focusedDocument->adjustedFocusedElement();
179 if (isHTMLInputElement(adjustedFocusedElement)) { 179 if (isHTMLInputElement(adjustedFocusedElement)) {
180 if (AXObject* axPopup = toHTMLInputElement(adjustedFocusedElement)->popu pRootAXObject()) { 180 if (AXObject* axPopup = toHTMLInputElement(adjustedFocusedElement)->popu pRootAXObject()) {
181 if (Element* focusedElementInPopup = axPopup->document()->focusedEle ment()) 181 if (Element* focusedElementInPopup = axPopup->getDocument()->focused Element())
182 focusedNode = focusedElementInPopup; 182 focusedNode = focusedElementInPopup;
183 } 183 }
184 184
185 } 185 }
186 186
187 AXObject* obj = getOrCreate(focusedNode); 187 AXObject* obj = getOrCreate(focusedNode);
188 if (!obj) 188 if (!obj)
189 return 0; 189 return 0;
190 190
191 if (obj->shouldFocusActiveDescendant()) { 191 if (obj->shouldFocusActiveDescendant()) {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 continue; 674 continue;
675 675
676 if (obj->isDetached()) 676 if (obj->isDetached())
677 continue; 677 continue;
678 678
679 #if ENABLE(ASSERT) 679 #if ENABLE(ASSERT)
680 // Make sure none of the layout views are in the process of being layed out. 680 // Make sure none of the layout views are in the process of being layed out.
681 // Notifications should only be sent after the layoutObject has finished 681 // Notifications should only be sent after the layoutObject has finished
682 if (obj->isAXLayoutObject()) { 682 if (obj->isAXLayoutObject()) {
683 AXLayoutObject* layoutObj = toAXLayoutObject(obj); 683 AXLayoutObject* layoutObj = toAXLayoutObject(obj);
684 LayoutObject* layoutObject = layoutObj->layoutObject(); 684 LayoutObject* layoutObject = layoutObj->getLayoutObject();
685 if (layoutObject && layoutObject->view()) 685 if (layoutObject && layoutObject->view())
686 ASSERT(!layoutObject->view()->layoutState()); 686 ASSERT(!layoutObject->view()->layoutState());
687 } 687 }
688 #endif 688 #endif
689 689
690 AXNotification notification = m_notificationsToPost[i].second; 690 AXNotification notification = m_notificationsToPost[i].second;
691 postPlatformNotification(obj, notification); 691 postPlatformNotification(obj, notification);
692 692
693 if (notification == AXChildrenChanged && obj->parentObjectIfExists() && obj->lastKnownIsIgnoredValue() != obj->accessibilityIsIgnored()) 693 if (notification == AXChildrenChanged && obj->parentObjectIfExists() && obj->lastKnownIsIgnoredValue() != obj->accessibilityIsIgnored())
694 childrenChanged(obj->parentObject()); 694 childrenChanged(obj->parentObject());
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 if (idsChanged) 772 if (idsChanged)
773 m_ariaOwnerToIdsMapping.set(owner->axObjectID(), newIds); 773 m_ariaOwnerToIdsMapping.set(owner->axObjectID(), newIds);
774 774
775 // 775 //
776 // Now figure out the ids that actually correspond to children that exist an d 776 // Now figure out the ids that actually correspond to children that exist an d
777 // that we can legally own (not cyclical, not already owned, etc.) and updat e 777 // that we can legally own (not cyclical, not already owned, etc.) and updat e
778 // the maps and |ownedChildren| based on that. 778 // the maps and |ownedChildren| based on that.
779 // 779 //
780 780
781 // Figure out the children that are owned by this object and are in the tree . 781 // Figure out the children that are owned by this object and are in the tree .
782 TreeScope& scope = owner->node()->treeScope(); 782 TreeScope& scope = owner->getNode()->treeScope();
783 Vector<AXID> newChildAXIDs; 783 Vector<AXID> newChildAXIDs;
784 for (const String& idName : idVector) { 784 for (const String& idName : idVector) {
785 Element* element = scope.getElementById(AtomicString(idName)); 785 Element* element = scope.getElementById(AtomicString(idName));
786 if (!element) 786 if (!element)
787 continue; 787 continue;
788 788
789 AXObject* child = getOrCreate(element); 789 AXObject* child = getOrCreate(element);
790 if (!child) 790 if (!child)
791 continue; 791 continue;
792 792
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 return false; 1138 return false;
1139 1139
1140 if (!node->isElementNode()) 1140 if (!node->isElementNode())
1141 return false; 1141 return false;
1142 1142
1143 return equalIgnoringCase(toElement(node)->getAttribute(aria_hiddenAttr), "fa lse"); 1143 return equalIgnoringCase(toElement(node)->getAttribute(aria_hiddenAttr), "fa lse");
1144 } 1144 }
1145 1145
1146 void AXObjectCacheImpl::postPlatformNotification(AXObject* obj, AXNotification n otification) 1146 void AXObjectCacheImpl::postPlatformNotification(AXObject* obj, AXNotification n otification)
1147 { 1147 {
1148 if (!obj || !obj->document() || !obj->documentFrameView() || !obj->documentF rameView()->frame().page()) 1148 if (!obj || !obj->getDocument() || !obj->documentFrameView() || !obj->docume ntFrameView()->frame().page())
1149 return; 1149 return;
1150 1150
1151 ChromeClient& client = obj->document()->axObjectCacheOwner().page()->chromeC lient(); 1151 ChromeClient& client = obj->getDocument()->axObjectCacheOwner().page()->chro meClient();
1152 1152
1153 if (notification == AXActiveDescendantChanged 1153 if (notification == AXActiveDescendantChanged
1154 && obj->document()->focusedElement() 1154 && obj->getDocument()->focusedElement()
1155 && obj->node() == obj->document()->focusedElement()) { 1155 && obj->getNode() == obj->getDocument()->focusedElement()) {
1156 // Calling handleFocusedUIElementChanged will focus the new active 1156 // Calling handleFocusedUIElementChanged will focus the new active
1157 // descendant and send the AXFocusedUIElementChanged notification. 1157 // descendant and send the AXFocusedUIElementChanged notification.
1158 handleFocusedUIElementChanged(0, obj->document()->focusedElement()); 1158 handleFocusedUIElementChanged(0, obj->getDocument()->focusedElement());
1159 } 1159 }
1160 1160
1161 client.postAccessibilityNotification(obj, notification); 1161 client.postAccessibilityNotification(obj, notification);
1162 } 1162 }
1163 1163
1164 void AXObjectCacheImpl::handleFocusedUIElementChanged(Node* oldFocusedNode, Node * newFocusedNode) 1164 void AXObjectCacheImpl::handleFocusedUIElementChanged(Node* oldFocusedNode, Node * newFocusedNode)
1165 { 1165 {
1166 if (!newFocusedNode) 1166 if (!newFocusedNode)
1167 return; 1167 return;
1168 1168
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 visitor->trace(m_nodeObjectMapping); 1298 visitor->trace(m_nodeObjectMapping);
1299 #endif 1299 #endif
1300 1300
1301 visitor->trace(m_objects); 1301 visitor->trace(m_objects);
1302 visitor->trace(m_notificationsToPost); 1302 visitor->trace(m_notificationsToPost);
1303 1303
1304 AXObjectCache::trace(visitor); 1304 AXObjectCache::trace(visitor);
1305 } 1305 }
1306 1306
1307 } // namespace blink 1307 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698