OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 LayoutObject* AXSpinButton::LayoutObjectForRelativeBounds() const { | 49 LayoutObject* AXSpinButton::LayoutObjectForRelativeBounds() const { |
50 if (!spin_button_element_ || !spin_button_element_->GetLayoutObject()) | 50 if (!spin_button_element_ || !spin_button_element_->GetLayoutObject()) |
51 return nullptr; | 51 return nullptr; |
52 | 52 |
53 return spin_button_element_->GetLayoutObject(); | 53 return spin_button_element_->GetLayoutObject(); |
54 } | 54 } |
55 | 55 |
56 void AXSpinButton::Detach() { | 56 void AXSpinButton::Detach() { |
57 AXObject::Detach(); | 57 AXObjectImpl::Detach(); |
58 spin_button_element_ = nullptr; | 58 spin_button_element_ = nullptr; |
59 } | 59 } |
60 | 60 |
61 void AXSpinButton::DetachFromParent() { | 61 void AXSpinButton::DetachFromParent() { |
62 AXObject::DetachFromParent(); | 62 AXObjectImpl::DetachFromParent(); |
63 spin_button_element_ = nullptr; | 63 spin_button_element_ = nullptr; |
64 } | 64 } |
65 | 65 |
66 AccessibilityRole AXSpinButton::RoleValue() const { | 66 AccessibilityRole AXSpinButton::RoleValue() const { |
67 return spin_button_element_ ? kSpinButtonRole : kUnknownRole; | 67 return spin_button_element_ ? kSpinButtonRole : kUnknownRole; |
68 } | 68 } |
69 | 69 |
70 void AXSpinButton::AddChildren() { | 70 void AXSpinButton::AddChildren() { |
71 DCHECK(!IsDetached()); | 71 DCHECK(!IsDetached()); |
72 have_children_ = true; | 72 have_children_ = true; |
(...skipping 22 matching lines...) Expand all Loading... |
95 // AXSpinButtonPart | 95 // AXSpinButtonPart |
96 | 96 |
97 AXSpinButtonPart::AXSpinButtonPart(AXObjectCacheImpl& ax_object_cache) | 97 AXSpinButtonPart::AXSpinButtonPart(AXObjectCacheImpl& ax_object_cache) |
98 : AXMockObject(ax_object_cache), is_incrementor_(false) {} | 98 : AXMockObject(ax_object_cache), is_incrementor_(false) {} |
99 | 99 |
100 AXSpinButtonPart* AXSpinButtonPart::Create(AXObjectCacheImpl& ax_object_cache) { | 100 AXSpinButtonPart* AXSpinButtonPart::Create(AXObjectCacheImpl& ax_object_cache) { |
101 return new AXSpinButtonPart(ax_object_cache); | 101 return new AXSpinButtonPart(ax_object_cache); |
102 } | 102 } |
103 | 103 |
104 void AXSpinButtonPart::GetRelativeBounds( | 104 void AXSpinButtonPart::GetRelativeBounds( |
105 AXObject** out_container, | 105 AXObjectImpl** out_container, |
106 FloatRect& out_bounds_in_container, | 106 FloatRect& out_bounds_in_container, |
107 SkMatrix44& out_container_transform) const { | 107 SkMatrix44& out_container_transform) const { |
108 *out_container = nullptr; | 108 *out_container = nullptr; |
109 out_bounds_in_container = FloatRect(); | 109 out_bounds_in_container = FloatRect(); |
110 out_container_transform.setIdentity(); | 110 out_container_transform.setIdentity(); |
111 | 111 |
112 if (!ParentObject()) | 112 if (!ParentObject()) |
113 return; | 113 return; |
114 | 114 |
115 // FIXME: This logic should exist in the layout tree or elsewhere, but there | 115 // FIXME: This logic should exist in the layout tree or elsewhere, but there |
(...skipping 19 matching lines...) Expand all Loading... |
135 AXSpinButton* spin_button = ToAXSpinButton(ParentObject()); | 135 AXSpinButton* spin_button = ToAXSpinButton(ParentObject()); |
136 if (is_incrementor_) | 136 if (is_incrementor_) |
137 spin_button->Step(1); | 137 spin_button->Step(1); |
138 else | 138 else |
139 spin_button->Step(-1); | 139 spin_button->Step(-1); |
140 | 140 |
141 return true; | 141 return true; |
142 } | 142 } |
143 | 143 |
144 } // namespace blink | 144 } // namespace blink |
OLD | NEW |