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

Side by Side Diff: Source/core/html/HTMLTableCellElement.cpp

Issue 406843002: Optimize hasTagName when called on an HTMLElement / SVGElement (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/html/HTMLTableCellElement.h ('k') | Source/core/html/HTMLTableColElement.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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return 0; 125 return 0;
126 } 126 }
127 127
128 bool HTMLTableCellElement::isURLAttribute(const Attribute& attribute) const 128 bool HTMLTableCellElement::isURLAttribute(const Attribute& attribute) const
129 { 129 {
130 return attribute.name() == backgroundAttr || HTMLTablePartElement::isURLAttr ibute(attribute); 130 return attribute.name() == backgroundAttr || HTMLTablePartElement::isURLAttr ibute(attribute);
131 } 131 }
132 132
133 bool HTMLTableCellElement::hasLegalLinkAttribute(const QualifiedName& name) cons t 133 bool HTMLTableCellElement::hasLegalLinkAttribute(const QualifiedName& name) cons t
134 { 134 {
135 return (hasLocalName(tdTag) && name == backgroundAttr) || HTMLTablePartEleme nt::hasLegalLinkAttribute(name); 135 return (hasTagName(tdTag) && name == backgroundAttr) || HTMLTablePartElement ::hasLegalLinkAttribute(name);
136 } 136 }
137 137
138 const QualifiedName& HTMLTableCellElement::subResourceAttributeName() const 138 const QualifiedName& HTMLTableCellElement::subResourceAttributeName() const
139 { 139 {
140 return hasLocalName(tdTag) ? backgroundAttr : HTMLTablePartElement::subResou rceAttributeName(); 140 return hasTagName(tdTag) ? backgroundAttr : HTMLTablePartElement::subResourc eAttributeName();
141 } 141 }
142 142
143 const AtomicString& HTMLTableCellElement::abbr() const 143 const AtomicString& HTMLTableCellElement::abbr() const
144 { 144 {
145 return fastGetAttribute(abbrAttr); 145 return fastGetAttribute(abbrAttr);
146 } 146 }
147 147
148 const AtomicString& HTMLTableCellElement::axis() const 148 const AtomicString& HTMLTableCellElement::axis() const
149 { 149 {
150 return fastGetAttribute(axisAttr); 150 return fastGetAttribute(axisAttr);
(...skipping 29 matching lines...) Expand all
180 180
181 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); 181 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer);
182 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer); 182 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer);
183 if (!cellAboveRenderer) 183 if (!cellAboveRenderer)
184 return 0; 184 return 0;
185 185
186 return toHTMLTableCellElement(cellAboveRenderer->node()); 186 return toHTMLTableCellElement(cellAboveRenderer->node());
187 } 187 }
188 188
189 } // namespace blink 189 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTableCellElement.h ('k') | Source/core/html/HTMLTableColElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698