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

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

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rename browser zoom to page zoom Created 6 years, 11 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/RenderTable.cpp ('k') | Source/core/rendering/RenderTableSection.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, 2007, 2009 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return styleWidth; 90 return styleWidth;
91 if (RenderTableCol* firstColumn = table()->colElement(col())) 91 if (RenderTableCol* firstColumn = table()->colElement(col()))
92 return logicalWidthFromColumns(firstColumn, styleWidth); 92 return logicalWidthFromColumns(firstColumn, styleWidth);
93 return styleWidth; 93 return styleWidth;
94 } 94 }
95 95
96 int logicalHeightForRowSizing() const 96 int logicalHeightForRowSizing() const
97 { 97 {
98 // FIXME: This function does too much work, and is very hot during table layout! 98 // FIXME: This function does too much work, and is very hot during table layout!
99 int adjustedLogicalHeight = pixelSnappedLogicalHeight() - (intrinsicPadd ingBefore() + intrinsicPaddingAfter()); 99 int adjustedLogicalHeight = pixelSnappedLogicalHeight() - (intrinsicPadd ingBefore() + intrinsicPaddingAfter());
100 int styleLogicalHeight = valueForLength(style()->logicalHeight(), 0, vie w()); 100 int styleLogicalHeight = valueForLength(style()->logicalHeight(), 0);
101 // In strict mode, box-sizing: content-box do the right thing and actual ly add in the border and padding. 101 // In strict mode, box-sizing: content-box do the right thing and actual ly add in the border and padding.
102 // Call computedCSSPadding* directly to avoid including implicitPadding. 102 // Call computedCSSPadding* directly to avoid including implicitPadding.
103 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX) 103 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX)
104 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter()).floor() + borderBefore() + borderAfter(); 104 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter()).floor() + borderBefore() + borderAfter();
105 return max(styleLogicalHeight, adjustedLogicalHeight); 105 return max(styleLogicalHeight, adjustedLogicalHeight);
106 } 106 }
107 107
108 108
109 void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&); 109 void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&);
110 110
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 unsigned m_hasRowSpan: 1; 285 unsigned m_hasRowSpan: 1;
286 int m_intrinsicPaddingBefore; 286 int m_intrinsicPaddingBefore;
287 int m_intrinsicPaddingAfter; 287 int m_intrinsicPaddingAfter;
288 }; 288 };
289 289
290 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCell, isTableCell()); 290 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCell, isTableCell());
291 291
292 } // namespace WebCore 292 } // namespace WebCore
293 293
294 #endif // RenderTableCell_h 294 #endif // RenderTableCell_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTable.cpp ('k') | Source/core/rendering/RenderTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698