Bug 1332180 - Early return from shape-outside:url() value in ctor of FloatInfo. r=TYLin

MozReview-Commit-ID: E2nj3DWt1fr

--HG--
extra : rebase_source : 65cd44b001f8f6ed0085d03f7bc45d07780ef5c1
This commit is contained in:
Xidorn Quan 2017-01-19 16:41:19 +11:00
parent 4d3816d9e0
commit 97f33ec2f8

View File

@ -689,6 +689,13 @@ nsFloatManager::FloatInfo::FloatInfo(nsIFrame* aFrame,
return;
}
if (shapeOutside.GetType() == StyleShapeSourceType::URL) {
// Bug 1265343: Implement 'shape-image-threshold'. Early return
// here because shape-outside with url() value doesn't have a
// reference box, and GetReferenceBox() asserts that.
return;
}
// Initialize <shape-box>'s reference rect.
LogicalRect rect = aMarginRect;
@ -723,8 +730,6 @@ nsFloatManager::FloatInfo::FloatInfo(nsIFrame* aFrame,
mShapeInfo = MakeUnique<CircleShapeInfo>(basicShape, aLineLeft, aBlockStart,
rect, aWM, aContainerSize);
}
} else if (shapeOutside.GetType() == StyleShapeSourceType::URL) {
// Bug 1265343: Implement 'shape-image-threshold'.
} else {
MOZ_ASSERT_UNREACHABLE("Unknown StyleShapeSourceType!");
}