зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1470504 - Skip empty paints when looking for the most recent paints in the APZ test data. r=kats
Retained displaylists can produce empty paints, which wasn't the case before. Differential Revision: https://phabricator.services.mozilla.com/D7343 --HG-- extra : rebase_source : a7cce68d6cde3f11aa838609586fd939d428650b extra : histedit_source : d4e490a445daf01db5ba87185cd0461095f003d7
This commit is contained in:
Родитель
7e073d817f
Коммит
4f64e06640
|
@ -54,6 +54,15 @@ function convertTestData(testData) {
|
|||
return result;
|
||||
}
|
||||
|
||||
function getLastNonemptyBucket(buckets) {
|
||||
for (var i = buckets.length - 1; i >= 0; --i) {
|
||||
if (buckets[i].scrollFrames.length > 0) {
|
||||
return buckets[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Given APZ test data for a single paint on the compositor side,
|
||||
// reconstruct the APZC tree structure from the 'parentScrollId'
|
||||
// entries that were logged. More specifically, the subset of the
|
||||
|
|
|
@ -47,7 +47,7 @@ function* test(testDriver) {
|
|||
// get the displayport for the subframe
|
||||
var utils = SpecialPowers.getDOMWindowUtils(window);
|
||||
var contentPaints = utils.getContentAPZTestData().paints;
|
||||
var lastPaint = convertScrollFrameData(contentPaints[contentPaints.length - 1].scrollFrames);
|
||||
var lastPaint = convertScrollFrameData(getLastNonemptyBucket(contentPaints).scrollFrames);
|
||||
var foundIt = 0;
|
||||
for (var scrollId in lastPaint) {
|
||||
if (('contentDescription' in lastPaint[scrollId]) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче