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

Unified Diff: Source/core/layout/LayoutTable.cpp

Issue 910083002: Constify and use LayoutStyle reference in layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined again Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/LayoutSliderContainer.cpp ('k') | Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTable.cpp
diff --git a/Source/core/layout/LayoutTable.cpp b/Source/core/layout/LayoutTable.cpp
index 224e1115399565b3219678411cfdc1985341f393..f3193b9c686d001976bfef49664983393694d26d 100644
--- a/Source/core/layout/LayoutTable.cpp
+++ b/Source/core/layout/LayoutTable.cpp
@@ -688,17 +688,17 @@ void LayoutTable::computePreferredLogicalWidths()
for (unsigned i = 0; i < m_captions.size(); i++)
m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth());
- LayoutStyle* styleToUse = style();
+ const LayoutStyle& styleToUse = styleRef();
// FIXME: This should probably be checking for isSpecified since you should be able to use percentage or calc values for min-width.
- if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
- m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
- m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
+ if (styleToUse.logicalMinWidth().isFixed() && styleToUse.logicalMinWidth().value() > 0) {
+ m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
+ m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
}
// FIXME: This should probably be checking for isSpecified since you should be able to use percentage or calc values for maxWidth.
- if (styleToUse->logicalMaxWidth().isFixed()) {
+ if (styleToUse.logicalMaxWidth().isFixed()) {
// We don't constrain m_minPreferredLogicalWidth as the table should be at least the size of its min-content, regardless of 'max-width'.
- m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
+ m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
m_maxPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
}
« no previous file with comments | « Source/core/layout/LayoutSliderContainer.cpp ('k') | Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698