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

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

Issue 1207613004: Fix leaking AXNodeObjects when sub document detaches (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 1 month 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 case MediaVolumeSliderPart: 80 case MediaVolumeSliderPart:
81 return AccessibilityOrientationVertical; 81 return AccessibilityOrientationVertical;
82 82
83 default: 83 default:
84 return AccessibilityOrientationHorizontal; 84 return AccessibilityOrientationHorizontal;
85 } 85 }
86 } 86 }
87 87
88 void AXSlider::addChildren() 88 void AXSlider::addChildren()
89 { 89 {
90 ASSERT(!isDetached());
90 ASSERT(!m_haveChildren); 91 ASSERT(!m_haveChildren);
91 92
92 m_haveChildren = true; 93 m_haveChildren = true;
93 94
94 AXObjectCacheImpl& cache = axObjectCache(); 95 AXObjectCacheImpl& cache = axObjectCache();
95 96
96 AXSliderThumb* thumb = static_cast<AXSliderThumb*>(cache.getOrCreate(SliderT humbRole)); 97 AXSliderThumb* thumb = static_cast<AXSliderThumb*>(cache.getOrCreate(SliderT humbRole));
97 thumb->setParent(this); 98 thumb->setParent(this);
98 99
99 // Before actually adding the value indicator to the hierarchy, 100 // Before actually adding the value indicator to the hierarchy,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return LayoutRect(); 159 return LayoutRect();
159 return toElement(sliderLayoutObject->node())->userAgentShadowRoot()->getElem entById(ShadowElementNames::sliderThumb())->boundingBox(); 160 return toElement(sliderLayoutObject->node())->userAgentShadowRoot()->getElem entById(ShadowElementNames::sliderThumb())->boundingBox();
160 } 161 }
161 162
162 bool AXSliderThumb::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReasons ) const 163 bool AXSliderThumb::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReasons ) const
163 { 164 {
164 return accessibilityIsIgnoredByDefault(ignoredReasons); 165 return accessibilityIsIgnoredByDefault(ignoredReasons);
165 } 166 }
166 167
167 } // namespace blink 168 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698