diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-05 17:19:11 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-05 17:19:11 +0000 |
commit | 56c39f543883334c854502dd92f769de7c85d5bc (patch) | |
tree | 2fb8939b6ed76db292d21b62c9f5422806201040 /chrome/default_plugin | |
parent | 54ccbd1473f09f07a8fd49a58aec05ab10eed465 (diff) | |
download | chromium_src-56c39f543883334c854502dd92f769de7c85d5bc.zip chromium_src-56c39f543883334c854502dd92f769de7c85d5bc.tar.gz chromium_src-56c39f543883334c854502dd92f769de7c85d5bc.tar.bz2 |
Revert 95611 - Always call the class methods to save/restore contexts.
If the current context was ever nil, sending a "restore" message would be a no-op and would likely leave an out-of-scope context as current.
BUG=90140
TEST=repeatedly select items in an open file dialog in column mode; no crash
Review URL: http://codereview.chromium.org/7572031
TBR=avi@chromium.org
Review URL: http://codereview.chromium.org/7541043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/default_plugin')
-rw-r--r-- | chrome/default_plugin/plugin_impl_mac.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/default_plugin/plugin_impl_mac.mm b/chrome/default_plugin/plugin_impl_mac.mm index b6deb28..eb0ee08 100644 --- a/chrome/default_plugin/plugin_impl_mac.mm +++ b/chrome/default_plugin/plugin_impl_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -17,7 +17,6 @@ #include "ui/base/l10n/l10n_util_mac.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" -#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" #include "unicode/locid.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/npapi/default_plugin_shared.h" @@ -140,7 +139,7 @@ void PluginInstallerImpl::DownloadCancelled() { } int16 PluginInstallerImpl::OnDrawRect(CGContextRef context, CGRect dirty_rect) { - gfx::ScopedNSGraphicsContextSaveGState scoped_state; + [NSGraphicsContext saveGraphicsState]; NSGraphicsContext* ns_context = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:YES]; [NSGraphicsContext setCurrentContext:ns_context]; @@ -184,6 +183,7 @@ int16 PluginInstallerImpl::OnDrawRect(CGContextRef context, CGRect dirty_rect) { label_point = NSMakePoint(roundf(label_point.x), roundf(label_point.y)); [command_ drawAtPoint:label_point withAttributes:attributes]; + [NSGraphicsContext restoreGraphicsState]; return 1; } |