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

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

Issue 150103007: Use fastGetAttribute in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use fastGEtAttribute more for titleAttr Created 6 years, 10 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 | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/HTMLTableSectionElement.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 const AtomicString& HTMLTableCellElement::abbr() const 133 const AtomicString& HTMLTableCellElement::abbr() const
134 { 134 {
135 return getAttribute(abbrAttr); 135 return fastGetAttribute(abbrAttr);
136 } 136 }
137 137
138 const AtomicString& HTMLTableCellElement::axis() const 138 const AtomicString& HTMLTableCellElement::axis() const
139 { 139 {
140 return getAttribute(axisAttr); 140 return fastGetAttribute(axisAttr);
141 } 141 }
142 142
143 void HTMLTableCellElement::setColSpan(int n) 143 void HTMLTableCellElement::setColSpan(int n)
144 { 144 {
145 setIntegralAttribute(colspanAttr, n); 145 setIntegralAttribute(colspanAttr, n);
146 } 146 }
147 147
148 const AtomicString& HTMLTableCellElement::headers() const 148 const AtomicString& HTMLTableCellElement::headers() const
149 { 149 {
150 return getAttribute(headersAttr); 150 return fastGetAttribute(headersAttr);
151 } 151 }
152 152
153 void HTMLTableCellElement::setRowSpan(int n) 153 void HTMLTableCellElement::setRowSpan(int n)
154 { 154 {
155 setIntegralAttribute(rowspanAttr, n); 155 setIntegralAttribute(rowspanAttr, n);
156 } 156 }
157 157
158 const AtomicString& HTMLTableCellElement::scope() const 158 const AtomicString& HTMLTableCellElement::scope() const
159 { 159 {
160 return getAttribute(scopeAttr); 160 return fastGetAttribute(scopeAttr);
161 } 161 }
162 162
163 HTMLTableCellElement* HTMLTableCellElement::cellAbove() const 163 HTMLTableCellElement* HTMLTableCellElement::cellAbove() const
164 { 164 {
165 RenderObject* cellRenderer = renderer(); 165 RenderObject* cellRenderer = renderer();
166 if (!cellRenderer) 166 if (!cellRenderer)
167 return 0; 167 return 0;
168 if (!cellRenderer->isTableCell()) 168 if (!cellRenderer->isTableCell())
169 return 0; 169 return 0;
170 170
171 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); 171 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer);
172 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer); 172 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer);
173 if (!cellAboveRenderer) 173 if (!cellAboveRenderer)
174 return 0; 174 return 0;
175 175
176 return toHTMLTableCellElement(cellAboveRenderer->node()); 176 return toHTMLTableCellElement(cellAboveRenderer->node());
177 } 177 }
178 178
179 } // namespace WebCore 179 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/HTMLTableSectionElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698