зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 4 changesets (bug 1664804) for failures on browser_inspector_highlighter-geometry_06.js. CLOSED TREE
Backed out changeset a54e27ab0e56 (bug 1664804) Backed out changeset 5e665bbcad8d (bug 1664804) Backed out changeset f9c62853d8ba (bug 1664804) Backed out changeset 17fef6ea08fe (bug 1664804)
This commit is contained in:
Родитель
c6a26a8b39
Коммит
da0a3666b9
|
@ -126,9 +126,6 @@ void ShareableCanvasRenderer::UpdateCompositableClient() {
|
|||
if (!YIsDown()) {
|
||||
flags |= TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||
}
|
||||
if (IsOpaque()) {
|
||||
flags |= TextureFlags::IS_OPAQUE;
|
||||
}
|
||||
|
||||
// -
|
||||
|
||||
|
|
|
@ -233,13 +233,11 @@ void MacIOSurfaceTextureHostOGL::PushDisplayItems(
|
|||
case gfx::SurfaceFormat::B8G8R8X8: {
|
||||
MOZ_ASSERT(aImageKeys.length() == 1);
|
||||
MOZ_ASSERT(mSurface->GetPlaneCount() == 0);
|
||||
// We disable external compositing for RGB surfaces for now until
|
||||
// we've tested support more thoroughly. Bug 1667917.
|
||||
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0],
|
||||
!(mFlags & TextureFlags::NON_PREMULTIPLIED),
|
||||
wr::ColorF{1.0f, 1.0f, 1.0f, 1.0f},
|
||||
aPreferCompositorSurface,
|
||||
/* aSupportsExternalCompositing */ false);
|
||||
/* aSupportsExternalCompositing */ true);
|
||||
break;
|
||||
}
|
||||
case gfx::SurfaceFormat::YUV422: {
|
||||
|
|
|
@ -113,46 +113,8 @@ static void BuildDisplayListForTopLayerFrame(nsDisplayListBuilder* aBuilder,
|
|||
aList->AppendToTop(&list);
|
||||
}
|
||||
|
||||
static bool BackdropListIsOpaque(ViewportFrame* aFrame,
|
||||
nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aList) {
|
||||
// The common case for ::backdrop elements on the top layer is a single
|
||||
// fixed position container, holding an opaque background color covering
|
||||
// the whole viewport.
|
||||
if (aList->Count() != 1 ||
|
||||
aList->GetTop()->GetType() != DisplayItemType::TYPE_FIXED_POSITION) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure the fixed position container isn't clipped or scrollable.
|
||||
nsDisplayFixedPosition* fixed =
|
||||
static_cast<nsDisplayFixedPosition*>(aList->GetTop());
|
||||
if (fixed->GetActiveScrolledRoot() || fixed->GetClipChain()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsDisplayList* children = fixed->GetChildren();
|
||||
if (!children->GetTop() ||
|
||||
children->GetTop()->GetType() != DisplayItemType::TYPE_BACKGROUND_COLOR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsDisplayBackgroundColor* child =
|
||||
static_cast<nsDisplayBackgroundColor*>(children->GetTop());
|
||||
if (child->GetActiveScrolledRoot() || child->GetClipChain()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the background color is both opaque, and covering the
|
||||
// whole viewport.
|
||||
bool dummy;
|
||||
nsRegion opaque = child->GetOpaqueRegion(aBuilder, &dummy);
|
||||
return opaque.Contains(aFrame->GetRect());
|
||||
}
|
||||
|
||||
void ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aList,
|
||||
bool* aIsOpaque) {
|
||||
nsDisplayList* aList) {
|
||||
nsTArray<dom::Element*> topLayer = PresContext()->Document()->GetTopLayer();
|
||||
for (dom::Element* elem : topLayer) {
|
||||
if (nsIFrame* frame = elem->GetPrimaryFrame()) {
|
||||
|
@ -190,10 +152,6 @@ void ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
|||
static_cast<nsPlaceholderFrame*>(backdropPh)->GetOutOfFlowFrame();
|
||||
MOZ_ASSERT(backdropFrame);
|
||||
BuildDisplayListForTopLayerFrame(aBuilder, backdropFrame, aList);
|
||||
|
||||
if (aIsOpaque) {
|
||||
*aIsOpaque = BackdropListIsOpaque(this, aBuilder, aList);
|
||||
}
|
||||
}
|
||||
BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
|
||||
}
|
||||
|
|
|
@ -52,8 +52,7 @@ class ViewportFrame : public nsContainerFrame {
|
|||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aList,
|
||||
bool* aIsOpaque = nullptr);
|
||||
nsDisplayList* aList);
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||
|
|
|
@ -3624,13 +3624,6 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsIScrollableFrame* sf = do_QueryFrame(mOuter);
|
||||
MOZ_ASSERT(sf);
|
||||
|
||||
// Create any required items for the 'top layer' and check if they'll be
|
||||
// opaque over the entire area of the viewport. If they are, then we can
|
||||
// skip building display items for the rest of the page.
|
||||
bool topLayerIsOpaque = false;
|
||||
nsDisplayWrapList* topLayerWrapList =
|
||||
MaybeCreateTopLayerItems(aBuilder, &topLayerIsOpaque);
|
||||
|
||||
if (ignoringThisScrollFrame) {
|
||||
// Root scrollframes have FrameMetrics and clipping on their container
|
||||
// layers, so don't apply clipping again.
|
||||
|
@ -3647,7 +3640,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, false);
|
||||
}
|
||||
|
||||
if (!topLayerIsOpaque) {
|
||||
{
|
||||
nsDisplayListBuilder::AutoBuildingDisplayList building(
|
||||
aBuilder, mOuter, visibleRect, dirtyRect);
|
||||
|
||||
|
@ -3657,9 +3650,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, aLists);
|
||||
}
|
||||
|
||||
if (topLayerWrapList) {
|
||||
aLists.PositionedDescendants()->AppendToTop(topLayerWrapList);
|
||||
}
|
||||
MaybeAddTopLayerItems(aBuilder, aLists);
|
||||
|
||||
if (addScrollBars) {
|
||||
// Add overlay scrollbars.
|
||||
|
@ -3848,7 +3839,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
}
|
||||
|
||||
if (!topLayerIsOpaque) {
|
||||
{
|
||||
// Clip our contents to the unsnapped scrolled rect. This makes sure
|
||||
// that we don't have display items over the subpixel seam at the edge
|
||||
// of the scrolled area.
|
||||
|
@ -3963,9 +3954,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
}
|
||||
|
||||
if (topLayerWrapList) {
|
||||
set.PositionedDescendants()->AppendToTop(topLayerWrapList);
|
||||
}
|
||||
MaybeAddTopLayerItems(aBuilder, set);
|
||||
|
||||
if (willBuildAsyncZoomContainer) {
|
||||
MOZ_ASSERT(mClipAllDescendants);
|
||||
|
@ -4068,13 +4057,12 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
scrolledContent.MoveTo(aLists);
|
||||
}
|
||||
|
||||
nsDisplayWrapList* ScrollFrameHelper::MaybeCreateTopLayerItems(
|
||||
nsDisplayListBuilder* aBuilder, bool* aIsOpaque) {
|
||||
void ScrollFrameHelper::MaybeAddTopLayerItems(nsDisplayListBuilder* aBuilder,
|
||||
const nsDisplayListSet& aLists) {
|
||||
if (mIsRoot) {
|
||||
if (ViewportFrame* viewportFrame = do_QueryFrame(mOuter->GetParent())) {
|
||||
nsDisplayList topLayerList;
|
||||
viewportFrame->BuildDisplayListForTopLayer(aBuilder, &topLayerList,
|
||||
aIsOpaque);
|
||||
viewportFrame->BuildDisplayListForTopLayer(aBuilder, &topLayerList);
|
||||
if (!topLayerList.IsEmpty()) {
|
||||
nsDisplayListBuilder::AutoBuildingDisplayList buildingDisplayList(
|
||||
aBuilder, viewportFrame);
|
||||
|
@ -4088,12 +4076,11 @@ nsDisplayWrapList* ScrollFrameHelper::MaybeCreateTopLayerItems(
|
|||
if (wrapList) {
|
||||
wrapList->SetOverrideZIndex(
|
||||
std::numeric_limits<decltype(wrapList->ZIndex())>::max());
|
||||
return wrapList;
|
||||
aLists.PositionedDescendants()->AppendToTop(wrapList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRect ScrollFrameHelper::RestrictToRootDisplayPort(
|
||||
|
|
|
@ -95,8 +95,8 @@ class ScrollFrameHelper : public nsIReflowCallback {
|
|||
// wrapped in the async zoom container, if we're building one.
|
||||
// It should not be called with an ASR setter on the stack, as the
|
||||
// top-layer items handle setting up their own ASRs.
|
||||
nsDisplayWrapList* MaybeCreateTopLayerItems(nsDisplayListBuilder* aBuilder,
|
||||
bool* aIsOpaque);
|
||||
void MaybeAddTopLayerItems(nsDisplayListBuilder* aBuilder,
|
||||
const nsDisplayListSet& aLists);
|
||||
|
||||
void AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
||||
const nsDisplayListSet& aLists, bool aCreateLayer,
|
||||
|
|
Загрузка…
Ссылка в новой задаче