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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.h

Issue 1574933002: Changed type of border-width longhands from unsigned to float. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added trivial tests safe to rebaseline to TestExpectations Created 4 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
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, 2009, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 int logicalHeightFromStyle() const 145 int logicalHeightFromStyle() const
146 { 146 {
147 Length height = style()->logicalHeight(); 147 Length height = style()->logicalHeight();
148 int styleLogicalHeight = height.isIntrinsicOrAuto() ? LayoutUnit() : val ueForLength(height, LayoutUnit()); 148 int styleLogicalHeight = height.isIntrinsicOrAuto() ? LayoutUnit() : val ueForLength(height, LayoutUnit());
149 149
150 // In strict mode, box-sizing: content-box do the right thing and actual ly add in the border and padding. 150 // In strict mode, box-sizing: content-box do the right thing and actual ly add in the border and padding.
151 // Call computedCSSPadding* directly to avoid including implicitPadding. 151 // Call computedCSSPadding* directly to avoid including implicitPadding.
152 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX) 152 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX)
153 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter()).floor() + borderBefore() + borderAfter(); 153 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter() + borderBefore() + borderAfter()).floor();
154 return styleLogicalHeight; 154 return styleLogicalHeight;
155 } 155 }
156 156
157 int logicalHeightForRowSizing() const 157 int logicalHeightForRowSizing() const
158 { 158 {
159 // FIXME: This function does too much work, and is very hot during table layout! 159 // FIXME: This function does too much work, and is very hot during table layout!
160 int adjustedLogicalHeight = pixelSnappedLogicalHeight() - (intrinsicPadd ingBefore() + intrinsicPaddingAfter()); 160 int adjustedLogicalHeight = pixelSnappedLogicalHeight() - (intrinsicPadd ingBefore() + intrinsicPaddingAfter());
161 int styleLogicalHeight = logicalHeightFromStyle(); 161 int styleLogicalHeight = logicalHeightFromStyle();
162 return max(styleLogicalHeight, adjustedLogicalHeight); 162 return max(styleLogicalHeight, adjustedLogicalHeight);
163 } 163 }
164 164
165 165
166 void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&); 166 void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&);
167 167
168 int borderLeft() const override; 168 LayoutUnit borderLeft() const override;
169 int borderRight() const override; 169 LayoutUnit borderRight() const override;
170 int borderTop() const override; 170 LayoutUnit borderTop() const override;
171 int borderBottom() const override; 171 LayoutUnit borderBottom() const override;
172 int borderStart() const override; 172 LayoutUnit borderStart() const override;
173 int borderEnd() const override; 173 LayoutUnit borderEnd() const override;
174 int borderBefore() const override; 174 LayoutUnit borderBefore() const override;
175 int borderAfter() const override; 175 LayoutUnit borderAfter() const override;
176 176
177 void collectBorderValues(LayoutTable::CollapsedBorderValues&); 177 void collectBorderValues(LayoutTable::CollapsedBorderValues&);
178 static void sortBorderValues(LayoutTable::CollapsedBorderValues&); 178 static void sortBorderValues(LayoutTable::CollapsedBorderValues&);
179 179
180 void layout() override; 180 void layout() override;
181 181
182 void paint(const PaintInfo&, const LayoutPoint&) const override; 182 void paint(const PaintInfo&, const LayoutPoint&) const override;
183 183
184 int cellBaselinePosition() const; 184 int cellBaselinePosition() const;
185 bool isBaselineAligned() const 185 bool isBaselineAligned() const
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&) cons t override; 288 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&) cons t override;
289 void paintMask(const PaintInfo&, const LayoutPoint&) const override; 289 void paintMask(const PaintInfo&, const LayoutPoint&) const override;
290 290
291 bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, const In lineFlowBox*) const override; 291 bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, const In lineFlowBox*) const override;
292 292
293 LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoint&, bool * offsetDependsOnPoint = nullptr) const override; 293 LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoint&, bool * offsetDependsOnPoint = nullptr) const override;
294 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov erride; 294 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov erride;
295 void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L ayoutRect&, const PaintInvalidationState*) const override; 295 void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, L ayoutRect&, const PaintInvalidationState*) const override;
296 296
297 int borderHalfLeft(bool outer) const; 297 LayoutUnit borderHalfLeft(bool outer) const;
298 int borderHalfRight(bool outer) const; 298 LayoutUnit borderHalfRight(bool outer) const;
299 int borderHalfTop(bool outer) const; 299 LayoutUnit borderHalfTop(bool outer) const;
300 int borderHalfBottom(bool outer) const; 300 LayoutUnit borderHalfBottom(bool outer) const;
301 301
302 int borderHalfStart(bool outer) const; 302 LayoutUnit borderHalfStart(bool outer) const;
303 int borderHalfEnd(bool outer) const; 303 LayoutUnit borderHalfEnd(bool outer) const;
304 int borderHalfBefore(bool outer) const; 304 LayoutUnit borderHalfBefore(bool outer) const;
305 int borderHalfAfter(bool outer) const; 305 LayoutUnit borderHalfAfter(bool outer) const;
306 306
307 void setIntrinsicPaddingBefore(int p) { m_intrinsicPaddingBefore = p; } 307 void setIntrinsicPaddingBefore(int p) { m_intrinsicPaddingBefore = p; }
308 void setIntrinsicPaddingAfter(int p) { m_intrinsicPaddingAfter = p; } 308 void setIntrinsicPaddingAfter(int p) { m_intrinsicPaddingAfter = p; }
309 void setIntrinsicPadding(int before, int after) { setIntrinsicPaddingBefore( before); setIntrinsicPaddingAfter(after); } 309 void setIntrinsicPadding(int before, int after) { setIntrinsicPaddingBefore( before); setIntrinsicPaddingAfter(after); }
310 310
311 bool hasStartBorderAdjoiningTable() const; 311 bool hasStartBorderAdjoiningTable() const;
312 bool hasEndBorderAdjoiningTable() const; 312 bool hasEndBorderAdjoiningTable() const;
313 313
314 // Those functions implement the CSS collapsing border conflict 314 // Those functions implement the CSS collapsing border conflict
315 // resolution algorithm. 315 // resolution algorithm.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 inline LayoutTableCell* LayoutTableRow::lastCell() const 380 inline LayoutTableCell* LayoutTableRow::lastCell() const
381 { 381 {
382 ASSERT(children() == virtualChildren()); 382 ASSERT(children() == virtualChildren());
383 return toLayoutTableCell(children()->lastChild()); 383 return toLayoutTableCell(children()->lastChild());
384 } 384 }
385 385
386 } // namespace blink 386 } // namespace blink
387 387
388 #endif // LayoutTableCell_h 388 #endif // LayoutTableCell_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698