Pull request #18: AP9-2791: Adjust the text scaling value of Chromium to the maximum value, and the chrome homepage page is stretched after restarting the panel.
Merge in AP/chromiumpatches from AP9-2791 to master * commit 'b7db040768d07dc60975096438cd5782a0a86b53': AP9-2791: Adjust the text scaling value of Chromium to the maximum value, and the chrome homepage page is stretched after restarting the panel.
This commit is contained in:
commit
5d5d2de72c
2 changed files with 90 additions and 0 deletions
|
@ -5,6 +5,7 @@ Set-default-page-url.patch
|
|||
change-Android-userAgent-to-deskmode-userAgent.patch
|
||||
Force-accessibility-text-scaling.patch
|
||||
Force-package-name-to-org.chromium.chrome.patch
|
||||
Donot-stretch-when-force-enable-zoom-checked.patch
|
||||
Disable-third-party-cookies-by-default.patch
|
||||
AV1-codec-support.patch
|
||||
Switch-to-fstack-protector-strong.patch
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
From: Yifeng <wuyifeng@nd.com.cn>
|
||||
Date: Fri, 30 Nov 2021 07:23:00 +0000
|
||||
Subject: The web page forces to fill the screen when the checkbox of Force enable zoom is checked.
|
||||
|
||||
This ensures that when the checkbox of Force enable zoom is checked, the web page will not be stretched.
|
||||
This is the same that when the checkbox is unchecked.
|
||||
Refer to: https://prometheanworld.atlassian.net/browse/AP9-2791
|
||||
|
||||
---
|
||||
content/browser/web_contents/web_contents_impl.cc | 2 +-
|
||||
chrome/android/java/res/xml/accessibility_preferences.xml | 4 ++--
|
||||
chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java | 8 ++++----
|
||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2760,9 +2760,9 @@
|
||||
#if defined(OS_ANDROID)
|
||||
for (FrameTreeNode* node : frame_tree_.Nodes()) {
|
||||
RenderFrameHostImpl* rfh = node->current_frame_host();
|
||||
if (rfh->is_local_root()) {
|
||||
if (auto* rwh = rfh->GetRenderWidgetHost())
|
||||
- rwh->SetForceEnableZoom(web_preferences_->force_enable_zoom);
|
||||
+ rwh->SetForceEnableZoom(false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
diff --git a/chrome/android/java/res/xml/accessibility_preferences.xml b/chrome/android/java/res/xml/accessibility_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/accessibility_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/accessibility_preferences.xml
|
||||
@@ -8,14 +8,14 @@
|
||||
<org.chromium.chrome.browser.accessibility.settings.TextScalePreference
|
||||
android:key="text_scale"
|
||||
android:title="@string/font_size"
|
||||
android:selectable="false" />
|
||||
|
||||
- <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ <!--<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
android:key="force_enable_zoom"
|
||||
android:summary="@string/force_enable_zoom_summary"
|
||||
- android:title="@string/force_enable_zoom_title" />
|
||||
+ android:title="@string/force_enable_zoom_title" />-->
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
android:key="reader_for_accessibility"
|
||||
android:summary="@string/reader_for_accessibility_summary"
|
||||
android:title="@string/reader_for_accessibility_title" />
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
@@ -37,7 +37,7 @@
|
||||
static final String PREF_IMAGE_DESCRIPTIONS = "image_descriptions";
|
||||
static final String PREF_ACCESSIBILITY_PAGE_ZOOM = "accessibility_page_zoom";
|
||||
|
||||
static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
|
||||
private TextScalePreference mTextScalePref;
|
||||
- private ChromeBaseCheckBoxPreference mForceEnableZoomPref;
|
||||
+ //private ChromeBaseCheckBoxPreference mForceEnableZoomPref;
|
||||
private boolean mRecordFontSizeChangeOnStop;
|
||||
@@ -45,11 +45,11 @@
|
||||
private FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() {
|
||||
@Override
|
||||
public void onFontScaleFactorChanged(float fontScaleFactor, float userFontScaleFactor) {
|
||||
mTextScalePref.updateFontScaleFactors(fontScaleFactor, userFontScaleFactor, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onForceEnableZoomChanged(boolean enabled) {
|
||||
- mForceEnableZoomPref.setChecked(enabled);
|
||||
+ //mForceEnableZoomPref.setChecked(enabled);
|
||||
}
|
||||
};
|
||||
@@ -69,11 +69,11 @@
|
||||
mTextScalePref = (TextScalePreference) findPreference(PREF_TEXT_SCALE);
|
||||
mTextScalePref.setOnPreferenceChangeListener(this);
|
||||
mTextScalePref.updateFontScaleFactors(mFontSizePrefs.getFontScaleFactor(),
|
||||
mFontSizePrefs.getUserFontScaleFactor(), false);
|
||||
|
||||
- mForceEnableZoomPref =
|
||||
+ /*mForceEnableZoomPref =
|
||||
(ChromeBaseCheckBoxPreference) findPreference(PREF_FORCE_ENABLE_ZOOM);
|
||||
mForceEnableZoomPref.setOnPreferenceChangeListener(this);
|
||||
- mForceEnableZoomPref.setChecked(mFontSizePrefs.getForceEnableZoom());
|
||||
+ mForceEnableZoomPref.setChecked(mFontSizePrefs.getForceEnableZoom());*/
|
||||
|
||||
ChromeBaseCheckBoxPreference readerForAccessibilityPref =
|
||||
--
|
||||
2.17.1
|
Loading…
Add table
Reference in a new issue