| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 return adoptRef(new AccessibilityRenderObject(renderer)); | 207 return adoptRef(new AccessibilityRenderObject(renderer)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 AccessibilityRenderObject::~AccessibilityRenderObject() | 210 AccessibilityRenderObject::~AccessibilityRenderObject() |
| 211 { | 211 { |
| 212 ASSERT(isDetached()); | 212 ASSERT(isDetached()); |
| 213 } | 213 } |
| 214 | 214 |
| 215 LayoutRect AccessibilityRenderObject::elementRect() const | 215 LayoutRect AccessibilityRenderObject::elementRect() const |
| 216 { | 216 { |
| 217 if (!m_explicitElementRect.isEmpty()) |
| 218 return m_explicitElementRect; |
| 217 if (!m_renderer) | 219 if (!m_renderer) |
| 218 return LayoutRect(); | 220 return LayoutRect(); |
| 219 if (!m_renderer->isBox()) | 221 if (!m_renderer->isBox()) |
| 220 return computeElementRect(); | 222 return computeElementRect(); |
| 221 | 223 |
| 222 for (const AccessibilityObject* obj = this; obj; obj = obj->parentObject())
{ | 224 for (const AccessibilityObject* obj = this; obj; obj = obj->parentObject())
{ |
| 223 if (obj->isAccessibilityRenderObject()) | 225 if (obj->isAccessibilityRenderObject()) |
| 224 static_cast<const AccessibilityRenderObject*>(obj)->checkCachedEleme
ntRect(); | 226 static_cast<const AccessibilityRenderObject*>(obj)->checkCachedEleme
ntRect(); |
| 225 } | 227 } |
| 226 for (const AccessibilityObject* obj = this; obj; obj = obj->parentObject())
{ | 228 for (const AccessibilityObject* obj = this; obj; obj = obj->parentObject())
{ |
| (...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 if (label && label->renderer()) { | 2513 if (label && label->renderer()) { |
| 2512 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2514 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2513 result.unite(labelRect); | 2515 result.unite(labelRect); |
| 2514 } | 2516 } |
| 2515 } | 2517 } |
| 2516 | 2518 |
| 2517 return result; | 2519 return result; |
| 2518 } | 2520 } |
| 2519 | 2521 |
| 2520 } // namespace WebCore | 2522 } // namespace WebCore |
| OLD | NEW |