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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 742353004: Implement computedRole and computedName (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Finished pulling out ScopedAXObjectCache etc. Many fprintfs remain. Created 6 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 return 0; 2262 return 0;
2263 2263
2264 return axObjectCacheOwner().m_axObjectCache.get(); 2264 return axObjectCacheOwner().m_axObjectCache.get();
2265 } 2265 }
2266 2266
2267 AXObjectCache* Document::axObjectCache() const 2267 AXObjectCache* Document::axObjectCache() const
2268 { 2268 {
2269 Settings* settings = this->settings(); 2269 Settings* settings = this->settings();
2270 if (!settings || !settings->accessibilityEnabled()) 2270 if (!settings || !settings->accessibilityEnabled())
2271 return 0; 2271 return 0;
2272 return alwaysCreateAxObjectCache();
2273 }
2272 2274
2275 AXObjectCache* Document::alwaysCreateAxObjectCache() const
2276 {
2273 // The only document that actually has a AXObjectCache is the top-level 2277 // The only document that actually has a AXObjectCache is the top-level
2274 // document. This is because we need to be able to get from any WebCoreAXOb ject 2278 // document. This is because we need to be able to get from any WebCoreAXOb ject
2275 // to any other WebCoreAXObject on the same page. Using a single cache allo ws 2279 // to any other WebCoreAXObject on the same page. Using a single cache allo ws
2276 // lookups across nested webareas (i.e. multiple documents). 2280 // lookups across nested webareas (i.e. multiple documents).
2277 Document& cacheOwner = this->axObjectCacheOwner(); 2281 Document& cacheOwner = this->axObjectCacheOwner();
2278 2282
2279 // If the document has already been detached, do not make a new axObjectCach e. 2283 // If the document has already been detached, do not make a new axObjectCach e.
2280 if (!cacheOwner.renderView()) 2284 if (!cacheOwner.renderView())
2281 return 0; 2285 return 0;
2282 2286
(...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after
5825 #ifndef NDEBUG 5829 #ifndef NDEBUG
5826 using namespace blink; 5830 using namespace blink;
5827 void showLiveDocumentInstances() 5831 void showLiveDocumentInstances()
5828 { 5832 {
5829 WeakDocumentSet& set = liveDocumentSet(); 5833 WeakDocumentSet& set = liveDocumentSet();
5830 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5834 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5831 for (Document* document : set) 5835 for (Document* document : set)
5832 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5836 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5833 } 5837 }
5834 #endif 5838 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698