Bug 1379515 - Change a child element position to be able to move into view of the parent by mouse wheel. r?birtles
Before this patch the child element actually did not move into the view and
observed an unrelated restyle maker. In the next patch we fix the observation
of the unrelated restyle maker.
MozReview-Commit-ID: 1DejqwF6hJg
--- a/dom/animation/test/chrome/test_restyles.html
+++ b/dom/animation/test/chrome/test_restyles.html
@@ -285,17 +285,17 @@ waitForAllPaints(function() {
*/
if (isAndroid) {
return;
}
var parentElement = addDiv(null,
{ style: 'overflow-y: scroll; height: 20px;' });
var div = addDiv(null,
- { style: 'animation: background-color 100s; position: relative; top: 100px;' });
+ { style: 'animation: background-color 100s; position: relative; top: 20px;' });
parentElement.appendChild(div);
var animation = div.getAnimations()[0];
await animation.ready;
var markers = await observeStyling(5);
is(markers.length, 0,
'Animations running on the main-thread for elements ' +
@@ -338,17 +338,17 @@ waitForAllPaints(function() {
var grandParent = addDiv(null,
{ style: 'overflow-y: scroll; height: 20px;' });
var parentElement = addDiv(null,
{ style: 'overflow-y: scroll; height: 100px;' });
var div = addDiv(null,
{ style: 'animation: background-color 100s; ' +
'position: relative; ' +
- 'top: 60px;' }); // This element is in-view in the parent, but
+ 'top: 20px;' }); // This element is in-view in the parent, but
// out of view in the grandparent.
grandParent.appendChild(parentElement);
parentElement.appendChild(div);
var animation = div.getAnimations()[0];
await animation.ready;
var markers = await observeStyling(5);