diff --git a/browser/resources/extensions/js_override/pdf/viewport.js b/browser/resources/extensions/js_override/pdf/viewport.js index 34e2dda4c125..d2894439d0a7 100644 --- a/browser/resources/extensions/js_override/pdf/viewport.js +++ b/browser/resources/extensions/js_override/pdf/viewport.js @@ -5,7 +5,4 @@ -Viewport.ZOOM_FACTORS = [ - 0.25, 1 / 3, 0.5, 2 / 3, 0.75, 0.8, 0.9, 1, 1.1, 1.25, 1.33, 1.4, 1.5, 1.75, 2, 2.5, 3, - 4, 5 -]; +Viewport.ZOOM_FACTORS = ; diff --git a/browser/resources/settings/brave_settings_overrides.js b/browser/resources/settings/brave_settings_overrides.js index c34f29578fd5..e62ea211fb84 100644 --- a/browser/resources/settings/brave_settings_overrides.js +++ b/browser/resources/settings/brave_settings_overrides.js @@ -105,27 +105,7 @@ const BraveClearSettingsMenuHighlightBehavior = { const BraveAddZoomLevelsBehavior = { ready: function() { - this._setPageZoomLevels_([ - 1 / 4, - 1 / 3, - 1 / 2, - 2 / 3, - 3 / 4, - 4 / 5, - 9 / 10, - 1, - 11 / 10, - 5 / 4, - 4 / 3, - 7 / 5, - 3 / 2, - 7 / 4, - 2, - 5 / 2, - 3, - 4, - 5, - ]) + this._setPageZoomLevels_() } } diff --git a/browser/resources/settings/zoom_factors.json b/browser/resources/settings/zoom_factors.json new file mode 100644 index 000000000000..05de8b17d8da --- /dev/null +++ b/browser/resources/settings/zoom_factors.json @@ -0,0 +1,21 @@ +[ + 0.25, + 1 / 3, + 0.5, + 2 / 3, + 0.75, + 0.8, + 0.9, + 1, + 1.1, + 1.25, + 4 / 3, + 7 / 5, + 1.5, + 1.75, + 2, + 2.5, + 3, + 4, + 5 +] \ No newline at end of file diff --git a/chromium_src/components/zoom/page_zoom_constants.cc b/chromium_src/components/zoom/page_zoom_constants.cc index a47f225e13f4..9155941a6c31 100644 --- a/chromium_src/components/zoom/page_zoom_constants.cc +++ b/chromium_src/components/zoom/page_zoom_constants.cc @@ -9,9 +9,8 @@ namespace zoom { -// This list is duplicated in chrome/browser/resources/pdf/viewport.js and in -// chrome/browser/resources/settings/appearance_page/appearance_page.js. Please -// make sure the three match. +// This list is duplicated in brave/browser/resources/settings/zoom_factors.json +// When changing this list, please make sure that gets updated also. const double kPresetZoomFactors[] = {0.25, 1 / 3.0, 0.5, 2 / 3.0, 0.75, 0.8, 0.9, 1.0, 1.1, 1.25, 4 / 3.0, 7 / 5.0, 1.5, 1.75, 2.0, 2.5,