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

Issue 1956283002: Mac: Convince the WindowServer to update the print preview shadow on retina screens (Closed)

Created:
4 years, 7 months ago by tapted
Modified:
4 years, 7 months ago
Reviewers:
erikchen
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@20160509-Revert-Extensiony
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: Convince the WindowServer to update the print preview shadow on retina screens The OSX WindowServer currently forgets to draw the window shadow on print preview when it's shown on retina displays. This started flakily in 10.10 and now always happens. It's probably something to do with the print preview dialog being wholly a layer-hosting NSView with the WebContents showing print preview WebUI. This, combined with the private APIs we currently use to show the dialog, seems to confuse the shadow generation code in the WindowServer. To fix, it seems we can make a call to -[NSWindow setFrame:] once the animation completes. Other ways of invalidating the shadow didn't have an effect. The setFrame call can't be a no-op, but it can be immediately reversed. This doesn't seem to negatively impact other dialogs. It does mean the dialog still doesn't have a shadow whilst it is animating in, but that's less noticeable. BUG=436884 TEST=Show Print Preview (Cmd+p) on a retina screen. It should have a border/shadow. Committed: https://crrev.com/21610ba731345e89dcb62229b3eceac977f6425b Cr-Commit-Position: refs/heads/master@{#392286}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M ui/base/cocoa/constrained_window/constrained_window_animation.mm View 1 chunk +10 lines, -0 lines 2 comments Download

Messages

Total messages: 10 (5 generated)
erikchen
lgtm, though not super happy about this. https://codereview.chromium.org/1956283002/diff/1/ui/base/cocoa/constrained_window/constrained_window_animation.mm File ui/base/cocoa/constrained_window/constrained_window_animation.mm (right): https://codereview.chromium.org/1956283002/diff/1/ui/base/cocoa/constrained_window/constrained_window_animation.mm#newcode235 ui/base/cocoa/constrained_window/constrained_window_animation.mm:235: [window_ setFrame:frame ...
4 years, 7 months ago (2016-05-09 05:29:07 UTC) #3
tapted
Thanks Erik! https://codereview.chromium.org/1956283002/diff/1/ui/base/cocoa/constrained_window/constrained_window_animation.mm File ui/base/cocoa/constrained_window/constrained_window_animation.mm (right): https://codereview.chromium.org/1956283002/diff/1/ui/base/cocoa/constrained_window/constrained_window_animation.mm#newcode235 ui/base/cocoa/constrained_window/constrained_window_animation.mm:235: [window_ setFrame:frame display:NO animate:NO]; On 2016/05/09 05:29:06, ...
4 years, 7 months ago (2016-05-09 05:35:56 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1956283002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1956283002/1
4 years, 7 months ago (2016-05-09 05:36:52 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-09 05:41:02 UTC) #8
commit-bot: I haz the power
4 years, 7 months ago (2016-05-09 05:42:02 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/21610ba731345e89dcb62229b3eceac977f6425b
Cr-Commit-Position: refs/heads/master@{#392286}

Powered by Google App Engine
This is Rietveld 408576698