mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
auto merge of #1121 : kmcallister/servo/client-rect, r=metajack
This broke in ab0d620
and in trying to fix it, it's become clear that I don't understand the intended behavior of `getClientRects()`. In fact I only see one rect in Firefox even when all three `<div>`s have drawn borders, which confuses me compared to [the spec](http://www.w3.org/TR/cssom-view/#the-getclientrects-and-getboundingclientrect-methods). Let's remove the test for now and someone who understands what's going on (which could be future me!) will re-add it.
This commit is contained in:
commit
404e3881b6
1 changed files with 0 additions and 40 deletions
|
@ -1,40 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="harness.js"></script>
|
|
||||||
<script>
|
|
||||||
var elems = document.getElementsByTagName('div');
|
|
||||||
var rects = elems[0].getClientRects();
|
|
||||||
is_a(rects, ClientRectList);
|
|
||||||
|
|
||||||
is(rects.length, 3);
|
|
||||||
|
|
||||||
for (var i=0; i<rects.length; i++) {
|
|
||||||
var rect = rects[i];
|
|
||||||
is_a(rect, ClientRect);
|
|
||||||
|
|
||||||
geq(rect.top, 100);
|
|
||||||
geq(rect.bottom, 100);
|
|
||||||
geq(rect.left, 100);
|
|
||||||
geq(rect.right, 100);
|
|
||||||
|
|
||||||
is(rect.width, rect.right - rect.left);
|
|
||||||
is(rect.height, rect.bottom - rect.top);
|
|
||||||
}
|
|
||||||
|
|
||||||
finish();
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
margin-top: 100px;
|
|
||||||
margin-left: 100px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div>
|
|
||||||
my div
|
|
||||||
<div>foo</div>
|
|
||||||
<div>bar</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Add table
Add a link
Reference in a new issue