diff --git a/platform/ui.jcef/jcef/SettingsHelper.java b/platform/ui.jcef/jcef/SettingsHelper.java index 9569a3f886f8..a2673cd50612 100644 --- a/platform/ui.jcef/jcef/SettingsHelper.java +++ b/platform/ui.jcef/jcef/SettingsHelper.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.ui.jcef; import com.intellij.execution.Platform; @@ -187,6 +187,14 @@ final class SettingsHelper { doTrackGPUCrashes.set(true); } + if (settings.windowless_rendering_enabled && RegistryManager.getInstance().is("ide.browser.jcef.osr.siteIsolation.disable")) { + // In OSR mode wheel events routed to an unscrollable cross-origin iframe are not bubbled back to the parent page, + // so page scrolling gets stuck while the pointer is over such an iframe, e.g. a YouTube embed on the What's New page. + // Disabling site isolation keeps cross-origin iframes in the parent's renderer where Blink handles scroll chaining itself. + // See https://github.com/chromiumembedded/cef/issues/3325 + args = ArrayUtil.mergeArrays(args, "--disable-site-isolation-trials"); + } + // Sometimes it's useful to be able to pass any additional keys (see IDEA-248140) // NOTE: List of keys: https://peter.sh/experiments/chromium-command-line-switches/ String extraArgsProp = System.getProperty("ide.browser.jcef.extra.args", ""); diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 297ddc9fa98c..9a5be1160d09 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -422,6 +422,9 @@ ide.browser.jcef.osr.enabled.restartRequired=true ide.browser.jcef.osr.enabled.description=Enable per-browser off-screen rendering mode for JCEF ide.browser.jcef.osr.wheelRotation.factor=40 ide.browser.jcef.osr.wheelRotation.factor.description=The factor to multiply MouseWheelEvent.getWheelRotation() in a buffered OSR browser. +ide.browser.jcef.osr.siteIsolation.disable=true +ide.browser.jcef.osr.siteIsolation.disable.restartRequired=true +ide.browser.jcef.osr.siteIsolation.disable.description=Disables Chromium site isolation (site-per-process) when JCEF off-screen rendering is enabled. Works around page scrolling getting stuck while the mouse pointer is over a cross-origin iframe (e.g., a YouTube video on the What's New page). Set to false to keep site isolation enabled. ide.browser.jcef.osr.measureFPS.id=OSR JCEF FPS Meter ide.browser.jcef.osr.measureFPS.id.description=JCEF OSR browser FPS Meter string ID. ide.browser.jcef.osr.measureFPS.scroll=false