aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-12-22 11:36:43 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-12-22 14:48:55 -0800
commitcc7cacfd5f5d5f3dbc5f36844876e9e52f802693 (patch)
tree02d0b3e15c9e9b65a0f7fd3cdfc8d1cf5760c8dc /tests
parentb22b29533a4bf3452265e90de4c0c0407ab3d989 (diff)
downloadservo-cc7cacfd5f5d5f3dbc5f36844876e9e52f802693.tar.gz
servo-cc7cacfd5f5d5f3dbc5f36844876e9e52f802693.zip
gfx: Clip the background properly when `border-radius` is used.
Improves Reddit, GitHub, etc.
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/basic.list2
-rw-r--r--tests/ref/border_radius_clip_a.html26
-rw-r--r--tests/ref/border_radius_clip_ref.html18
3 files changed, 45 insertions, 1 deletions
diff --git a/tests/ref/basic.list b/tests/ref/basic.list
index 9864cb0bfa0..1868570cdf8 100644
--- a/tests/ref/basic.list
+++ b/tests/ref/basic.list
@@ -221,4 +221,4 @@ fragment=top != ../html/acid2.html acid2_ref.html
== clip_a.html clip_ref.html
!= inset_blackborder.html blackborder_ref.html
!= outset_blackborder.html blackborder_ref.html
-
+== border_radius_clip_a.html border_radius_clip_ref.html
diff --git a/tests/ref/border_radius_clip_a.html b/tests/ref/border_radius_clip_a.html
new file mode 100644
index 00000000000..cb866db02d2
--- /dev/null
+++ b/tests/ref/border_radius_clip_a.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!-- Tests that `border-radius` causes the background to be clipped around the corners. -->
+<style>
+main {
+ display: block;
+ width: 16px;
+ height: 16px;
+ background: green;
+ overflow: hidden;
+}
+section {
+ display: block;
+ width: 256px;
+ height: 256px;
+ background: red;
+ border-radius: 50%;
+}
+</style>
+</head>
+<body>
+<main><section></section></main>
+</body>
+</html>
+
diff --git a/tests/ref/border_radius_clip_ref.html b/tests/ref/border_radius_clip_ref.html
new file mode 100644
index 00000000000..4a97468be8e
--- /dev/null
+++ b/tests/ref/border_radius_clip_ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!-- Tests that `border-radius` causes the background to be clipped around the corners. -->
+<style>
+main {
+ display: block;
+ width: 16px;
+ height: 16px;
+ background: green;
+}
+</style>
+</head>
+<body>
+<main></main>
+</body>
+</html>
+