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

Unified Diff: Source/core/rendering/RenderBlock.h

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 | « no previous file | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.h
diff --git a/Source/core/rendering/RenderBlock.h b/Source/core/rendering/RenderBlock.h
index 0b0d54852ce3d53f5525e9a68218b1a5d123fd69..85e46ef65ef8794dd828f63081981078dd772ef6 100644
--- a/Source/core/rendering/RenderBlock.h
+++ b/Source/core/rendering/RenderBlock.h
@@ -206,20 +206,20 @@ public:
void setPageLogicalOffset(LayoutUnit offset) { m_pageLogicalOffset = offset; }
// Accessors for logical width/height and margins in the containing block's block-flow direction.
- LayoutUnit logicalWidthForChild(const RenderBox* child) const { return isHorizontalWritingMode() ? child->width() : child->height(); }
- LayoutUnit logicalHeightForChild(const RenderBox* child) const { return isHorizontalWritingMode() ? child->height() : child->width(); }
- LayoutSize logicalSizeForChild(const RenderBox* child) const { return isHorizontalWritingMode() ? child->size() : child->size().transposedSize(); }
- LayoutUnit logicalTopForChild(const RenderBox* child) const { return isHorizontalWritingMode() ? child->y() : child->x(); }
- LayoutUnit marginBeforeForChild(const RenderBoxModelObject* child) const { return child->marginBefore(style()); }
- LayoutUnit marginAfterForChild(const RenderBoxModelObject* child) const { return child->marginAfter(style()); }
- LayoutUnit marginStartForChild(const RenderBoxModelObject* child) const { return child->marginStart(style()); }
- LayoutUnit marginEndForChild(const RenderBoxModelObject* child) const { return child->marginEnd(style()); }
- void setMarginStartForChild(RenderBox* child, LayoutUnit value) const { child->setMarginStart(value, style()); }
- void setMarginEndForChild(RenderBox* child, LayoutUnit value) const { child->setMarginEnd(value, style()); }
- void setMarginBeforeForChild(RenderBox* child, LayoutUnit value) const { child->setMarginBefore(value, style()); }
- void setMarginAfterForChild(RenderBox* child, LayoutUnit value) const { child->setMarginAfter(value, style()); }
- LayoutUnit collapsedMarginBeforeForChild(const RenderBox* child) const;
- LayoutUnit collapsedMarginAfterForChild(const RenderBox* child) const;
+ LayoutUnit logicalWidthForChild(const RenderBox& child) const { return isHorizontalWritingMode() ? child.width() : child.height(); }
+ LayoutUnit logicalHeightForChild(const RenderBox& child) const { return isHorizontalWritingMode() ? child.height() : child.width(); }
+ LayoutSize logicalSizeForChild(const RenderBox& child) const { return isHorizontalWritingMode() ? child.size() : child.size().transposedSize(); }
+ LayoutUnit logicalTopForChild(const RenderBox& child) const { return isHorizontalWritingMode() ? child.y() : child.x(); }
+ LayoutUnit marginBeforeForChild(const RenderBoxModelObject& child) const { return child.marginBefore(style()); }
+ LayoutUnit marginAfterForChild(const RenderBoxModelObject& child) const { return child.marginAfter(style()); }
+ LayoutUnit marginStartForChild(const RenderBoxModelObject& child) const { return child.marginStart(style()); }
+ LayoutUnit marginEndForChild(const RenderBoxModelObject& child) const { return child.marginEnd(style()); }
+ void setMarginStartForChild(RenderBox& child, LayoutUnit value) const { child.setMarginStart(value, style()); }
+ void setMarginEndForChild(RenderBox& child, LayoutUnit value) const { child.setMarginEnd(value, style()); }
+ void setMarginBeforeForChild(RenderBox& child, LayoutUnit value) const { child.setMarginBefore(value, style()); }
+ void setMarginAfterForChild(RenderBox& child, LayoutUnit value) const { child.setMarginAfter(value, style()); }
+ LayoutUnit collapsedMarginBeforeForChild(const RenderBox& child) const;
+ LayoutUnit collapsedMarginAfterForChild(const RenderBox& child) const;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
@@ -262,7 +262,7 @@ protected:
void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout);
void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLayoutScope&);
- LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox* child) const;
+ LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox& child) const;
int beforeMarginInLineDirection(LineDirectionMode) const;
@@ -320,7 +320,7 @@ protected:
virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override;
- void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox*);
+ void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox&);
virtual bool isInlineBlockOrInlineTable() const override final { return isInline() && isReplaced(); }
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698