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 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 // | 1336 // |
1337 | 1337 |
1338 AXObject* AXLayoutObject::accessibilityHitTest(const IntPoint& point) const | 1338 AXObject* AXLayoutObject::accessibilityHitTest(const IntPoint& point) const |
1339 { | 1339 { |
1340 if (!m_layoutObject || !m_layoutObject->hasLayer()) | 1340 if (!m_layoutObject || !m_layoutObject->hasLayer()) |
1341 return 0; | 1341 return 0; |
1342 | 1342 |
1343 DeprecatedPaintLayer* layer = toLayoutBox(m_layoutObject)->layer(); | 1343 DeprecatedPaintLayer* layer = toLayoutBox(m_layoutObject)->layer(); |
1344 | 1344 |
1345 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); | 1345 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); |
1346 HitTestResult hitTestResult = HitTestResult(point); | 1346 HitTestResult hitTestResult = HitTestResult(request, point); |
1347 layer->hitTest(request, hitTestResult); | 1347 layer->hitTest(hitTestResult); |
1348 if (!hitTestResult.innerNode()) | 1348 if (!hitTestResult.innerNode()) |
1349 return 0; | 1349 return 0; |
1350 | 1350 |
1351 Node* node = hitTestResult.innerNode(); | 1351 Node* node = hitTestResult.innerNode(); |
1352 | 1352 |
1353 // Allow the hit test to return media control buttons. | 1353 // Allow the hit test to return media control buttons. |
1354 if (node->isInShadowTree() && (!isHTMLInputElement(*node) || !node->isMediaC
ontrolElement())) | 1354 if (node->isInShadowTree() && (!isHTMLInputElement(*node) || !node->isMediaC
ontrolElement())) |
1355 node = node->shadowHost(); | 1355 node = node->shadowHost(); |
1356 | 1356 |
1357 if (isHTMLAreaElement(node)) | 1357 if (isHTMLAreaElement(node)) |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 if (label && label->layoutObject()) { | 2367 if (label && label->layoutObject()) { |
2368 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2368 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2369 result.unite(labelRect); | 2369 result.unite(labelRect); |
2370 } | 2370 } |
2371 } | 2371 } |
2372 | 2372 |
2373 return result; | 2373 return result; |
2374 } | 2374 } |
2375 | 2375 |
2376 } // namespace blink | 2376 } // namespace blink |
OLD | NEW |