Auto merge of #9824 - danlrobertson:element1, r=asajeffrey

Add the scrollWidth and scrollHeight extensions to the element interface

Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`.

I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9824)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-03-12 00:19:24 +05:30
commit 7ff7932a8c
10 changed files with 234 additions and 39 deletions

View file

@ -1,17 +0,0 @@
[scrollWidthHeight.htm]
type: testharness
[elemSimple.scrollHeight is its clientHeight]
expected: FAIL
[elemSimple.scrollWidth is its clientWidth]
expected: FAIL
[elemOverflow.scrollHeight is the width of its scrolled contents (ignoring padding, since we overflowed)]
expected: FAIL
[elemNestedOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)]
expected: FAIL
[elemNestedOverflow.scrollWidth is the width of its scrolled contents (ignoring padding, since we overflowed)]
expected: FAIL

View file

@ -1,20 +0,0 @@
[scrollWidthHeightWhenNotScrollable.htm]
type: testharness
[elemSimple.scrollHeight is its clientHeight]
expected: FAIL
[elemSimple.scrollWidth is its clientWidth]
expected: FAIL
[elemOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)]
expected: FAIL
[elemOverflow.scrollHeight is the width of its scrolled contents (ignoring padding, since we overflowed)]
expected: FAIL
[elemNestedOverflow.scrollHeight is the height of its scrolled contents (ignoring padding, since we overflowed)]
expected: FAIL
[elemNestedOverflow.scrollWidth is the width of its scrolled contents (ignoring padding, since we overflowed)]
expected: FAIL