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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1498 if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects (HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, l eftPadding))) | 1498 if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects (HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, l eftPadding))) |
1499 return nullptr; | 1499 return nullptr; |
1500 | 1500 |
1501 WillBeHeapVector<RefPtrWillBeMember<Node> > matches; | 1501 WillBeHeapVector<RefPtrWillBeMember<Node> > matches; |
1502 | 1502 |
1503 // Need padding to trigger a rect based hit test, but we want to return a No deList | 1503 // Need padding to trigger a rect based hit test, but we want to return a No deList |
1504 // so we special case this. | 1504 // so we special case this. |
1505 if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) { | 1505 if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) { |
1506 HitTestResult result(point); | 1506 HitTestResult result(point); |
1507 renderView->hitTest(request, result); | 1507 renderView->hitTest(request, result); |
1508 if (result.innerNode()) | 1508 |
1509 matches.append(result.innerNode()->deprecatedShadowAncestorNode()); | 1509 Node* innerNode = result.innerNode(); |
1510 if (innerNode) { | |
tkent
2014/07/08 23:33:01
nit:
if (Node* innerNode = result.innerNode()) {
deepak.sa
2014/07/10 13:52:03
Done.
| |
1511 if (innerNode->isInShadowTree()) | |
1512 innerNode = innerNode->shadowHost(); | |
1513 matches.append(innerNode); | |
1514 } | |
1510 } else { | 1515 } else { |
1511 HitTestResult result(point, topPadding, rightPadding, bottomPadding, lef tPadding); | 1516 HitTestResult result(point, topPadding, rightPadding, bottomPadding, lef tPadding); |
1512 renderView->hitTest(request, result); | 1517 renderView->hitTest(request, result); |
1513 copyToVector(result.rectBasedTestResult(), matches); | 1518 copyToVector(result.rectBasedTestResult(), matches); |
1514 } | 1519 } |
1515 | 1520 |
1516 return StaticNodeList::adopt(matches); | 1521 return StaticNodeList::adopt(matches); |
1517 } | 1522 } |
1518 | 1523 |
1519 void Internals::emitInspectorDidBeginFrame(int frameId) | 1524 void Internals::emitInspectorDidBeginFrame(int frameId) |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2353 } | 2358 } |
2354 networkStateNotifier().setWebConnectionTypeForTest(webtype); | 2359 networkStateNotifier().setWebConnectionTypeForTest(webtype); |
2355 } | 2360 } |
2356 | 2361 |
2357 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) | 2362 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) |
2358 { | 2363 { |
2359 return context->hitRegionsCount(); | 2364 return context->hitRegionsCount(); |
2360 } | 2365 } |
2361 | 2366 |
2362 } // namespace WebCore | 2367 } // namespace WebCore |
OLD | NEW |