mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
78dba184db
In the case of an invalid clip-path, the browser is supposed to discard the mask entirely. In the non-webrender codepath this would happen implicitly because the computed MaskUsage would have no flags set, and so no actions would be taken on the gfxContext which contained the display items rasterized so far. In the WebRender codepath, though, we invoke the code on a A8 drawtarget that's zero-filled, so if PaintMask fails to rasterize anything into it, it gets treated as a "mask everything out" mask. Instead, this patch makes it so that we detect the scenario where the computed MaskUsage is a no-op, and ensure that we don't apply the mask in that case. An alternative approach considered was to initialize the A8 drawtarget to white instead of black but in cases where there is an actual mask, the rest of the code assumes it is zero-filled and so that doesn't work. MozReview-Commit-ID: Hw7nCiUXVJl --HG-- extra : rebase_source : 241d550fa0ed1b3bd088c73d9565b166acbcece8
5 lines
109 B
HTML
5 lines
109 B
HTML
<!doctype html>
|
|
<body>
|
|
<div style="background-color: green; width: 100px; height: 100px;"></div>
|
|
</body>
|