Unlike the border areas that only nead their own dimensions, the middle area of a border-image determines its repetition parameter based on the size of the borders. A new flag is provided for the brush_image shader to know whether to use the segment's own rect or look at the borders when computing the pattern's size. Differential Revision: https://phabricator.services.mozilla.com/D59675 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/834d49acd3c02a7e5ae75d0a4d01a55e69c8fdba