OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects
(HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, l
eftPadding))) | 1491 if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects
(HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, l
eftPadding))) |
1492 return nullptr; | 1492 return nullptr; |
1493 | 1493 |
1494 WillBeHeapVector<RefPtrWillBeMember<Node> > matches; | 1494 WillBeHeapVector<RefPtrWillBeMember<Node> > matches; |
1495 | 1495 |
1496 // Need padding to trigger a rect based hit test, but we want to return a No
deList | 1496 // Need padding to trigger a rect based hit test, but we want to return a No
deList |
1497 // so we special case this. | 1497 // so we special case this. |
1498 if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) { | 1498 if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) { |
1499 HitTestResult result(point); | 1499 HitTestResult result(point); |
1500 renderView->hitTest(request, result); | 1500 renderView->hitTest(request, result); |
1501 if (result.innerNode()) | 1501 |
1502 matches.append(result.innerNode()->deprecatedShadowAncestorNode()); | 1502 if (Node* innerNode = result.innerNode()) { |
| 1503 if (innerNode->isInShadowTree()) |
| 1504 innerNode = innerNode->shadowHost(); |
| 1505 matches.append(innerNode); |
| 1506 } |
1503 } else { | 1507 } else { |
1504 HitTestResult result(point, topPadding, rightPadding, bottomPadding, lef
tPadding); | 1508 HitTestResult result(point, topPadding, rightPadding, bottomPadding, lef
tPadding); |
1505 renderView->hitTest(request, result); | 1509 renderView->hitTest(request, result); |
1506 copyToVector(result.rectBasedTestResult(), matches); | 1510 copyToVector(result.rectBasedTestResult(), matches); |
1507 } | 1511 } |
1508 | 1512 |
1509 return StaticNodeList::adopt(matches); | 1513 return StaticNodeList::adopt(matches); |
1510 } | 1514 } |
1511 | 1515 |
1512 void Internals::emitInspectorDidBeginFrame(int frameId) | 1516 void Internals::emitInspectorDidBeginFrame(int frameId) |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2346 } | 2350 } |
2347 networkStateNotifier().setWebConnectionTypeForTest(webtype); | 2351 networkStateNotifier().setWebConnectionTypeForTest(webtype); |
2348 } | 2352 } |
2349 | 2353 |
2350 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) | 2354 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) |
2351 { | 2355 { |
2352 return context->hitRegionsCount(); | 2356 return context->hitRegionsCount(); |
2353 } | 2357 } |
2354 | 2358 |
2355 } // namespace WebCore | 2359 } // namespace WebCore |
OLD | NEW |