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

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

Issue 405973004: Optimize / clean up hasTagName() call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/accessibility/AXRenderObject.h ('k') | Source/core/accessibility/AXTable.cpp » ('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 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 break; 1984 break;
1985 firstChild = newFirstChild; 1985 firstChild = newFirstChild;
1986 if (!firstChild->node()) 1986 if (!firstChild->node())
1987 break; 1987 break;
1988 } 1988 }
1989 } 1989 }
1990 1990
1991 return parent; 1991 return parent;
1992 } 1992 }
1993 1993
1994 bool AXRenderObject::isDescendantOfElementType(const QualifiedName& tagName) con st 1994 bool AXRenderObject::isDescendantOfElementType(const HTMLQualifiedName& tagName) const
1995 { 1995 {
1996 for (RenderObject* parent = m_renderer->parent(); parent; parent = parent->p arent()) { 1996 for (RenderObject* parent = m_renderer->parent(); parent; parent = parent->p arent()) {
1997 if (parent->node() && parent->node()->hasTagName(tagName)) 1997 if (parent->node() && parent->node()->hasTagName(tagName))
1998 return true; 1998 return true;
1999 } 1999 }
2000 return false; 2000 return false;
2001 } 2001 }
2002 2002
2003 bool AXRenderObject::isSVGImage() const 2003 bool AXRenderObject::isSVGImage() const
2004 { 2004 {
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 if (label && label->renderer()) { 2314 if (label && label->renderer()) {
2315 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2315 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2316 result.unite(labelRect); 2316 result.unite(labelRect);
2317 } 2317 }
2318 } 2318 }
2319 2319
2320 return result; 2320 return result;
2321 } 2321 }
2322 2322
2323 } // namespace blink 2323 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXRenderObject.h ('k') | Source/core/accessibility/AXTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698