testing/web-platform/tests/css/css-backgrounds/border-radius-clip-001.html
author Serban Stanca <sstanca@mozilla.com>
Mon, 14 Jul 2025 00:37:50 +0300 (5 minutes ago)
changeset 796395 57c30f1adca5fb5ccd4a9a09192c41e207e28d88
parent 660460 dbd4c3d965be00b23004c24a4c7e22f47db167ac
permissions -rw-r--r--
Revert "Bug 1950748 part 3: Don't return a caret inside an editor when no editor is focused. r=morgan" as requested for causing accessibility crashes (bug 1977012). This reverts commit aaf970807d281c28c1e937491719d996cb11648a. This reverts commit f5f2e3cf4d34c2430372ba790d77620837d56b75. This reverts commit 5565c5899c32c0b0f5446561a21c5b6499fd44c6.
<!DOCTYPE html>

  <meta charset="UTF-8">

  <title>CSS Backgrounds and Borders Test: 'border-radius' and corner-clipping of content</title>

  <link rel="author" title="zhouli" href="mailto:liz@oupeng.com">
  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
  <link rel="help" href="http://www.w3.org/TR/css-background-3/#corner-clipping">
  <link rel="match" href="reference/border-radius-clipping-ref.html">

  <meta name="assert" content="Test passes if a box with border-radius that clips its content to a box edge clips to the border-radius curve in the corners.">

  <meta name="fuzzy" content="0-57;0-1552">

  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
  <style>
  body > div { float: left; }
  .round
    {
      border: transparent double 20px;
      border-radius: 50%;
      padding: 10px;
    }
  #bg, #txt, #img-contain
    {
      overflow: hidden;
      width: 80px;
    }
  #bg > div
    {
      margin: -10px;
      background-image: url("support/100x100-green-with-red-corners.png");
      height: 100px;
      width: 100px;
    }
  #txt > div
    {
      margin: -10px;
      color: green;
      font: 50px/1 Ahem;
    }

  img
    {
      display: block;
    }
  #img-contain > img
    {
      margin: -10px;
    }
  #img-self
    {
      margin: -10px;
    }
  </style>

  <p>Test passes if there are four filled green circles and <strong>no red</strong>.

  <div id="bg" class="round">
    <div></div>
  </div>

  <div id="txt" class="round">
    <div>XX<br>XX</div>
  </div>

  <div id="img-contain" class="round">
    <img src="support/swatch-green.png" width=100 height=100>
  </div>

  <div>
    <img id="img-self" class="round" src="support/swatch-green.png" width=100>
  </div>