diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-03-31 10:23:39 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-31 23:53:15 +0200 |
commit | 2cc10c62eedcd170caa03447426aa935bf354c96 (patch) | |
tree | 0de528f8fd7db683b19c7b75bbf3a8f4828a2178 /Base/res | |
parent | cbd62c472e853eb98bbc0336f51dda06f1484a15 (diff) | |
download | serenity-2cc10c62eedcd170caa03447426aa935bf354c96.zip |
Base: Add test for a box placed over links with negative z-index
In this test, a set of links has a background box placed behind them via
a negative z-index. The expectation is that a hit test on a link during
a mouse-move event should select that link, and not the background box.
Diffstat (limited to 'Base/res')
-rw-r--r-- | Base/res/html/misc/link-over-zindex-block.html | 47 | ||||
-rw-r--r-- | Base/res/html/misc/welcome.html | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/Base/res/html/misc/link-over-zindex-block.html b/Base/res/html/misc/link-over-zindex-block.html new file mode 100644 index 0000000000..28d4be7020 --- /dev/null +++ b/Base/res/html/misc/link-over-zindex-block.html @@ -0,0 +1,47 @@ +<style> + ul { + margin: 0; + padding: 0; + text-align: center; + list-style-type: none; + } + a { + color: black; + text-decoration: none; + } + a:hover { + text-decoration: underline; + } + #contents { + position: relative; + overflow: hidden; + } + #links { + width: 110px; + float: left; + padding: 5px; + } + #background { + width: 120px; + position: absolute; + float: left; + left: 0; + bottom: 0; + top: 0; + background: cyan; + border: 1px solid black; + z-index: -10000; + } +</style> +<body> + <div id=contents> + <div id=links> + <ul> + <li><a href="welcome.html">Home 1</a></li> + <li><a href="welcome.html">Home 2</a></li> + <li><a href="welcome.html">Home 3</a></li> + </ul> + </div> + <div id=background></div> + </div> +</body> diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index 3fd83cb3c5..91d23f50fd 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -38,6 +38,7 @@ span#loadtime { <p>This page loaded in <b><span id="loadtime"></span></b> ms</p> <p>Some small test pages:</p> <ul> + <li><a href="link-over-zindex-block.html">link elements with background box placed with z-index</a></li> <li><a href="contenteditable.html">contenteditable</a></li> <li><a href="clear-1.html">clearing floats</a></li> <li><a href="float-1.html">floating boxes</a></li> |