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

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

Issue 1463793004: Add null check to AXLayoutObject::computeAccessibilityIsIgnored (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 537
538 return AXObject::defaultObjectInclusion(ignoredReasons); 538 return AXObject::defaultObjectInclusion(ignoredReasons);
539 } 539 }
540 540
541 bool AXLayoutObject::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReason s) const 541 bool AXLayoutObject::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReason s) const
542 { 542 {
543 #if ENABLE(ASSERT) 543 #if ENABLE(ASSERT)
544 ASSERT(m_initialized); 544 ASSERT(m_initialized);
545 #endif 545 #endif
546 546
547 if (!m_layoutObject)
548 return true;
549
547 // Check first if any of the common reasons cause this element to be ignored . 550 // Check first if any of the common reasons cause this element to be ignored .
548 // Then process other use cases that need to be applied to all the various r oles 551 // Then process other use cases that need to be applied to all the various r oles
549 // that AXLayoutObjects take on. 552 // that AXLayoutObjects take on.
550 AXObjectInclusion decision = defaultObjectInclusion(ignoredReasons); 553 AXObjectInclusion decision = defaultObjectInclusion(ignoredReasons);
551 if (decision == IncludeObject) 554 if (decision == IncludeObject)
552 return false; 555 return false;
553 if (decision == IgnoreObject) 556 if (decision == IgnoreObject)
554 return true; 557 return true;
555 558
556 // If this element is within a parent that cannot have children, it should n ot be exposed 559 // If this element is within a parent that cannot have children, it should n ot be exposed
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 if (label && label->layoutObject()) { 2558 if (label && label->layoutObject()) {
2556 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2559 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2557 result.unite(labelRect); 2560 result.unite(labelRect);
2558 } 2561 }
2559 } 2562 }
2560 2563
2561 return result; 2564 return result;
2562 } 2565 }
2563 2566
2564 } // namespace blink 2567 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698