| 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 712 |
| 713 // FIXME: This method passes in a point that has page scale applied but assumes
that (0, 0) | 713 // FIXME: This method passes in a point that has page scale applied but assumes
that (0, 0) |
| 714 // is the top left of the visual viewport. In other words, the point has the Pin
chViewport | 714 // is the top left of the visual viewport. In other words, the point has the Pin
chViewport |
| 715 // scale applied, but not the PinchViewport offset. crbug.com/459591. | 715 // scale applied, but not the PinchViewport offset. crbug.com/459591. |
| 716 WebAXObject WebAXObject::hitTest(const WebPoint& point) const | 716 WebAXObject WebAXObject::hitTest(const WebPoint& point) const |
| 717 { | 717 { |
| 718 if (isDetached()) | 718 if (isDetached()) |
| 719 return WebAXObject(); | 719 return WebAXObject(); |
| 720 | 720 |
| 721 IntPoint contentsPoint = m_private->documentFrameView()->soonToBeRemovedUnsc
aledViewportToContents(point); | 721 IntPoint contentsPoint = m_private->documentFrameView()->soonToBeRemovedUnsc
aledViewportToContents(point); |
| 722 RefPtr<AXObject> hit = m_private->accessibilityHitTest(contentsPoint); | 722 RefPtrWillBeRawPtr<AXObject> hit = m_private->accessibilityHitTest(contentsP
oint); |
| 723 | 723 |
| 724 if (hit) | 724 if (hit) |
| 725 return WebAXObject(hit); | 725 return WebAXObject(hit); |
| 726 | 726 |
| 727 if (m_private->elementRect().contains(contentsPoint)) | 727 if (m_private->elementRect().contains(contentsPoint)) |
| 728 return *this; | 728 return *this; |
| 729 | 729 |
| 730 return WebAXObject(); | 730 return WebAXObject(); |
| 731 } | 731 } |
| 732 | 732 |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 { | 1064 { |
| 1065 return deprecatedTitleUIElement(); | 1065 return deprecatedTitleUIElement(); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 WebString WebAXObject::name(WebAXNameFrom& outNameFrom, WebVector<WebAXObject>&
outNameObjects) | 1068 WebString WebAXObject::name(WebAXNameFrom& outNameFrom, WebVector<WebAXObject>&
outNameObjects) |
| 1069 { | 1069 { |
| 1070 if (isDetached()) | 1070 if (isDetached()) |
| 1071 return WebString(); | 1071 return WebString(); |
| 1072 | 1072 |
| 1073 AXNameFrom nameFrom = AXNameFromAttribute; | 1073 AXNameFrom nameFrom = AXNameFromAttribute; |
| 1074 Vector<AXObject*> nameObjects; | 1074 WillBeHeapVector<RawPtrWillBeMember<AXObject>> nameObjects; |
| 1075 WebString result = m_private->name(nameFrom, nameObjects); | 1075 WebString result = m_private->name(nameFrom, nameObjects); |
| 1076 outNameFrom = static_cast<WebAXNameFrom>(nameFrom); | 1076 outNameFrom = static_cast<WebAXNameFrom>(nameFrom); |
| 1077 | 1077 |
| 1078 WebVector<WebAXObject> webNameObjects(nameObjects.size()); | 1078 WebVector<WebAXObject> webNameObjects(nameObjects.size()); |
| 1079 for (size_t i = 0; i < nameObjects.size(); i++) | 1079 for (size_t i = 0; i < nameObjects.size(); i++) |
| 1080 webNameObjects[i] = WebAXObject(nameObjects[i]); | 1080 webNameObjects[i] = WebAXObject(nameObjects[i]); |
| 1081 outNameObjects.swap(webNameObjects); | 1081 outNameObjects.swap(webNameObjects); |
| 1082 | 1082 |
| 1083 return result; | 1083 return result; |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 WebString WebAXObject::description(WebAXNameFrom nameFrom, WebAXDescriptionFrom&
outDescriptionFrom, WebVector<WebAXObject>& outDescriptionObjects) | 1086 WebString WebAXObject::description(WebAXNameFrom nameFrom, WebAXDescriptionFrom&
outDescriptionFrom, WebVector<WebAXObject>& outDescriptionObjects) |
| 1087 { | 1087 { |
| 1088 if (isDetached()) | 1088 if (isDetached()) |
| 1089 return WebString(); | 1089 return WebString(); |
| 1090 | 1090 |
| 1091 AXDescriptionFrom descriptionFrom; | 1091 AXDescriptionFrom descriptionFrom; |
| 1092 Vector<AXObject*> descriptionObjects; | 1092 WillBeHeapVector<RawPtrWillBeMember<AXObject>> descriptionObjects; |
| 1093 String result = m_private->description(static_cast<AXNameFrom>(nameFrom), de
scriptionFrom, descriptionObjects); | 1093 String result = m_private->description(static_cast<AXNameFrom>(nameFrom), de
scriptionFrom, descriptionObjects); |
| 1094 outDescriptionFrom = static_cast<WebAXDescriptionFrom>(descriptionFrom); | 1094 outDescriptionFrom = static_cast<WebAXDescriptionFrom>(descriptionFrom); |
| 1095 | 1095 |
| 1096 WebVector<WebAXObject> webDescriptionObjects(descriptionObjects.size()); | 1096 WebVector<WebAXObject> webDescriptionObjects(descriptionObjects.size()); |
| 1097 for (size_t i = 0; i < descriptionObjects.size(); i++) | 1097 for (size_t i = 0; i < descriptionObjects.size(); i++) |
| 1098 webDescriptionObjects[i] = WebAXObject(descriptionObjects[i]); | 1098 webDescriptionObjects[i] = WebAXObject(descriptionObjects[i]); |
| 1099 outDescriptionObjects.swap(webDescriptionObjects); | 1099 outDescriptionObjects.swap(webDescriptionObjects); |
| 1100 | 1100 |
| 1101 return result; | 1101 return result; |
| 1102 } | 1102 } |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 if (!isDetached()) | 1569 if (!isDetached()) |
| 1570 m_private->scrollToMakeVisibleWithSubFocus(subfocus); | 1570 m_private->scrollToMakeVisibleWithSubFocus(subfocus); |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 void WebAXObject::scrollToGlobalPoint(const WebPoint& point) const | 1573 void WebAXObject::scrollToGlobalPoint(const WebPoint& point) const |
| 1574 { | 1574 { |
| 1575 if (!isDetached()) | 1575 if (!isDetached()) |
| 1576 m_private->scrollToGlobalPoint(point); | 1576 m_private->scrollToGlobalPoint(point); |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 WebAXObject::WebAXObject(const WTF::PassRefPtr<AXObject>& object) | 1579 WebAXObject::WebAXObject(const PassRefPtrWillBeRawPtr<AXObject>& object) |
| 1580 : m_private(object) | 1580 : m_private(object) |
| 1581 { | 1581 { |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 WebAXObject& WebAXObject::operator=(const WTF::PassRefPtr<AXObject>& object) | 1584 WebAXObject& WebAXObject::operator=(const PassRefPtrWillBeRawPtr<AXObject>& obje
ct) |
| 1585 { | 1585 { |
| 1586 m_private = object; | 1586 m_private = object; |
| 1587 return *this; | 1587 return *this; |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 WebAXObject::operator WTF::PassRefPtr<AXObject>() const | 1590 WebAXObject::operator PassRefPtrWillBeRawPtr<AXObject>() const |
| 1591 { | 1591 { |
| 1592 return m_private.get(); | 1592 return m_private.get(); |
| 1593 } | 1593 } |
| 1594 | 1594 |
| 1595 } // namespace blink | 1595 } // namespace blink |
| OLD | NEW |