Robert O'Callahan — Bug 564991. Part 32: Fix assertion in BasicThebesLayer; it's entirely possible that we need to invalidate an area, but the actual visible region is empty so there's no context to draw to. r=cjones

Robert O'Callahan — Bug 564991. Part 10: When NS_DOCUMENT_STATE_WINDOW_INACTIVE changes, flush the contents of all ThebesLayers. We need to do this because this change can change the rendering of themed content, and explicitly tracking and invalidating all such content would be way too expensive to justify. r=mats

Robert O'Callahan — Bug 573933. Part 3: Fix button-state test to render a margin around the button so we don't get into any weird sampling issues. Also, use a canvas that's just as big as necessary. r=dbaron