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

Side by Side Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 481753002: Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 3 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 | Annotate | Revision Log
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 if (m_renderer->isText()) 282 if (m_renderer->isText())
283 return StaticTextRole; 283 return StaticTextRole;
284 if (cssBox && cssBox->isImage()) { 284 if (cssBox && cssBox->isImage()) {
285 if (isHTMLInputElement(node)) 285 if (isHTMLInputElement(node))
286 return ariaHasPopup() ? PopUpButtonRole : ButtonRole; 286 return ariaHasPopup() ? PopUpButtonRole : ButtonRole;
287 if (isSVGImage()) 287 if (isSVGImage())
288 return SVGRootRole; 288 return SVGRootRole;
289 return ImageRole; 289 return ImageRole;
290 } 290 }
291 291
292 // This is for the case where the fallback content kicks in.
293 // The normal case should be handled in the case above
294 if (node && node->hasTagName(HTMLNames::imgTag)) {
295 return ImageRole;
296 }
esprehn 2014/09/05 00:47:50 no braces
rhogan 2014/09/08 19:52:41 Done
297
292 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas . 298 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas .
293 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) 299 if (isHTMLCanvasElement(node) && m_renderer->isCanvas())
294 return CanvasRole; 300 return CanvasRole;
295 301
296 if (cssBox && cssBox->isRenderView()) 302 if (cssBox && cssBox->isRenderView())
297 return WebAreaRole; 303 return WebAreaRole;
298 304
299 if (cssBox && cssBox->isTextField()) 305 if (cssBox && cssBox->isTextField())
300 return TextFieldRole; 306 return TextFieldRole;
301 307
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 if (label && label->renderer()) { 2347 if (label && label->renderer()) {
2342 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2348 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2343 result.unite(labelRect); 2349 result.unite(labelRect);
2344 } 2350 }
2345 } 2351 }
2346 2352
2347 return result; 2353 return result;
2348 } 2354 }
2349 2355
2350 } // namespace blink 2356 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698