forked from mirrors/gecko-dev
Update clip-path-shape-003.html and clip-path-shape-004.html because 1. Per SVG2 spec, we don't accept comma among commands, so I remove them. 2. Basically, these two tests want to test the result of `shape()` should be identical to the result of `path()`. However, I noticed the original tests which put a `clip-path:path()` with `position:absolutely` may have a fuzzy result if the path has some curves there. This may be caused by anti-alias together with absoultely positioned element (note: perhaps there are some floating point calculation in layout for this, so the final rendering coordinates may have some fractions). Therefore, I drop the absolutely positioned element, and just test that if the result of `shape()` is identical to the result of `path()`. Also, add two more tests for different reference-boxes together with the usage of `shape()` (to make sure we resolve percentage values properly). Differential Revision: https://phabricator.services.mozilla.com/D202884
18 lines
463 B
HTML
18 lines
463 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Reference of CSS Masking: Test clip-path property and shape function with nonzero fill</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-shape">
|
|
</head>
|
|
<style>
|
|
#ref {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: green;
|
|
clip-path: path(nonzero, "M 10 10 Q 40 0 60 20 T 90 0 c 10 40 20 20 -20 60 s -10 70 -40 -10");
|
|
}
|
|
</style>
|
|
<body>
|
|
<div id="ref"></div>
|
|
</body>
|
|
</html>
|