mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update web-platform-tests to revision cdd3b613e1e108d805ae9441e9827777f1d7072c
This commit is contained in:
parent
4edd1590f4
commit
e6a0d5b0bd
163 changed files with 7225 additions and 191 deletions
|
@ -28,10 +28,10 @@
|
|||
|
||||
<script>
|
||||
function parseWidthInPx(element) {
|
||||
const value = CSSNumericValue.parse(getComputedStyle(element).width);
|
||||
if (!value || !(value instanceof CSSUnitValue) || value.unit !== 'px')
|
||||
throw 'Cannot parse width in pixels';
|
||||
return value.value;
|
||||
const value = getComputedStyle(element).width;
|
||||
if (!value.endsWith('px'))
|
||||
return NaN;
|
||||
return parseFloat(value);
|
||||
}
|
||||
|
||||
const testCases = document.querySelectorAll('.test');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue