New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass down the bool value of enableAutoSize to setSize #13282

Merged
merged 2 commits into from Jun 19, 2018

Conversation

Projects
None yet
5 participants
@jguze
Contributor

jguze commented Jun 18, 2018

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.

Justin Guze
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.

@jguze jguze requested a review from electron/reviewers as a code owner Jun 18, 2018

@welcome

This comment has been minimized.

Show comment
Hide comment
@welcome

welcome bot Jun 18, 2018

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix, OR prefix at least one of your commit messages.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

welcome bot commented Jun 18, 2018

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix, OR prefix at least one of your commit messages.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@jguze jguze changed the title from fix: pass the boolean value of enableAutoSize to setSize to fix: pass down the boolean value of enableAutoSize to setSize Jun 18, 2018

@jguze jguze changed the title from fix: pass down the boolean value of enableAutoSize to setSize to fix: pass down the bool value of enableAutoSize to setSize Jun 18, 2018

@codebytere

This comment has been minimized.

Show comment
Hide comment
@codebytere

codebytere Jun 18, 2018

Member

@jguze:

../../atom/browser/api/atom_api_web_contents.cc:133:35: error: cannot initialize a parameter of type 'std::__1::unique_ptr<bool, std::__1::default_delete<bool> >::pointer' (aka 'bool *') with an lvalue of type 'bool'
      out->enable_auto_size.reset(autosize);
                                  ^~~~~~~~
/Users/distiller/project/vendor/llvm-build/Release+Asserts/include/c++/v1/memory:2542:22: note: passing argument to parameter '__p' here
  void reset(pointer __p = pointer()) _NOEXCEPT {
                     ^
1 error generated.
Member

codebytere commented Jun 18, 2018

@jguze:

../../atom/browser/api/atom_api_web_contents.cc:133:35: error: cannot initialize a parameter of type 'std::__1::unique_ptr<bool, std::__1::default_delete<bool> >::pointer' (aka 'bool *') with an lvalue of type 'bool'
      out->enable_auto_size.reset(autosize);
                                  ^~~~~~~~
/Users/distiller/project/vendor/llvm-build/Release+Asserts/include/c++/v1/memory:2542:22: note: passing argument to parameter '__p' here
  void reset(pointer __p = pointer()) _NOEXCEPT {
                     ^
1 error generated.
Justin Guze

@ckerr ckerr merged commit 137aaf2 into electron:master Jun 19, 2018

10 checks passed

WIP ready for review
Details
ci/circleci: electron-linux-arm Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-mas-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-osx-x64 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@welcome

This comment has been minimized.

Show comment
Hide comment
@welcome

welcome bot Jun 19, 2018

Congrats on merging your first pull request! 🎉🎉🎉

welcome bot commented Jun 19, 2018

Congrats on merging your first pull request! 🎉🎉🎉

@alexeykuzmin

This comment has been minimized.

Show comment
Hide comment
@alexeykuzmin

alexeykuzmin Jun 20, 2018

Contributor

/trop run backport

Contributor

alexeykuzmin commented Jun 20, 2018

/trop run backport

@trop

This comment has been minimized.

Show comment
Hide comment
@trop

trop bot Jun 20, 2018

The backport process for this PR has been manually initiated, here we go! :D

trop bot commented Jun 20, 2018

The backport process for this PR has been manually initiated, here we go! :D

@trop

This comment has been minimized.

Show comment
Hide comment
@trop

trop bot Jun 20, 2018

We have automatically backported this PR to "2-0-x", please check out #13330

trop bot commented Jun 20, 2018

We have automatically backported this PR to "2-0-x", please check out #13330

@trop trop bot added merged/2-0-x and removed target/2-0-x labels Jun 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment