diff --git a/gfx/webrender_bindings/WebRenderAPI.cpp b/gfx/webrender_bindings/WebRenderAPI.cpp index 013e3cde07ad..78c341f2b227 100644 --- a/gfx/webrender_bindings/WebRenderAPI.cpp +++ b/gfx/webrender_bindings/WebRenderAPI.cpp @@ -795,15 +795,16 @@ void DisplayListBuilder::PushBorder(const WrRect& aBounds, const WrRect& aClip, const WrBorderWidths& aWidths, - const WrBorderSide& aTop, - const WrBorderSide& aRight, - const WrBorderSide& aBottom, - const WrBorderSide& aLeft, + const Range& aSides, const WrBorderRadius& aRadius) { + MOZ_ASSERT(aSides.length() == 4); + if (aSides.length() != 4) { + return; + } WrClipRegionToken tok = wr_dp_push_clip_region(mWrState, aClip, nullptr, 0, nullptr); wr_dp_push_border(mWrState, aBounds, tok, - aWidths, aTop, aRight, aBottom, aLeft, aRadius); + aWidths, aSides[0], aSides[1], aSides[2], aSides[3], aRadius); } void diff --git a/gfx/webrender_bindings/WebRenderAPI.h b/gfx/webrender_bindings/WebRenderAPI.h index 93715b8422c9..108e4bb2a634 100644 --- a/gfx/webrender_bindings/WebRenderAPI.h +++ b/gfx/webrender_bindings/WebRenderAPI.h @@ -232,13 +232,12 @@ public: const WrRect& aClip, wr::PipelineId aPipeline); + // XXX WrBorderSides are passed with Range. + // It is just to bypass compiler bug. See Bug 1357734. void PushBorder(const WrRect& aBounds, const WrRect& aClip, const WrBorderWidths& aWidths, - const WrBorderSide& aTop, - const WrBorderSide& aRight, - const WrBorderSide& aBbottom, - const WrBorderSide& aLeft, + const Range& aSides, const WrBorderRadius& aRadius); void PushBorderImage(const WrRect& aBounds, diff --git a/layout/painting/nsCSSRenderingBorders.cpp b/layout/painting/nsCSSRenderingBorders.cpp index e31a217d7859..2b3dad24307a 100644 --- a/layout/painting/nsCSSRenderingBorders.cpp +++ b/layout/painting/nsCSSRenderingBorders.cpp @@ -30,6 +30,7 @@ #include "gfxGradientCache.h" #include "mozilla/layers/StackingContextHelper.h" #include "mozilla/layers/WebRenderDisplayItemLayer.h" +#include "mozilla/Range.h" #include using namespace mozilla; @@ -3565,10 +3566,11 @@ nsCSSBorderRenderer::CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder, LayerSize(mBorderRadii[1].width, mBorderRadii[1].height), LayerSize(mBorderRadii[3].width, mBorderRadii[3].height), LayerSize(mBorderRadii[2].width, mBorderRadii[2].height)); + Range wrsides(side, 4); aBuilder.PushBorder(transformedRect, transformedRect, wr::ToWrBorderWidths(mBorderWidths[0], mBorderWidths[1], mBorderWidths[2], mBorderWidths[3]), - side[0], side[1], side[2], side[3], + wrsides, borderRadius); } diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 68dde934f75c..3e9ee541e527 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -39,6 +39,7 @@ #include "nsFrameManager.h" #include "nsError.h" #include "nsCSSFrameConstructor.h" +#include "mozilla/Range.h" #include "mozilla/ServoRestyleManager.h" #include "mozilla/ServoStyleSet.h" #include "mozilla/StyleSetHandle.h" @@ -7436,10 +7437,11 @@ BCBlockDirSeg::CreateWebRenderCommands(BCPaintBorderIterator& aIter, transformedRect.width, transformedRect.width); transformedRect.width *= 2.0f; + Range wrsides(wrSide, 4); aBuilder.PushBorder(transformedRect, transformedRect, borderWidths, - wrSide[0], wrSide[1], wrSide[2], wrSide[3], + wrsides, borderRadii); } @@ -7694,10 +7696,11 @@ BCInlineDirSeg::CreateWebRenderCommands(BCPaintBorderIterator& aIter, transformedRect.height, transformedRect.height); transformedRect.height *= 2.0f; + Range wrsides(wrSide, 4); aBuilder.PushBorder(transformedRect, transformedRect, borderWidths, - wrSide[0], wrSide[1], wrSide[2], wrSide[3], + wrsides, borderRadii); }