| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013, Google Inc. All rights reserved. | 2 * Copyright (C) 2013, 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 | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return new AXInlineTextBox(std::move(inline_text_box), ax_object_cache); | 49 return new AXInlineTextBox(std::move(inline_text_box), ax_object_cache); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void AXInlineTextBox::Init() {} | 52 void AXInlineTextBox::Init() {} |
| 53 | 53 |
| 54 void AXInlineTextBox::Detach() { | 54 void AXInlineTextBox::Detach() { |
| 55 AXObject::Detach(); | 55 AXObject::Detach(); |
| 56 inline_text_box_ = nullptr; | 56 inline_text_box_ = nullptr; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void AXInlineTextBox::GetRelativeBounds( | 59 bool AXInlineTextBox::GetSimpleRelativeBounds( |
| 60 AXObject** out_container, | 60 AXObject** out_container, |
| 61 FloatRect& out_bounds_in_container, | 61 FloatRect& out_bounds_in_container) const { |
| 62 SkMatrix44& out_container_transform) const { | |
| 63 *out_container = nullptr; | 62 *out_container = nullptr; |
| 64 out_bounds_in_container = FloatRect(); | 63 out_bounds_in_container = FloatRect(); |
| 65 out_container_transform.setIdentity(); | |
| 66 | 64 |
| 67 if (!inline_text_box_ || !ParentObject() || | 65 if (!inline_text_box_ || !ParentObject() || |
| 68 !ParentObject()->GetLayoutObject()) | 66 !ParentObject()->GetLayoutObject()) |
| 69 return; | 67 return false; |
| 70 | 68 |
| 71 *out_container = ParentObject(); | 69 *out_container = ParentObject(); |
| 72 out_bounds_in_container = FloatRect(inline_text_box_->LocalBounds()); | 70 out_bounds_in_container = FloatRect(inline_text_box_->LocalBounds()); |
| 73 | 71 |
| 74 // Subtract the local bounding box of the parent because they're | 72 // Subtract the local bounding box of the parent because they're |
| 75 // both in the same coordinate system. | 73 // both in the same coordinate system. |
| 76 LayoutObject* parent_layout_object = ParentObject()->GetLayoutObject(); | 74 LayoutObject* parent_layout_object = ParentObject()->GetLayoutObject(); |
| 77 FloatRect parent_bounding_box = | 75 FloatRect parent_bounding_box = |
| 78 parent_layout_object->LocalBoundingBoxRectForAccessibility(); | 76 parent_layout_object->LocalBoundingBoxRectForAccessibility(); |
| 79 out_bounds_in_container.MoveBy(-parent_bounding_box.Location()); | 77 out_bounds_in_container.MoveBy(-parent_bounding_box.Location()); |
| 78 return true; |
| 80 } | 79 } |
| 81 | 80 |
| 82 bool AXInlineTextBox::ComputeAccessibilityIsIgnored( | 81 bool AXInlineTextBox::ComputeAccessibilityIsIgnored( |
| 83 IgnoredReasons* ignored_reasons) const { | 82 IgnoredReasons* ignored_reasons) const { |
| 84 AXObject* parent = ParentObject(); | 83 AXObject* parent = ParentObject(); |
| 85 if (!parent) | 84 if (!parent) |
| 86 return false; | 85 return false; |
| 87 | 86 |
| 88 if (!parent->AccessibilityIsIgnored()) | 87 if (!parent->AccessibilityIsIgnored()) |
| 89 return false; | 88 return false; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 if (previous_on_line) | 178 if (previous_on_line) |
| 180 return ax_object_cache_->GetOrCreate(previous_on_line.Get()); | 179 return ax_object_cache_->GetOrCreate(previous_on_line.Get()); |
| 181 | 180 |
| 182 if (!inline_text_box_->IsFirst()) | 181 if (!inline_text_box_->IsFirst()) |
| 183 return 0; | 182 return 0; |
| 184 | 183 |
| 185 return ParentObject()->PreviousOnLine(); | 184 return ParentObject()->PreviousOnLine(); |
| 186 } | 185 } |
| 187 | 186 |
| 188 } // namespace blink | 187 } // namespace blink |
| OLD | NEW |