| Index: ui/wm/core/shadow.cc
|
| diff --git a/ui/wm/core/shadow.cc b/ui/wm/core/shadow.cc
|
| index dc80187fc9e7cecf210d97d690f9d80aabb8fe6b..b3300a0b95b4e5b945ee538d238820c4554073eb 100644
|
| --- a/ui/wm/core/shadow.cc
|
| +++ b/ui/wm/core/shadow.cc
|
| @@ -182,13 +182,23 @@ void Shadow::UpdateLayerBounds() {
|
| int aperture = GetShadowApertureForStyle(style_);
|
| int aperture_x = std::min(aperture, layer_bounds.width() / 2);
|
| int aperture_y = std::min(aperture, layer_bounds.height() / 2);
|
| -
|
| - shadow_layer_->UpdateNinePatchLayerAperture(
|
| - gfx::Rect(aperture_x, aperture_y,
|
| - image_size_.width() - aperture_x * 2,
|
| - image_size_.height() - aperture_y * 2));
|
| - shadow_layer_->UpdateNinePatchOcclusion(
|
| - content_bounds_ + gfx::Vector2d(interior_inset_, interior_inset_));
|
| + gfx::Rect aperture_rect(aperture_x, aperture_y,
|
| + image_size_.width() - aperture_x * 2,
|
| + image_size_.height() - aperture_y * 2);
|
| +
|
| + shadow_layer_->UpdateNinePatchLayerAperture(aperture_rect);
|
| + shadow_layer_->UpdateNinePatchLayerBorder(
|
| + gfx::Rect(aperture_x, aperture_y, aperture_x * 2, aperture_y * 2));
|
| +
|
| + // The content bounds in the shadow's layer space are offsetted by
|
| + // |interior_inset_| and also shrinked by the aperture's rectangle to
|
| + // include rounding corners overdrawing the window's content.
|
| + gfx::Rect content_bounds(
|
| + content_bounds_.x() + interior_inset_ + aperture_rect.width(),
|
| + content_bounds_.y() + interior_inset_ + aperture_rect.height(),
|
| + content_bounds_.width() - 2 * aperture_rect.width(),
|
| + content_bounds_.height() - 2 * aperture_rect.height());
|
| + shadow_layer_->UpdateNinePatchOcclusion(content_bounds);
|
| }
|
|
|
| } // namespace wm
|
|
|