Chromium Code Reviews
Description[merge-m54] Mac: Hack around Sierra autolayout bug in the certificate viewer.
Currently on macOS 10.12 Sierra, invoking the OS-provided SSL
certificate viewer used by Chrome will show a window sheet with an
improperly constrained height. Tracing shows the autolayout algorithm
going berserk - it gets invoked a few thousand times and decides that
the NSScrollView containing the certificate details should be sized as
though details are expanded, and doesn't add scrollbars. This usually
results in an attached panel window much larger than the screen height,
which is mostly unusable.
This happens when linking to the 10.10 SDK, but not the 10.11 SDK, and
only when running against Sierra's 10.12 SDK.
To fix, append an override of -[NSWindow setFrame:display:animate] to
the certificate viewer's class implementation using the Objective C
runtime. This override prevents programmatic changes to the frame from
setting a height more than 400 pixels. User-initiated resizes function
as usual.
BUG=643123
TBR=tapted@chromium.org
TEST=On macOS 10.12 Sierra, go to a secure site (e.g.
https://www.google.com) and view the SSL certificate (click padlock,
click Details, click View Certificate). It should fit within the screen
area. On other OSX versions, there should be no change.
Review-Url: https://codereview.chromium.org/2356113002
Cr-Commit-Position: refs/heads/master@{#420038}
(cherry picked from commit 027233cd43df4596af6b3ba501a15090f1284c05)
Committed: https://chromium.googlesource.com/chromium/src/+/50f08e85195bab38b86e0fa116a52cf81d23d12a
Patch Set 1 #
Messages
Total messages: 4 (3 generated)
|
|||||||||||||||||||