mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #7500 - farodin91:viewport, r=jdm
Implement viewport functions for window #1718 @jdm r? closes #6875 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7500) <!-- Reviewable:end -->
This commit is contained in:
commit
a844c0b0e8
14 changed files with 466 additions and 63 deletions
42
tests/html/viewport.html
Normal file
42
tests/html/viewport.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test innerHeight</title>
|
||||
<script type="text/javascript">
|
||||
function show(){
|
||||
console.log("innerHeight: "+ window.innerHeight);
|
||||
console.log("innerWidth: "+ window.innerWidth);
|
||||
console.log("ScrollY: "+ window.scrollY);
|
||||
console.log("ScrollX: "+ window.scrollX);
|
||||
console.log("outerHeight: "+ window.outerHeight);
|
||||
console.log("outerWidth: "+ window.outerWidth);
|
||||
console.log("screenY: "+ window.screenY);
|
||||
console.log("screenX: "+ window.screenX);
|
||||
}
|
||||
function test_scroll(){
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<button onclick="show();">Test</button>
|
||||
<button onclick="window.scroll(0,100);">Scroll</button>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<button onclick="window.moveTo(100,10);">Move</button>
|
||||
<button onclick="window.scroll(0,10);">Scroll 2</button>
|
||||
<div style="background-color: #b0c4de; height:1000px; width:800px;"/>
|
||||
<button onclick="show();">Test</button>
|
||||
</body>
|
||||
</html>
|
|
@ -377,4 +377,3 @@
|
|||
|
||||
[Window replaceable attribute: devicePixelRatio]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue