Bug 1334227 - Early return in unimplemented shape-outside cases. r=xidorn

MozReview-Commit-ID: 8l6C9LsLpJI

--HG--
extra : rebase_source : 3e91fd201d9483ce21cb4087aecbaf0a30a0a29a
This commit is contained in:
Ting-Yu Lin 2017-02-02 11:53:06 +08:00
parent 52c1c6fc8f
commit 83efb1089f

View File

@ -703,7 +703,7 @@ nsFloatManager::FloatInfo::FloatInfo(nsIFrame* aFrame,
case StyleBasicShapeType::Polygon:
// Bug 1326409 - Implement the rendering of basic shape polygon()
// for CSS shape-outside.
break;
return;
case StyleBasicShapeType::Circle:
case StyleBasicShapeType::Ellipse:
mShapeInfo =
@ -712,12 +712,15 @@ nsFloatManager::FloatInfo::FloatInfo(nsIFrame* aFrame,
case StyleBasicShapeType::Inset:
// Bug 1326407 - Implement the rendering of basic shape inset() for
// CSS shape-outside.
break;
return;
}
} else {
MOZ_ASSERT_UNREACHABLE("Unknown StyleShapeSourceType!");
}
MOZ_ASSERT(mShapeInfo,
"All shape-outside values except none should have mShapeInfo!");
// Translate the shape to the same origin as nsFloatManager.
mShapeInfo->Translate(aLineLeft, aBlockStart);
}