Backed out 2 changesets (bug 1645433) for reftest failures. CLOSED TREE

Backed out changeset 34c5981b4667 (bug 1645433)
Backed out changeset 7e28049666b7 (bug 1645433)
This commit is contained in:
Csoregi Natalia 2020-11-17 02:53:42 +02:00
Родитель 8ffa84e50d
Коммит 9eab74eb27
3 изменённых файлов: 2 добавлений и 131 удалений

Просмотреть файл

@ -50,12 +50,11 @@ add_task(async function test_main() {
file: "helper_fission_tap.html",
prefs: [["apz.max_tap_time", 10000]],
},
{ file: "helper_fission_inactivescroller_under_oopif.html" },
// add additional tests here
];
if (isWebRender) {
subtests = subtests.concat([
// add WebRender-specific tests here
// add additional WebRender-specific tests here
]);
} else {
subtests = subtests.concat([

Просмотреть файл

@ -1,88 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Ensure inactive scollframes under OOPIFs hit-test properly</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/paint_listener.js"></script>
<script src="helper_fission_utils.js"></script>
<script src="apz_test_utils.js"></script>
<script src="apz_test_native_event_utils.js"></script>
<script>
fission_subtest_init();
FissionTestHelper.startTestPromise
.then(waitUntilApzStable)
.then(loadOOPIFrame("testframe", "helper_fission_empty.html"))
.then(waitUntilApzStable)
.then(test)
.then(FissionTestHelper.subtestDone, FissionTestHelper.subtestFailed);
let make_oopif_scrollable = function() {
// ensure the oopif is scrollable, and wait for the paint so that the
// compositor also knows it's scrollable.
document.body.style.height = "200vh";
promiseApzFlushedRepaints().then(() => {
let utils = SpecialPowers.getDOMWindowUtils(window);
let result = {
layersId: utils.getLayersId(),
viewId: utils.getViewId(document.scrollingElement)
};
dump(`OOPIF computed IDs ${JSON.stringify(result)}\n`);
FissionTestHelper.fireEventInEmbedder("OOPIF:Scrollable", result);
});
return true;
};
async function test() {
let iframe = document.getElementById("testframe");
let letScrollerIdPromise = promiseOneEvent(window, "OOPIF:Scrollable", null);
ok(await FissionTestHelper.sendToOopif(iframe, `(${make_oopif_scrollable})()`),
"Ran code to make OOPIF scrollable");
let oopifScrollerIds = (await letScrollerIdPromise).data;
// The #scroller div is (a) inactive, and (b) under the OOPIF. Hit-testing
// against it should hit the OOPIF.
checkHitResult(await fissionHitTest(centerOf("scroller"), iframe),
APZHitResultFlags.VISIBLE,
oopifScrollerIds.viewId,
oopifScrollerIds.layersId,
"Part of OOPIF sitting on top of the inactive scrollframe should hit OOPIF");
}
</script>
</head>
<body>
<style>
html, body {
margin: 0;
}
body {
/* Ensure root document is scrollable so that #scroller is inactive by
default */
height: 200vh;
}
iframe {
position: fixed;
top: 0;
left: 0;
width: 300px;
height: 200px;
}
#scroller {
width: 200px;
height: 200px;
background-color: transparent;
overflow-y: scroll;
}
</style>
<div id="scroller">
<div style="height:500px">inside scroller</div>
</div>
<iframe id="testframe"></iframe>
</body>
</html>

Просмотреть файл

@ -3528,26 +3528,6 @@ class MOZ_RAII AutoContainsBlendModeCapturer {
}
};
// Finds the max z-index of the items in aList that meet the following
// conditions
// 1) have z-index auto or z-index >= 0.
// 2) aFrame is a proper ancestor of the item's frame.
// Returns -1 if there is no such item.
static int32_t MaxZIndexInListOfItemsContainedInFrame(nsDisplayList* aList,
nsIFrame* aFrame) {
int32_t maxZIndex = -1;
for (nsDisplayItem* item = aList->GetBottom(); item;
item = item->GetAbove()) {
nsIFrame* itemFrame = item->Frame();
// Perspective items return the scroll frame as their Frame(), so consider
// their TransformFrame() instead.
if (nsLayoutUtils::IsProperAncestorFrame(aFrame, itemFrame)) {
maxZIndex = std::max(maxZIndex, item->ZIndex());
}
}
return maxZIndex;
}
void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) {
SetAndNullOnExit<const nsIFrame> tmpBuilder(
@ -4066,31 +4046,11 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// create a displayport for this frame. We'll add the item later on.
if (!mWillBuildScrollableLayer) {
if (aBuilder->BuildCompositorHitTestInfo()) {
int32_t zIndex = MaxZIndexInListOfItemsContainedInFrame(
scrolledContent.PositionedDescendants(), mOuter);
if (aBuilder->IsPartialUpdate()) {
if (auto* items =
mScrolledFrame->GetProperty(nsIFrame::DisplayItems())) {
for (nsDisplayItemBase* item : *items) {
if (item->GetType() ==
DisplayItemType::TYPE_COMPOSITOR_HITTEST_INFO) {
auto* hitTestItem =
static_cast<nsDisplayCompositorHitTestInfo*>(item);
if (hitTestItem->HasHitTestInfo() &&
hitTestItem->HitTestFlags().contains(
CompositorHitTestFlags::eInactiveScrollframe)) {
zIndex = std::max(zIndex, hitTestItem->ZIndex());
item->SetCantBeReused();
}
}
}
}
}
nsDisplayCompositorHitTestInfo* hitInfo =
MakeDisplayItemWithIndex<nsDisplayCompositorHitTestInfo>(
aBuilder, mScrolledFrame, 1, info, Some(area));
if (hitInfo) {
AppendInternalItemToTop(scrolledContent, hitInfo, Some(zIndex));
AppendInternalItemToTop(scrolledContent, hitInfo, Some(INT32_MAX));
}
}
}