Commit graph

5 commits

Author SHA1 Message Date
Charles Kerr
4a695d07c6
fix: misc-use-internal-linkage warnings (#44843)
* refactor: misc-use-internal-linkage warnings in context bridge

move impl functions into anonymous namespace so that they're not visible
to other compilation units:

- ExposeAPIInWorld()
- IsCalledFromMainWorld()
- OverrideGlobalPropertyFromIsolatedWorld()
- OverrideGlobalValueFromIsolatedWorld()
- TraceKeyPath()

* refactor: misc-use-internal-linkage warnings in skia util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- struct ScaleFactorPair
- kScaleFactorPairs[]
- GetScaleFactorFromPath()
- AddImageSkiaRepFromPath()

* refactor: misc-use-internal-linkage warnings in printing util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetFullPagePlugin()

* refactor: misc-use-internal-linkage warnings in blijnk converter

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetKeyLocationCode()
- ModifiersToArray()

* refactor: misc-use-internal-linkage warnings in extrension system

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- ParseManifest()

* refactor: misc-use-internal-linkage warnings in skia util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetFrameTokenMap()
- GetFrameTreeNodeIdMap()

* refactor: misc-use-internal-linkage warnings in electron_api_utility_process.cc

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- GetAllUtilityProcessWrappers()

* refactor: misc-use-internal-linkage warnings in electron_api_menu

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- InvokeBoolMethod()

* refactor: misc-use-internal-linkage warnings in platform util

move impl details into anonymous namespace so that they're not visible
to other compilation units:

- struct TrashItemResult
- TrashItemOnBlockingThread()
2024-11-27 10:40:39 -06:00
Charles Kerr
f595443a22
refactor: fix modernize-return-braced-init-list warnings (#44838)
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]

* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]

NB: using the braced-initializer list uncovered an error here:
the float returned by std::floor() can't be implicitly cast to
an int. This is solved by using base::ClampFloor<int>() instead.
std::floor()
2024-11-27 09:41:46 +09:00
Charles Kerr
eb40d2cbfa
fix: FTBFS when building with enable_plugins = false (#44003)
* fix: do not build electron_plugin_info_host_impl.cc when plugins are disabled

it fails to build from source with this error:

../../content/public/browser/plugin_service.h:17:2: error: "Plugins should be enabled"
   17 | #error "Plugins should be enabled"

* fix: FTBFS in printing_utils.cc when ENABLE_PDF is false

* fixup! fix: do not build electron_plugin_info_host_impl.cc when plugins are disabled

fix BUILD.gn linting
2024-09-29 17:10:34 -05:00
Shelley Vohr
286384258b
fix: blank page when printing pdf (#43309) 2024-08-14 15:47:47 -04:00
Shelley Vohr
db11090e58
fix: silent printing default dpi on Windows (#41811) 2024-04-11 19:56:39 -04:00