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
Родитель 4d3816d9e0
Коммит 97f33ec2f8
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -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!");
}