[M130 Migration] Fix mix-blend-mode cause video invisible 06/325506/2
authorJi Qiang <qiang.ji@samsung.com>
Wed, 11 Jun 2025 06:06:42 +0000 (14:06 +0800)
committerBot Blink <blinkbot@samsung.com>
Wed, 11 Jun 2025 08:36:13 +0000 (08:36 +0000)
In some website, mix-blend-mode was used to implement a custom
controller for video. It will enable blend mode for video element.
As we used video hole in our platform, we cannot enable blend mode
for video element.

reproduced steps:
- Launch Samsung Browser.
- Navigate to "http://apple.com/"
- Click "iPhone"
- Scroll down until "Watch the film" button appears, then click the button

refs:
https://archive.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/312212/

Change-Id: I87cfcfa42a8ba96a80f8544b8d0c4db5ad47d5bc
Signed-off-by: Ji Qiang <qiang.ji@samsung.com>
third_party/blink/renderer/core/paint/paint_layer.cc
third_party/blink/renderer/core/paint/paint_property_tree_builder.cc

index f30e6466e7e99c923a09e904d5235a08628cd13f..e2f86f5a41e33c7e1ce8b556383cba9bce56eabb 100644 (file)
@@ -413,6 +413,14 @@ void PaintLayer::UpdateDescendantDependentFlags() {
            child->HasNonIsolatedDescendantWithBlendMode()) ||
           child_style.HasBlendMode();
 
+#if BUILDFLAG(IS_TIZEN_TV) && defined(TIZEN_VIDEO_HOLE)
+      if (Page* page = GetLayoutObject().GetFrame()->GetPage()) {
+        if (page->GetSettings().GetVideoHoleEnabled())
+          // As platform limit, we don't support mix-blend-mode for video hole.
+          has_non_isolated_descendant_with_blend_mode_ = false;
+      }
+#endif
+
       has_fixed_position_descendant_ |=
           child->HasFixedPositionDescendant() ||
           child_style.GetPosition() == EPosition::kFixed;
index d7effcdca01e93e484774940825219fc6e34b0f7..92973f8b920fe3e22f37c3dfd53a16321375121f 100644 (file)
 #include "ui/gfx/geometry/transform.h"
 #include "ui/gfx/geometry/vector2d_conversions.h"
 
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "third_party/blink/public/platform/web_application_type.h"
+#endif
+
 namespace blink {
 
 namespace {
@@ -1695,6 +1699,11 @@ void FragmentPaintPropertyTreeBuilder::UpdateEffect() {
               ? CompositingReason::kBackdropFilterMask
               : CompositingReason::kNone;
 
+#if BUILDFLAG(IS_TIZEN_TV)
+      if (IsWebBrowser())
+        mask_direct_compositing_reasons = CompositingReason::kNone;
+#endif
+
       if (mask_clip) {
         EffectPaintPropertyNode::State mask_state;
         mask_state.local_transform_space = context_.current.transform;