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

Side by Side Diff: Source/core/rendering/RenderTableRow.h

Issue 532513002: Don't use rowIndex() if needsCellRecalc(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: NULL check in assertion, to avoid crash in unit tests. Created 6 years, 3 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/rendering/RenderTableCell.cpp ('k') | Source/core/rendering/RenderTableRow.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) 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, 2009, 2013 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv ed.
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if (UNLIKELY(rowIndex > maxRowIndex)) 63 if (UNLIKELY(rowIndex > maxRowIndex))
64 CRASH(); 64 CRASH();
65 65
66 m_rowIndex = rowIndex; 66 m_rowIndex = rowIndex;
67 } 67 }
68 68
69 bool rowIndexWasSet() const { return m_rowIndex != unsetRowIndex; } 69 bool rowIndexWasSet() const { return m_rowIndex != unsetRowIndex; }
70 unsigned rowIndex() const 70 unsigned rowIndex() const
71 { 71 {
72 ASSERT(rowIndexWasSet()); 72 ASSERT(rowIndexWasSet());
73 ASSERT(!section() || !section()->needsCellRecalc()); // index may be bog us if cells need recalc.
73 return m_rowIndex; 74 return m_rowIndex;
74 } 75 }
75 76
76 const BorderValue& borderAdjoiningTableStart() const 77 const BorderValue& borderAdjoiningTableStart() const
77 { 78 {
78 if (section()->hasSameDirectionAs(table())) 79 if (section()->hasSameDirectionAs(table()))
79 return style()->borderStart(); 80 return style()->borderStart();
80 81
81 return style()->borderEnd(); 82 return style()->borderEnd();
82 } 83 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 152
152 inline RenderTableRow* RenderTableSection::lastRow() const 153 inline RenderTableRow* RenderTableSection::lastRow() const
153 { 154 {
154 ASSERT(children() == virtualChildren()); 155 ASSERT(children() == virtualChildren());
155 return toRenderTableRow(children()->lastChild()); 156 return toRenderTableRow(children()->lastChild());
156 } 157 }
157 158
158 } // namespace blink 159 } // namespace blink
159 160
160 #endif // RenderTableRow_h 161 #endif // RenderTableRow_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableCell.cpp ('k') | Source/core/rendering/RenderTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698