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

Unified Diff: Source/core/rendering/RenderTable.cpp

Issue 752723004: Use references in RenderBlock and RenderBlockFlow methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cover RenderBlockFlow class as well Created 6 years, 1 month 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/rendering/RenderTable.h ('k') | Source/core/rendering/line/BreakingContextInlineHeaders.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index a5a90e380223bfb62aa2484c3ef5cabc7342914f..df9a9aec096035c33130814be2ff2e569aa95ab6 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -348,27 +348,27 @@ LayoutUnit RenderTable::convertStyleLogicalHeightToComputedHeight(const Length&
return std::max<LayoutUnit>(0, computedLogicalHeight);
}
-void RenderTable::layoutCaption(RenderTableCaption* caption)
+void RenderTable::layoutCaption(RenderTableCaption& caption)
{
- if (caption->needsLayout()) {
+ if (caption.needsLayout()) {
// The margins may not be available but ensure the caption is at least located beneath any previous sibling caption
// so that it does not mistakenly think any floats in the previous caption intrude into it.
- caption->setLogicalLocation(LayoutPoint(caption->marginStart(), collapsedMarginBeforeForChild(caption) + logicalHeight()));
+ caption.setLogicalLocation(LayoutPoint(caption.marginStart(), collapsedMarginBeforeForChild(caption) + logicalHeight()));
// If RenderTableCaption ever gets a layout() function, use it here.
- caption->layoutIfNeeded();
+ caption.layoutIfNeeded();
}
// Apply the margins to the location now that they are definitely available from layout
LayoutUnit captionLogicalTop = collapsedMarginBeforeForChild(caption) + logicalHeight();
if (view()->layoutState()->isPaginated()) {
- captionLogicalTop += caption->paginationStrut();
- caption->setPaginationStrut(0);
+ captionLogicalTop += caption.paginationStrut();
+ caption.setPaginationStrut(0);
}
- caption->setLogicalLocation(LayoutPoint(caption->marginStart(), captionLogicalTop));
+ caption.setLogicalLocation(LayoutPoint(caption.marginStart(), captionLogicalTop));
if (!selfNeedsLayout())
- caption->setMayNeedPaintInvalidation(true);
+ caption.setMayNeedPaintInvalidation(true);
- setLogicalHeight(logicalHeight() + caption->logicalHeight() + collapsedMarginBeforeForChild(caption) + collapsedMarginAfterForChild(caption));
+ setLogicalHeight(logicalHeight() + caption.logicalHeight() + collapsedMarginBeforeForChild(caption) + collapsedMarginAfterForChild(caption));
}
void RenderTable::distributeExtraLogicalHeight(int extraLogicalHeight)
@@ -468,7 +468,7 @@ void RenderTable::layout()
for (unsigned i = 0; i < m_captions.size(); i++) {
if (m_captions[i]->style()->captionSide() == CAPBOTTOM)
continue;
- layoutCaption(m_captions[i]);
+ layoutCaption(*m_captions[i]);
}
if (logicalHeight() != oldTableLogicalTop) {
sectionMoved = true;
@@ -537,7 +537,7 @@ void RenderTable::layout()
for (unsigned i = 0; i < m_captions.size(); i++) {
if (m_captions[i]->style()->captionSide() != CAPBOTTOM)
continue;
- layoutCaption(m_captions[i]);
+ layoutCaption(*m_captions[i]);
}
updateLogicalHeight();
« no previous file with comments | « Source/core/rendering/RenderTable.h ('k') | Source/core/rendering/line/BreakingContextInlineHeaders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698