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

Unified Diff: Source/core/rendering/RenderFieldset.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/RenderBox.cpp ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderFieldset.cpp
diff --git a/Source/core/rendering/RenderFieldset.cpp b/Source/core/rendering/RenderFieldset.cpp
index fcb090298f2b9d1c5b663b7fa9f22eb972e26d96..b727c7747e2a72a76364cf849cb96dff1f93948f 100644
--- a/Source/core/rendering/RenderFieldset.cpp
+++ b/Source/core/rendering/RenderFieldset.cpp
@@ -74,13 +74,13 @@ RenderObject* RenderFieldset::layoutSpecialExcludedChild(bool relayoutChildren,
if (style()->isLeftToRightDirection()) {
switch (legend->style()->textAlign()) {
case CENTER:
- logicalLeft = (logicalWidth() - logicalWidthForChild(legend)) / 2;
+ logicalLeft = (logicalWidth() - logicalWidthForChild(*legend)) / 2;
break;
case RIGHT:
- logicalLeft = logicalWidth() - borderEnd() - paddingEnd() - logicalWidthForChild(legend);
+ logicalLeft = logicalWidth() - borderEnd() - paddingEnd() - logicalWidthForChild(*legend);
break;
default:
- logicalLeft = borderStart() + paddingStart() + marginStartForChild(legend);
+ logicalLeft = borderStart() + paddingStart() + marginStartForChild(*legend);
break;
}
} else {
@@ -91,20 +91,20 @@ RenderObject* RenderFieldset::layoutSpecialExcludedChild(bool relayoutChildren,
case CENTER: {
// Make sure that the extra pixel goes to the end side in RTL (since it went to the end side
// in LTR).
- LayoutUnit centeredWidth = logicalWidth() - logicalWidthForChild(legend);
+ LayoutUnit centeredWidth = logicalWidth() - logicalWidthForChild(*legend);
logicalLeft = centeredWidth - centeredWidth / 2;
break;
}
default:
- logicalLeft = logicalWidth() - borderStart() - paddingStart() - marginStartForChild(legend) - logicalWidthForChild(legend);
+ logicalLeft = logicalWidth() - borderStart() - paddingStart() - marginStartForChild(*legend) - logicalWidthForChild(*legend);
break;
}
}
- setLogicalLeftForChild(legend, logicalLeft);
+ setLogicalLeftForChild(*legend, logicalLeft);
LayoutUnit fieldsetBorderBefore = borderBefore();
- LayoutUnit legendLogicalHeight = logicalHeightForChild(legend);
+ LayoutUnit legendLogicalHeight = logicalHeightForChild(*legend);
LayoutUnit legendLogicalTop;
LayoutUnit collapsedLegendExtent;
@@ -115,11 +115,12 @@ RenderObject* RenderFieldset::layoutSpecialExcludedChild(bool relayoutChildren,
// on the legend's margins as we want to still follow the author's cues.
// Firefox completely ignores the margins in this case which seems wrong.
legendLogicalTop = (fieldsetBorderBefore - legendLogicalHeight) / 2;
- collapsedLegendExtent = max<LayoutUnit>(fieldsetBorderBefore, legendLogicalTop + legendLogicalHeight + marginAfterForChild(legend));
- } else
- collapsedLegendExtent = legendLogicalHeight + marginAfterForChild(legend);
+ collapsedLegendExtent = max<LayoutUnit>(fieldsetBorderBefore, legendLogicalTop + legendLogicalHeight + marginAfterForChild(*legend));
+ } else {
+ collapsedLegendExtent = legendLogicalHeight + marginAfterForChild(*legend);
+ }
- setLogicalTopForChild(legend, legendLogicalTop);
+ setLogicalTopForChild(*legend, legendLogicalTop);
setLogicalHeight(paddingBefore() + collapsedLegendExtent);
}
return legend;
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698