From 137aaf24297b097d26eec5d2acee69672301bf30 Mon Sep 17 00:00:00 2001 From: Justin Guze Date: Tue, 19 Jun 2018 08:38:55 -0700 Subject: [PATCH] fix: pass down the bool value of enableAutoSize to setSize (#13282) * fix: pass the boolean value of enableAutoSize to setSize The webContents setSize API takes in an optional enableAutoSize boolean. Looking in the code, if that property is set, regardless if you pass in true or false, it will always set it to true. This change passes the appropriate boolean value down properly. * creating new bool for autosize --- atom/browser/api/atom_api_web_contents.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 6295856d7e..170e1d7ced 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -130,7 +130,7 @@ struct Converter { return false; bool autosize; if (params.Get("enableAutoSize", &autosize)) - out->enable_auto_size.reset(new bool(true)); + out->enable_auto_size.reset(new bool(autosize)); gfx::Size size; if (params.Get("min", &size)) out->min_size.reset(new gfx::Size(size));