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 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 if (!m_renderer || !m_renderer->hasLayer()) | 1265 if (!m_renderer || !m_renderer->hasLayer()) |
1266 return 0; | 1266 return 0; |
1267 | 1267 |
1268 RenderLayer* layer = toRenderBox(m_renderer)->layer(); | 1268 RenderLayer* layer = toRenderBox(m_renderer)->layer(); |
1269 | 1269 |
1270 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); | 1270 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); |
1271 HitTestResult hitTestResult = HitTestResult(point); | 1271 HitTestResult hitTestResult = HitTestResult(point); |
1272 layer->hitTest(request, hitTestResult); | 1272 layer->hitTest(request, hitTestResult); |
1273 if (!hitTestResult.innerNode()) | 1273 if (!hitTestResult.innerNode()) |
1274 return 0; | 1274 return 0; |
1275 Node* node = hitTestResult.innerNode()->deprecatedShadowAncestorNode(); | 1275 |
| 1276 Node* node = hitTestResult.innerNode(); |
| 1277 if (node->isInShadowTree()) |
| 1278 node = node->shadowHost(); |
1276 | 1279 |
1277 if (isHTMLAreaElement(node)) | 1280 if (isHTMLAreaElement(node)) |
1278 return accessibilityImageMapHitTest(toHTMLAreaElement(node), point); | 1281 return accessibilityImageMapHitTest(toHTMLAreaElement(node), point); |
1279 | 1282 |
1280 if (isHTMLOptionElement(node)) | 1283 if (isHTMLOptionElement(node)) |
1281 node = toHTMLOptionElement(*node).ownerSelectElement(); | 1284 node = toHTMLOptionElement(*node).ownerSelectElement(); |
1282 | 1285 |
1283 RenderObject* obj = node->renderer(); | 1286 RenderObject* obj = node->renderer(); |
1284 if (!obj) | 1287 if (!obj) |
1285 return 0; | 1288 return 0; |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 if (label && label->renderer()) { | 2312 if (label && label->renderer()) { |
2310 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2313 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2311 result.unite(labelRect); | 2314 result.unite(labelRect); |
2312 } | 2315 } |
2313 } | 2316 } |
2314 | 2317 |
2315 return result; | 2318 return result; |
2316 } | 2319 } |
2317 | 2320 |
2318 } // namespace WebCore | 2321 } // namespace WebCore |
OLD | NEW |