Bug 1460041 Part 1: Correct PolygonShapeInfo constructor to measure its start and end block extents in margin rect space.
MozReview-Commit-ID: 5pxiK1oH7sn
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -1380,27 +1380,27 @@ nsFloatManager::PolygonShapeInfo::Polygo
// Find the left and right i intercepts of the polygon edge for this
// block row, and adjust them to compensate for the expansion of the
// inline dimension. If we're in the expanded region, or if we're using
// a b that's less than the bStart of the polygon, the intercepts are
// the nscoord min and max limits.
nscoord bInAppUnits = (b - kbExpansionPerSide) * aAppUnitsPerDevPixel;
bool bIsInExpandedRegion(b < kbExpansionPerSide ||
b >= bSize - kbExpansionPerSide);
- bool bIsLessThanPolygonBStart(bInAppUnits < mBStart);
- bool bIsMoreThanPolygonBEnd(bInAppUnits >= mBEnd);
// We now figure out the i values that correspond to the left edge and
// the right edge of the polygon at one-dev-pixel-thick strip of b. We
// have a ComputeLineIntercept function that takes and returns app unit
// coordinates in the space of aMarginRect. So to pass in b values, we
// first have to add the aMarginRect.y value. And for the values that we
// get out, we have to subtract away the aMarginRect.x value before
// converting the app units to dev pixels.
nscoord bInAppUnitsMarginRect = bInAppUnits + aMarginRect.y;
+ bool bIsLessThanPolygonBStart(bInAppUnitsMarginRect < mBStart);
+ bool bIsMoreThanPolygonBEnd(bInAppUnitsMarginRect >= mBEnd);
const int32_t iLeftEdge = (bIsInExpandedRegion ||
bIsLessThanPolygonBStart ||
bIsMoreThanPolygonBEnd) ? nscoord_MAX :
kiExpansionPerSide + NSAppUnitsToIntPixels(
ComputeLineIntercept(bInAppUnitsMarginRect,
bInAppUnitsMarginRect + aAppUnitsPerDevPixel,
std::min<nscoord>, nscoord_MAX) - aMarginRect.x,