Backed out changeset 69faa23050d9 (bug 1412179) for landing without first patch

This commit is contained in:
Margareta Eliza Balazs 2018-08-24 18:32:02 +03:00
parent 0d4d59a191
commit 9b4034d1f9
3 changed files with 13 additions and 28 deletions

View File

@ -163,42 +163,27 @@ nsDisplayFieldSetBorder::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder
auto frame = static_cast<nsFieldSetFrame*>(mFrame);
auto offset = ToReferenceFrame();
nsRect rect;
bool pushedClip = false;
if (nsIFrame* legend = frame->GetLegend()) {
rect = frame->VisualBorderRectRelativeToSelf() + offset;
// Legends require a "negative" clip around the text, which WR doesn't support yet.
nsRect legendRect = legend->GetNormalRect() + offset;
if (!legendRect.IsEmpty()) {
auto appUnitsPerDevPixel = frame->PresContext()->AppUnitsPerDevPixel();
auto layoutRect = wr::ToLayoutRect(LayoutDeviceRect::FromAppUnits(rect, appUnitsPerDevPixel));
wr::ComplexClipRegion region;
region.rect = wr::ToLayoutRect(LayoutDeviceRect::FromAppUnits(legendRect, appUnitsPerDevPixel));
region.mode = wr::ClipMode::ClipOut;
nsTArray<mozilla::wr::ComplexClipRegion> array{region};
wr::WrClipId clip = aBuilder.DefineClip(Nothing(), layoutRect, &array, nullptr);
aBuilder.PushClip(clip);
pushedClip = true;
return false;
}
} else {
rect = nsRect(offset, frame->GetRect().Size());
}
bool result = nsCSSRendering::CreateWebRenderCommandsForBorder(this,
mFrame,
rect,
aBuilder,
aResources,
aSc,
aManager,
aDisplayListBuilder);
if (pushedClip) {
aBuilder.PopClip();
}
return result;
return nsCSSRendering::CreateWebRenderCommandsForBorder(this,
mFrame,
rect,
aBuilder,
aResources,
aSc,
aManager,
aDisplayListBuilder);
};
void

View File

@ -40,7 +40,7 @@ fuzzy(0-13,0-9445) fuzzy-if(d2d,0-13,0-10926) fails-if(webrender) == boxshadow-i
== overflow-not-scrollable-2.html overflow-not-scrollable-2-ref.html
fuzzy-if(webrender,0-1,0-655) == 611574-1.html 611574-1-ref.html
fuzzy-if(webrender,0-4,0-144) == 611574-2.html 611574-2-ref.html
fuzzy-if(winWidget,0-5,0-30) fuzzy-if(skiaContent,0-16,0-10) == fieldset.html fieldset-ref.html # minor anti-aliasing problem on Windows
fuzzy-if(winWidget,0-5,0-30) fuzzy-if(skiaContent,0-16,0-10) fuzzy-if(webrender,34-34,82-82) == fieldset.html fieldset-ref.html # minor anti-aliasing problem on Windows
fuzzy-if(winWidget,0-5,0-30) fuzzy-if(skiaContent,0-16,0-10) fails-if(webrender) == fieldset-inset.html fieldset-inset-ref.html # minor anti-aliasing problem on Windows
== 1178575.html 1178575-ref.html
== 1178575-2.html 1178575-2-ref.html

View File

@ -10,7 +10,7 @@ fuzzy-if(winWidget&&!layersGPUAccelerated,0-142,0-276) == positioned-container-1
== relpos-legend-2.html relpos-legend-2-ref.html
== relpos-legend-3.html relpos-legend-3-ref.html
== relpos-legend-4.html relpos-legend-4-ref.html
== sticky-legend-1.html sticky-legend-1-ref.html
fuzzy-if(webrender,17-19,1217-2452) == sticky-legend-1.html sticky-legend-1-ref.html
fuzzy-if(skiaContent,0-1,0-40768) == abs-pos-child-sizing.html abs-pos-child-sizing-ref.html
== overflow-hidden.html overflow-hidden-ref.html
== legend-rtl.html legend-rtl-ref.html