| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 } | 700 } |
| 701 | 701 |
| 702 // FIXME: This method passes in a point that has page scale applied but assumes
that (0, 0) | 702 // FIXME: This method passes in a point that has page scale applied but assumes
that (0, 0) |
| 703 // is the top left of the visual viewport. In other words, the point has the Pin
chViewport | 703 // is the top left of the visual viewport. In other words, the point has the Pin
chViewport |
| 704 // scale applied, but not the PinchViewport offset. crbug.com/459591. | 704 // scale applied, but not the PinchViewport offset. crbug.com/459591. |
| 705 WebAXObject WebAXObject::hitTest(const WebPoint& point) const | 705 WebAXObject WebAXObject::hitTest(const WebPoint& point) const |
| 706 { | 706 { |
| 707 if (isDetached()) | 707 if (isDetached()) |
| 708 return WebAXObject(); | 708 return WebAXObject(); |
| 709 | 709 |
| 710 // FIXME: This is being cleaned up in https://codereview.chromium.org/967213
004/ to use | 710 IntPoint contentsPoint = m_private->documentFrameView()->soonToBeRemovedUnsc
aledViewportToContents(point); |
| 711 // centralized methods to convert between coordinate spaces. However, this i
s a bug that needs | |
| 712 // to be merged back to M42 so it needs an isolated, low-impact fix. This ha
ck will be removed | |
| 713 // in the above CL. | |
| 714 PinchViewport& pinchViewport = m_private->documentFrameView()->page()->frame
Host().pinchViewport(); | |
| 715 FloatPoint pointInRootFrame(point.x, point.y); | |
| 716 pointInRootFrame.moveBy(pinchViewport.location()); | |
| 717 | |
| 718 IntPoint contentsPoint = m_private->documentFrameView()->windowToContents(fl
ooredIntPoint(pointInRootFrame)); | |
| 719 RefPtr<AXObject> hit = m_private->accessibilityHitTest(contentsPoint); | 711 RefPtr<AXObject> hit = m_private->accessibilityHitTest(contentsPoint); |
| 720 | 712 |
| 721 if (hit) | 713 if (hit) |
| 722 return WebAXObject(hit); | 714 return WebAXObject(hit); |
| 723 | 715 |
| 724 if (m_private->elementRect().contains(contentsPoint)) | 716 if (m_private->elementRect().contains(contentsPoint)) |
| 725 return *this; | 717 return *this; |
| 726 | 718 |
| 727 return WebAXObject(); | 719 return WebAXObject(); |
| 728 } | 720 } |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 m_private = object; | 1333 m_private = object; |
| 1342 return *this; | 1334 return *this; |
| 1343 } | 1335 } |
| 1344 | 1336 |
| 1345 WebAXObject::operator WTF::PassRefPtr<AXObject>() const | 1337 WebAXObject::operator WTF::PassRefPtr<AXObject>() const |
| 1346 { | 1338 { |
| 1347 return m_private.get(); | 1339 return m_private.get(); |
| 1348 } | 1340 } |
| 1349 | 1341 |
| 1350 } // namespace blink | 1342 } // namespace blink |
| OLD | NEW |