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

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

Issue 2168663002: Bypass cached element rects in AXLayoutObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 AXLayoutObject::~AXLayoutObject() 195 AXLayoutObject::~AXLayoutObject()
196 { 196 {
197 ASSERT(isDetached()); 197 ASSERT(isDetached());
198 } 198 }
199 199
200 LayoutRect AXLayoutObject::elementRect() const 200 LayoutRect AXLayoutObject::elementRect() const
201 { 201 {
202 if (!m_explicitElementRect.isEmpty()) 202 if (!m_explicitElementRect.isEmpty())
203 return m_explicitElementRect; 203 return m_explicitElementRect;
204 if (!m_layoutObject)
205 return LayoutRect();
206 if (!m_layoutObject->isBox())
207 return computeElementRect();
208 204
209 for (const AXObject* obj = this; obj; obj = obj->parentObject()) { 205 return computeElementRect();
aboxhall 2016/07/20 16:30:11 Add a comment pointing to the bug tracking the lon
dmazzoni 2016/07/20 17:24:16 Sure, done.
210 if (obj->isAXLayoutObject())
211 toAXLayoutObject(obj)->checkCachedElementRect();
212 }
213 for (const AXObject* obj = this; obj; obj = obj->parentObject()) {
214 if (obj->isAXLayoutObject())
215 toAXLayoutObject(obj)->updateCachedElementRect();
216 }
217
218 return m_cachedElementRect;
219 } 206 }
220 207
221 SkMatrix44 AXLayoutObject::transformFromLocalParentFrame() const 208 SkMatrix44 AXLayoutObject::transformFromLocalParentFrame() const
222 { 209 {
223 if (!m_layoutObject) 210 if (!m_layoutObject)
224 return SkMatrix44(); 211 return SkMatrix44();
225 LayoutView* layoutView = toLayoutView(LayoutAPIShim::layoutObjectFrom(docume ntFrameView()->layoutViewItem())); 212 LayoutView* layoutView = toLayoutView(LayoutAPIShim::layoutObjectFrom(docume ntFrameView()->layoutViewItem()));
226 213
227 FrameView* parentFrameView = documentFrameView()->parentFrameView(); 214 FrameView* parentFrameView = documentFrameView()->parentFrameView();
228 if (!parentFrameView) 215 if (!parentFrameView)
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2579 result.unite(labelRect); 2566 result.unite(labelRect);
2580 } 2567 }
2581 } 2568 }
2582 } 2569 }
2583 } 2570 }
2584 2571
2585 return result; 2572 return result;
2586 } 2573 }
2587 2574
2588 } // namespace blink 2575 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698