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

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

Issue 68173014: Have ElementTraversal::firstWithin() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | Source/core/css/StyleInvalidationAnalysis.h » ('j') | 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 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 void AXRenderObject::addImageMapChildren() 2189 void AXRenderObject::addImageMapChildren()
2190 { 2190 {
2191 RenderBoxModelObject* cssBox = renderBoxModelObject(); 2191 RenderBoxModelObject* cssBox = renderBoxModelObject();
2192 if (!cssBox || !cssBox->isRenderImage()) 2192 if (!cssBox || !cssBox->isRenderImage())
2193 return; 2193 return;
2194 2194
2195 HTMLMapElement* map = toRenderImage(cssBox)->imageMap(); 2195 HTMLMapElement* map = toRenderImage(cssBox)->imageMap();
2196 if (!map) 2196 if (!map)
2197 return; 2197 return;
2198 2198
2199 for (Element* current = ElementTraversal::firstWithin(map); current; current = ElementTraversal::next(*current, map)) { 2199 for (Element* current = ElementTraversal::firstWithin(*map); current; curren t = ElementTraversal::next(*current, map)) {
2200 // add an <area> element for this child if it has a link 2200 // add an <area> element for this child if it has a link
2201 if (isHTMLAreaElement(current) && current->isLink()) { 2201 if (isHTMLAreaElement(current) && current->isLink()) {
2202 AXImageMapLink* areaObject = toAXImageMapLink(axObjectCache()->getOr Create(ImageMapLinkRole)); 2202 AXImageMapLink* areaObject = toAXImageMapLink(axObjectCache()->getOr Create(ImageMapLinkRole));
2203 areaObject->setHTMLAreaElement(toHTMLAreaElement(current)); 2203 areaObject->setHTMLAreaElement(toHTMLAreaElement(current));
2204 areaObject->setHTMLMapElement(map); 2204 areaObject->setHTMLMapElement(map);
2205 areaObject->setParent(this); 2205 areaObject->setParent(this);
2206 if (!areaObject->accessibilityIsIgnored()) 2206 if (!areaObject->accessibilityIsIgnored())
2207 m_children.append(areaObject); 2207 m_children.append(areaObject);
2208 else 2208 else
2209 axObjectCache()->remove(areaObject->axObjectID()); 2209 axObjectCache()->remove(areaObject->axObjectID());
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 if (label && label->renderer()) { 2359 if (label && label->renderer()) {
2360 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2360 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2361 result.unite(labelRect); 2361 result.unite(labelRect);
2362 } 2362 }
2363 } 2363 }
2364 2364
2365 return result; 2365 return result;
2366 } 2366 }
2367 2367
2368 } // namespace WebCore 2368 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/StyleInvalidationAnalysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698