summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 13:28:48 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-12 13:28:48 +0000
commit8743ec41593c6e3377f2a8377e553a21a505add6 (patch)
tree4250c7ad475e9ec26f732d3ef656b57a5be28722 /chrome/browser/autocomplete
parent1ee492cbda413ed4b172d54ba8cd6bed4916ce62 (diff)
downloadchromium_src-8743ec41593c6e3377f2a8377e553a21a505add6.zip
chromium_src-8743ec41593c6e3377f2a8377e553a21a505add6.tar.gz
chromium_src-8743ec41593c6e3377f2a8377e553a21a505add6.tar.bz2
Total guess fixes for the bug.
Add DCHECKs for main thread in all the places we use animation contexts. Added a stack based class that takes an animate flag to enable/disable animation operations (grouping, durations) to clean up the code that does optional animation. This might help the crashes in the bug because before we created animation context groups when we didn't need them and those empty groups could be tripping up something in the system frameworks (I some something similar in nib loading on 10.6). BUG=26979 TEST=like we have a repeat fail case... Review URL: http://codereview.chromium.org/390014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index beaa239..38b7547 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -44,7 +44,7 @@ const CGFloat kLeftRightMargin = 8.0;
const CGFloat kTextXOffset = 33.0;
// Animation duration when animating the popup window smaller.
-const float kShrinkAnimationDuration = 0.1;
+const CGFloat kShrinkAnimationDuration = 0.1;
// Maximum fraction of the popup width that can be used to display match
// contents.
@@ -365,6 +365,7 @@ void AutocompletePopupViewMac::CreatePopupIfNeeded() {
}
void AutocompletePopupViewMac::UpdatePopupAppearance() {
+ DCHECK([NSThread isMainThread]);
const AutocompleteResult& result = model_->result();
if (result.empty()) {
[[popup_ parentWindow] removeChildWindow:popup_];