diff options
author | Mitchell Hentges <mitchhentges@protonmail.com> | 2016-05-22 20:20:24 +0200 |
---|---|---|
committer | Mitchell Hentges <mitchhentges@protonmail.com> | 2016-05-29 12:02:03 +0200 |
commit | 94a884b0ae5d557eb9c10d91ef88973ee184335d (patch) | |
tree | 48a9c95a19f01837574ae2a84b8bf40e084a3c37 | |
parent | d160f8cb8037db0f4fa0b592d5f59162c1428494 (diff) | |
download | servo-94a884b0ae5d557eb9c10d91ef88973ee184335d.tar.gz servo-94a884b0ae5d557eb9c10d91ef88973ee184335d.zip |
use floats to represent intended fixed position, re-enable position_fixed test
-rw-r--r-- | tests/wpt/mozilla/meta/css/position_fixed_a.html.ini | 3 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/css/position_fixed_a.html | 17 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/css/position_fixed_b.html | 33 |
3 files changed, 23 insertions, 30 deletions
diff --git a/tests/wpt/mozilla/meta/css/position_fixed_a.html.ini b/tests/wpt/mozilla/meta/css/position_fixed_a.html.ini deleted file mode 100644 index d632a59e874..00000000000 --- a/tests/wpt/mozilla/meta/css/position_fixed_a.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[position_fixed_a.html] - type: reftest - disabled: https://github.com/servo/servo/issues/9106 diff --git a/tests/wpt/mozilla/tests/css/position_fixed_a.html b/tests/wpt/mozilla/tests/css/position_fixed_a.html index 961613c7f6c..d96cd783298 100644 --- a/tests/wpt/mozilla/tests/css/position_fixed_a.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_a.html @@ -5,6 +5,11 @@ .container { display: block; background: blue; + + /* Use font available on all hosts, instead of system font, + because test reference depends on dynamic sizing, and different + fonts change the required margins. */ + font-family: 'Ahem'; } .fixed_block { background: green; @@ -26,19 +31,13 @@ top: 100px; bottom: 30px; } - .stretched_fixed_block { - position: fixed; - background: black; - top: 100px; - bottom: 30px; - } </style> </head> <body> <div class="container"> - <div class="fixed_block"> fixed block </div> - <div class="positioned_fixed_block"> positioned fixed block </div> - <div class="sized_fixed_block"> sized fixed block </div> + <div class="fixed_block"> a </div> + <div class="sized_fixed_block"> b </div> + <div class="positioned_fixed_block"> c </div> </div> </body> </html> diff --git a/tests/wpt/mozilla/tests/css/position_fixed_b.html b/tests/wpt/mozilla/tests/css/position_fixed_b.html index 1fe3fc1ec45..996c6fa48d3 100644 --- a/tests/wpt/mozilla/tests/css/position_fixed_b.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_b.html @@ -4,40 +4,37 @@ .container { display: block; background: blue; + + font-family: 'Ahem'; } .fixed_block { background: green; - position: fixed; + float: left; + + /* Servo seems to ignore default margins when position: fixed */ + margin-top: -8px; } .positioned_fixed_block { background: yellow; - position: fixed; - top: 50%; - right: 25px; + float: left; + margin-top: 292px; + margin-left: 704px; } .sized_fixed_block { background: red; - position: fixed; height: 50px; width: 50px; - left: 5px; - right: 10px; - top: 100px; - bottom: 30px; - } - .stretched_fixed_block { - position: fixed; - background: black; - top: 100px; - bottom: 30px; + float: left; + margin-top: 92px; + margin-left: -19px; } </style> </head> <body> <div class="container"> - <div class="fixed_block"> fixed block </div> - <div class="positioned_fixed_block"> positioned fixed block </div> - <div class="sized_fixed_block"> sized fixed block </div> + <div class="fixed_block"> a </div> + <div class="sized_fixed_block"> b </div> + <div class="positioned_fixed_block"> c </div> </div> </body> </html> |