layout/reftests/forms/fieldset/fieldset-border-image-1b.html
author Boris Zbarsky <bzbarsky@mit.edu>
Tue, 29 Nov 2016 15:52:30 -0500
changeset 324761 694d5dac1dccbe712f9b5ff8789ae525c738f03c
parent 324729 056f728704e77c6ddc3cf9fc0f0ae8e539d73dc9
permissions -rw-r--r--
Bug 504622 part 1. Rewrite fieldset border drawing to just clip to the area outside the legend instead of doing it in pieces with different clip rects. r=mattwoodrow,dbaron This change will allow the border drawing code to deal with the following changes, which will make us no longer force the fieldset to be wider than the legend. Without this patch, allowing the fieldset to be narrower than the legend causes the vertical inline-start-side and inline-end-side borders of the fieldset to paint under the legend, because the current code only modifies the painting of the block-start-side border (the one the legend is positioned on). This does change behavior in one situation, which the new tests test. For relatively positioned legends, we used to use the original vertical location but the positioned horizontal location of the legend to decide which parts of the border to not paint. In the new setup, we use the original location for both. I did check that this new behavior matches Chrome and Safari. Edge seems to have our old behavior.

<!DOCTYPE html>
<style>
  fieldset {
    padding: 0;
    margin: 10px;
    height: 100px;
    width: 100px;
    border: 10px solid;
    border-image-source: url(blue-1x1.png);
    border-image-outset: 10px;
  }
</style>
<fieldset><legend></legend></fieldset>