зеркало из 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()) {
|
if (!YIsDown()) {
|
||||||
flags |= TextureFlags::ORIGIN_BOTTOM_LEFT;
|
flags |= TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||||
}
|
}
|
||||||
if (IsOpaque()) {
|
|
||||||
flags |= TextureFlags::IS_OPAQUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// -
|
// -
|
||||||
|
|
||||||
|
|
|
@ -233,13 +233,11 @@ void MacIOSurfaceTextureHostOGL::PushDisplayItems(
|
||||||
case gfx::SurfaceFormat::B8G8R8X8: {
|
case gfx::SurfaceFormat::B8G8R8X8: {
|
||||||
MOZ_ASSERT(aImageKeys.length() == 1);
|
MOZ_ASSERT(aImageKeys.length() == 1);
|
||||||
MOZ_ASSERT(mSurface->GetPlaneCount() == 0);
|
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],
|
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0],
|
||||||
!(mFlags & TextureFlags::NON_PREMULTIPLIED),
|
!(mFlags & TextureFlags::NON_PREMULTIPLIED),
|
||||||
wr::ColorF{1.0f, 1.0f, 1.0f, 1.0f},
|
wr::ColorF{1.0f, 1.0f, 1.0f, 1.0f},
|
||||||
aPreferCompositorSurface,
|
aPreferCompositorSurface,
|
||||||
/* aSupportsExternalCompositing */ false);
|
/* aSupportsExternalCompositing */ true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case gfx::SurfaceFormat::YUV422: {
|
case gfx::SurfaceFormat::YUV422: {
|
||||||
|
|
|
@ -113,46 +113,8 @@ static void BuildDisplayListForTopLayerFrame(nsDisplayListBuilder* aBuilder,
|
||||||
aList->AppendToTop(&list);
|
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,
|
void ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayList* aList,
|
nsDisplayList* aList) {
|
||||||
bool* aIsOpaque) {
|
|
||||||
nsTArray<dom::Element*> topLayer = PresContext()->Document()->GetTopLayer();
|
nsTArray<dom::Element*> topLayer = PresContext()->Document()->GetTopLayer();
|
||||||
for (dom::Element* elem : topLayer) {
|
for (dom::Element* elem : topLayer) {
|
||||||
if (nsIFrame* frame = elem->GetPrimaryFrame()) {
|
if (nsIFrame* frame = elem->GetPrimaryFrame()) {
|
||||||
|
@ -190,10 +152,6 @@ void ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||||
static_cast<nsPlaceholderFrame*>(backdropPh)->GetOutOfFlowFrame();
|
static_cast<nsPlaceholderFrame*>(backdropPh)->GetOutOfFlowFrame();
|
||||||
MOZ_ASSERT(backdropFrame);
|
MOZ_ASSERT(backdropFrame);
|
||||||
BuildDisplayListForTopLayerFrame(aBuilder, backdropFrame, aList);
|
BuildDisplayListForTopLayerFrame(aBuilder, backdropFrame, aList);
|
||||||
|
|
||||||
if (aIsOpaque) {
|
|
||||||
*aIsOpaque = BackdropListIsOpaque(this, aBuilder, aList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
|
BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,7 @@ class ViewportFrame : public nsContainerFrame {
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayList* aList,
|
nsDisplayList* aList);
|
||||||
bool* aIsOpaque = nullptr);
|
|
||||||
|
|
||||||
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||||
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||||
|
|
|
@ -3624,13 +3624,6 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsIScrollableFrame* sf = do_QueryFrame(mOuter);
|
nsIScrollableFrame* sf = do_QueryFrame(mOuter);
|
||||||
MOZ_ASSERT(sf);
|
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) {
|
if (ignoringThisScrollFrame) {
|
||||||
// Root scrollframes have FrameMetrics and clipping on their container
|
// Root scrollframes have FrameMetrics and clipping on their container
|
||||||
// layers, so don't apply clipping again.
|
// layers, so don't apply clipping again.
|
||||||
|
@ -3647,7 +3640,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, false);
|
AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!topLayerIsOpaque) {
|
{
|
||||||
nsDisplayListBuilder::AutoBuildingDisplayList building(
|
nsDisplayListBuilder::AutoBuildingDisplayList building(
|
||||||
aBuilder, mOuter, visibleRect, dirtyRect);
|
aBuilder, mOuter, visibleRect, dirtyRect);
|
||||||
|
|
||||||
|
@ -3657,9 +3650,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, aLists);
|
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (topLayerWrapList) {
|
MaybeAddTopLayerItems(aBuilder, aLists);
|
||||||
aLists.PositionedDescendants()->AppendToTop(topLayerWrapList);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (addScrollBars) {
|
if (addScrollBars) {
|
||||||
// Add overlay scrollbars.
|
// 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
|
// 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
|
// that we don't have display items over the subpixel seam at the edge
|
||||||
// of the scrolled area.
|
// of the scrolled area.
|
||||||
|
@ -3963,9 +3954,7 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (topLayerWrapList) {
|
MaybeAddTopLayerItems(aBuilder, set);
|
||||||
set.PositionedDescendants()->AppendToTop(topLayerWrapList);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (willBuildAsyncZoomContainer) {
|
if (willBuildAsyncZoomContainer) {
|
||||||
MOZ_ASSERT(mClipAllDescendants);
|
MOZ_ASSERT(mClipAllDescendants);
|
||||||
|
@ -4068,13 +4057,12 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
scrolledContent.MoveTo(aLists);
|
scrolledContent.MoveTo(aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayWrapList* ScrollFrameHelper::MaybeCreateTopLayerItems(
|
void ScrollFrameHelper::MaybeAddTopLayerItems(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayListBuilder* aBuilder, bool* aIsOpaque) {
|
const nsDisplayListSet& aLists) {
|
||||||
if (mIsRoot) {
|
if (mIsRoot) {
|
||||||
if (ViewportFrame* viewportFrame = do_QueryFrame(mOuter->GetParent())) {
|
if (ViewportFrame* viewportFrame = do_QueryFrame(mOuter->GetParent())) {
|
||||||
nsDisplayList topLayerList;
|
nsDisplayList topLayerList;
|
||||||
viewportFrame->BuildDisplayListForTopLayer(aBuilder, &topLayerList,
|
viewportFrame->BuildDisplayListForTopLayer(aBuilder, &topLayerList);
|
||||||
aIsOpaque);
|
|
||||||
if (!topLayerList.IsEmpty()) {
|
if (!topLayerList.IsEmpty()) {
|
||||||
nsDisplayListBuilder::AutoBuildingDisplayList buildingDisplayList(
|
nsDisplayListBuilder::AutoBuildingDisplayList buildingDisplayList(
|
||||||
aBuilder, viewportFrame);
|
aBuilder, viewportFrame);
|
||||||
|
@ -4088,12 +4076,11 @@ nsDisplayWrapList* ScrollFrameHelper::MaybeCreateTopLayerItems(
|
||||||
if (wrapList) {
|
if (wrapList) {
|
||||||
wrapList->SetOverrideZIndex(
|
wrapList->SetOverrideZIndex(
|
||||||
std::numeric_limits<decltype(wrapList->ZIndex())>::max());
|
std::numeric_limits<decltype(wrapList->ZIndex())>::max());
|
||||||
return wrapList;
|
aLists.PositionedDescendants()->AppendToTop(wrapList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect ScrollFrameHelper::RestrictToRootDisplayPort(
|
nsRect ScrollFrameHelper::RestrictToRootDisplayPort(
|
||||||
|
|
|
@ -95,8 +95,8 @@ class ScrollFrameHelper : public nsIReflowCallback {
|
||||||
// wrapped in the async zoom container, if we're building one.
|
// 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
|
// It should not be called with an ASR setter on the stack, as the
|
||||||
// top-layer items handle setting up their own ASRs.
|
// top-layer items handle setting up their own ASRs.
|
||||||
nsDisplayWrapList* MaybeCreateTopLayerItems(nsDisplayListBuilder* aBuilder,
|
void MaybeAddTopLayerItems(nsDisplayListBuilder* aBuilder,
|
||||||
bool* aIsOpaque);
|
const nsDisplayListSet& aLists);
|
||||||
|
|
||||||
void AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
void AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists, bool aCreateLayer,
|
const nsDisplayListSet& aLists, bool aCreateLayer,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче