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

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

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: GetSimpleRelativeBounds, add failing test for fixed with transform 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) 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return false; 148 return false;
149 149
150 return IsEnabled(); 150 return IsEnabled();
151 } 151 }
152 152
153 bool AXMenuListOption::ComputeAccessibilityIsIgnored( 153 bool AXMenuListOption::ComputeAccessibilityIsIgnored(
154 IgnoredReasons* ignored_reasons) const { 154 IgnoredReasons* ignored_reasons) const {
155 return AccessibilityIsIgnoredByDefault(ignored_reasons); 155 return AccessibilityIsIgnoredByDefault(ignored_reasons);
156 } 156 }
157 157
158 void AXMenuListOption::GetRelativeBounds( 158 void AXMenuListOption::GetRelativeBounds(AXObject** out_container,
159 AXObject** out_container, 159 FloatRect& out_bounds_in_container,
160 FloatRect& out_bounds_in_container, 160 SkMatrix44& out_container_transform,
161 SkMatrix44& out_container_transform) const { 161 bool& out_is_fixed_positioned) const {
162 *out_container = nullptr; 162 *out_container = nullptr;
163 out_bounds_in_container = FloatRect(); 163 out_bounds_in_container = FloatRect();
164 out_container_transform.setIdentity(); 164 out_container_transform.setIdentity();
165 165
166 AXObject* parent = ParentObject(); 166 AXObject* parent = ParentObject();
167 if (!parent) 167 if (!parent)
168 return; 168 return;
169 DCHECK(parent->IsMenuListPopup()); 169 DCHECK(parent->IsMenuListPopup());
170 170
171 AXObject* grandparent = parent->ParentObject(); 171 AXObject* grandparent = parent->ParentObject();
172 if (!grandparent) 172 if (!grandparent)
173 return; 173 return;
174 DCHECK(grandparent->IsMenuList()); 174 DCHECK(grandparent->IsMenuList());
175 grandparent->GetRelativeBounds(out_container, out_bounds_in_container, 175 grandparent->GetRelativeBounds(out_container, out_bounds_in_container,
176 out_container_transform); 176 out_container_transform,
177 out_is_fixed_positioned);
177 } 178 }
178 179
179 String AXMenuListOption::TextAlternative(bool recursive, 180 String AXMenuListOption::TextAlternative(bool recursive,
180 bool in_aria_labelled_by_traversal, 181 bool in_aria_labelled_by_traversal,
181 AXObjectSet& visited, 182 AXObjectSet& visited,
182 AXNameFrom& name_from, 183 AXNameFrom& name_from,
183 AXRelatedObjectVector* related_objects, 184 AXRelatedObjectVector* related_objects,
184 NameSources* name_sources) const { 185 NameSources* name_sources) const {
185 // If nameSources is non-null, relatedObjects is used in filling it in, so it 186 // If nameSources is non-null, relatedObjects is used in filling it in, so it
186 // must be non-null as well. 187 // must be non-null as well.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 219
219 return 0; 220 return 0;
220 } 221 }
221 222
222 DEFINE_TRACE(AXMenuListOption) { 223 DEFINE_TRACE(AXMenuListOption) {
223 visitor->Trace(element_); 224 visitor->Trace(element_);
224 AXMockObject::Trace(visitor); 225 AXMockObject::Trace(visitor);
225 } 226 }
226 227
227 } // namespace blink 228 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698