Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1279)

Unified Diff: ash/mus/shadow.cc

Issue 2302773005: Fixes positioning of shadow layer (Closed)
Patch Set: Fixes positioning of shadow layer Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/wm/core/shadow.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/shadow.cc
diff --git a/ash/mus/shadow.cc b/ash/mus/shadow.cc
index 6be4d45f744a341f7d7bbae0b32431e451f55779..21be30480c71cf9125de82664655609976d31dbd 100644
--- a/ash/mus/shadow.cc
+++ b/ash/mus/shadow.cc
@@ -207,13 +207,12 @@ void Shadow::UpdateLayerBounds() {
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_|. The occlusion area also has to be shrinked to
- // allow rounded corners overdrawing on top of the window's content.
- gfx::Rect content_bounds(
- content_bounds_.x() + interior_inset_ + kRoundedCornerRadius,
- content_bounds_.y() + interior_inset_ + kRoundedCornerRadius,
- content_bounds_.width() - 2 * kRoundedCornerRadius,
- content_bounds_.height() - 2 * kRoundedCornerRadius);
+ // |interior_inset_|. The occlusion area also has to be shrunk to allow
+ // rounded corners overdrawing on top of the window's content.
+ gfx::Rect content_bounds(interior_inset_ + kRoundedCornerRadius,
+ interior_inset_ + kRoundedCornerRadius,
+ content_bounds_.width() - 2 * kRoundedCornerRadius,
+ content_bounds_.height() - 2 * kRoundedCornerRadius);
shadow_layer_->UpdateNinePatchOcclusion(content_bounds);
}
« no previous file with comments | « no previous file | ui/wm/core/shadow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698