forked from mirrors/gecko-dev
		
	In some cases (in this scenario, with a RTL XUL scrollframe), the scrollframe can have a nonzero scroll position upon construction or reconstruction, without having executed the scrolling code in ScrollFrameHelper::RestoreState or ScrollFrameHelper::ScrollToRestoredPosition. In such cases APZ is not properly notified of the scroll position, and it can get into a state where it is out of sync with the main thread scroll position (until a subsequent scroll). To correct this, we replace the ScrollPositionUpdate that is created during scrollframe construction with a new ScrollPositionUpdate that holds the correct scroll position, so that APZ is properly notified of the scroll position. Differential Revision: https://phabricator.services.mozilla.com/D90674
		
			
				
	
	
		
			103 lines
		
	
	
	
		
			3.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			103 lines
		
	
	
	
		
			3.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!-- Any copyright is dedicated to the Public Domain.
 | 
						|
   - http://creativecommons.org/publicdomain/zero/1.0/ -->
 | 
						|
<!DOCTYPE HTML>
 | 
						|
<html class="reftest-wait"><head>
 | 
						|
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 | 
						|
    <title>Testcase for bug 672944</title>
 | 
						|
    <style type="text/css">
 | 
						|
@font-face {
 | 
						|
  font-family: DejaVuSansMono;
 | 
						|
  src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
 | 
						|
}
 | 
						|
html,body {
 | 
						|
    color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
 | 
						|
}
 | 
						|
	
 | 
						|
  .bacon {
 | 
						|
    white-space:    nowrap;
 | 
						|
    text-overflow:  ellipsis ellipsis;
 | 
						|
    overflow:       hidden;
 | 
						|
    width:          30ch;
 | 
						|
    display:        -moz-box;
 | 
						|
    background:     lime;
 | 
						|
    margin-bottom:  1em;
 | 
						|
  }
 | 
						|
 | 
						|
  .auto {
 | 
						|
    overflow-x:       auto;
 | 
						|
    padding-bottom: 2ch;
 | 
						|
    width:          29.5ch;
 | 
						|
    text-overflow:  "" "";
 | 
						|
  }
 | 
						|
  .scroll {
 | 
						|
    overflow:       auto;
 | 
						|
    padding:        2ch;
 | 
						|
    border:         3px solid black;
 | 
						|
    text-overflow:  "" "";
 | 
						|
  }
 | 
						|
  .scroll2 {
 | 
						|
    overflow:       auto;
 | 
						|
    padding:        3ch;
 | 
						|
    text-overflow:  "" "";
 | 
						|
  }
 | 
						|
  .scroll3 {
 | 
						|
    overflow:       auto;
 | 
						|
    padding:        2ch;
 | 
						|
    text-indent:    -3ch;
 | 
						|
    text-overflow:  "" "";
 | 
						|
  }
 | 
						|
  .scroll4 {
 | 
						|
    overflow:       auto;
 | 
						|
    padding:        2ch 0.2ch;
 | 
						|
    text-overflow:  "" "";
 | 
						|
  }
 | 
						|
span { background-color:white; }
 | 
						|
 | 
						|
#block-hover {
 | 
						|
  position:fixed;
 | 
						|
  top:0;left:0;width:100%;height:100%;
 | 
						|
}
 | 
						|
    </style>
 | 
						|
    <script type="text/javascript">
 | 
						|
function init() {
 | 
						|
 | 
						|
  // The behaviour of this test may be subtly different when this code runs
 | 
						|
  // before the first paint vs after the first paint. If you encounter
 | 
						|
  // intermittent failures in this reftest, you might have luck turning it into
 | 
						|
  // a reliable failure by wrapping this function body in a
 | 
						|
  // requestAnimationFrame callback to force it to run after the first paint.
 | 
						|
  // Alternatively you might need to force it to run before the first paint,
 | 
						|
  // perhaps by running it inline (not as an onload handler) or something.
 | 
						|
 | 
						|
  // workaround bug 936936
 | 
						|
  document.body.style.display="block";
 | 
						|
 | 
						|
  document.getElementById('rtl_auto').scrollLeft=999999;
 | 
						|
 | 
						|
  document.documentElement.removeAttribute('class');
 | 
						|
}
 | 
						|
    </script>
 | 
						|
</head>
 | 
						|
<body onload="init();" style="display: inline;">
 | 
						|
 | 
						|
<div style="float:right;" dir="rtl">
 | 
						|
  <div class="bacon"><span>1Beef hamburger bacon tri-tip, jowl biltong tail ribeye ham</span></div><br>
 | 
						|
  <div id="rtl_auto" class="bacon auto"><span>2Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll"><span>3Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll2"><span>4Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll3"><span>5Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll4"><span>6Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
</div>
 | 
						|
 | 
						|
<div>
 | 
						|
  <div class="bacon"><span>1Beef hamburger bacon tri-tip, jowl biltong tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon auto"><span>2Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll"><span>3Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll2"><span>4Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll3"><span>5Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
  <div class="bacon scroll4"><span>6Beef hamburger bacon tri-tipJOWLBILTONG tail ribeye ham</span></div><br>
 | 
						|
</div>
 | 
						|
 | 
						|
<div id="block-hover"></div>
 | 
						|
</body>
 | 
						|
</html>
 |