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

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

Issue 178473024: Convert some Shape code to use references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase with 185393015 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
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 410ccea586f7631dfdd2cba1cb7633a9dbb0d37d..7935536ba21ba0335bb2c058252ec0ee8f9de548 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -1400,8 +1400,8 @@ void RenderBlock::imageChanged(WrappedImagePtr image, const IntRect*)
ShapeValue* shapeValue = style()->shapeInside();
if (shapeValue && shapeValue->image() && shapeValue->image()->data() == image) {
- ShapeInsideInfo* shapeInsideInfo = ensureShapeInsideInfo();
- shapeInsideInfo->dirtyShapeSize();
+ ShapeInsideInfo& shapeInsideInfo = ensureShapeInsideInfo();
+ shapeInsideInfo.markShapeAsDirty();
markShapeInsideDescendantsForLayout();
}
}
@@ -1413,8 +1413,8 @@ void RenderBlock::updateShapeInsideInfoAfterStyleChange(const ShapeValue* shapeI
return;
if (shapeInside) {
- ShapeInsideInfo* shapeInsideInfo = ensureShapeInsideInfo();
- shapeInsideInfo->dirtyShapeSize();
+ ShapeInsideInfo& shapeInsideInfo = ensureShapeInsideInfo();
+ shapeInsideInfo.markShapeAsDirty();
} else {
setShapeInsideInfo(nullptr);
markShapeInsideDescendantsForLayout();
@@ -1425,7 +1425,7 @@ static inline bool shapeInfoRequiresRelayout(const RenderBlock* block)
{
ShapeInsideInfo* info = block->shapeInsideInfo();
if (info)
- info->setNeedsLayout(info->shapeSizeDirty());
+ info->setNeedsLayout(info->isShapeDirty());
else
info = block->layoutShapeInsideInfo();
return info && info->needsLayout();
@@ -1463,7 +1463,7 @@ void RenderBlock::computeShapeSize()
return;
bool percentageLogicalHeightResolvable = percentageLogicalHeightIsResolvableFromBlock(this, false);
- shapeInsideInfo->setShapeSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : LayoutUnit());
+ shapeInsideInfo->setReferenceBoxLogicalSize(LayoutSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : LayoutUnit()));
}
void RenderBlock::updateRegionsAndShapesAfterChildLayout(RenderFlowThread* flowThread, bool heightChanged)
@@ -1471,7 +1471,7 @@ void RenderBlock::updateRegionsAndShapesAfterChildLayout(RenderFlowThread* flowT
// A previous sibling has changed dimension, so we need to relayout the shape with the content
ShapeInsideInfo* shapeInsideInfo = layoutShapeInsideInfo();
if (heightChanged && shapeInsideInfo)
- shapeInsideInfo->dirtyShapeSize();
+ shapeInsideInfo->markShapeAsDirty();
computeRegionRangeForBlock(flowThread);
}

Powered by Google App Engine
This is Rietveld 408576698