diff --git a/gfx/tests/reftest/1501195-ref.html b/gfx/tests/reftest/1501195-ref.html new file mode 100644 index 000000000000..45ea08d56587 --- /dev/null +++ b/gfx/tests/reftest/1501195-ref.html @@ -0,0 +1,30 @@ + + + + + +
+
+
+
+ + diff --git a/gfx/tests/reftest/1501195.html b/gfx/tests/reftest/1501195.html new file mode 100644 index 000000000000..f1664e54fffe --- /dev/null +++ b/gfx/tests/reftest/1501195.html @@ -0,0 +1,31 @@ + + + + + +
+
+
+
+ + diff --git a/gfx/tests/reftest/reftest.list b/gfx/tests/reftest/reftest.list index b7de0d048868..b068c02ddf50 100644 --- a/gfx/tests/reftest/reftest.list +++ b/gfx/tests/reftest/reftest.list @@ -16,4 +16,5 @@ fuzzy(0-100,0-30) == 1149923.html 1149923-ref.html # use fuzzy due to few distor == 1461313.html 1461313-ref.html fuzzy(5-32,21908-26621) fuzzy-if(webrender,0-1,0-3) == 1463802.html 1463802-ref.html fuzzy(0-11,0-4) == 1474722.html 1474722-ref.html +== 1501195.html 1501195-ref.html == 1519754.html 1519754-ref.html diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 3a4e38da25b4..4aae91319bdb 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -7864,6 +7864,11 @@ bool nsDisplayTransform::CreateWebRenderCommands( // doesn't turn this stacking context into a reference frame, as it // affects positioning. Bug 1345577 tracks a better fix. transformForSC = nullptr; + + // In ChooseScaleAndSetTransform, we round the offset from the reference + // frame used to adjust the transform, if there is no transform, or it + // is just a translation. We need to do the same here. + position.Round(); } uint64_t animationsId = AddAnimationsForWebRender(