     case PST_TOP_RIGHT:
     case PST_BOTTOM_LEFT:
     case PST_BOTTOM_RIGHT:
+      // TODO: Fix for corners with a border-radius
       oFragColor = draw_dotted_edge();
       break;
     case PST_BOTTOM:


  // Where we want to draw the actual circle.
  vec2 tileCenter = destTile + circleCenter;
  // Snap the tile back because we calculate the center
  // based on the spacing but we need to make sure we have enough
  // space to draw the actual circle.
  tileCenter += adjust_dotted_padding(radius);

  // Find the position within the tile
  vec2 positionInTile = mod(position, distBetweenCircles);

  return vec4(aColor, pixelInCircle);
}

vec4 draw_dotted_edge() {
  // Everything here should be in device pixels.
  // We want the dot to be roughly the size of the whole border spacing
  float border_spacing = min(vBorders.w, vBorders.z);
  float radius = floor(border_spacing / 2.0);
  float diameter = radius * 2.0;
  // The amount of space between dots. 2.2 was chosen because it looks kind of
  // like firefox.
  float circleSpacing = diameter * 2.2;

  vec2 size = vec2(vBorders.z, vBorders.w);
  // Get our position within this specific segment
  vec2 position = vPos - vBorders.xy;

  // Break our position into square tiles with circles in them.
  vec2 circleCount = floor(size / circleSpacing);
  circleCount = max(circleCount, 1);

  vec2 distBetweenCircles = size / circleCount;
  vec2 circleCenter = distBetweenCircles / 2.0;

