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

Side by Side Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | Annotate | Revision Log
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (renderer->isRenderBlock()) 162 if (renderer->isRenderBlock())
163 return toRenderBlock(renderer)->inlineElementContinuation(); 163 return toRenderBlock(renderer)->inlineElementContinuation();
164 return 0; 164 return 0;
165 } 165 }
166 166
167 AXRenderObject::AXRenderObject(RenderObject* renderer) 167 AXRenderObject::AXRenderObject(RenderObject* renderer)
168 : AXNodeObject(renderer->node()) 168 : AXNodeObject(renderer->node())
169 , m_renderer(renderer) 169 , m_renderer(renderer)
170 , m_cachedElementRectDirty(true) 170 , m_cachedElementRectDirty(true)
171 { 171 {
172 #ifndef NDEBUG 172 #if ENABLE(ASSERT)
173 m_renderer->setHasAXObject(true); 173 m_renderer->setHasAXObject(true);
174 #endif 174 #endif
175 } 175 }
176 176
177 PassRefPtr<AXRenderObject> AXRenderObject::create(RenderObject* renderer) 177 PassRefPtr<AXRenderObject> AXRenderObject::create(RenderObject* renderer)
178 { 178 {
179 return adoptRef(new AXRenderObject(renderer)); 179 return adoptRef(new AXRenderObject(renderer));
180 } 180 }
181 181
182 AXRenderObject::~AXRenderObject() 182 AXRenderObject::~AXRenderObject()
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 { 412 {
413 AXNodeObject::init(); 413 AXNodeObject::init();
414 } 414 }
415 415
416 void AXRenderObject::detach() 416 void AXRenderObject::detach()
417 { 417 {
418 AXNodeObject::detach(); 418 AXNodeObject::detach();
419 419
420 detachRemoteSVGRoot(); 420 detachRemoteSVGRoot();
421 421
422 #ifndef NDEBUG 422 #if ENABLE(ASSERT)
423 if (m_renderer) 423 if (m_renderer)
424 m_renderer->setHasAXObject(false); 424 m_renderer->setHasAXObject(false);
425 #endif 425 #endif
426 m_renderer = 0; 426 m_renderer = 0;
427 } 427 }
428 428
429 // 429 //
430 // Check object role or purpose. 430 // Check object role or purpose.
431 // 431 //
432 432
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 return DefaultBehavior; 569 return DefaultBehavior;
570 570
571 return IgnoreObject; 571 return IgnoreObject;
572 } 572 }
573 573
574 return AXObject::defaultObjectInclusion(); 574 return AXObject::defaultObjectInclusion();
575 } 575 }
576 576
577 bool AXRenderObject::computeAccessibilityIsIgnored() const 577 bool AXRenderObject::computeAccessibilityIsIgnored() const
578 { 578 {
579 #ifndef NDEBUG 579 #if ENABLE(ASSERT)
580 ASSERT(m_initialized); 580 ASSERT(m_initialized);
581 #endif 581 #endif
582 582
583 // Check first if any of the common reasons cause this element to be ignored . 583 // Check first if any of the common reasons cause this element to be ignored .
584 // Then process other use cases that need to be applied to all the various r oles 584 // Then process other use cases that need to be applied to all the various r oles
585 // that AXRenderObjects take on. 585 // that AXRenderObjects take on.
586 AXObjectInclusion decision = defaultObjectInclusion(); 586 AXObjectInclusion decision = defaultObjectInclusion();
587 if (decision == IncludeObject) 587 if (decision == IncludeObject)
588 return false; 588 return false;
589 if (decision == IgnoreObject) 589 if (decision == IgnoreObject)
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 if (label && label->renderer()) { 2314 if (label && label->renderer()) {
2315 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2315 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2316 result.unite(labelRect); 2316 result.unite(labelRect);
2317 } 2317 }
2318 } 2318 }
2319 2319
2320 return result; 2320 return result;
2321 } 2321 }
2322 2322
2323 } // namespace WebCore 2323 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXObjectCache.cpp ('k') | Source/core/animation/CompositorAnimationsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698