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

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

Issue 1072273006: Oilpan: Prepare moving AXObject to heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 AXLayoutObject::AXLayoutObject(LayoutObject* layoutObject, AXObjectCacheImpl* ax ObjectCache) 174 AXLayoutObject::AXLayoutObject(LayoutObject* layoutObject, AXObjectCacheImpl* ax ObjectCache)
175 : AXNodeObject(layoutObject->node(), axObjectCache) 175 : AXNodeObject(layoutObject->node(), axObjectCache)
176 , m_layoutObject(layoutObject) 176 , m_layoutObject(layoutObject)
177 , m_cachedElementRectDirty(true) 177 , m_cachedElementRectDirty(true)
178 { 178 {
179 #if ENABLE(ASSERT) 179 #if ENABLE(ASSERT)
180 m_layoutObject->setHasAXObject(true); 180 m_layoutObject->setHasAXObject(true);
181 #endif 181 #endif
182 } 182 }
183 183
184 PassRefPtr<AXLayoutObject> AXLayoutObject::create(LayoutObject* layoutObject, AX ObjectCacheImpl* axObjectCache) 184 PassRefPtrWillBeRawPtr<AXLayoutObject> AXLayoutObject::create(LayoutObject* layo utObject, AXObjectCacheImpl* axObjectCache)
185 { 185 {
186 return adoptRef(new AXLayoutObject(layoutObject, axObjectCache)); 186 return adoptRefWillBeNoop(new AXLayoutObject(layoutObject, axObjectCache));
187 } 187 }
188 188
189 AXLayoutObject::~AXLayoutObject() 189 AXLayoutObject::~AXLayoutObject()
190 { 190 {
191 ASSERT(isDetached()); 191 ASSERT(isDetached());
192 } 192 }
193 193
194 LayoutRect AXLayoutObject::elementRect() const 194 LayoutRect AXLayoutObject::elementRect() const
195 { 195 {
196 if (!m_explicitElementRect.isEmpty()) 196 if (!m_explicitElementRect.isEmpty())
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 ASSERT(!m_haveChildren); 1677 ASSERT(!m_haveChildren);
1678 1678
1679 m_haveChildren = true; 1679 m_haveChildren = true;
1680 1680
1681 if (!canHaveChildren()) 1681 if (!canHaveChildren())
1682 return; 1682 return;
1683 1683
1684 Vector<AXObject*> ownedChildren; 1684 Vector<AXObject*> ownedChildren;
1685 computeAriaOwnsChildren(ownedChildren); 1685 computeAriaOwnsChildren(ownedChildren);
1686 1686
1687 for (RefPtr<AXObject> obj = firstChild(); obj; obj = obj->nextSibling()) { 1687 for (RefPtrWillBeRawPtr<AXObject> obj = firstChild(); obj; obj = obj->nextSi bling()) {
1688 if (!axObjectCache()->isAriaOwned(obj.get())) 1688 if (!axObjectCache()->isAriaOwned(obj.get()))
1689 addChild(obj.get()); 1689 addChild(obj.get());
1690 } 1690 }
1691 1691
1692 addHiddenChildren(); 1692 addHiddenChildren();
1693 addAttachmentChildren(); 1693 addAttachmentChildren();
1694 addPopupChildren(); 1694 addPopupChildren();
1695 addImageMapChildren(); 1695 addImageMapChildren();
1696 addTextFieldChildren(); 1696 addTextFieldChildren();
1697 addCanvasChildren(); 1697 addCanvasChildren();
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 if (label && label->layoutObject()) { 2484 if (label && label->layoutObject()) {
2485 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2485 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2486 result.unite(labelRect); 2486 result.unite(labelRect);
2487 } 2487 }
2488 } 2488 }
2489 2489
2490 return result; 2490 return result;
2491 } 2491 }
2492 2492
2493 } // namespace blink 2493 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698