From 83cf96b3a0943741333f061aadf1fc9628fbb408 Mon Sep 17 00:00:00 2001 From: mkarolin Date: Thu, 13 Feb 2020 17:30:42 -0500 Subject: [PATCH] Revert "Merge pull request #4092 from fow5040/add-extra-static-zoom-levels" Reason for revert: this change has been upstreamed: https://chromium.googlesource.com/chromium/src/+/08b57c09851e2bdcb39ea70e46707f3bab6a0a4a This reverts commit 88c722981acc8ea984cce662b18253695bdc829a, reversing changes made to 01f83c78e5aa083c4579aa90557fff9ee7bb7dcd. --- .../extensions/extensions_resources.grd | 2 -- .../extensions/js_override/pdf/viewport.js | 8 ------- .../settings/brave_settings_overrides.js | 9 -------- browser/resources/settings/zoom_factors.json | 21 ------------------- .../webui/print_preview/print_preview_ui.cc | 12 ----------- .../components/zoom/page_zoom_constants.cc | 21 ------------------- 6 files changed, 73 deletions(-) delete mode 100644 browser/resources/extensions/js_override/pdf/viewport.js delete mode 100644 browser/resources/settings/zoom_factors.json delete mode 100644 chromium_src/chrome/browser/ui/webui/print_preview/print_preview_ui.cc delete mode 100644 chromium_src/components/zoom/page_zoom_constants.cc diff --git a/browser/resources/extensions/extensions_resources.grd b/browser/resources/extensions/extensions_resources.grd index aac129e3bfff..bc280770e483 100644 --- a/browser/resources/extensions/extensions_resources.grd +++ b/browser/resources/extensions/extensions_resources.grd @@ -10,8 +10,6 @@ - - - -Viewport.ZOOM_FACTORS = ; diff --git a/browser/resources/settings/brave_settings_overrides.js b/browser/resources/settings/brave_settings_overrides.js index a84d7c6b2485..e802762a66f7 100644 --- a/browser/resources/settings/brave_settings_overrides.js +++ b/browser/resources/settings/brave_settings_overrides.js @@ -103,17 +103,8 @@ const BraveClearSettingsMenuHighlightBehavior = { } } -const BraveAddZoomLevelsBehavior = { - ready: function() { - this._setPageZoomLevels_() - } -} - // Polymer Component Behavior injection (like superclasses) BravePatching.RegisterPolymerComponentBehaviors({ - 'settings-appearance-page': [ - BraveAddZoomLevelsBehavior - ], 'settings-clear-browsing-data-dialog': [ BraveClearBrowsingDataOnExitBehavior ], diff --git a/browser/resources/settings/zoom_factors.json b/browser/resources/settings/zoom_factors.json deleted file mode 100644 index 05de8b17d8da..000000000000 --- a/browser/resources/settings/zoom_factors.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - 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/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chromium_src/chrome/browser/ui/webui/print_preview/print_preview_ui.cc deleted file mode 100644 index efd2b7345868..000000000000 --- a/chromium_src/chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (c) 2019 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "chrome/grit/component_extension_resources.h" -#include "brave/browser/resources/extensions/grit/brave_extensions_resources.h" - -#undef IDR_PDF_VIEWPORT_JS -#define IDR_PDF_VIEWPORT_JS IDR_BRAVE_PDF_VIEWPORT_JS -#include "../../../../../../../chrome/browser/ui/webui/print_preview/print_preview_ui.cc" // NOLINT -#undef IDR_PDF_VIEWPORT_JS diff --git a/chromium_src/components/zoom/page_zoom_constants.cc b/chromium_src/components/zoom/page_zoom_constants.cc deleted file mode 100644 index 9155941a6c31..000000000000 --- a/chromium_src/components/zoom/page_zoom_constants.cc +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2019 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "components/zoom/page_zoom_constants.h" - -#include "base/stl_util.h" - -namespace zoom { - -// 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, - 3.0, 4.0, 5.0}; -const std::size_t kPresetZoomFactorsSize = base::size(kPresetZoomFactors); - -} // namespace zoom -