Bug 629038 - Disabling reflow zoom requires a browser restart; r=dougt a=blocking-fennec

This commit is contained in:
Vivien Nicolas 2011-02-11 16:50:11 -05:00
Родитель be2fa27065
Коммит fcd1620d3d
1 изменённых файлов: 16 добавлений и 3 удалений

Просмотреть файл

@ -381,9 +381,22 @@ ContentParent::Observe(nsISupports* aSubject,
nsCOMPtr<nsIPrefServiceInternal> prefService =
do_GetService("@mozilla.org/preferences-service;1");
PRBool prefHasValue;
prefService->PrefHasUserValue(strData, &prefHasValue);
if (prefHasValue) {
PRBool prefNeedUpdate;
prefService->PrefHasUserValue(strData, &prefNeedUpdate);
// If the pref does not have a user value, check if it exist on the
// default branch or not
if (!prefNeedUpdate) {
nsCOMPtr<nsIPrefBranch> defaultBranch;
nsCOMPtr<nsIPrefService> prefsService = do_QueryInterface(prefService);
prefsService->GetDefaultBranch(nsnull, getter_AddRefs(defaultBranch));
PRInt32 prefType = nsIPrefBranch::PREF_INVALID;
defaultBranch->GetPrefType(strData.get(), &prefType);
prefNeedUpdate = (prefType != nsIPrefBranch::PREF_INVALID);
}
if (prefNeedUpdate) {
// Pref was created, or previously existed and its value
// changed.
PrefTuple pref;