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

Side by Side Diff: Source/core/layout/LayoutTableSection.cpp

Issue 1339633002: Remove tautological comparison in CellSpan::ensureConsistency (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 row.logicalHeight = logicalHeight; 73 row.logicalHeight = logicalHeight;
74 break; 74 break;
75 default: 75 default:
76 break; 76 break;
77 } 77 }
78 } 78 }
79 } 79 }
80 80
81 void CellSpan::ensureConsistency(const unsigned maximumSpanSize) 81 void CellSpan::ensureConsistency(const unsigned maximumSpanSize)
82 { 82 {
83 RELEASE_ASSERT(m_start >= 0 && m_start <= maximumSpanSize); 83 static_assert(WTF::IsSameType<decltype(m_start), unsigned>::value, "Asserts below assume m_start is unsigned");
84 RELEASE_ASSERT(m_end >= 0 && m_end <= maximumSpanSize); 84 static_assert(WTF::IsSameType<decltype(m_end), unsigned>::value, "Asserts be low assume m_end is unsigned");
85 RELEASE_ASSERT(m_start <= maximumSpanSize);
86 RELEASE_ASSERT(m_end <= maximumSpanSize);
85 RELEASE_ASSERT(m_start <= m_end); 87 RELEASE_ASSERT(m_start <= m_end);
86 } 88 }
87 89
88 LayoutTableSection::LayoutTableSection(Element* element) 90 LayoutTableSection::LayoutTableSection(Element* element)
89 : LayoutBox(element) 91 : LayoutBox(element)
90 , m_cCol(0) 92 , m_cCol(0)
91 , m_cRow(0) 93 , m_cRow(0)
92 , m_outerBorderStart(0) 94 , m_outerBorderStart(0)
93 , m_outerBorderEnd(0) 95 , m_outerBorderEnd(0)
94 , m_outerBorderBefore(0) 96 , m_outerBorderBefore(0)
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 // FIXME: The table's direction should determine our row's direction, not th e section's (see bug 96691). 1644 // FIXME: The table's direction should determine our row's direction, not th e section's (see bug 96691).
1643 if (!style()->isLeftToRightDirection()) 1645 if (!style()->isLeftToRightDirection())
1644 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); 1646 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing);
1645 else 1647 else
1646 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); 1648 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing);
1647 1649
1648 cell->setLogicalLocation(cellLocation); 1650 cell->setLogicalLocation(cellLocation);
1649 } 1651 }
1650 1652
1651 } // namespace blink 1653 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698