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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXImageMapLink.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) 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 void AXImageMapLink::GetRelativeBounds(AXObject** out_container,
101 AXObject** out_container, 101 FloatRect& out_bounds_in_container,
102 FloatRect& out_bounds_in_container, 102 SkMatrix44& out_container_transform,
103 SkMatrix44& out_container_transform) const { 103 bool& out_is_fixed_positioned) const {
104 *out_container = nullptr; 104 *out_container = nullptr;
105 out_bounds_in_container = FloatRect(); 105 out_bounds_in_container = FloatRect();
106 out_container_transform.setIdentity(); 106 out_container_transform.setIdentity();
107 107
108 HTMLAreaElement* area = AreaElement(); 108 HTMLAreaElement* area = AreaElement();
109 HTMLMapElement* map = MapElement(); 109 HTMLMapElement* map = MapElement();
110 if (!area || !map) 110 if (!area || !map)
111 return; 111 return;
112 112
113 LayoutObject* layout_object; 113 LayoutObject* layout_object;
114 if (parent_ && parent_->IsAXLayoutObject()) 114 if (parent_ && parent_->IsAXLayoutObject())
115 layout_object = ToAXLayoutObject(parent_)->GetLayoutObject(); 115 layout_object = ToAXLayoutObject(parent_)->GetLayoutObject();
116 else 116 else
117 layout_object = map->GetLayoutObject(); 117 layout_object = map->GetLayoutObject();
118 118
119 if (!layout_object) 119 if (!layout_object)
120 return; 120 return;
121 121
122 out_bounds_in_container = area->GetPath(layout_object).BoundingRect(); 122 out_bounds_in_container = area->GetPath(layout_object).BoundingRect();
123 *out_container = AxObjectCache().GetOrCreate(layout_object); 123 *out_container = AxObjectCache().GetOrCreate(layout_object);
124 } 124 }
125 125
126 DEFINE_TRACE(AXImageMapLink) { 126 DEFINE_TRACE(AXImageMapLink) {
127 AXNodeObject::Trace(visitor); 127 AXNodeObject::Trace(visitor);
128 } 128 }
129 129
130 } // namespace blink 130 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698