mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update web-platform-tests to revision b'ee6da9d71d0268d7fdb04e8e5b26858f46ee0cc4'
This commit is contained in:
parent
4401622eb1
commit
b77ad115f6
16832 changed files with 270819 additions and 87621 deletions
|
@ -1,31 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>abspos button with auto width, non-auto left/right</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<link rel=help href=https://html.spec.whatwg.org/multipage/rendering.html#button-layout>
|
||||
<!--
|
||||
If the element is absolutely positioned, then for the purpose of the CSS visual formatting model, act as if the element is a replaced element. [CSS]
|
||||
-->
|
||||
<link rel=help href=https://drafts.csswg.org/css2/visudet.html#abs-replaced-width>
|
||||
<!--
|
||||
If at this point the values are over-constrained, ignore the value for either 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value.
|
||||
-->
|
||||
<style>
|
||||
#overconstrained { position: absolute; left: 100px; right: 100px; }
|
||||
#ltr { position: absolute; left: 100px; margin-top: 2em }
|
||||
#rtl { position: absolute; right: 100px; margin-top: 2em }
|
||||
</style>
|
||||
<button id=overconstrained>test</button>
|
||||
<button id=ltr>test</button>
|
||||
<button id=rtl>test</button>
|
||||
<script>
|
||||
for (const dir of ['rtl', 'ltr']) {
|
||||
test(() => {
|
||||
document.documentElement.dir = dir;
|
||||
const overconstrained = document.getElementById('overconstrained');
|
||||
const ref = document.getElementById(dir);
|
||||
assert_equals(overconstrained.offsetLeft, ref.offsetLeft, 'offsetLeft');
|
||||
assert_equals(overconstrained.clientWidth, ref.clientWidth, 'clientWidth');
|
||||
}, `${document.title} (${dir})`);
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue