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

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

Issue 1705853002: NOT FOR REVIEW. ax tree focus with debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash Created 4 years, 10 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) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple 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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 void AXObject::clearChildren() 1175 void AXObject::clearChildren()
1176 { 1176 {
1177 // Detach all weak pointers from objects to their parents. 1177 // Detach all weak pointers from objects to their parents.
1178 for (const auto& child : m_children) 1178 for (const auto& child : m_children)
1179 child->detachFromParent(); 1179 child->detachFromParent();
1180 1180
1181 m_children.clear(); 1181 m_children.clear();
1182 m_haveChildren = false; 1182 m_haveChildren = false;
1183 } 1183 }
1184 1184
1185 AXObject* AXObject::focusedUIElement() const
1186 {
1187 Document* doc = document();
1188 if (!doc)
1189 return 0;
1190
1191 Page* page = doc->page();
1192 if (!page)
1193 return 0;
1194
1195 return axObjectCache().focusedUIElementForPage(page);
1196 }
1197
1198 Document* AXObject::document() const 1185 Document* AXObject::document() const
1199 { 1186 {
1200 FrameView* frameView = documentFrameView(); 1187 FrameView* frameView = documentFrameView();
1201 if (!frameView) 1188 if (!frameView)
1202 return 0; 1189 return 0;
1203 1190
1204 return frameView->frame().document(); 1191 return frameView->frame().document();
1205 } 1192 }
1206 1193
1207 FrameView* AXObject::documentFrameView() const 1194 FrameView* AXObject::documentFrameView() const
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 1688
1702 DEFINE_TRACE(AXObject) 1689 DEFINE_TRACE(AXObject)
1703 { 1690 {
1704 visitor->trace(m_children); 1691 visitor->trace(m_children);
1705 visitor->trace(m_parent); 1692 visitor->trace(m_parent);
1706 visitor->trace(m_cachedLiveRegionRoot); 1693 visitor->trace(m_cachedLiveRegionRoot);
1707 visitor->trace(m_axObjectCache); 1694 visitor->trace(m_axObjectCache);
1708 } 1695 }
1709 1696
1710 } // namespace blink 1697 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698