From c41f6473f8355d35d0b8b6ff4f6f85a794b0e6c2 Mon Sep 17 00:00:00 2001 From: Bush2021 <79072750+Bush2021@users.noreply.github.com> Date: Sun, 5 May 2024 19:27:29 -0400 Subject: [PATCH] chore: remove `--force-renderer-accessibility` This parameter will slightly affect the performance of the browser when loading pages with a large number of elements. Therefore, it is not enabled by default. If users need to use this feature, they may add the parameter manually. --- src/iaccessible.h | 6 +++++- src/portable.h | 6 ------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/iaccessible.h b/src/iaccessible.h index 1bdf5f7..b790d85 100644 --- a/src/iaccessible.h +++ b/src/iaccessible.h @@ -416,7 +416,11 @@ bool IsDocNewTab() { NodePtr document = FindElementWithRole(pacc_main_window, ROLE_SYSTEM_DOCUMENT); if (document) { - // document 的 accValue 需要添加启动参数 --force-renderer-accessibility 来获取 + // The accValue of document needs to be obtained by adding the startup + // parameter --force-renderer-accessibility. However, this parameter will + // slightly affect the performance of the browser when loading pages with + // a large number of elements. Therefore, it is not enabled by default. + // If users need to use this feature, they may add the parameter manually. GetAccessibleValue(document, [&flag](BSTR bstr) { std::wstring_view bstr_view(bstr); flag = bstr_view.find(L"://newtab") != std::wstring_view::npos || diff --git a/src/portable.h b/src/portable.h index 4db7645..4b121d3 100644 --- a/src/portable.h +++ b/src/portable.h @@ -64,12 +64,6 @@ std::wstring GetCommand(LPWSTR param) { args.push_back(L"--disk-cache-dir=" + diskcache); } - { - if (IsNewTabDisable()) { - args.push_back(L"--force-renderer-accessibility"); - } - } - // 获取命令行,然后追加参数 // 截取拆分每个--开头的参数,然后多次 args.push_back // 重复上述过程,直到字串中不再存在 -- 号