Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXInlineTextBox.cpp

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 void AXInlineTextBox::GetRelativeBounds(AXObject** out_container,
60 AXObject** out_container, 60 FloatRect& out_bounds_in_container,
61 FloatRect& out_bounds_in_container, 61 SkMatrix44& out_container_transform,
62 SkMatrix44& out_container_transform) const { 62 bool& out_is_fixed_positioned) const {
63 *out_container = nullptr; 63 *out_container = nullptr;
64 out_bounds_in_container = FloatRect(); 64 out_bounds_in_container = FloatRect();
65 out_container_transform.setIdentity(); 65 out_container_transform.setIdentity();
66 out_is_fixed_positioned = false;
66 67
67 if (!inline_text_box_ || !ParentObject() || 68 if (!inline_text_box_ || !ParentObject() ||
68 !ParentObject()->GetLayoutObject()) 69 !ParentObject()->GetLayoutObject())
69 return; 70 return;
70 71
71 *out_container = ParentObject(); 72 *out_container = ParentObject();
72 out_bounds_in_container = FloatRect(inline_text_box_->LocalBounds()); 73 out_bounds_in_container = FloatRect(inline_text_box_->LocalBounds());
73 74
74 // Subtract the local bounding box of the parent because they're 75 // Subtract the local bounding box of the parent because they're
75 // both in the same coordinate system. 76 // both in the same coordinate system.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (previous_on_line) 180 if (previous_on_line)
180 return ax_object_cache_->GetOrCreate(previous_on_line.Get()); 181 return ax_object_cache_->GetOrCreate(previous_on_line.Get());
181 182
182 if (!inline_text_box_->IsFirst()) 183 if (!inline_text_box_->IsFirst())
183 return 0; 184 return 0;
184 185
185 return ParentObject()->PreviousOnLine(); 186 return ParentObject()->PreviousOnLine();
186 } 187 }
187 188
188 } // namespace blink 189 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698