<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
</head>
<body>
<p><b>BUG ID</b> <a href="rdar://problem/3471901">3471901</a> support scrollIntoView method for DOM elements (3474)</p>
<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b>
Following the numbered steps, click each button to scroll the specified colored box into view.</p>
<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b>
A colored box should scroll into view after clicking each button. The text on the button specifies the expected position (top, bottom) of the box scrolled into view.</p>
<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>
Colored box does not scroll into view, or the box is scrolled to the wrong positon (top, bottom).
</p>
<div id="purplebox" style="background-color:purple; width: 300px; height: 100px;">
<input type="button" value="STEP 1: click to scroll yellow box to BOTTOM of view" onclick="document.getElementById('yellowbox').scrollIntoView(false);">
<input type="button" value="STEP 4: click to scroll orange box to TOP of view" onclick="document.getElementById('orangebox').scrollIntoView(true);">
</div>
<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>
<div id="greenbox" style="background-color:green; width: 300px; height: 100px;">
<input type="button" value="STEP 3: click to scroll purple box to TOP of view" onclick="document.getElementById('purplebox').scrollIntoView();">
</div>
<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>
<div id="yellowbox" style="background-color:yellow; width: 300px; height: 100px;">
<input type="button" value="STEP 2: click to scroll green box to TOP of view" onclick="document.getElementById('greenbox').scrollIntoView(true);">
</div>
<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>
<div id="orangebox" style="background-color:orange; width: 300px; height: 100px;">
Test Complete
</div>
<div style="height: 500px; width: 500px; border: 1px solid;">here is a big empty div</div>
</body>
</html>