mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
56653ce8ef
This adds support for class="reftest-opaque-layer" and for reftest-assigned-layer="some-layer-name" to the reftest harness. From reftest/README.txt: Opaque Layer Tests: class="reftest-opaque-layer" ================================================ If an element should be assigned to a PaintedLayer that's opaque, set the class "reftest-opaque-layer" on it. This checks whether the layer is opaque during the last paint of the test, and it works whether your test is an invalidation test or not. In order to pass the test, the element has to have a primary frame, and that frame's display items must all be assigned to a single painted layer and no other layers, so it can't be used on elements that create stacking contexts (active or inactive). Layerization Tests: reftest-assigned-layer="layer-name" ======================================================= If two elements should be assigned to the same PaintedLayer, choose any string value as the layer name and set the attribute reftest-assigned-layer="yourname" on both elements. Reftest will check whether all elements with the same reftest-assigned-layer value share the same layer. It will also test whether elements with different reftest-assigned-layer values are assigned to different layers. The same restrictions as with class="reftest-opaque-layer" apply: All elements must have a primary frame, and that frame's display items must all be assigned to the same PaintedLayer and no other layers. If these requirements are not met, the test will fail.
49 lines
745 B
HTML
49 lines
745 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<meta charset="utf-8">
|
|
<title>Both divs should be part of opaque layers.</title>
|
|
|
|
<style>
|
|
|
|
.content {
|
|
box-sizing: border-box;
|
|
width: 200px;
|
|
height: 200px;
|
|
border: 1px solid black;
|
|
margin: 10px;
|
|
}
|
|
|
|
.relative {
|
|
position: relative;
|
|
}
|
|
|
|
.fixed {
|
|
position: fixed;
|
|
top: 140px;
|
|
left: 140px;
|
|
}
|
|
|
|
.low-z {
|
|
z-index: 1;
|
|
}
|
|
|
|
.high-z {
|
|
z-index: 2;
|
|
}
|
|
|
|
.opaque-background {
|
|
background-color: white;
|
|
}
|
|
|
|
body {
|
|
height: 4000px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="content relative low-z" reftest-assigned-layer="page-background"></div>
|
|
|
|
<div class="fixed opaque-background content high-z" reftest-assigned-layer="fixed-layer"></div>
|
|
|
|
<div class="content relative low-z" reftest-assigned-layer="page-background"></div>
|