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

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

Issue 178473024: Convert some Shape code to use references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased patch Created 6 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/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index 906875676cad979d26f8d912d073df0cda2ac342..26ce5c2e5870f944f064392f3be7d70d4864bc05 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -1017,7 +1017,7 @@ static inline void pushShapeContentOverflowBelowTheContentBox(RenderBlockFlow* b
LayoutUnit shapeLogicalBottom = shapeInsideInfo->shapeLogicalBottom();
LayoutUnit shapeContainingBlockHeight = shapeInsideInfo->shapeContainingBlockHeight();
- bool isOverflowPositionedAlready = (shapeContainingBlockHeight - shapeInsideInfo->owner()->borderAndPaddingAfter() + lineHeight) <= lineTop;
+ bool isOverflowPositionedAlready = (shapeContainingBlockHeight - shapeInsideInfo->owner().borderAndPaddingAfter() + lineHeight) <= lineTop;
// If the last line overlaps with the shape, we don't need the segments anymore
if (lineTop < shapeLogicalBottom && shapeLogicalBottom < logicalLineBottom)
@@ -1025,7 +1025,7 @@ static inline void pushShapeContentOverflowBelowTheContentBox(RenderBlockFlow* b
if (logicalLineBottom <= shapeLogicalBottom || !shapeContainingBlockHeight || isOverflowPositionedAlready)
return;
- LayoutUnit newLogicalHeight = block->logicalHeight() + (shapeContainingBlockHeight - (lineTop + shapeInsideInfo->owner()->borderAndPaddingAfter()));
+ LayoutUnit newLogicalHeight = block->logicalHeight() + (shapeContainingBlockHeight - (lineTop + shapeInsideInfo->owner().borderAndPaddingAfter()));
block->setLogicalHeight(newLogicalHeight);
}
@@ -1170,17 +1170,17 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
LayoutSize logicalOffsetFromShapeContainer;
ShapeInsideInfo* shapeInsideInfo = layoutShapeInsideInfo();
if (shapeInsideInfo) {
- ASSERT(shapeInsideInfo->owner() == this || allowsShapeInsideInfoSharing(shapeInsideInfo->owner()));
+ ASSERT(&shapeInsideInfo->owner() == this || allowsShapeInsideInfoSharing(&shapeInsideInfo->owner()));
if (shapeInsideInfo != this->shapeInsideInfo()) {
// FIXME Bug 100284: If subsequent LayoutStates are pushed, we will have to add
// their offsets from the original shape-inside container.
- logicalOffsetFromShapeContainer = logicalOffsetFromShapeAncestorContainer(shapeInsideInfo->owner());
+ logicalOffsetFromShapeContainer = logicalOffsetFromShapeAncestorContainer(&shapeInsideInfo->owner());
}
// Begin layout at the logical top of our shape inside.
if (logicalHeight() + logicalOffsetFromShapeContainer.height() < shapeInsideInfo->shapeLogicalTop()) {
LayoutUnit logicalHeight = shapeInsideInfo->shapeLogicalTop() - logicalOffsetFromShapeContainer.height();
if (layoutState.flowThread())
- logicalHeight -= shapeInsideInfo->owner()->borderAndPaddingBefore();
+ logicalHeight -= shapeInsideInfo->owner().borderAndPaddingBefore();
setLogicalHeight(logicalHeight);
}
}
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698