-
Enhancement
-
Resolution: Fixed
-
P4
-
8
The updateBackgroundInsets method carries this claim:
/**
* Visits each of the background fills and takes their raddi into account to determine the insets.
* The backgroundInsets variable is cleared whenever the fills change, or whenever the size of the
* region has changed (because if the size of the region changed and a radius is percentage based
* then we need to recompute the insets).
*/
However in the setSize method, we're always clearing the backgroundInsets, even for the most common case of a Background with BackgroundFills who's insets are never based on the size of the region. For the case of animated layout or where the size of a region might be changing dynamically (think, window resizing) we're doing much more work here by recomputing the insets each time than we need to be doing.
/**
* Visits each of the background fills and takes their raddi into account to determine the insets.
* The backgroundInsets variable is cleared whenever the fills change, or whenever the size of the
* region has changed (because if the size of the region changed and a radius is percentage based
* then we need to recompute the insets).
*/
However in the setSize method, we're always clearing the backgroundInsets, even for the most common case of a Background with BackgroundFills who's insets are never based on the size of the region. For the case of animated layout or where the size of a region might be changing dynamically (think, window resizing) we're doing much more work here by recomputing the insets each time than we need to be doing.