The input to the box tree generator will include elements that have shadow roots attached. CSS Display will have to compose these. CSS seems like the most logical place to compose the tree as this isn't really observable otherwise.