• Home
  • Raw
  • Download

Lines Matching +full:clang +full:- +full:cl +full:- +full:10 +full:- +full:x64

1 diff --git a/.gitattributes b/.gitattributes
3 --- a/.gitattributes
5 @@ -1,49 +1,16 @@
6 -src/native_client/toolchain/.tars/package_archives/toolchain.tar.bz2/04a77d2e2d6e814a6a5efd66de141…
7 …rd_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ filter=lfs diff=lfs merge=l…
8 src/third_party/jdk/current/lib/src.zip filter=lfs diff=lfs merge=lfs -text
9 -src/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz filter=lfs diff=lf…
10 -src/third_party/node/linux/node-linux-x64/bin/node filter=lfs diff=lfs merge=lfs -text
11 -.cipd/pkgs/215/iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC/lib/android-all-10-robolectric-5803371…
12 …ird_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang filter=lfs diff=lfs merge=lf…
13 src/third_party/jdk/extras/java_8/jre/lib/rt.jar filter=lfs diff=lfs merge=lfs -text
14 -src/third_party/swiftshader/tests/regres/testlists/vk-master-NOT_SUPPORTED.txt filter=lfs diff=lfs…
15 -.cipd/pkgs/134/87169fbc701d244c311e6aa8843591a7f1710bc0/lib/libart-compiler.so filter=lfs diff=lfs…
16 …d_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-cl filter=lfs diff=lfs merge=l…
17 src/third_party/llvm-build/Release+Asserts/bin/clang filter=lfs diff=lfs merge=lfs -text
18 -.cipd/pkgs/199/no8ss5nRg6uYDM08HboypuIQuix7bS1kVqRGyWmwP-YC/android_system.jar filter=lfs diff=lfs…
19 src/third_party/android_ndk/prebuilt/linux-x86_64/bin/gdb-orig filter=lfs diff=lfs merge=lfs -text
20 …ty/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/libclang.so.11git filter=lfs diff=lfs m…
21 -src/third_party/angle/third_party/VK-GL-CTS/src/android/cts/master/vk-master.txt filter=lfs diff=l…
22 -src/third_party/angle/third_party/VK-GL-CTS/src/external/vulkancts/mustpass/master/vk-default.txt …
23 -.cipd/pkgs/215/iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC/lib/android-all-5.0.2_r3-robolectric-r…
24 -.cipd/pkgs/134/87169fbc701d244c311e6aa8843591a7f1710bc0/lib/libart.so filter=lfs diff=lfs merge=lf…
25 …party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/liblldb.so filter=lfs diff=lfs merge…
26 …ty/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/liblldb.so.11git filter=lfs diff=lfs me…
27 -src/third_party/android_build_tools/aapt2/aapt2 filter=lfs diff=lfs merge=lfs -text
28 -src/third_party/swiftshader/tests/regres/testlists/vk-master.txt filter=lfs diff=lfs merge=lfs -te…
29 -src/third_party/depot_tools/.cipd_bin/compiler_proxy filter=lfs diff=lfs merge=lfs -text
30 -src/chrome/test/data/xr/webvr_info/samples/media/textures/vr_bench_man.mp4 filter=lfs diff=lfs mer…
31 -.cipd/pkgs/215/iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC/lib/android-all-8.1.0-robolectric-4611…
32 …/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/libclang_cxx.so.11git filter=lfs diff=lfs…
33 src/third_party/jdk/current/lib/modules filter=lfs diff=lfs merge=lfs -text
34 -.cipd/pkgs/215/iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC/lib/android-all-9-robolectric-4913185-
35 -.cipd/pkgs/215/iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC/lib/android-all-8.0.0_r4-robolectric-r…
36 -.cipd/pkgs/134/87169fbc701d244c311e6aa8843591a7f1710bc0/lib/libartd-compiler.so filter=lfs diff=lf…
37 …d_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib/python3.8/site-packages/lldb/_lldb.so filter=lfs d…
38 …ty/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/libLLVM-11git.so filter=lfs diff=lfs me…
39 …/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/liblldb.so.11.0.5git filter=lfs diff=lfs …
40 …public/emulator/lib64/qt/lib/libQt5WebEngineCoreAndroidEmu.so.5 filter=lfs diff=lfs merge=lfs -text
41 -src/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz filter=lfs diff=lfs mer…
42 -src/third_party/catapult/tracing/test_data/theverge_trace.json filter=lfs diff=lfs merge=lfs -text
43 -.cipd/pkgs/215/iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC/lib/android-all-7.1.0_r7-robolectric-r…
44 -src/ohos_ndk/toolchains/llvm/bin/lld filter=lfs diff=lfs merge=lfs -text
45 -src/ohos_ndk/toolchains/llvm/bin/clang-check filter=lfs diff=lfs merge=lfs -text
46 -src/ohos_ndk/toolchains/llvm/lib/libLLVM-10.so filter=lfs diff=lfs merge=lfs -text
47 -src/ohos_ndk/toolchains/llvm/lib/libLTO.so.10 filter=lfs diff=lfs merge=lfs -text
48 -src/ohos_ndk/toolchains/llvm/lib/libclang.so.10 filter=lfs diff=lfs merge=lfs -text
49 -src/ohos_ndk/toolchains/llvm/lib/liblldb.so.10.0.1 filter=lfs diff=lfs merge=lfs -text
50 -src/ohos_ndk/toolchains/llvm/lib/libclang-cpp.so.10 filter=lfs diff=lfs merge=lfs -text
51 -src/ohos_ndk/toolchains/llvm/bin/clang-10 filter=lfs diff=lfs merge=lfs -text
52 -src/ohos_ndk_aosp/toolchains/clang-r353983c/bin/clang-9 filter=lfs diff=lfs merge=lfs -text
53 -src/ohos_ndk_aosp/toolchains/clang-r353983c/lib64/libclang_cxx.so.9svn filter=lfs diff=lfs merge=l…
54 -src/ohos_ndk_aosp/toolchains/clang-r353983c/lib64/libclang.so.9svn filter=lfs diff=lfs merge=lfs -
55 diff --git a/build.sh b/build.sh
57 --- a/build.sh
59 @@ -35,11 +35,11 @@ buildargs="
63 - use_musl=false
68 - product_name=\"wgr\"
73 diff --git a/build_all.sh b/build_all.sh
75 --- a/build_all.sh
77 @@ -5,7 +5,7 @@ basedir=`pwd`
81 -ohos_nweb_path=$harmony_base/foundation/web/webview
86 diff --git a/gen_ohos_ndk.sh b/gen_ohos_ndk.sh
88 --- a/gen_ohos_ndk.sh
90 @@ -66,6 +66,9 @@ declare -A src_ohos_includes=(
100 @@ -80,6 +83,12 @@ src_ohos_libs=(
113 diff --git a/src/build/config/ohos/BUILD.gn b/src/build/config/ohos/BUILD.gn
115 --- a/src/build/config/ohos/BUILD.gn
117 @@ -131,12 +131,12 @@ config("runtime_library") {
121 - "-L" + rebase_path("$ohos_sysroot/usr/lib/arm-linux-ohosmusl", root_build_dir),
122 - "-L" + rebase_path("$ohos_toolchain_root/lib/arm-linux-ohosmusl/c++", root_build_dir),
123 - "-L" + rebase_path("$ohos_toolchain_root/lib/clang/10.0.1/lib/arm-linux-ohosmusl", root_buil…
124 + "-L" + rebase_path("$ohos_sysroot/usr/lib/arm-linux-ohos", root_build_dir),
125 + "-L" + rebase_path("$ohos_toolchain_root/lib/arm-linux-ohos/c++", root_build_dir),
126 + "-L" + rebase_path("$ohos_toolchain_root/lib/clang/10.0.1/lib/arm-linux-ohos", root_build_di…
128 - ldflags += [ "-Wl,--dynamic-linker,/system/bin/ld-musl-arm.so.1" ]
129 - libclang_rt_file = "$ohos_toolchain_root/lib/clang/10.0.1/lib/arm-linux-ohosmusl/libclang_rt.b…
130 + ldflags += [ "-Wl,--dynamic-linker,/lib/ld-musl-arm.so.1" ]
131 + libclang_rt_file = "$ohos_toolchain_root/lib/clang/10.0.1/lib/arm-linux-ohos/libclang_rt.built…
135 diff --git a/src/build/config/ohos/config.gni b/src/build/config/ohos/config.gni
137 --- a/src/build/config/ohos/config.gni
139 @@ -13,7 +13,7 @@ if (is_ohos) {
143 - build_chromium_with_ohos_src = false
148 @@ -46,7 +46,7 @@ if (is_ohos) {
151 ohos_toolchain_root = "$ohos_ndk_root/clang/ohos/linux-x86_64/llvm"
152 - ohos_sysroot = "$ohos_build_root/out/ohos-arm-release/obj/third_party/musl"
155 ohos_toolchain_root = "$ohos_ndk_root/clang/host/linux-x86/clang-r353983c"
156 ohos_sysroot = "$ohos_ndk_root/aosp_prebuilt_libs/asdk_libs/ndk/platforms/current/arch-arm"
157 @@ -61,6 +61,7 @@ if (is_ohos) {
165 @@ -85,10 +86,18 @@ if (is_ohos) {
171 - ohos_libs_dir = [
172 - "$ohos_build_root/out/ohos-arm-release/packages/phone/system/lib",
173 - ]
181 + "$ohos_build_root/out/ohos-arm-release/packages/phone/system/lib",
187 @@ -124,6 +133,12 @@ if (is_ohos) {
200 diff --git a/src/cef/include/capi/cef_browser_capi.h b/src/cef/include/capi/cef_browser_capi.h
202 --- a/src/cef/include/capi/cef_browser_capi.h
204 @@ -33,7 +33,7 @@
208 -// $hash=c67f05b1e5dfb20ca1895cd289fa391fc2f8d21b$
213 @@ -104,6 +104,11 @@ typedef struct _cef_browser_t {
225 @@ -1049,6 +1054,17 @@ typedef struct _cef_browser_host_t {
243 diff --git a/src/cef/include/capi/cef_dialog_handler_capi.h b/src/cef/include/capi/cef_dialog_handl…
245 --- a/src/cef/include/capi/cef_dialog_handler_capi.h
247 @@ -33,7 +33,7 @@
251 -// $hash=0f56154217707d141912dc8a298279df8df04311$
256 @@ -106,6 +106,7 @@ typedef struct _cef_dialog_handler_t {
264 diff --git a/src/cef/include/capi/cef_load_handler_capi.h b/src/cef/include/capi/cef_load_handler_c…
266 --- a/src/cef/include/capi/cef_load_handler_capi.h
268 @@ -33,7 +33,7 @@
272 -// $hash=4e59a8c7cda2f13ee54599773755637ec846fe84$
277 @@ -138,6 +138,16 @@ typedef struct _cef_load_handler_t {
294 diff --git a/src/cef/include/cef_api_hash.h b/src/cef/include/cef_api_hash.h
296 --- a/src/cef/include/cef_api_hash.h
298 @@ -42,15 +42,15 @@
302 -#define CEF_API_HASH_UNIVERSAL "1f76ea4de1ba7ea76c979c9e1b8979dd9635627c"
305 -#define CEF_API_HASH_PLATFORM "8495446ce9aab5825a73927de2d283a4c476cb78"
308 -#define CEF_API_HASH_PLATFORM "f29274b57821fd5052c5e2b438189ad9f9343aeb"
311 -#define CEF_API_HASH_PLATFORM "441fb55700b31842dfc6e31f9757ef63c0359623"
314 -#define CEF_API_HASH_PLATFORM "441fb55700b31842dfc6e31f9757ef63c0359623"
319 diff --git a/src/cef/include/cef_browser.h b/src/cef/include/cef_browser.h
321 --- a/src/cef/include/cef_browser.h
323 @@ -100,6 +100,12 @@ class CefBrowser : public virtual CefBaseRefCounted {
324 /*--cef()--*/
330 + /*--cef()--*/
336 @@ -1078,6 +1084,18 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
338 /*--cef()--*/
344 + /*--cef()--*/
350 + /*--cef()--*/
355 diff --git a/src/cef/include/cef_dialog_handler.h b/src/cef/include/cef_dialog_handler.h
357 --- a/src/cef/include/cef_dialog_handler.h
359 @@ -98,6 +98,7 @@ class CefDialogHandler : public virtual CefBaseRefCounted {
367 diff --git a/src/cef/include/cef_load_handler.h b/src/cef/include/cef_load_handler.h
371 --- a/src/cef/include/cef_load_handler.h
373 @@ -131,6 +131,15 @@ class CefLoadHandler : public virtual CefBaseRefCounted {
381 + /*--cef()--*/
389 diff --git a/src/cef/include/internal/cef_types.h b/src/cef/include/internal/cef_types.h
393 --- a/src/cef/include/internal/cef_types.h
395 @@ -703,13 +703,13 @@ typedef struct _cef_browser_settings_t {
399 - int mixed_content_mode;
410 diff --git a/src/cef/include/internal/cef_types_wrappers.h b/src/cef/include/internal/cef_types_wra…
414 --- a/src/cef/include/internal/cef_types_wrappers.h
416 @@ -732,13 +732,13 @@ struct CefBrowserSettingsTraits {
417 src->javascript_can_open_windows_automatically;
418 target->loads_images_automatically = src->loads_images_automatically;
419 target->text_size_percent = src->text_size_percent;
420 - target->mixed_content_mode = src->mixed_content_mode;
421 target->allow_running_insecure_content = src->allow_running_insecure_content;
422 target->strict_mixed_content_checking = src->strict_mixed_content_checking;
423 target->allow_mixed_content_upgrades = src->allow_mixed_content_upgrades;
424 target->geolocation_enabled = src->geolocation_enabled;
425 target->supports_double_tap_zoom = src->supports_double_tap_zoom;
426 target->supports_multi_touch_zoom = src->supports_multi_touch_zoom;
427 + target->initialize_at_minimum_page_scale = src->initialize_at_minimum_page_scale;
431 diff --git a/src/cef/libcef/browser/alloy/alloy_browser_main.cc b/src/cef/libcef/browser/alloy/allo…
433 --- a/src/cef/libcef/browser/alloy/alloy_browser_main.cc
435 @@ -194,10 +194,6 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() {
439 - auto browser_context =
440 - global_request_context_->GetBrowserContext()->AsBrowserContext();
441 -
442 - CefDevToolsManagerDelegate::StartHttpHandler(browser_context);
446 diff --git a/src/cef/libcef/browser/alloy/alloy_content_browser_client.cc b/src/cef/libcef/browser/…
448 --- a/src/cef/libcef/browser/alloy/alloy_content_browser_client.cc
450 @@ -1229,6 +1229,8 @@ void AlloyContentBrowserClient::ConfigureNetworkContextParams(
452 network_context_params->persist_session_cookies = cef_context->ShouldPersistSessionCookies();
453 …network_context_params->restore_old_session_cookies = cef_context->ShouldRestoreOldSessionCookies(…
454 + network_context_params->http_cache_enabled = true;
455 + network_context_params->http_cache_path = cache_path;
459 diff --git a/src/cef/libcef/browser/browser_contents_delegate.cc b/src/cef/libcef/browser/browser_c…
463 --- a/src/cef/libcef/browser/browser_contents_delegate.cc
465 @@ -406,6 +406,11 @@ void CefBrowserContentsDelegate::DidFinishNavigation(
470 + bool isReload = PageTransitionCoreTypeIs(navigation_handle->GetPageTransition(),
472 + LOG(INFO) << "load type = " << PageTransitionStripQualifier(navigation_handle->GetPageTransiti…
477 @@ -663,3 +668,19 @@ void CefBrowserContentsDelegate::InitIconHelper() {
489 + auto handler = cefClient->GetLoadHandler();
495 + handler->OnRefreshAccessedHistory(browser(), frame, url.spec(), isReload);
497 diff --git a/src/cef/libcef/browser/browser_contents_delegate.h b/src/cef/libcef/browser/browser_co…
501 --- a/src/cef/libcef/browser/browser_contents_delegate.h
503 @@ -176,6 +176,8 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
512 diff --git a/src/cef/libcef/browser/browser_host_base.cc b/src/cef/libcef/browser/browser_host_base…
514 --- a/src/cef/libcef/browser/browser_host_base.cc
516 @@ -10,6 +10,7 @@
524 @@ -465,7 +466,6 @@ void CefBrowserHostBase::UpdateBrowserSettings(
528 - settings_.mixed_content_mode = browser_settings.mixed_content_mode;
532 @@ -477,6 +477,8 @@ void CefBrowserHostBase::UpdateBrowserSettings(
541 @@ -682,15 +684,27 @@ void CefBrowserHostBase::GoForward() {
545 - LOG(INFO) << "CanGoBackOrForward";
547 - LOG(INFO) << "CanGoBackOrForward:"
548 - << wc->GetController().CanGoToOffset(num_steps);
549 return wc->GetController().CanGoToOffset(num_steps);
561 + if (wc && wc->GetController().CanPruneAllButLastCommitted()) {
562 + wc->GetController().PruneAllButLastCommitted();
572 @@ -1300,4 +1314,24 @@ void CefBrowserHostBase::SetNativeWindow(cef_native_window_t window)
576 -}
599 diff --git a/src/cef/libcef/browser/browser_host_base.h b/src/cef/libcef/browser/browser_host_base.h
601 --- a/src/cef/libcef/browser/browser_host_base.h
603 @@ -219,6 +219,7 @@ class CefBrowserHostBase : public CefBrowserHost,
611 @@ -354,6 +355,9 @@ class CefBrowserHostBase : public CefBrowserHost,
621 @@ -407,6 +411,7 @@ class CefBrowserHostBase : public CefBrowserHost,
629 diff --git a/src/cef/libcef/browser/devtools/devtools_manager_delegate.cc b/src/cef/libcef/browser/…
631 --- a/src/cef/libcef/browser/devtools/devtools_manager_delegate.cc
633 @@ -102,8 +102,15 @@ void CefDevToolsManagerDelegate::StartHttpHandler(
637 - content::DevToolsAgentHost::StartRemoteDebuggingServer(
645 std::move(socket_factory), browser_context->GetPath(), base::FilePath());
650 @@ -116,6 +123,7 @@ void CefDevToolsManagerDelegate::StartHttpHandler(
653 // This is a no-op if the server was never started.
658 diff --git a/src/cef/libcef/browser/file_dialog_manager.cc b/src/cef/libcef/browser/file_dialog_man…
662 --- a/src/cef/libcef/browser/file_dialog_manager.cc
664 @@ -204,7 +204,6 @@ void CefFileDialogManager::RunFileChooser(
668 -
672 @@ -286,7 +285,8 @@ void CefFileDialogManager::RunFileChooserInternal(
673 handled = handler->OnFileDialog(
676 - params.selected_accept_filter, callbackImpl.get());
681 callback = callbackImpl->Disconnect();
682 diff --git a/src/cef/libcef/browser/net_service/cookie_helper.cc b/src/cef/libcef/browser/net_servi…
684 --- a/src/cef/libcef/browser/net_service/cookie_helper.cc
686 @@ -192,7 +192,7 @@ void LoadCookies(content::BrowserContext* browser_context,
690 - request.url.IsAboutBlank() || !request.SendsCookies()) {
695 @@ -213,8 +213,7 @@ void SaveCookies(content::BrowserContext* browser_context,
699 - !headers->HasHeader(net_service::kHTTPSetCookieHeaderName) ||
700 - !request.SavesCookies()) {
701 + !headers->HasHeader(net_service::kHTTPSetCookieHeaderName)) {
705 diff --git a/src/cef/libcef/browser/net_service/cookie_manager_impl.cc b/src/cef/libcef/browser/net…
709 --- a/src/cef/libcef/browser/net_service/cookie_manager_impl.cc
711 @@ -20,7 +20,7 @@ namespace {
715 - CEF_REQUIRE_UIT();
720 @@ -29,10 +29,10 @@ CefBrowserContext* GetBrowserContext(const CefBrowserContext::Getter& getter) {
724 - CEF_REQUIRE_UIT();
727 browser_context->AsBrowserContext())
728 - ->GetCookieManagerForBrowserProcess();
729 + ->GetCookieManagerForOhos();
733 @@ -43,34 +43,10 @@ void RunAsyncCompletionOnUIThread(CefRefPtr<CefCompletionCallback> callback) {
737 -// Always execute the callback asynchronously.
738 -void SetCookieCallbackImpl(CefRefPtr<CefSetCookieCallback> callback,
739 - net::CookieAccessResult access_result) {
740 - if (!callback.get()) {
741 - return;
742 - }
743 - const bool is_include = access_result.status.IsInclude();
744 - if (!is_include) {
745 - LOG(WARNING) << "SetCookie failed with reason: "
746 - << access_result.status.GetDebugString();
747 - }
748 - CEF_POST_TASK(CEF_UIT, base::Bind(&CefSetCookieCallback::OnComplete,
749 - callback.get(), is_include));
750 -}
751 -
752 -// Always execute the callback asynchronously.
753 -void DeleteCookiesCallbackImpl(CefRefPtr<CefDeleteCookiesCallback> callback,
754 - uint32_t num_deleted) {
755 - if (!callback.get())
756 - return;
757 - CEF_POST_TASK(CEF_UIT, base::Bind(&CefDeleteCookiesCallback::OnComplete,
758 - callback.get(), num_deleted));
759 -}
760 -
764 - CEF_REQUIRE_UIT();
769 @@ -103,30 +79,13 @@ void ExecuteVisitor(CefRefPtr<CefCookieVisitor> visitor,
771 visitor->SetCookieLine(CefString(cookie_line));
773 -
774 -// Always execute the callback asynchronously.
775 -void GetAllCookiesCallbackImpl(
776 - CefRefPtr<CefCookieVisitor> visitor,
777 - const CefBrowserContext::Getter& browser_context_getter,
778 - const net::CookieList& cookies) {
779 - CEF_POST_TASK(CEF_UIT, base::Bind(&ExecuteVisitor, visitor,
780 - browser_context_getter, cookies));
781 -}
782 -
783 -void GetCookiesCallbackImpl(
784 - CefRefPtr<CefCookieVisitor> visitor,
785 - const CefBrowserContext::Getter& browser_context_getter,
786 - const net::CookieAccessResultList& include_cookies,
787 - const net::CookieAccessResultList&) {
788 - net::CookieList cookies;
789 - for (const auto& status : include_cookies) {
790 - cookies.push_back(status.cookie);
791 - }
792 - GetAllCookiesCallbackImpl(visitor, browser_context_getter, cookies);
793 -}
796 -CefCookieManagerImpl::CefCookieManagerImpl() {}
805 @@ -215,7 +174,6 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url,
809 -
813 @@ -292,7 +250,9 @@ bool CefCookieManagerImpl::VisitAllCookiesInternal(
817 - ->GetAllCookies(base::Bind(&GetAllCookiesCallbackImpl, visitor,
818 + ->GetAllCookies(base::Bind(&CefCookieManagerImpl::GetAllCookiesCallbackImpl,
824 @@ -317,7 +277,9 @@ bool CefCookieManagerImpl::VisitUrlCookiesInternal(
827 ->GetCookieList(url, options,
828 - base::Bind(&GetCookiesCallbackImpl, visitor,
835 @@ -367,9 +329,12 @@ bool CefCookieManagerImpl::SetCookieInternal(
841 ->SetCanonicalCookie(*canonical_cookie, url, options,
842 - base::Bind(SetCookieCallbackImpl, callback));
849 @@ -406,7 +371,9 @@ bool CefCookieManagerImpl::DeleteCookiesInternal(
852 ->DeleteCookies(std::move(deletion_filter),
853 - base::Bind(DeleteCookiesCallbackImpl, callback));
860 @@ -419,15 +386,18 @@ bool CefCookieManagerImpl::FlushStoreInternal(
864 - ->FlushCookieStore(base::Bind(RunAsyncCompletionOnUIThread, callback));
865 + ->FlushCookieStore(base::Bind(
874 - if (!CEF_CURRENTLY_ON_UIT()) {
875 - CEF_POST_TASK(
876 - CEF_UIT,
877 + if (!cookie_store_task_runner_->RunsTasksInCurrentSequence()) {
878 + cookie_store_task_runner_->PostTask(
883 @@ -441,7 +411,7 @@ void CefCookieManagerImpl::StoreOrTriggerInitCallback(
887 - return CEF_CURRENTLY_ON_UIT() && initialized_;
888 + return cookie_store_task_runner_->RunsTasksInCurrentSequence() && initialized_;
891 // CefCookieManager methods ----------------------------------------------------
892 @@ -459,3 +429,65 @@ bool CefCookieManager::CreateCefCookie(const CefString& url,
910 + cookie_store_task_runner_->PostTask(
920 + cookie_store_task_runner_->PostTask(
930 + cookie_store_task_runner_->PostTask(
953 + cookie_store_task_runner_->PostTask(
959 diff --git a/src/cef/libcef/browser/net_service/cookie_manager_impl.h b/src/cef/libcef/browser/net_…
963 --- a/src/cef/libcef/browser/net_service/cookie_manager_impl.h
965 @@ -12,6 +12,7 @@
973 @@ -58,6 +59,18 @@ class CefCookieManagerImpl : public CefCookieManager {
992 @@ -71,6 +84,8 @@ class CefCookieManagerImpl : public CefCookieManager {
1001 diff --git a/src/cef/libcef/browser/net_service/net_helpers.cc b/src/cef/libcef/browser/net_service…
1003 --- a/src/cef/libcef/browser/net_service/net_helpers.cc
1005 @@ -30,6 +30,7 @@ int UpdateCacheLoadFlags(int load_flags, int cache_control_flags) {
1013 @@ -87,7 +88,11 @@ int UpdateLoadFlags(int load_flags) {
1017 - return load_flags;
1026 diff --git a/src/cef/libcef/browser/net_service/net_helpers.h b/src/cef/libcef/browser/net_service/…
1028 --- a/src/cef/libcef/browser/net_service/net_helpers.h
1030 @@ -19,6 +19,7 @@ class NETHELPERS_EXPORT NetHelpers {
1038 diff --git a/src/cef/libcef/browser/osr/browser_platform_delegate_osr.cc b/src/cef/libcef/browser/o…
1040 --- a/src/cef/libcef/browser/osr/browser_platform_delegate_osr.cc
1042 @@ -160,7 +160,10 @@ void CefBrowserPlatformDelegateOsr::SendTouchEvent(const CefTouchEvent& event)…
1045 view->SendTouchEvent(event);
1046 - SendTouchEventToRender(event);
1054 diff --git a/src/cef/libcef/browser/prefs/renderer_prefs.cc b/src/cef/libcef/browser/prefs/renderer…
1058 --- a/src/cef/libcef/browser/prefs/renderer_prefs.cc
1060 @@ -371,6 +371,7 @@ void SetCefPrefs(const CefBrowserSettings& cef,
1068 diff --git a/src/cef/libcef/renderer/browser_impl.cc b/src/cef/libcef/renderer/browser_impl.cc
1070 --- a/src/cef/libcef/renderer/browser_impl.cc
1072 @@ -83,6 +83,10 @@ bool CefBrowserImpl::CanGoBackOrForward(int num_steps) {
1083 diff --git a/src/cef/libcef/renderer/browser_impl.h b/src/cef/libcef/renderer/browser_impl.h
1085 --- a/src/cef/libcef/renderer/browser_impl.h
1087 @@ -50,6 +50,7 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver {
1095 diff --git a/src/cef/libcef_dll/cpptoc/browser_cpptoc.cc b/src/cef/libcef_dll/cpptoc/browser_cpptoc…
1097 --- a/src/cef/libcef_dll/cpptoc/browser_cpptoc.cc
1099 @@ -9,7 +9,7 @@
1103 -// $hash=37305a392b6fceed48564b7a7d5f0d2811c537f4$
1108 @@ -117,6 +117,19 @@ int CEF_CALLBACK browser_can_go_back_or_forward(struct _cef_browser_t* self,
1115 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1122 + CefBrowserCppToC::Get(self)->DeleteHistory();
1128 @@ -439,6 +452,7 @@ CefBrowserCppToC::CefBrowserCppToC() {
1129 GetStruct()->can_go_forward = browser_can_go_forward;
1130 GetStruct()->go_forward = browser_go_forward;
1131 GetStruct()->can_go_back_or_forward = browser_can_go_back_or_forward;
1132 + GetStruct()->delete_history = browser_delete_history;
1133 GetStruct()->is_loading = browser_is_loading;
1134 GetStruct()->reload = browser_reload;
1135 GetStruct()->reload_ignore_cache = browser_reload_ignore_cache;
1136 diff --git a/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc b/src/cef/libcef_dll/cpptoc/browser_h…
1138 --- a/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc
1140 @@ -9,7 +9,7 @@
1144 -// $hash=895ebf37281c0926ef4cc9262fe90e940d8b7ab4$
1149 @@ -1635,6 +1635,39 @@ browser_host_set_native_window(struct _cef_browser_host_t* self,
1150 CefBrowserHostCppToC::Get(self)->SetNativeWindow(window);
1158 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1165 + CefBrowserHostCppToC::Get(self)->SetWebDebuggingAccess(isEnableDebug ? true
1173 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1180 + bool _retval = CefBrowserHostCppToC::Get(self)->GetWebDebuggingAccess();
1188 // CONSTRUCTOR - Do not edit by hand.
1189 @@ -1728,6 +1761,8 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() {
1190 GetStruct()->is_audio_muted = browser_host_is_audio_muted;
1191 GetStruct()->execute_java_script = browser_host_execute_java_script;
1192 GetStruct()->set_native_window = browser_host_set_native_window;
1193 + GetStruct()->set_web_debugging_access = browser_host_set_web_debugging_access;
1194 + GetStruct()->get_web_debugging_access = browser_host_get_web_debugging_access;
1197 // DESTRUCTOR - Do not edit by hand.
1198 diff --git a/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/dialog_…
1200 --- a/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc
1202 @@ -9,7 +9,7 @@
1206 -// $hash=639576c610ca3898809cdee6d19c45253e9ea4d2$
1211 @@ -30,6 +30,7 @@ dialog_handler_on_file_dialog(struct _cef_dialog_handler_t* self,
1219 @@ -60,7 +61,7 @@ dialog_handler_on_file_dialog(struct _cef_dialog_handler_t* self,
1220 bool _retval = CefDialogHandlerCppToC::Get(self)->OnFileDialog(
1223 - CefFileDialogCallbackCToCpp::Wrap(callback));
1228 diff --git a/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/load_hand…
1230 --- a/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc
1232 @@ -9,7 +9,7 @@
1236 -// $hash=b9eb6961bd51d881bd4b0aff6e1c2ad16de8bc93$
1241 @@ -189,6 +189,38 @@ void CEF_CALLBACK load_handler_on_http_error(struct _cef_load_handler_t* self,
1253 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1272 + CefLoadHandlerCppToC::Get(self)->OnRefreshAccessedHistory(
1279 // CONSTRUCTOR - Do not edit by hand.
1280 @@ -201,6 +233,8 @@ CefLoadHandlerCppToC::CefLoadHandlerCppToC() {
1281 GetStruct()->on_load_error_with_request =
1283 GetStruct()->on_http_error = load_handler_on_http_error;
1284 + GetStruct()->on_refresh_accessed_history =
1288 // DESTRUCTOR - Do not edit by hand.
1289 diff --git a/src/cef/libcef_dll/ctocpp/browser_ctocpp.cc b/src/cef/libcef_dll/ctocpp/browser_ctocpp…
1291 --- a/src/cef/libcef_dll/ctocpp/browser_ctocpp.cc
1293 @@ -9,7 +9,7 @@
1297 -// $hash=669b83a0500ef99c8537d8f00fe746c28e09b31a$
1302 @@ -114,6 +114,19 @@ bool CefBrowserCToCpp::CanGoBackOrForward(int num_steps) {
1306 +NO_SANITIZE("cfi-icall") void CefBrowserCToCpp::DeleteHistory() {
1313 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1316 + _struct->delete_history(_struct);
1319 NO_SANITIZE("cfi-icall") bool CefBrowserCToCpp::IsLoading() {
1322 diff --git a/src/cef/libcef_dll/ctocpp/browser_ctocpp.h b/src/cef/libcef_dll/ctocpp/browser_ctocpp.h
1324 --- a/src/cef/libcef_dll/ctocpp/browser_ctocpp.h
1326 @@ -9,7 +9,7 @@
1330 -// $hash=5a8d946ed143178608c22b2952d6f82e46b52976$
1335 @@ -42,6 +42,7 @@ class CefBrowserCToCpp
1343 diff --git a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc b/src/cef/libcef_dll/ctocpp/browser_h…
1345 --- a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc
1347 @@ -9,7 +9,7 @@
1351 -// $hash=dcd2dbff40a3be4939f946075675080ac88e9441$
1356 @@ -1450,6 +1450,36 @@ void CefBrowserHostCToCpp::SetNativeWindow(cef_native_window_t window) {
1357 _struct->set_native_window(_struct, window);
1360 +NO_SANITIZE("cfi-icall")
1368 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1371 + _struct->set_web_debugging_access(_struct, isEnableDebug);
1374 +NO_SANITIZE("cfi-icall") bool CefBrowserHostCToCpp::GetWebDebuggingAccess() {
1381 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1384 + int _retval = _struct->get_web_debugging_access(_struct);
1390 // CONSTRUCTOR - Do not edit by hand.
1393 diff --git a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.h b/src/cef/libcef_dll/ctocpp/browser_ho…
1395 --- a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.h
1397 @@ -9,7 +9,7 @@
1401 -// $hash=aca73f8ef9bcd54b300b1772d1115a32bf270084$
1406 @@ -162,6 +162,8 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp,
1415 diff --git a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/dialog_…
1417 --- a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc
1419 @@ -9,7 +9,7 @@
1423 -// $hash=cac933371fc47c864230d4537ef1da76cd7e4d8e$
1428 @@ -28,6 +28,7 @@ bool CefDialogHandlerCToCpp::OnFileDialog(
1436 @@ -61,7 +62,7 @@ bool CefDialogHandlerCToCpp::OnFileDialog(
1437 int _retval = _struct->on_file_dialog(
1440 - CefFileDialogCallbackCppToC::Wrap(callback));
1445 diff --git a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/dialog_h…
1447 --- a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h
1449 @@ -9,7 +9,7 @@
1453 -// $hash=4c07a40d3bd171adf3ae3cc4aa935bc7eca4aa5e$
1458 @@ -42,6 +42,7 @@ class CefDialogHandlerCToCpp
1466 diff --git a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/load_hand…
1468 --- a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc
1470 @@ -9,7 +9,7 @@
1474 -// $hash=a815207886f2b474bff70f4f988a4407bcb3d42a$
1479 @@ -187,6 +187,39 @@ void CefLoadHandlerCToCpp::OnHttpError(CefRefPtr<CefRequest> request,
1483 +NO_SANITIZE("cfi-icall")
1495 + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1511 + _struct->on_refresh_accessed_history(_struct, CefBrowserCppToC::Wrap(browser),
1516 // CONSTRUCTOR - Do not edit by hand.
1519 diff --git a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/load_handl…
1521 --- a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.h
1523 @@ -9,7 +9,7 @@
1527 -// $hash=dcaaaa3afd30e1e4be34e0d22cedacddc71e41d0$
1532 @@ -58,6 +58,10 @@ class CefLoadHandlerCToCpp : public CefCToCppRefCounted<CefLoadHandlerCToCpp,
1543 diff --git a/src/content/browser/BUILD.gn b/src/content/browser/BUILD.gn
1545 --- a/src/content/browser/BUILD.gn
1547 @@ -2206,6 +2206,7 @@ source_set("browser") {
1555 diff --git a/src/content/browser/child_process_launcher_helper.h b/src/content/browser/child_proces…
1557 --- a/src/content/browser/child_process_launcher_helper.h
1559 @@ -217,6 +217,10 @@ class ChildProcessLauncherHelper :
1570 diff --git a/src/content/browser/child_process_launcher_helper_linux.cc b/src/content/browser/child…
1572 --- a/src/content/browser/child_process_launcher_helper_linux.cc
1574 @@ -2,6 +2,10 @@
1575 // Use of this source code is governed by a BSD-style license that can be
1585 @@ -140,6 +144,40 @@ void ChildProcessLauncherHelper::AfterLaunchOnLauncherThread(
1604 + // is by oom-killer.
1626 @@ -147,6 +185,18 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper::GetTerminationInfo(
1628 info.status = process.zygote->GetTerminationStatus(
1633 + int ret = app_mgr_client_->GetRenderProcessTerminationStatus(process.process.Handle(), exitSta…
1645 diff --git a/src/content/browser/devtools/devtools_http_handler.cc b/src/content/browser/devtools/d…
1647 --- a/src/content/browser/devtools/devtools_http_handler.cc
1649 @@ -278,6 +278,7 @@ void StartServerOnHandlerThread(
1655 // Write this port to a well-known file in the profile directory
1657 diff --git a/src/content/browser/portal/portal.cc b/src/content/browser/portal/portal.cc
1661 --- a/src/content/browser/portal/portal.cc
1663 @@ -606,6 +606,11 @@ void Portal::ActivateImpl(blink::TransferableMessage data,
1664 devtools_instrumentation::PortalActivated(outer_contents->GetMainFrame());
1665 successor_contents_raw->set_portal(nullptr);
1670 + outer_contents->CancelActiveAndPendingDialogs();
1673 delegate->ActivatePortalWebContents(outer_contents,
1675 diff --git a/src/content/browser/storage_partition_impl.cc b/src/content/browser/storage_partition_…
1677 --- a/src/content/browser/storage_partition_impl.cc
1679 @@ -12,6 +12,9 @@
1689 @@ -1382,6 +1385,32 @@ StoragePartitionImpl::GetCookieManagerForBrowserProcess() {
1703 + GetIOThreadTaskRunner({})->PostTask(
1713 + GetNetworkContext()->GetCookieManager(
1722 diff --git a/src/content/browser/storage_partition_impl.h b/src/content/browser/storage_partition_i…
1724 --- a/src/content/browser/storage_partition_impl.h
1726 @@ -11,6 +11,11 @@
1738 @@ -140,6 +145,7 @@ class CONTENT_EXPORT StoragePartitionImpl
1746 @@ -502,6 +508,10 @@ class CONTENT_EXPORT StoragePartitionImpl
1757 @@ -603,6 +613,12 @@ class CONTENT_EXPORT StoragePartitionImpl
1770 diff --git a/src/content/common/cursors/webcursor.cc b/src/content/common/cursors/webcursor.cc
1772 --- a/src/content/common/cursors/webcursor.cc
1774 @@ -32,16 +32,19 @@ WebCursor& WebCursor::operator=(const WebCursor& other) {
1778 - static constexpr int kMaxSize = 1024;
1780 + // - kMaximumCursorSize in Blink's EventHandler
1781 + // - kCursorSize in Chrome's DevToolsEyeDropper
1786 - (cursor.custom_bitmap().width() > kMaxSize ||
1787 - cursor.custom_bitmap().height() > kMaxSize ||
1791 - kMaxSize ||
1794 - kMaxSize))) {
1799 diff --git a/src/content/common/cursors/webcursor_mac.mm b/src/content/common/cursors/webcursor_mac…
1801 --- a/src/content/common/cursors/webcursor_mac.mm
1803 @@ -261,6 +261,7 @@ gfx::NativeCursor WebCursor::GetNativeCursor() {
1811 diff --git a/src/content/common/cursors/webcursor_unittest.cc b/src/content/common/cursors/webcurso…
1813 --- a/src/content/common/cursors/webcursor_unittest.cc
1815 @@ -137,11 +137,11 @@ TEST(WebCursorTest, SetCursor) {
1819 - cursor.set_custom_bitmap(CreateTestBitmap(1025, 3));
1824 - cursor.set_custom_bitmap(CreateTestBitmap(3, 1025));
1829 @@ -151,7 +151,7 @@ TEST(WebCursorTest, SetCursor) {
1833 - cursor.set_custom_bitmap(CreateTestBitmap(5, 200));
1838 diff --git a/src/content/public/browser/storage_partition.h b/src/content/public/browser/storage_pa…
1840 --- a/src/content/public/browser/storage_partition.h
1842 @@ -113,7 +113,10 @@ class CONTENT_EXPORT StoragePartition {
1846 -
1854 diff --git a/src/content/renderer/BUILD.gn b/src/content/renderer/BUILD.gn
1856 --- a/src/content/renderer/BUILD.gn
1858 @@ -36,6 +36,7 @@ if (is_ohos) {
1866 diff --git a/src/content/renderer/media/ohos/ohos_media_player_renderer_client.cc b/src/content/ren…
1868 --- a/src/content/renderer/media/ohos/ohos_media_player_renderer_client.cc
1870 @@ -136,8 +136,9 @@ void OHOSMediaPlayerRendererClient::OnFrameUpdate(
1874 - << " visible_height:" << visible_height
1875 - << " format:" << src_format << " size:" << buffer_size;
1882 diff --git a/src/content/renderer/render_remote_proxy.cc b/src/content/renderer/render_remote_proxy…
1884 --- a/src/content/renderer/render_remote_proxy.cc
1886 @@ -65,14 +65,22 @@ bool RenderRemoteProxy::WaitForBrowserFd() {
1890 - constexpr int kTimeOutDur = 5; // seconds
1891 - if (!browser_fd_cv_.wait_for(lk, std::chrono::seconds(kTimeOutDur),
1892 - []() { return is_browser_fd_received_; })) {
1893 - LOG(ERROR) << "wait for browser fd timeout(" << kTimeOutDur << "s)";
1894 - return false;
1895 + constexpr uint32_t kTimeOutDur = 10; // milliseconds
1896 + constexpr uint32_t kMaxWaitCount = 10;
1902 + g_app_mgr_client->AttachRenderProcess(g_render_remote_proxy);
1908 - LOG(INFO) << "wait for browser fd end";
1909 - return true;
1917 diff --git a/src/media/base/ohos/BUILD.gn b/src/media/base/ohos/BUILD.gn
1919 --- a/src/media/base/ohos/BUILD.gn
1921 @@ -19,6 +19,11 @@ if (is_ohos) {
1933 diff --git a/src/media/base/ohos/ohos_media_player_bridge.cc b/src/media/base/ohos/ohos_media_playe…
1935 --- a/src/media/base/ohos/ohos_media_player_bridge.cc
1937 @@ -139,10 +139,17 @@ void OHOSMediaPlayerBridge::FinishPaint(int fd) {
1942 + if (cached_buffers_.front()->GetBufferHandle()->fd != fd) {
1944 + << cached_buffers_.front()->GetBufferHandle()->fd;
1947 if (cached_buffers_.front()->GetBufferHandle()->reserve[0] != fd) {
1949 << cached_buffers_.front()->GetBufferHandle()->reserve[0];
1953 consumer_surface_->ReleaseBuffer(cached_buffers_.front(), -1);
1955 @@ -188,6 +195,25 @@ void OHOSMediaPlayerBridge::OnBufferAvailable(
1960 + int fd = buffer->GetBufferHandle()->fd;
1962 + int fd = buffer->GetBufferHandle()->reserve[0];
1966 + OHOS::SurfaceError ret = consumer_surface_->ReleaseBuffer(buffer, -1);
1974 + client_->OnFrameAvailable(fd, buffer->GetSize(), buffer->GetWidth(),
1975 + buffer->GetHeight(), buffer->GetWidth(),
1976 + buffer->GetHeight(), buffer->GetFormat());
1981 @@ -205,10 +231,10 @@ void OHOSMediaPlayerBridge::OnBufferAvailable(
1983 coded_width = buffer->GetStride();
1985 - client_->OnFrameAvailable(buffer->GetBufferHandle()->reserve[0],
1986 - buffer->GetSize(), coded_width, coded_height,
1987 + client_->OnFrameAvailable(fd, buffer->GetSize(), coded_width, coded_height,
1988 buffer->GetWidth(), buffer->GetHeight(),
1989 buffer->GetFormat());
1994 diff --git a/src/ohos_ndk_aosp/toolchains/clang-r353983c/bin/clang-9 b/src/ohos_ndk_aosp/toolchains…
1996 …s a/src/ohos_ndk_aosp/toolchains/clang-r353983c/bin/clang-9 and b/src/ohos_ndk_aosp/toolchains/cla…
1997 diff --git a/src/ohos_nweb/BUILD.gn b/src/ohos_nweb/BUILD.gn
1999 --- a/src/ohos_nweb/BUILD.gn
2001 @@ -1,6 +1,15 @@
2002 -# Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2003 -# Use of this source code is governed by a BSD-style license that can be
2004 -# found in the LICENSE file.
2010 +# http://www.apache.org/licenses/LICENSE-2.0
2020 @@ -63,6 +72,8 @@ component("cef_nweb") {
2029 @@ -94,6 +105,10 @@ config("nweb_config") {
2040 @@ -210,4 +225,4 @@ shared_library("libnweb_render") {
2044 -}
2047 diff --git a/src/ohos_nweb/include/nweb.h b/src/ohos_nweb/include/nweb.h
2049 --- a/src/ohos_nweb/include/nweb.h
2051 @@ -1,6 +1,17 @@
2052 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2053 -// Use of this source code is governed by a BSD-style license that can be
2054 -// found in the LICENSE file.
2061 + * http://www.apache.org/licenses/LICENSE-2.0
2072 @@ -37,11 +48,11 @@ struct OHOS_NWEB_EXPORT NWebCreateInfo {
2076 - /* rs producer surface, for acquiring elgsurface from ohos */
2077 - void *producer_surface = nullptr;
2078 -
2087 @@ -103,6 +114,10 @@ class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this<NWeb> {
2098 diff --git a/src/ohos_nweb/include/nweb_access_request.h b/src/ohos_nweb/include/nweb_access_reques…
2100 --- a/src/ohos_nweb/include/nweb_access_request.h
2102 @@ -1,6 +1,17 @@
2103 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2104 -// Use of this source code is governed by a BSD-style license that can be
2105 -// found in the LICENSE file.
2112 + * http://www.apache.org/licenses/LICENSE-2.0
2123 diff --git a/src/ohos_nweb/include/nweb_console_log.h b/src/ohos_nweb/include/nweb_console_log.h
2125 --- a/src/ohos_nweb/include/nweb_console_log.h
2127 @@ -1,6 +1,17 @@
2128 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2129 -// Use of this source code is governed by a BSD-style license that can be
2130 -// found in the LICENSE file.
2137 + * http://www.apache.org/licenses/LICENSE-2.0
2148 diff --git a/src/ohos_nweb/include/nweb_cookie_manager.h b/src/ohos_nweb/include/nweb_cookie_manage…
2150 --- a/src/ohos_nweb/include/nweb_cookie_manager.h
2152 @@ -1,6 +1,17 @@
2153 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2154 -// Use of this source code is governed by a BSD-style license that can be
2155 -// found in the LICENSE file.
2162 + * http://www.apache.org/licenses/LICENSE-2.0
2173 @@ -18,13 +29,6 @@ public:
2177 - /**
2178 - * @brief Gets the singleton NWebCookieManager instance.
2179 - *
2180 - * @return the singleton NWebCookieManager instance.
2181 - */
2182 - static NWebCookieManager* GetInstance();
2183 -
2187 @@ -59,7 +63,14 @@ public:
2191 - * @brief GSets a single cookie (key-value pair) for the given URL.
2199 + * @brief Sets a single cookie (key-value pair) for the given URL.
2202 … * @param value the cookie as a string, using the format of the 'Set-Cookie' HTTP response header.
2203 @@ -68,6 +79,15 @@ public:
2208 + * @brief Sets a single cookie (key-value pair) for the given URL sync.
2211 + * @param value the cookie as a string, using the format of the 'Set-Cookie' HTTP response hea…
2219 @@ -81,6 +101,13 @@ public:
2233 diff --git a/src/ohos_nweb/include/nweb_download_callback.h b/src/ohos_nweb/include/nweb_download_c…
2235 --- a/src/ohos_nweb/include/nweb_download_callback.h
2237 @@ -1,6 +1,17 @@
2238 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2239 -// Use of this source code is governed by a BSD-style license that can be
2240 -// found in the LICENSE file.
2247 + * http://www.apache.org/licenses/LICENSE-2.0
2258 diff --git a/src/ohos_nweb/include/nweb_export.h b/src/ohos_nweb/include/nweb_export.h
2260 --- a/src/ohos_nweb/include/nweb_export.h
2262 @@ -1,6 +1,17 @@
2263 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2264 -// Use of this source code is governed by a BSD-style license that can be
2265 -// found in the LICENSE file.
2272 + * http://www.apache.org/licenses/LICENSE-2.0
2283 diff --git a/src/ohos_nweb/include/nweb_file_selector_params.h b/src/ohos_nweb/include/nweb_file_se…
2286 --- /dev/null
2288 @@ -0,0 +1,50 @@
2295 + * http://www.apache.org/licenses/LICENSE-2.0
2340 diff --git a/src/ohos_nweb/include/nweb_geolocation_callback_interface.h b/src/ohos_nweb/include/nw…
2342 --- a/src/ohos_nweb/include/nweb_geolocation_callback_interface.h
2344 @@ -1,6 +1,17 @@
2345 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2346 -// Use of this source code is governed by a BSD-style license that can be
2347 -// found in the LICENSE file.
2354 + * http://www.apache.org/licenses/LICENSE-2.0
2365 diff --git a/src/ohos_nweb/include/nweb_handler.h b/src/ohos_nweb/include/nweb_handler.h
2369 --- a/src/ohos_nweb/include/nweb_handler.h
2371 @@ -1,6 +1,17 @@
2372 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2373 -// Use of this source code is governed by a BSD-style license that can be
2374 -// found in the LICENSE file.
2381 + * http://www.apache.org/licenses/LICENSE-2.0
2392 @@ -13,6 +24,7 @@
2400 @@ -51,6 +63,25 @@ enum class ImageAlphaType {
2405 + // Render process non-zero exit status
2426 @@ -302,6 +333,32 @@ public:
2459 diff --git a/src/ohos_nweb/include/nweb_hit_testresult.h b/src/ohos_nweb/include/nweb_hit_testresul…
2461 --- a/src/ohos_nweb/include/nweb_hit_testresult.h
2463 @@ -1,6 +1,17 @@
2464 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2465 -// Use of this source code is governed by a BSD-style license that can be
2466 -// found in the LICENSE file.
2473 + * http://www.apache.org/licenses/LICENSE-2.0
2484 diff --git a/src/ohos_nweb/include/nweb_javascript_result_callback.h b/src/ohos_nweb/include/nweb_j…
2486 --- a/src/ohos_nweb/include/nweb_javascript_result_callback.h
2488 @@ -1,6 +1,17 @@
2489 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2490 -// Use of this source code is governed by a BSD-style license that can be
2491 -// found in the LICENSE file.
2498 + * http://www.apache.org/licenses/LICENSE-2.0
2509 diff --git a/src/ohos_nweb/include/nweb_preference.h b/src/ohos_nweb/include/nweb_preference.h
2513 --- a/src/ohos_nweb/include/nweb_preference.h
2515 @@ -1,6 +1,17 @@
2516 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2517 -// Use of this source code is governed by a BSD-style license that can be
2518 -// found in the LICENSE file.
2525 + * http://www.apache.org/licenses/LICENSE-2.0
2536 @@ -13,26 +24,26 @@ class OHOS_NWEB_EXPORT NWebPreference {
2540 - enum AccessMode { ALWAYS_ALLOW = 0, NEVER_ALLOW = 1, COMPATIBILITY_MODE = 2 };
2548 -
2555 -
2562 -
2567 @@ -40,21 +51,21 @@ public:
2571 -
2579 -
2587 -
2592 @@ -62,7 +73,7 @@ public:
2596 -
2601 @@ -70,7 +81,7 @@ public:
2605 -
2610 @@ -78,7 +89,7 @@ public:
2614 -
2618 * The default is "UTF-8".
2619 @@ -86,49 +97,49 @@ public:
2623 -
2629 -
2637 -
2645 -
2653 -
2660 -
2666 -
2672 -
2677 @@ -136,7 +147,7 @@ public:
2681 -
2686 @@ -144,28 +155,35 @@ public:
2690 -
2700 * Put the sans-serif font family name. The default is "sans-serif".
2705 -
2713 -
2716 * Put the standard font family name. The default is "sans-serif".
2721 -
2724 * Put the user-agent string to the nweb. If it is null or empty,
2725 * webview will use the system default value. Changing the user-agent
2726 @@ -174,14 +192,14 @@ public:
2727 * @param ua user-agent string. The value may be null.
2730 -
2738 -
2743 @@ -191,7 +209,7 @@ public:
2747 -
2752 @@ -200,12 +218,12 @@ public:
2756 -
2762 -
2767 @@ -215,6 +233,22 @@ public:
2790 @@ -223,7 +257,7 @@ public:
2794 -
2799 @@ -231,7 +265,7 @@ public:
2803 -
2808 @@ -239,7 +273,7 @@ public:
2812 -
2817 @@ -248,7 +282,7 @@ public:
2821 -
2826 @@ -256,177 +290,198 @@ public:
2830 -
2838 -
2846 -
2854 -
2862 -
2870 -
2873 - * Get the default user-agent string to the nweb.
2874 + * Get the default user-agent string to the nweb.
2875 * An instance of WebView could use a different User-Agent that
2881 -
2884 - * Get if the DOM storage API is supported.
2890 -
2893 - * Get the fantasy font family name.
2899 -
2902 - * Get the fixed font family name.
2908 -
2911 - * Get if the dark mode for this WebView is supported.
2917 -
2920 - * Get if JavaScript can open windows.
2926 -
2929 - * Get if the WebView can execute JavaScript.
2935 -
2938 - * Get if the WebView can load image.
2944 -
2947 - * Get the lower limit of the minimum font size.
2953 -
2956 - * Get the lower limit of the minimum logical font size.
2962 -
2972 - * Get the sans-serif font family name.
2973 + * Get the sans-serif font family name.
2978 -
2981 - * Get the serif font family name.
2987 -
2990 - * Get the standard font family name.
2996 -
2999 - * Get the user-agent string to the nweb.
3000 + * Get the user-agent string to the nweb.
3005 -
3008 - * Get the zoom percentage of the page text.
3014 -
3017 - * Get if the WebView can get geolocation.
3023 -
3031 - virtual int AccessModeForSecureOriginLoadFromInsecure() = 0;
3032 -
3041 -
3066 diff --git a/src/ohos_nweb/include/nweb_url_resource_error.h b/src/ohos_nweb/include/nweb_url_resou…
3068 --- a/src/ohos_nweb/include/nweb_url_resource_error.h
3070 @@ -1,6 +1,17 @@
3071 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3072 -// Use of this source code is governed by a BSD-style license that can be
3073 -// found in the LICENSE file.
3080 + * http://www.apache.org/licenses/LICENSE-2.0
3091 diff --git a/src/ohos_nweb/include/nweb_url_resource_request.h b/src/ohos_nweb/include/nweb_url_res…
3093 --- a/src/ohos_nweb/include/nweb_url_resource_request.h
3095 @@ -1,6 +1,18 @@
3096 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3097 -// Use of this source code is governed by a BSD-style license that can be
3098 -// found in the LICENSE file.
3105 + * http://www.apache.org/licenses/LICENSE-2.0
3117 diff --git a/src/ohos_nweb/include/nweb_url_resource_response.h b/src/ohos_nweb/include/nweb_url_re…
3119 --- a/src/ohos_nweb/include/nweb_url_resource_response.h
3121 @@ -1,6 +1,17 @@
3122 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3123 -// Use of this source code is governed by a BSD-style license that can be
3124 -// found in the LICENSE file.
3131 + * http://www.apache.org/licenses/LICENSE-2.0
3142 diff --git a/src/ohos_nweb/include/nweb_value.h b/src/ohos_nweb/include/nweb_value.h
3144 --- a/src/ohos_nweb/include/nweb_value.h
3146 @@ -1,6 +1,17 @@
3147 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3148 -// Use of this source code is governed by a BSD-style license that can be
3149 -// found in the LICENSE file.
3156 + * http://www.apache.org/licenses/LICENSE-2.0
3167 @@ -29,7 +40,7 @@ public:
3171 - NWebValue(Type type) : type_(type) {}
3176 diff --git a/src/ohos_nweb/include/nweb_value_callback.h b/src/ohos_nweb/include/nweb_value_callbac…
3178 --- a/src/ohos_nweb/include/nweb_value_callback.h
3180 @@ -1,6 +1,17 @@
3181 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3182 -// Use of this source code is governed by a BSD-style license that can be
3183 -// found in the LICENSE file.
3190 + * http://www.apache.org/licenses/LICENSE-2.0
3201 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.cc b/src/ohos_nweb/src/cef…
3203 --- a/src/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.cc
3205 @@ -1,6 +1,17 @@
3206 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3207 -// Use of this source code is governed by a BSD-style license that can be
3208 -// found in the LICENSE file.
3215 + * http://www.apache.org/licenses/LICENSE-2.0
3226 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.h b/src/ohos_nweb/src/cef_…
3228 --- a/src/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.h
3230 @@ -1,6 +1,17 @@
3231 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3232 -// Use of this source code is governed by a BSD-style license that can be
3233 -// found in the LICENSE file.
3240 + * http://www.apache.org/licenses/LICENSE-2.0
3251 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_application.cc b/src/ohos_nweb/src/cef_delegate/nw…
3253 --- a/src/ohos_nweb/src/cef_delegate/nweb_application.cc
3255 @@ -1,6 +1,17 @@
3256 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3257 -// Use of this source code is governed by a BSD-style license that can be
3258 -// found in the LICENSE file.
3265 + * http://www.apache.org/licenses/LICENSE-2.0
3276 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_application.h b/src/ohos_nweb/src/cef_delegate/nwe…
3278 --- a/src/ohos_nweb/src/cef_delegate/nweb_application.h
3280 @@ -1,6 +1,17 @@
3281 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3282 -// Use of this source code is governed by a BSD-style license that can be
3283 -// found in the LICENSE file.
3290 + * http://www.apache.org/licenses/LICENSE-2.0
3301 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.cc b/src/ohos_nweb/src/cef…
3305 --- a/src/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.cc
3307 @@ -1,6 +1,17 @@
3308 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3309 -// Use of this source code is governed by a BSD-style license that can be
3310 -// found in the LICENSE file.
3317 + * http://www.apache.org/licenses/LICENSE-2.0
3328 @@ -101,8 +112,10 @@ class ReturnCookieVisitor : public CefCookieVisitor {
3334 - : cookie_line_(std::string()),
3340 @@ -115,6 +128,9 @@ class ReturnCookieVisitor : public CefCookieVisitor {
3342 callback_->OnReceiveValue(cookie_line_);
3345 + event_->Signal();
3350 @@ -128,6 +144,9 @@ class ReturnCookieVisitor : public CefCookieVisitor {
3352 callback_->OnReceiveValue(cookie_line_);
3355 + event_->Signal();
3360 @@ -136,6 +155,7 @@ class ReturnCookieVisitor : public CefCookieVisitor {
3368 @@ -181,8 +201,6 @@ class CookieDeleteCallback : public CefDeleteCookiesCallback {
3372 -NWebCookieManagerDelegate::NWebCookieManagerDelegate() {}
3373 -
3377 @@ -232,13 +250,33 @@ void NWebCookieManagerDelegate::ReturnCookie(
3381 - CefRefPtr<ReturnCookieVisitor> visitor = new ReturnCookieVisitor(callback);
3383 if (!cookie_manager->VisitUrlCookies(CefString(url), false, visitor)) {
3401 + if (!cookie_manager->VisitUrlCookies(CefString(url), false, visitor)) {
3405 + event->Wait();
3406 + return visitor->ReturnCookieLine();
3412 @@ -254,6 +292,7 @@ void NWebCookieManagerDelegate::SetCookie(
3417 if (!cookie_manager->SetCookie(CefString(url), cef_cookie,
3420 @@ -261,6 +300,33 @@ void NWebCookieManagerDelegate::SetCookie(
3443 + if (!cookie_manager->SetCookie(CefString(url), cef_cookie, callback)) {
3447 + completion->Wait();
3448 + return callback->IsSetSuccess();
3454 @@ -288,6 +354,25 @@ void NWebCookieManagerDelegate::Store(
3469 + if (!cookie_manager->FlushStore(complete)) {
3473 + event->Wait();
3480 @@ -309,12 +394,19 @@ void NWebCookieManagerDelegate::DeleteCookieEntirely(
3489 - new CookieDeleteCallback(callback);
3491 if (!cookie_manager->DeleteCookies(CefString(std::string()),
3497 + event->Wait();
3502 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.h b/src/ohos_nweb/src/cef_…
3504 --- a/src/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.h
3506 @@ -1,6 +1,17 @@
3507 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3508 -// Use of this source code is governed by a BSD-style license that can be
3509 -// found in the LICENSE file.
3516 + * http://www.apache.org/licenses/LICENSE-2.0
3527 @@ -13,7 +24,7 @@
3531 - NWebCookieManagerDelegate();
3536 @@ -23,11 +34,15 @@ class NWebCookieManagerDelegate : public NWebCookieManagerDelegateInterface {
3552 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_delegate.cc b/src/ohos_nweb/src/cef_delegate/nweb_…
3554 --- a/src/ohos_nweb/src/cef_delegate/nweb_delegate.cc
3556 @@ -1,6 +1,17 @@
3557 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3558 -// Use of this source code is governed by a BSD-style license that can be
3559 -// found in the LICENSE file.
3566 + * http://www.apache.org/licenses/LICENSE-2.0
3577 @@ -187,6 +198,13 @@ void NWebDelegate::NavigateForward() const {
3584 + GetBrowser()->DeleteHistory();
3591 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_delegate.h b/src/ohos_nweb/src/cef_delegate/nweb_d…
3593 --- a/src/ohos_nweb/src/cef_delegate/nweb_delegate.h
3595 @@ -1,6 +1,17 @@
3596 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3597 -// Use of this source code is governed by a BSD-style license that can be
3598 -// found in the LICENSE file.
3605 + * http://www.apache.org/licenses/LICENSE-2.0
3616 @@ -47,6 +58,7 @@ class NWebDelegate : public NWebDelegateInterface,
3624 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_event_handler.cc b/src/ohos_nweb/src/cef_delegate/…
3626 --- a/src/ohos_nweb/src/cef_delegate/nweb_event_handler.cc
3628 @@ -1,6 +1,17 @@
3629 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3630 -// Use of this source code is governed by a BSD-style license that can be
3631 -// found in the LICENSE file.
3638 + * http://www.apache.org/licenses/LICENSE-2.0
3649 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_event_handler.h b/src/ohos_nweb/src/cef_delegate/n…
3651 --- a/src/ohos_nweb/src/cef_delegate/nweb_event_handler.h
3653 @@ -1,6 +1,17 @@
3654 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3655 -// Use of this source code is governed by a BSD-style license that can be
3656 -// found in the LICENSE file.
3663 + * http://www.apache.org/licenses/LICENSE-2.0
3674 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_file_selector_params_impl.cc b/src/ohos_nweb/src/c…
3677 --- /dev/null
3679 @@ -0,0 +1,71 @@
3686 + * http://www.apache.org/licenses/LICENSE-2.0
3742 + callback_->Cancel();
3747 + callback_->Continue(0, file_path_);
3752 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_file_selector_params_impl.h b/src/ohos_nweb/src/ce…
3755 --- /dev/null
3757 @@ -0,0 +1,65 @@
3764 + * http://www.apache.org/licenses/LICENSE-2.0
3824 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.cc b/src/ohos_nweb/src/cef_de…
3826 --- a/src/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.cc
3828 @@ -1,6 +1,17 @@
3829 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3830 -// Use of this source code is governed by a BSD-style license that can be
3831 -// found in the LICENSE file.
3838 + * http://www.apache.org/licenses/LICENSE-2.0
3849 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.h b/src/ohos_nweb/src/cef_del…
3851 --- a/src/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.h
3853 @@ -1,6 +1,17 @@
3854 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3855 -// Use of this source code is governed by a BSD-style license that can be
3856 -// found in the LICENSE file.
3863 + * http://www.apache.org/licenses/LICENSE-2.0
3874 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc b/src/ohos_nweb/src/cef_delega…
3876 --- a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc
3878 @@ -1,6 +1,17 @@
3879 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
3880 -// Use of this source code is governed by a BSD-style license that can be
3881 -// found in the LICENSE file.
3888 + * http://www.apache.org/licenses/LICENSE-2.0
3899 @@ -13,12 +24,14 @@
3914 @@ -68,6 +81,25 @@ NWebConsoleLog::NWebConsoleLogLevel ConvertConsoleMessageLevel(
3940 @@ -182,6 +214,10 @@ CefRefPtr<CefJSDialogHandler> NWebHandlerDelegate::GetJSDialogHandler() {
3951 @@ -307,7 +343,7 @@ void NWebHandlerDelegate::OnLoadEnd(CefRefPtr<CefBrowser> browser,
3954 if (frame == nullptr || !frame->IsMain()) {
3955 - return;
3960 @@ -392,6 +428,19 @@ void NWebHandlerDelegate::OnHttpError(CefRefPtr<CefRequest> request,
3974 + nweb_handler_->OnRefreshAccessedHistory(url.ToString(), isReload);
3980 @@ -423,8 +472,7 @@ bool NWebHandlerDelegate::OnCertificateError(
3984 -CefRefPtr<CefResourceRequestHandler>
3985 -NWebHandlerDelegate::GetResourceRequestHandler(
3990 @@ -435,6 +483,34 @@ NWebHandlerDelegate::GetResourceRequestHandler(
4020 + nweb_handler_->OnRenderExited(reason);
4025 @@ -564,7 +640,7 @@ bool NWebHandlerDelegate::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
4029 - source.ToString());
4031 return nweb_handler_->OnConsoleLog(console_message);
4034 @@ -584,10 +660,11 @@ bool NWebHandlerDelegate::OnSetFocus(CefRefPtr<CefBrowser> browser,
4038 - NWebGeolocationCallback* callback =
4039 - new NWebGeolocationCallback(main_browser_);
4040 - nweb_handler_->OnGeolocationShow(origin, callback);
4041 - delete callback;
4046 + nweb_handler_->OnGeolocationShow(origin, callback_);
4050 @@ -666,6 +743,49 @@ bool NWebHandlerDelegate::OnBeforeUnloadDialog(
4093 + return nweb_handler_->OnFileSelectorShow(file_path_callback, param);
4099 return nweb_handler_->VisitedUrlHistory();
4100 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h b/src/ohos_nweb/src/cef_delegat…
4102 --- a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h
4104 @@ -1,6 +1,17 @@
4105 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4106 -// Use of this source code is governed by a BSD-style license that can be
4107 -// found in the LICENSE file.
4114 + * http://www.apache.org/licenses/LICENSE-2.0
4125 @@ -9,6 +20,7 @@
4133 @@ -25,6 +37,7 @@
4141 @@ -35,7 +48,8 @@ class NWebHandlerDelegate : public CefClient,
4145 - public CefJSDialogHandler {
4151 @@ -71,6 +85,7 @@ class NWebHandlerDelegate : public CefClient,
4159 @@ -131,6 +146,11 @@ class NWebHandlerDelegate : public CefClient,
4171 @@ -152,6 +172,9 @@ class NWebHandlerDelegate : public CefClient,
4181 @@ -223,6 +246,17 @@ class NWebHandlerDelegate : public CefClient,
4199 @@ -245,6 +279,8 @@ class NWebHandlerDelegate : public CefClient,
4208 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_inputmethod_client.h b/src/ohos_nweb/src/cef_deleg…
4210 --- a/src/ohos_nweb/src/cef_delegate/nweb_inputmethod_client.h
4212 @@ -1,6 +1,17 @@
4213 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4214 -// Use of this source code is governed by a BSD-style license that can be
4215 -// found in the LICENSE file.
4222 + * http://www.apache.org/licenses/LICENSE-2.0
4233 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.cc b/src/ohos_nweb/src/cef_d…
4235 --- a/src/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.cc
4237 @@ -1,6 +1,17 @@
4238 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4239 -// Use of this source code is governed by a BSD-style license that can be
4240 -// found in the LICENSE file.
4247 + * http://www.apache.org/licenses/LICENSE-2.0
4258 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.h b/src/ohos_nweb/src/cef_de…
4260 --- a/src/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.h
4262 @@ -1,6 +1,17 @@
4263 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4264 -// Use of this source code is governed by a BSD-style license that can be
4265 -// found in the LICENSE file.
4272 + * http://www.apache.org/licenses/LICENSE-2.0
4283 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc b/src/ohos_nweb/src/cef_del…
4287 --- a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc
4289 @@ -1,6 +1,17 @@
4290 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4291 -// Use of this source code is governed by a BSD-style license that can be
4292 -// found in the LICENSE file.
4299 + * http://www.apache.org/licenses/LICENSE-2.0
4310 @@ -15,8 +26,22 @@
4333 @@ -80,6 +105,8 @@ void NWebPreferenceDelegate::ComputeBrowserSettings(
4342 @@ -105,8 +132,6 @@ void NWebPreferenceDelegate::ComputeBrowserSettings(
4346 - browser_settings.mixed_content_mode =
4347 - AccessModeForSecureOriginLoadFromInsecure();
4351 @@ -122,6 +147,7 @@ void NWebPreferenceDelegate::SetBrowserSettingsToNetHelpers() {
4359 @@ -219,6 +245,11 @@ void NWebPreferenceDelegate::PutLogicalFontSizeLowerLimit(int size) {
4371 @@ -282,6 +313,20 @@ void NWebPreferenceDelegate::PutBlockNetwork(bool flag) {
4386 + browser_->GetHost()->SetWebDebuggingAccess(flag);
4392 @@ -362,6 +407,10 @@ int NWebPreferenceDelegate::LogicalFontSizeLowerLimit() {
4403 @@ -389,16 +438,16 @@ bool NWebPreferenceDelegate::GeolocationAllowed() {
4407 -int NWebPreferenceDelegate::AccessModeForSecureOriginLoadFromInsecure() {
4413 - return access_mode_ == ALWAYS_ALLOW;
4418 - return access_mode_ == NEVER_ALLOW;
4423 @@ -406,7 +455,7 @@ const base::Feature webview_mixed_content_autoupgrades{
4427 - return access_mode_ == COMPATIBILITY_MODE;
4432 @@ -419,7 +468,20 @@ bool NWebPreferenceDelegate::IsNetworkBlocked() {
4450 + return browser_->GetHost()->GetWebDebuggingAccess();
4453 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h b/src/ohos_nweb/src/cef_dele…
4457 --- a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h
4459 @@ -1,6 +1,17 @@
4460 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4461 -// Use of this source code is governed by a BSD-style license that can be
4462 -// found in the LICENSE file.
4469 + * http://www.apache.org/licenses/LICENSE-2.0
4480 @@ -39,6 +50,7 @@ class NWebPreferenceDelegate : public NWebPreference {
4488 @@ -49,6 +61,8 @@ class NWebPreferenceDelegate : public NWebPreference {
4497 @@ -71,15 +85,18 @@ class NWebPreferenceDelegate : public NWebPreference {
4508 - int AccessModeForSecureOriginLoadFromInsecure() override;
4517 @@ -117,10 +134,12 @@ class NWebPreferenceDelegate : public NWebPreference {
4521 - int access_mode_{NEVER_ALLOW};
4531 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.cc b/src/ohos_nweb/src/cef_delegate…
4533 --- a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.cc
4535 @@ -1,6 +1,17 @@
4536 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4537 -// Use of this source code is governed by a BSD-style license that can be
4538 -// found in the LICENSE file.
4545 + * http://www.apache.org/licenses/LICENSE-2.0
4556 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.h b/src/ohos_nweb/src/cef_delegate/…
4558 --- a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.h
4560 @@ -1,6 +1,17 @@
4561 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4562 -// Use of this source code is governed by a BSD-style license that can be
4563 -// found in the LICENSE file.
4570 + * http://www.apache.org/licenses/LICENSE-2.0
4581 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_resource_handler.cc b/src/ohos_nweb/src/cef_delega…
4583 --- a/src/ohos_nweb/src/cef_delegate/nweb_resource_handler.cc
4585 @@ -1,6 +1,17 @@
4586 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4587 -// Use of this source code is governed by a BSD-style license that can be
4588 -// found in the LICENSE file.
4595 + * http://www.apache.org/licenses/LICENSE-2.0
4606 diff --git a/src/ohos_nweb/src/cef_delegate/nweb_resource_handler.h b/src/ohos_nweb/src/cef_delegat…
4608 --- a/src/ohos_nweb/src/cef_delegate/nweb_resource_handler.h
4610 @@ -1,6 +1,17 @@
4611 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4612 -// Use of this source code is governed by a BSD-style license that can be
4613 -// found in the LICENSE file.
4620 + * http://www.apache.org/licenses/LICENSE-2.0
4631 diff --git a/src/ohos_nweb/src/nweb_cookie_manager_delegate_interface.h b/src/ohos_nweb/src/nweb_co…
4633 --- a/src/ohos_nweb/src/nweb_cookie_manager_delegate_interface.h
4635 @@ -1,6 +1,17 @@
4636 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4637 -// Use of this source code is governed by a BSD-style license that can be
4638 -// found in the LICENSE file.
4645 + * http://www.apache.org/licenses/LICENSE-2.0
4656 @@ -20,12 +31,16 @@ class NWebCookieManagerDelegateInterface {
4673 diff --git a/src/ohos_nweb/src/nweb_cookie_manager_impl.cc b/src/ohos_nweb/src/nweb_cookie_manager_…
4675 --- a/src/ohos_nweb/src/nweb_cookie_manager_impl.cc
4677 @@ -1,6 +1,17 @@
4678 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4679 -// Use of this source code is governed by a BSD-style license that can be
4680 -// found in the LICENSE file.
4687 + * http://www.apache.org/licenses/LICENSE-2.0
4698 @@ -8,6 +19,12 @@
4711 @@ -50,6 +67,15 @@ void NWebCookieManagerImpl::SetCookie(
4719 + return delegate_->SetCookie(url, value);
4727 @@ -58,6 +84,14 @@ void NWebCookieManagerImpl::ReturnCookie(
4734 + return delegate_->ReturnCookie(url);
4742 @@ -72,6 +106,13 @@ void NWebCookieManagerImpl::Store(
4748 + return delegate_->Store();
4756 @@ -85,9 +126,4 @@ void NWebCookieManagerImpl::DeleteCookieEntirely(
4757 delegate_->DeleteCookieEntirely(callback);
4760 -
4761 -NWebCookieManager* NWebCookieManager::GetInstance() {
4762 - static NWebCookieManagerImpl instance;
4763 - return &instance;
4764 -}
4767 diff --git a/src/ohos_nweb/src/nweb_cookie_manager_impl.h b/src/ohos_nweb/src/nweb_cookie_manager_i…
4769 --- a/src/ohos_nweb/src/nweb_cookie_manager_impl.h
4771 @@ -1,6 +1,17 @@
4772 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4773 -// Use of this source code is governed by a BSD-style license that can be
4774 -// found in the LICENSE file.
4781 + * http://www.apache.org/licenses/LICENSE-2.0
4792 @@ -21,18 +32,22 @@ class NWebCookieManagerImpl : public NWebCookieManager {
4811 - std::shared_ptr<NWebCookieManagerDelegateInterface> delegate_ = nullptr;
4816 diff --git a/src/ohos_nweb/src/nweb_delegate_adapter.cc b/src/ohos_nweb/src/nweb_delegate_adapter.cc
4818 --- a/src/ohos_nweb/src/nweb_delegate_adapter.cc
4820 @@ -1,6 +1,17 @@
4821 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4822 -// Use of this source code is governed by a BSD-style license that can be
4823 -// found in the LICENSE file.
4830 + * http://www.apache.org/licenses/LICENSE-2.0
4841 diff --git a/src/ohos_nweb/src/nweb_delegate_adapter.h b/src/ohos_nweb/src/nweb_delegate_adapter.h
4843 --- a/src/ohos_nweb/src/nweb_delegate_adapter.h
4845 @@ -1,6 +1,17 @@
4846 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4847 -// Use of this source code is governed by a BSD-style license that can be
4848 -// found in the LICENSE file.
4855 + * http://www.apache.org/licenses/LICENSE-2.0
4866 diff --git a/src/ohos_nweb/src/nweb_delegate_interface.h b/src/ohos_nweb/src/nweb_delegate_interfac…
4868 --- a/src/ohos_nweb/src/nweb_delegate_interface.h
4870 @@ -1,6 +1,17 @@
4871 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4872 -// Use of this source code is governed by a BSD-style license that can be
4873 -// found in the LICENSE file.
4880 + * http://www.apache.org/licenses/LICENSE-2.0
4891 @@ -39,6 +50,7 @@ class NWebDelegateInterface {
4899 diff --git a/src/ohos_nweb/src/nweb_hilog.h b/src/ohos_nweb/src/nweb_hilog.h
4901 --- a/src/ohos_nweb/src/nweb_hilog.h
4903 @@ -1,6 +1,17 @@
4904 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4905 -// Use of this source code is governed by a BSD-style license that can be
4906 -// found in the LICENSE file.
4913 + * http://www.apache.org/licenses/LICENSE-2.0
4924 diff --git a/src/ohos_nweb/src/nweb_impl.cc b/src/ohos_nweb/src/nweb_impl.cc
4926 --- a/src/ohos_nweb/src/nweb_impl.cc
4928 @@ -1,6 +1,17 @@
4929 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4930 -// Use of this source code is governed by a BSD-style license that can be
4931 -// found in the LICENSE file.
4938 + * http://www.apache.org/licenses/LICENSE-2.0
4949 @@ -148,6 +159,9 @@ void NWebImpl::InitWebEngineArgs(const NWebInitArgs& init_args) {
4951 web_engine_args_.emplace_back("--in-process-gpu");
4952 web_engine_args_.emplace_back("--disable-dev-shm-usage");
4954 + // web_engine_args_.emplace_back("--disable-gpu");
4956 web_engine_args_.emplace_back("--no-unsandboxed-zygote");
4957 web_engine_args_.emplace_back("--no-zygote");
4958 web_engine_args_.emplace_back("--off-screen-frame-rate=60");
4959 @@ -157,9 +171,11 @@ void NWebImpl::InitWebEngineArgs(const NWebInitArgs& init_args) {
4960 web_engine_args_.emplace_back("--ignore-certificate-errors");
4961 web_engine_args_.emplace_back("--use-mobile-user-agent");
4962 web_engine_args_.emplace_back("--enable-gpu-rasterization");
4963 + web_engine_args_.emplace_back("--enable-viewport");
4965 "--browser-subprocess-path=/system/bin/web_render");
4966 web_engine_args_.emplace_back("--zygote-cmd-prefix=/system/bin/web_render");
4967 + web_engine_args_.emplace_back("--remote-debugging-port=9222");
4971 @@ -285,6 +301,13 @@ void NWebImpl::NavigateForward() const {
4972 nweb_delegate_->NavigateForward();
4979 + nweb_delegate_->DeleteNavigateHistory();
4985 diff --git a/src/ohos_nweb/src/nweb_impl.h b/src/ohos_nweb/src/nweb_impl.h
4987 --- a/src/ohos_nweb/src/nweb_impl.h
4989 @@ -1,6 +1,17 @@
4990 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
4991 -// Use of this source code is governed by a BSD-style license that can be
4992 -// found in the LICENSE file.
4999 + * http://www.apache.org/licenses/LICENSE-2.0
5010 @@ -40,6 +51,7 @@ class NWebImpl : public NWeb {
5018 diff --git a/src/ohos_nweb/src/nweb_input_handler.cc b/src/ohos_nweb/src/nweb_input_handler.cc
5020 --- a/src/ohos_nweb/src/nweb_input_handler.cc
5022 @@ -1,6 +1,17 @@
5023 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5024 -// Use of this source code is governed by a BSD-style license that can be
5025 -// found in the LICENSE file.
5032 + * http://www.apache.org/licenses/LICENSE-2.0
5043 diff --git a/src/ohos_nweb/src/nweb_input_handler.h b/src/ohos_nweb/src/nweb_input_handler.h
5045 --- a/src/ohos_nweb/src/nweb_input_handler.h
5047 @@ -1,6 +1,17 @@
5048 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5049 -// Use of this source code is governed by a BSD-style license that can be
5050 -// found in the LICENSE file.
5057 + * http://www.apache.org/licenses/LICENSE-2.0
5068 diff --git a/src/ohos_nweb/src/nweb_inputmethod_handler.cc b/src/ohos_nweb/src/nweb_inputmethod_han…
5070 --- a/src/ohos_nweb/src/nweb_inputmethod_handler.cc
5072 @@ -1,11 +1,21 @@
5073 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5074 -// Use of this source code is governed by a BSD-style license that can be
5075 -// found in the LICENSE file.
5082 + * http://www.apache.org/licenses/LICENSE-2.0
5093 -#include <input_method_controller.h>
5094 -#include <input_method_utils.h>
5099 @@ -37,7 +47,7 @@ class OnTextChangedListenerImpl
5103 - LOG(INFO) << "NWebInputMethodHandler::DeleteBackward";
5108 @@ -54,16 +64,13 @@ class OnTextChangedListenerImpl
5112 - LOG(INFO) << "NWebInputMethodHandler::MoveCursor ";
5120 -// The object should be freed while keyboard hidden.
5121 -OHOS::sptr<OHOS::MiscServices::OnTextChangedListener> g_listener = nullptr;
5122 -
5126 @@ -81,20 +88,17 @@ class InputMethodTask : public CefTask {
5130 - : selected_from_(0), selected_to_(0) {
5131 - g_listener = nullptr;
5132 -}
5140 -
5141 - if (g_listener == nullptr) {
5142 - g_listener = new OnTextChangedListenerImpl(this);
5146 - OHOS::MiscServices::InputMethodController::GetInstance()->Attach(g_listener);
5147 + OHOS::MiscServices::InputMethodController::GetInstance()->Attach(inputmethod_listener_);
5151 @@ -183,6 +187,12 @@ void NWebInputMethodHandler::InsertTextHandlerOnUI(const std::u16string& text)…
5153 browser_->GetHost()->ImeSetComposition(CefString(composing_text_), underlines,
5156 + browser_->GetHost()->ImeFinishComposingText(false);
5164 diff --git a/src/ohos_nweb/src/nweb_inputmethod_handler.h b/src/ohos_nweb/src/nweb_inputmethod_hand…
5166 --- a/src/ohos_nweb/src/nweb_inputmethod_handler.h
5168 @@ -1,10 +1,23 @@
5169 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5170 -// Use of this source code is governed by a BSD-style license that can be
5171 -// found in the LICENSE file.
5178 + * http://www.apache.org/licenses/LICENSE-2.0
5195 @@ -37,6 +50,7 @@ class NWebInputMethodHandler : public NWebInputMethodClient {
5203 diff --git a/src/ohos_nweb/src/nweb_output_handler.cc b/src/ohos_nweb/src/nweb_output_handler.cc
5205 --- a/src/ohos_nweb/src/nweb_output_handler.cc
5207 @@ -1,6 +1,17 @@
5208 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5209 -// Use of this source code is governed by a BSD-style license that can be
5210 -// found in the LICENSE file.
5217 + * http://www.apache.org/licenses/LICENSE-2.0
5228 diff --git a/src/ohos_nweb/src/nweb_output_handler.h b/src/ohos_nweb/src/nweb_output_handler.h
5230 --- a/src/ohos_nweb/src/nweb_output_handler.h
5232 @@ -1,6 +1,17 @@
5233 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5234 -// Use of this source code is governed by a BSD-style license that can be
5235 -// found in the LICENSE file.
5242 + * http://www.apache.org/licenses/LICENSE-2.0
5253 diff --git a/src/ohos_nweb/src/nweb_render_main.cc b/src/ohos_nweb/src/nweb_render_main.cc
5255 --- a/src/ohos_nweb/src/nweb_render_main.cc
5257 @@ -1,6 +1,17 @@
5258 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5259 -// Use of this source code is governed by a BSD-style license that can be
5260 -// found in the LICENSE file.
5267 + * http://www.apache.org/licenses/LICENSE-2.0
5278 diff --git a/src/ohos_nweb/src/nweb_url_resource_error_impl.h b/src/ohos_nweb/src/nweb_url_resource…
5280 --- a/src/ohos_nweb/src/nweb_url_resource_error_impl.h
5282 @@ -1,6 +1,17 @@
5283 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5284 -// Use of this source code is governed by a BSD-style license that can be
5285 -// found in the LICENSE file.
5292 + * http://www.apache.org/licenses/LICENSE-2.0
5303 diff --git a/src/ohos_nweb/src/nweb_url_resource_request_impl.cc b/src/ohos_nweb/src/nweb_url_resou…
5305 --- a/src/ohos_nweb/src/nweb_url_resource_request_impl.cc
5307 @@ -1,6 +1,17 @@
5308 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5309 -// Use of this source code is governed by a BSD-style license that can be
5310 -// found in the LICENSE file.
5317 + * http://www.apache.org/licenses/LICENSE-2.0
5328 diff --git a/src/ohos_nweb/src/nweb_url_resource_request_impl.h b/src/ohos_nweb/src/nweb_url_resour…
5330 --- a/src/ohos_nweb/src/nweb_url_resource_request_impl.h
5332 @@ -1,6 +1,17 @@
5333 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5334 -// Use of this source code is governed by a BSD-style license that can be
5335 -// found in the LICENSE file.
5342 + * http://www.apache.org/licenses/LICENSE-2.0
5353 diff --git a/src/ohos_nweb/src/ohos_nweb_main.cc b/src/ohos_nweb/src/ohos_nweb_main.cc
5355 --- a/src/ohos_nweb/src/ohos_nweb_main.cc
5357 @@ -1,6 +1,17 @@
5358 -// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
5359 -// Use of this source code is governed by a BSD-style license that can be
5360 -// found in the LICENSE file.
5367 + * http://www.apache.org/licenses/LICENSE-2.0
5378 diff --git a/src/services/device/geolocation/ohos/location_provider_ohos.cc b/src/services/device/g…
5380 --- a/src/services/device/geolocation/ohos/location_provider_ohos.cc
5382 @@ -17,18 +17,31 @@ namespace device {
5386 - locator_callback_ = this;
5392 - if (locator_ != nullptr)
5405 + locator_callback_->SetUpdateCallback(base::BindRepeating(
5416 @@ -40,18 +53,20 @@ void LocationProviderOhos::StopProvider() {
5420 - locator_->StopLocating(locator_callback_);
5423 + locator_->StopLocating(locator_call_back);
5427 - return last_position_;
5428 + return locator_callback_->GetPosition();
5435 -void LocationProviderOhos::OnNewLocationAvailable(
5439 position.latitude = location->GetLatitude();
5440 @@ -67,7 +82,7 @@ void LocationProviderOhos::OnNewLocationAvailable(
5444 -void LocationProviderOhos::OnNewErrorAvailable(std::string message) {
5449 @@ -82,7 +97,8 @@ void LocationProviderOhos::RequestLocationUpdate(bool high_accuracy) {
5453 - OnErrorReport(LOCATION_GET_FAILED);
5454 + locator_callback_->OnErrorReport(
5459 @@ -90,14 +106,21 @@ void LocationProviderOhos::RequestLocationUpdate(bool high_accuracy) {
5463 -
5464 - locator_->StartLocating(requestConfig, locator_callback_, "location.ILocator",
5465 - 0, 0);
5468 + int ret = locator_->StartLocating(requestConfig, locator_call_back, "location.ILocator",
5472 + locator_callback_->OnErrorReport(
5478 - if (locator_ != nullptr)
5485 @@ -111,21 +134,25 @@ void LocationProviderOhos::SetRequestConfig(
5486 requestConfig->SetScenario(OHOS::Location::SCENE_UNSET);
5487 requestConfig->SetTimeInterval(1);
5488 requestConfig->SetDistanceInterval(0);
5489 - requestConfig->SetMaxAccuracy(0);
5490 - requestConfig->SetFixNumber(1);
5491 + requestConfig->SetMaxAccuracy(50);
5492 + requestConfig->SetFixNumber(0);
5495 -void LocationProviderOhos::NewGeopositionReport(
5500 - callback_.Run(this, position);
5504 -int LocationProviderOhos::OnRemoteRequest(uint32_t code,
5505 - OHOS::MessageParcel& data,
5506 - OHOS::MessageParcel& reply,
5507 - OHOS::MessageOption& option) {
5514 + return -1;
5519 @@ -147,18 +174,14 @@ int LocationProviderOhos::OnRemoteRequest(uint32_t code,
5523 -void LocationProviderOhos::OnLocationReport(
5526 - if (is_running_) {
5527 - OnNewLocationAvailable(location);
5528 - StopProvider();
5529 - }
5533 -void LocationProviderOhos::OnLocatingStatusChange(const int status) {}
5536 -void LocationProviderOhos::OnErrorReport(const int errorCode) {
5537 - StopProvider();
5542 diff --git a/src/services/device/geolocation/ohos/location_provider_ohos.h b/src/services/device/ge…
5544 --- a/src/services/device/geolocation/ohos/location_provider_ohos.h
5546 @@ -14,21 +14,17 @@
5550 -#include "base/memory/scoped_refptr.h"
5557 -
5558 -// Location provider for OpenHarmony using the platform provider over JNI.
5559 -class LocationProviderOhos
5560 - : public LocationProvider,
5561 - public OHOS::IRemoteStub<OHOS::Location::ILocatorCallback> {
5565 - LocationProviderOhos();
5566 - ~LocationProviderOhos() override;
5572 @@ -36,13 +32,8 @@ class LocationProviderOhos
5576 - // LocationProvider implementation.
5577 - void SetUpdateCallback(
5578 - const LocationProviderUpdateCallback& callback) override;
5579 - void StartProvider(bool high_accuracy) override;
5580 - void StopProvider() override;
5581 - const mojom::Geoposition& GetPosition() override;
5582 - void OnPermissionGranted() override;
5588 @@ -57,6 +48,34 @@ class LocationProviderOhos
5623 @@ -65,17 +84,12 @@ class LocationProviderOhos
5627 - // Calls |callback_| with the new location.
5628 - void NewGeopositionReport(const mojom::Geoposition& position);
5629 -
5632 - mojom::Geoposition last_position_;
5633 -
5637 - OHOS::sptr<OHOS::Location::ILocatorCallback> locator_callback_;
5642 diff --git a/src/third_party/blink/common/web_preferences/web_preferences.cc b/src/third_party/blin…
5646 --- a/src/third_party/blink/common/web_preferences/web_preferences.cc
5648 @@ -122,7 +122,7 @@ WebPreferences::WebPreferences()
5652 -#if defined(OS_ANDROID)
5657 @@ -155,13 +155,13 @@ WebPreferences::WebPreferences()
5661 -#if defined(OS_ANDROID) || defined(OS_MAC)
5668 -#if !defined(OS_ANDROID)
5673 @@ -169,16 +169,16 @@ WebPreferences::WebPreferences()
5677 - use_legacy_background_size_shorthand_behavior(false),
5680 - use_wide_viewport(true),
5683 - viewport_meta_merge_content_quirk(false),
5684 - viewport_meta_non_user_scalable_quirk(false),
5685 - viewport_meta_zero_values_quirk(false),
5691 - report_screen_size_in_physical_pixels_quirk(false),
5696 @@ -196,7 +196,7 @@ WebPreferences::WebPreferences()
5700 - default_minimum_page_scale_factor(1.f),
5705 diff --git a/src/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/src/thi…
5707 --- a/src/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
5709 @@ -164,7 +164,7 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
5710 out->double_tap_to_zoom_enabled = data.double_tap_to_zoom_enabled();
5711 out->fullscreen_supported = data.fullscreen_supported();
5712 out->text_autosizing_enabled = data.text_autosizing_enabled();
5713 -#if defined(OS_ANDROID)
5715 out->font_scale_factor = data.font_scale_factor();
5716 out->device_scale_adjustment = data.device_scale_adjustment();
5717 out->force_enable_zoom = data.force_enable_zoom();
5718 diff --git a/src/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/s…
5720 --- a/src/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
5722 @@ -546,7 +546,7 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
5726 -#if defined(OS_ANDROID)
5731 diff --git a/src/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/src/third_pa…
5733 --- a/src/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
5735 @@ -270,91 +270,91 @@ struct WebPreferences {
5739 - [EnableIf=is_android]
5743 - [EnableIf=is_android]
5747 - [EnableIf=is_android]
5751 - [EnableIf=is_android]
5755 - [EnableIf=is_android]
5759 - [EnableIf=is_android]
5763 - [EnableIf=is_android]
5767 - [EnableIf=is_android]
5771 - [EnableIf=is_android]
5775 - [EnableIf=is_android]
5779 - [EnableIf=is_android]
5783 - [EnableIf=is_android]
5787 - [EnableIf=is_android]
5791 - [EnableIf=is_android]
5795 - [EnableIf=is_android]
5800 // a top-level initial empty document and expect it to persist on navigation.
5801 - [EnableIf=is_android]
5807 - [EnableIf=is_android]
5812 - [EnableIf=is_android]
5818 - [EnableIf=is_android]
5822 - [EnableIf=is_android]
5828 - [EnableIf=is_android]
5835 - [EnableIf=is_android]
5842 - [EnableIf=is_android]
5846 - [EnableIf=is_android]
5851 diff --git a/src/third_party/blink/renderer/core/exported/web_view_impl.cc b/src/third_party/blink/…
5853 --- a/src/third_party/blink/renderer/core/exported/web_view_impl.cc
5855 @@ -1577,7 +1577,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
5857 settings->SetWebAppScope(WebString::FromASCII(prefs.web_app_scope.spec()));
5859 -#if defined(OS_ANDROID)
5861 settings->SetAllowCustomScrollbarInMainFrame(false);
5862 settings->SetAccessibilityFontScaleFactor(prefs.font_scale_factor);
5863 settings->SetDeviceScaleAdjustment(prefs.device_scale_adjustment);
5864 diff --git a/src/third_party/blink/renderer/core/frame/local_frame_view.cc b/src/third_party/blink/…
5868 --- a/src/third_party/blink/renderer/core/frame/local_frame_view.cc
5870 @@ -216,7 +216,7 @@ constexpr int kCommitDelayDefaultInMs = 500; // 30 frames @ 60hz
5874 -
5879 @@ -1515,8 +1515,8 @@ void LocalFrameView::SetLayoutSize(const IntSize& size) {
5880 if (frame_->GetDocument() &&
5881 frame_->GetDocument()->Lifecycle().LifecyclePostponed())
5883 -
5884 - SetLayoutSizeInternal(size);
5890 diff --git a/src/third_party/blink/renderer/modules/webdatabase/database_tracker.cc b/src/third_par…
5892 --- a/src/third_party/blink/renderer/modules/webdatabase/database_tracker.cc
5894 @@ -78,9 +78,18 @@ bool DatabaseTracker::CanEstablishDatabase(DatabaseContext* database_context,
5900 + String(Platform::Current()->DatabaseCreateOriginIdentifier(WebSecurityOrigin(origin)));
5906 return String(Platform::Current()->DatabaseCreateOriginIdentifier(
5913 diff --git a/src/third_party/blink/renderer/modules/webdatabase/sqlite/sqlite_database.cc b/src/thi…
5915 --- a/src/third_party/blink/renderer/modules/webdatabase/sqlite/sqlite_database.cc
5917 @@ -46,10 +46,14 @@ std::tuple<int, sqlite3*> OpenDatabase(const String& filename) {
5932 diff --git a/src/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/src/third_par…
5934 --- a/src/third_party/blink/renderer/platform/runtime_enabled_features.json5
5936 @@ -1228,7 +1228,7 @@
5940 - status: {"Android": "stable"},
5945 diff --git a/src/third_party/node/linux/node-linux-x64/bin/node b/src/third_party/node/linux/node-l…
5947 …ary files a/src/third_party/node/linux/node-linux-x64/bin/node and b/src/third_party/node/linux/no…
5948 diff --git a/src/v8/src/objects/objects.cc b/src/v8/src/objects/objects.cc
5952 --- a/src/v8/src/objects/objects.cc
5954 @@ -2529,6 +2529,12 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
5963 + it->Next();
5967 @@ -2536,11 +2542,21 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
5971 - if (maybe_attributes.FromJust() == ABSENT) break;
5972 - *found = false;
5973 - return Nothing<bool>();
5981 + it->Next();
5985 + it->NotFound();
5988 - break;
5993 @@ -2603,6 +2619,26 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
5999 + Isolate* isolate = it->isolate();
6001 + if (it->GetReceiver()->IsJSGlobalObject(isolate) &&
6003 + if (it->state() == LookupIterator::TRANSITION) {
6008 + it->transition_cell()->ClearAndInvalidate(ReadOnlyRoots(isolate));
6010 + isolate->Throw(*isolate->factory()->NewReferenceError(
6011 + MessageTemplate::kNotDefined, it->GetName()));
6020 @@ -2613,24 +2649,9 @@ Maybe<bool> Object::SetProperty(LookupIterator* it, Handle<Object> value,
6024 - // If the receiver is the JSGlobalObject, the store was contextual. In case
6025 - // the property did not exist yet on the global object itself, we have to
6026 - // throw a reference error in strict mode. In sloppy mode, we continue.
6027 - if (it->GetReceiver()->IsJSGlobalObject() &&
6028 - (GetShouldThrow(it->isolate(), should_throw) ==
6029 - ShouldThrow::kThrowOnError)) {
6030 - if (it->state() == LookupIterator::TRANSITION) {
6031 - // The property cell that we have created is garbage because we are going
6032 - // to throw now instead of putting it into the global dictionary. However,
6033 - // the cell might already have been stored into the feedback vector, so
6034 - // we must invalidate it nevertheless.
6035 - it->transition_cell()->ClearAndInvalidate(ReadOnlyRoots(it->isolate()));
6036 - }
6037 - it->isolate()->Throw(*it->isolate()->factory()->NewReferenceError(
6038 - MessageTemplate::kNotDefined, it->GetName()));
6042 -
6046 @@ -2697,6 +2718,9 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
6056 diff --git a/src/v8/src/objects/objects.h b/src/v8/src/objects/objects.h
6060 --- a/src/v8/src/objects/objects.h
6062 @@ -726,6 +726,8 @@ class Object : public TaggedImpl<HeapObjectReferenceType::STRONG, Address> {
6071 diff --git a/src/v8/test/cctest/test-api-interceptors.cc b/src/v8/test/cctest/test-api-interceptors…
6075 --- a/src/v8/test/cctest/test-api-interceptors.cc
6076 +++ b/src/v8/test/cctest/test-api-interceptors.cc
6077 @@ -5490,10 +5490,10 @@ void DatabaseGetter(Local<Name> name,
6080 auto context = info.GetIsolate()->GetCurrentContext();
6081 - Local<v8::Object> db = info.Holder()
6082 - ->GetRealNamedProperty(context, v8_str("db"))
6083 - .ToLocalChecked()
6084 - .As<v8::Object>();
6086 + info.Holder()->GetRealNamedProperty(context, v8_str("db"));
6089 if (!db->Has(context, name).FromJust()) return;
6090 info.GetReturnValue().Set(db->Get(context, name).ToLocalChecked());
6092 diff --git a/src/v8/test/unittests/api/interceptor-unittest.cc b/src/v8/test/unittests/api/intercep…
6096 --- a/src/v8/test/unittests/api/interceptor-unittest.cc
6097 +++ b/src/v8/test/unittests/api/interceptor-unittest.cc
6098 @@ -170,8 +170,8 @@ TEST_F(InterceptorLoggingTest, DispatchTest) {
6102 - EXPECT_EQ(Run("obj.foo = null"), "named setter");
6103 - EXPECT_EQ(Run("obj[42] = null"), "indexed setter");