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

Side by Side Diff: Source/core/rendering/RenderTableCell.cpp

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/rendering/HitTestResult.cpp ('k') | no next file » | 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, 2007, 2008, 2009 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 { 146 {
147 // The child cells rely on the grids up in the sections to do their computeP referredLogicalWidths work. Normally the sections are set up early, as table 147 // The child cells rely on the grids up in the sections to do their computeP referredLogicalWidths work. Normally the sections are set up early, as table
148 // cells are added, but relayout can cause the cells to be freed, leaving st ale pointers in the sections' 148 // cells are added, but relayout can cause the cells to be freed, leaving st ale pointers in the sections'
149 // grids. We must refresh those grids before the child cells try to use the m. 149 // grids. We must refresh those grids before the child cells try to use the m.
150 table()->recalcSectionsIfNeeded(); 150 table()->recalcSectionsIfNeeded();
151 151
152 RenderBlock::computePreferredLogicalWidths(); 152 RenderBlock::computePreferredLogicalWidths();
153 if (node() && style()->autoWrap()) { 153 if (node() && style()->autoWrap()) {
154 // See if nowrap was set. 154 // See if nowrap was set.
155 Length w = styleOrColLogicalWidth(); 155 Length w = styleOrColLogicalWidth();
156 String nowrap = toElement(node())->getAttribute(nowrapAttr); 156 const AtomicString& nowrap = toElement(node())->getAttribute(nowrapAttr) ;
157 if (!nowrap.isNull() && w.isFixed()) 157 if (!nowrap.isNull() && w.isFixed())
158 // Nowrap is set, but we didn't actually use it because of the 158 // Nowrap is set, but we didn't actually use it because of the
159 // fixed width set on the cell. Even so, it is a WinIE/Moz trait 159 // fixed width set on the cell. Even so, it is a WinIE/Moz trait
160 // to make the minwidth of the cell into the fixed width. They do t his 160 // to make the minwidth of the cell into the fixed width. They do t his
161 // even in strict mode, so do not make this a quirk. Affected the t op 161 // even in strict mode, so do not make this a quirk. Affected the t op
162 // of hiptop.com. 162 // of hiptop.com.
163 m_minPreferredLogicalWidth = max<LayoutUnit>(w.value(), m_minPreferr edLogicalWidth); 163 m_minPreferredLogicalWidth = max<LayoutUnit>(w.value(), m_minPreferr edLogicalWidth);
164 } 164 }
165 } 165 }
166 166
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 1273
1274 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent) 1274 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent)
1275 { 1275 {
1276 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen t()); 1276 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen t());
1277 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL); 1277 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL);
1278 newCell->setStyle(newStyle.release()); 1278 newCell->setStyle(newStyle.release());
1279 return newCell; 1279 return newCell;
1280 } 1280 }
1281 1281
1282 } // namespace WebCore 1282 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698