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

Unified Diff: Source/core/accessibility/AccessibilityObject.cpp

Issue 23717008: Remove useless null checks from Node::document() call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AccessibilityObject.cpp
diff --git a/Source/core/accessibility/AccessibilityObject.cpp b/Source/core/accessibility/AccessibilityObject.cpp
index f1ee094565411656c32eb6766135275b6a230c2f..e474e0fe49d4c41b882d45540c39bab4a1513fc4 100644
--- a/Source/core/accessibility/AccessibilityObject.cpp
+++ b/Source/core/accessibility/AccessibilityObject.cpp
@@ -505,12 +505,7 @@ AccessibilityObject* AccessibilityObject::firstAccessibleObjectFromNode(const No
if (!node)
return 0;
- Document* document = node->document();
- if (!document)
- return 0;
-
- AXObjectCache* cache = document->axObjectCache();
-
+ AXObjectCache* cache = node->document()->axObjectCache();
AccessibilityObject* accessibleObject = cache->getOrCreate(node->renderer());
while (accessibleObject && accessibleObject->accessibilityIsIgnored()) {
node = NodeTraversal::next(node);
« no previous file with comments | « no previous file | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698