-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4092 from fow5040/add-extra-static-zoom-levels
Updated zoom constants and pages to resolve issue #6943
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* 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 src="../../../../../../chrome/browser/resources/pdf/viewport.js"> | ||
|
||
Viewport.ZOOM_FACTORS = <include src="../../../settings/zoom_factors.json">; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
] |
12 changes: 12 additions & 0 deletions
12
chromium_src/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* 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 | ||
|