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

Unified Diff: Source/core/layout/LayoutTableSection.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/LayoutTableCell.cpp ('k') | Source/core/layout/compositing/CompositedLayerMapping.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTableSection.cpp
diff --git a/Source/core/layout/LayoutTableSection.cpp b/Source/core/layout/LayoutTableSection.cpp
index 93378a14c4eca864dad2b2be64e832319c4399bf..537b401249f7f0915f355acdcd35cfdfe8d5b9f7 100644
--- a/Source/core/layout/LayoutTableSection.cpp
+++ b/Source/core/layout/LayoutTableSection.cpp
@@ -1145,8 +1145,8 @@ int LayoutTableSection::calcBlockDirectionOuterBorder(BlockBorderSide side) cons
const CellStruct& current = cellAt(side == BorderBefore ? 0 : m_grid.size() - 1, c);
if (current.inColSpan || !current.hasCells())
continue;
- const LayoutStyle* primaryCellStyle = current.primaryCell()->style();
- const BorderValue& cb = side == BorderBefore ? primaryCellStyle->borderBefore() : primaryCellStyle->borderAfter(); // FIXME: Make this work with perpendicular and flipped cells.
+ const LayoutStyle& primaryCellStyle = current.primaryCell()->styleRef();
+ const BorderValue& cb = side == BorderBefore ? primaryCellStyle.borderBefore() : primaryCellStyle.borderAfter(); // FIXME: Make this work with perpendicular and flipped cells.
// FIXME: Don't repeat for the same col group
LayoutTableCol* colGroup = table()->colElement(c);
if (colGroup) {
@@ -1203,10 +1203,10 @@ int LayoutTableSection::calcInlineDirectionOuterBorder(InlineBorderSide side) co
if (!current.hasCells())
continue;
// FIXME: Don't repeat for the same cell
- const LayoutStyle* primaryCellStyle = current.primaryCell()->style();
- const LayoutStyle* primaryCellParentStyle = current.primaryCell()->parent()->style();
- const BorderValue& cb = side == BorderStart ? primaryCellStyle->borderStart() : primaryCellStyle->borderEnd(); // FIXME: Make this work with perpendicular and flipped cells.
- const BorderValue& rb = side == BorderStart ? primaryCellParentStyle->borderStart() : primaryCellParentStyle->borderEnd();
+ const LayoutStyle& primaryCellStyle = current.primaryCell()->styleRef();
+ const LayoutStyle& primaryCellParentStyle = current.primaryCell()->parent()->styleRef();
+ const BorderValue& cb = side == BorderStart ? primaryCellStyle.borderStart() : primaryCellStyle.borderEnd(); // FIXME: Make this work with perpendicular and flipped cells.
+ const BorderValue& rb = side == BorderStart ? primaryCellParentStyle.borderStart() : primaryCellParentStyle.borderEnd();
if (cb.style() == BHIDDEN || rb.style() == BHIDDEN)
continue;
allHidden = false;
« no previous file with comments | « Source/core/layout/LayoutTableCell.cpp ('k') | Source/core/layout/compositing/CompositedLayerMapping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698