| OLD | NEW |
| 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 Loading... |
| 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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 ASSERT(!m_haveChildren); | 1700 ASSERT(!m_haveChildren); |
| 1701 | 1701 |
| 1702 m_haveChildren = true; | 1702 m_haveChildren = true; |
| 1703 | 1703 |
| 1704 if (!canHaveChildren()) | 1704 if (!canHaveChildren()) |
| 1705 return; | 1705 return; |
| 1706 | 1706 |
| 1707 Vector<AXObject*> ownedChildren; | 1707 Vector<AXObject*> ownedChildren; |
| 1708 computeAriaOwnsChildren(ownedChildren); | 1708 computeAriaOwnsChildren(ownedChildren); |
| 1709 | 1709 |
| 1710 for (RefPtr<AXObject> obj = firstChild(); obj; obj = obj->nextSibling()) { | 1710 for (RefPtrWillBeRawPtr<AXObject> obj = firstChild(); obj; obj = obj->nextSi
bling()) { |
| 1711 if (!axObjectCache().isAriaOwned(obj.get())) | 1711 if (!axObjectCache().isAriaOwned(obj.get())) |
| 1712 addChild(obj.get()); | 1712 addChild(obj.get()); |
| 1713 } | 1713 } |
| 1714 | 1714 |
| 1715 addHiddenChildren(); | 1715 addHiddenChildren(); |
| 1716 addAttachmentChildren(); | 1716 addAttachmentChildren(); |
| 1717 addPopupChildren(); | 1717 addPopupChildren(); |
| 1718 addImageMapChildren(); | 1718 addImageMapChildren(); |
| 1719 addTextFieldChildren(); | 1719 addTextFieldChildren(); |
| 1720 addCanvasChildren(); | 1720 addCanvasChildren(); |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2507 if (label && label->layoutObject()) { | 2507 if (label && label->layoutObject()) { |
| 2508 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2508 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2509 result.unite(labelRect); | 2509 result.unite(labelRect); |
| 2510 } | 2510 } |
| 2511 } | 2511 } |
| 2512 | 2512 |
| 2513 return result; | 2513 return result; |
| 2514 } | 2514 } |
| 2515 | 2515 |
| 2516 } // namespace blink | 2516 } // namespace blink |
| OLD | NEW |