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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 return 0; | 694 return 0; |
695 | 695 |
696 return m_private->hierarchicalLevel(); | 696 return m_private->hierarchicalLevel(); |
697 } | 697 } |
698 | 698 |
699 WebAXObject WebAXObject::hitTest(const WebPoint& point) const | 699 WebAXObject WebAXObject::hitTest(const WebPoint& point) const |
700 { | 700 { |
701 if (isDetached()) | 701 if (isDetached()) |
702 return WebAXObject(); | 702 return WebAXObject(); |
703 | 703 |
704 IntPoint contentsPoint = m_private->documentFrameView()->windowToContents(po
int); | 704 // FIXME: point looks like it may be in viewport coordinates (at least somet
imes). |
| 705 IntPoint contentsPoint = m_private->documentFrameView()->rootFrameToContents
(point); |
705 RefPtr<AXObject> hit = m_private->accessibilityHitTest(contentsPoint); | 706 RefPtr<AXObject> hit = m_private->accessibilityHitTest(contentsPoint); |
706 | 707 |
707 if (hit) | 708 if (hit) |
708 return WebAXObject(hit); | 709 return WebAXObject(hit); |
709 | 710 |
710 if (m_private->elementRect().contains(contentsPoint)) | 711 if (m_private->elementRect().contains(contentsPoint)) |
711 return *this; | 712 return *this; |
712 | 713 |
713 return WebAXObject(); | 714 return WebAXObject(); |
714 } | 715 } |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 m_private = object; | 1328 m_private = object; |
1328 return *this; | 1329 return *this; |
1329 } | 1330 } |
1330 | 1331 |
1331 WebAXObject::operator WTF::PassRefPtr<AXObject>() const | 1332 WebAXObject::operator WTF::PassRefPtr<AXObject>() const |
1332 { | 1333 { |
1333 return m_private.get(); | 1334 return m_private.get(); |
1334 } | 1335 } |
1335 | 1336 |
1336 } // namespace blink | 1337 } // namespace blink |
OLD | NEW |