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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXImageMapLink.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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return GetNode() ? ToElement(GetNode()) : nullptr; 90 return GetNode() ? ToElement(GetNode()) : nullptr;
91 } 91 }
92 92
93 KURL AXImageMapLink::Url() const { 93 KURL AXImageMapLink::Url() const {
94 if (!AreaElement()) 94 if (!AreaElement())
95 return KURL(); 95 return KURL();
96 96
97 return AreaElement()->Href(); 97 return AreaElement()->Href();
98 } 98 }
99 99
100 void AXImageMapLink::GetRelativeBounds( 100 bool AXImageMapLink::GetSimpleRelativeBounds(
101 AXObject** out_container, 101 AXObject** out_container,
102 FloatRect& out_bounds_in_container, 102 FloatRect& out_bounds_in_container) const {
103 SkMatrix44& out_container_transform) const {
104 *out_container = nullptr; 103 *out_container = nullptr;
105 out_bounds_in_container = FloatRect(); 104 out_bounds_in_container = FloatRect();
106 out_container_transform.setIdentity();
107 105
108 HTMLAreaElement* area = AreaElement(); 106 HTMLAreaElement* area = AreaElement();
109 HTMLMapElement* map = MapElement(); 107 HTMLMapElement* map = MapElement();
110 if (!area || !map) 108 if (!area || !map)
111 return; 109 return false;
112 110
113 LayoutObject* layout_object; 111 LayoutObject* layout_object;
114 if (parent_ && parent_->IsAXLayoutObject()) 112 if (parent_ && parent_->IsAXLayoutObject())
115 layout_object = ToAXLayoutObject(parent_)->GetLayoutObject(); 113 layout_object = ToAXLayoutObject(parent_)->GetLayoutObject();
116 else 114 else
117 layout_object = map->GetLayoutObject(); 115 layout_object = map->GetLayoutObject();
118 116
119 if (!layout_object) 117 if (!layout_object)
120 return; 118 return false;
121 119
122 out_bounds_in_container = area->GetPath(layout_object).BoundingRect(); 120 out_bounds_in_container = area->GetPath(layout_object).BoundingRect();
123 *out_container = AxObjectCache().GetOrCreate(layout_object); 121 *out_container = AxObjectCache().GetOrCreate(layout_object);
122 return true;
124 } 123 }
125 124
126 DEFINE_TRACE(AXImageMapLink) { 125 DEFINE_TRACE(AXImageMapLink) {
127 AXNodeObject::Trace(visitor); 126 AXNodeObject::Trace(visitor);
128 } 127 }
129 128
130 } // namespace blink 129 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698