public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/cef] rawhide: - Update to 149.0.7827.196
@ 2026-09-04 17:42 Than Ngo
  0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-09-04 17:42 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/cef
            Branch : rawhide
            Commit : bdab8b553c8e399e9c6a91143cda0ef1bee4a934
            Author : Than Ngo <than@redhat.com>
            Date   : 2026-09-04T17:42:12+00:00
            Stats  : +208/-2 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/cef/c/bdab8b553c8e399e9c6a91143cda0ef1bee4a934?branch=rawhide

            Log:
            - Update to 149.0.7827.196

- Upstream patch, Make dark mode apply filter to images irrespective of layout zoom

---
diff --git a/cef.spec b/cef.spec
index 797cf75..554385b 100644
--- a/cef.spec
+++ b/cef.spec
@@ -244,7 +244,7 @@
 %global chromium_major 149
 %global chromium_branch 7827
 # Where possible, track Chromium versions already released in Fedora.
-%global chromium_minor 155
+%global chromium_minor 196
 %global chromium_version %{chromium_major}.0.%{chromium_branch}.%{chromium_minor}
 %global cef_commit 3a0fcf1e1b6249b50c96ac77c429bfefade09d96
 %global cef_branch %{chromium_branch}
@@ -514,6 +514,7 @@ Patch601: chromium-148-Prefix-dark-mode-decision-tree-threshold-constants-with-k
 Patch602: chromium-148-Add-saturation-feature-for-dark-mode-image-classification.patch
 Patch603: chromium-148-Add-AutoDarkModeSkipImages-flag-to-bypass-image-dark-mode.patch
 Patch604: chromium-148-Add-chromatic-pixels-feature-based-on-muted-hue-colors-for-dark-mode.patch
+Patch605: chromium-149-Make-dark-mode-apply-filter-to-images-irrespective-of-layout-zoom.patch
 
 ## CEF: CEF-specific fix patches
 Patch900: cef-no-sysroot.patch
@@ -1217,6 +1218,7 @@ mv %{_builddir}/cef-%{cef_commit} ./cef
 %patch -P602 -p1 -b .Add-saturation-feature-for-dark-mode-image-classification
 %patch -P603 -p1 -b .Add-AutoDarkModeSkipImages-flag-to-bypass-image-dark-mode
 %patch -P604 -p1 -b .Add-chromatic-pixels-feature-based-on-muted-hue-colors-for-dark-mode
+%patch -P605 -p1 -b .Make-dark-mode-apply-filter-to-images-irrespective-of-layout-zoom
 
 ## CEF: CEF-specific fix patches & other fixup
 %patch -P900 -p1 -b .cef-no-sysroot

diff --git a/chromium-149-Make-dark-mode-apply-filter-to-images-irrespective-of-layout-zoom.patch b/chromium-149-Make-dark-mode-apply-filter-to-images-irrespective-of-layout-zoom.patch
new file mode 100644
index 0000000..3e94092
--- /dev/null
+++ b/chromium-149-Make-dark-mode-apply-filter-to-images-irrespective-of-layout-zoom.patch
@@ -0,0 +1,204 @@
+commit cf9588e0655663e301915e53ec5a8df8ae874ce4
+Author: Prashant Nevase <pnevase@microsoft.com>
+Date:   Fri Jun 19 06:19:47 2026 -0700
+
+    Make dark mode apply filter to images irrespective of layout zoom
+    
+    The layout zoom factor combines page zoom with the device scale factor.
+    When zoom is applied, the page size scales accordingly, and images are
+    drawn relative to the new page size. This should account for the higher
+    icon threshold ratio compared with the 1x scale. Otherwise, the same
+    image may receive different dark mode filters at different scales,
+    creating a poor user experience. To avoid this, dark mode image
+    classification should remain consistent across layout zoom factors.
+    
+    CSS zoom is still considered, because it changes the ratio of drawn
+    image size to display size in 1x scale.
+    
+    Bug: 449909524
+    Change-Id: Ia420007b278a1f592c353557d4cbf66a7c575c42
+    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7961660
+    Reviewed-by: Stephen Chenney <schenney@chromium.org>
+    Commit-Queue: Prashant Nevase <pnevase@microsoft.com>
+    Auto-Submit: Prashant Nevase <pnevase@microsoft.com>
+    Cr-Commit-Position: refs/heads/main@{#1649638}
+
+diff --git a/third_party/blink/renderer/core/paint/paint_auto_dark_mode.cc b/third_party/blink/renderer/core/paint/paint_auto_dark_mode.cc
+index 1246f179f9b1..5b34283d7a55 100644
+--- a/third_party/blink/renderer/core/paint/paint_auto_dark_mode.cc
++++ b/third_party/blink/renderer/core/paint/paint_auto_dark_mode.cc
+@@ -41,6 +41,7 @@ DarkModeFilter::ImageType GetImageType(float dest_to_device_ratio,
+ 
+ float GetRatio(const display::ScreenInfo& screen_info,
+                const gfx::RectF& dest_rect) {
++  // Compute device rect in device pixels.
+   const gfx::SizeF& device_rect = gfx::ScaleSize(
+       gfx::SizeF(screen_info.rect.size()), screen_info.device_scale_factor);
+ 
+@@ -48,6 +49,27 @@ float GetRatio(const display::ScreenInfo& screen_info,
+                   dest_rect.height() / device_rect.height());
+ }
+ 
++// Classifies an image after undoing the frame's layout zoom factor.
++// |dest_rect| comes from layout geometry and includes layout zoom (page zoom
++// and potentially DSF) and CSS zoom. Undo only layout zoom so page zoom and
++// DSF do not affect classification, while CSS zoom still does. |src_rect| is
++// derived from the image's intrinsic pixel size and is already
++// zoom-independent, so it must be left untouched.
++DarkModeFilter::ImageType GetImageTypeWithZoom(
++    const display::ScreenInfo& screen_info,
++    float zoom,
++    const gfx::RectF& dest_rect,
++    const gfx::RectF& src_rect) {
++  gfx::RectF unzoomed_dest_rect = dest_rect;
++  if (zoom > 0.f && zoom != 1.f) {
++    unzoomed_dest_rect.Scale(1.f / zoom);
++  }
++
++  return GetImageType(GetRatio(screen_info, unzoomed_dest_rect),
++                      gfx::ToEnclosingRect(unzoomed_dest_rect),
++                      gfx::ToEnclosingRect(src_rect));
++}
++
+ }  // namespace
+ 
+ // static
+@@ -63,20 +85,19 @@ ImageAutoDarkMode ImageClassifierHelper::GetImageAutoDarkMode(
+   const display::ScreenInfo& screen_info =
+       local_frame.GetChromeClient().GetScreenInfo(local_frame);
+ 
+-  return ImageAutoDarkMode(role, style.ForceDark(),
+-                           GetImageType(GetRatio(screen_info, dest_rect),
+-                                        gfx::ToEnclosingRect(dest_rect),
+-                                        gfx::ToEnclosingRect(src_rect)));
++  const float layout_zoom = local_frame.LayoutZoomFactor();
++  return ImageAutoDarkMode(
++      role, style.ForceDark(),
++      GetImageTypeWithZoom(screen_info, layout_zoom, dest_rect, src_rect));
+ }
+ 
+ // static
+ DarkModeFilter::ImageType ImageClassifierHelper::GetImageTypeForTesting(
+     display::ScreenInfo& screen_info,
+     const gfx::RectF& dest_rect,
+-    const gfx::RectF& src_rect) {
+-  return GetImageType(GetRatio(screen_info, dest_rect),
+-                      gfx::ToEnclosingRect(dest_rect),
+-                      gfx::ToEnclosingRect(src_rect));
++    const gfx::RectF& src_rect,
++    float zoom) {
++  return GetImageTypeWithZoom(screen_info, zoom, dest_rect, src_rect);
+ }
+ 
+ }  // namespace blink
+diff --git a/third_party/blink/renderer/core/paint/paint_auto_dark_mode.h b/third_party/blink/renderer/core/paint/paint_auto_dark_mode.h
+index f3eda0113391..9bf8df1c33a8 100644
+--- a/third_party/blink/renderer/core/paint/paint_auto_dark_mode.h
++++ b/third_party/blink/renderer/core/paint/paint_auto_dark_mode.h
+@@ -42,7 +42,8 @@ class ImageClassifierHelper {
+   CORE_EXPORT static DarkModeFilter::ImageType GetImageTypeForTesting(
+       display::ScreenInfo& screen_info,
+       const gfx::RectF& dest_rect,
+-      const gfx::RectF& src_rect);
++      const gfx::RectF& src_rect,
++      float zoom = 1.0f);
+ };
+ 
+ }  // namespace blink
+diff --git a/third_party/blink/renderer/core/paint/paint_auto_dark_mode_test.cc b/third_party/blink/renderer/core/paint/paint_auto_dark_mode_test.cc
+index 705a304de1ce..77ff0f069188 100644
+--- a/third_party/blink/renderer/core/paint/paint_auto_dark_mode_test.cc
++++ b/third_party/blink/renderer/core/paint/paint_auto_dark_mode_test.cc
+@@ -10,7 +10,69 @@
+ 
+ namespace blink {
+ 
+-class PaintAutoDarkModeTest : public testing::Test {};
++class PaintAutoDarkModeTest : public testing::Test {
++ public:
++  void TestApplyFilterToImageIrrespectiveOfPageZoom(
++      display::ScreenInfo screen_info) {
++    DarkModeSettings settings;
++    DarkModeFilter filter(settings);
++
++    float page_zoom = 1.0f;
++    float layout_zoom = 1.0f;
++    float css_zoom = 1.0f;
++    gfx::RectF src_rect;
++    gfx::RectF dest_rect;
++
++    // A 50x50 CSS icon gets filtered even if |dest_rect| becomes larger 250x250
++    // than threshold size in larger zoom levels.
++    src_rect = gfx::RectF(50, 50);
++    page_zoom = 5.0f;
++    css_zoom = 1.0f;
++    layout_zoom = page_zoom * screen_info.device_scale_factor;
++    dest_rect =
++        gfx::RectF(50 * layout_zoom * css_zoom, 50 * layout_zoom * css_zoom);
++    EXPECT_TRUE(filter.ShouldApplyFilterToImage(
++        ImageClassifierHelper::GetImageTypeForTesting(screen_info, dest_rect,
++                                                      src_rect, layout_zoom)));
++
++    // A 50x50 CSS icon with css zoom 5.0f becomes 250x250 and does not get
++    // filterred as |dest_rect| is larger than threshold size.
++    src_rect = gfx::RectF(50, 50);
++    page_zoom = 5.0f;
++    css_zoom = 5.0f;
++    layout_zoom = page_zoom * screen_info.device_scale_factor;
++    dest_rect =
++        gfx::RectF(50 * layout_zoom * css_zoom, 50 * layout_zoom * css_zoom);
++    EXPECT_FALSE(filter.ShouldApplyFilterToImage(
++        ImageClassifierHelper::GetImageTypeForTesting(screen_info, dest_rect,
++                                                      src_rect, layout_zoom)));
++
++    // An image with 200x200 CSS size gets classified as photo and does not get
++    // filtered, even if |dest_rect| becomes smaller 50x50 than threshold size
++    // in smaller zoom levels.
++    src_rect = gfx::RectF(200, 200);
++    page_zoom = 0.25f;
++    css_zoom = 1.0f;
++    layout_zoom = page_zoom * screen_info.device_scale_factor;
++    dest_rect =
++        gfx::RectF(200 * layout_zoom * css_zoom, 200 * layout_zoom * css_zoom);
++    EXPECT_FALSE(filter.ShouldApplyFilterToImage(
++        ImageClassifierHelper::GetImageTypeForTesting(screen_info, dest_rect,
++                                                      src_rect, layout_zoom)));
++
++    // An image with 200x200 CSS size becomes 20x20 CSS size and gets classified
++    // as icon as the CSS size is below the threshold.
++    src_rect = gfx::RectF(200, 200);
++    page_zoom = 0.25f;
++    css_zoom = 0.1f;
++    layout_zoom = page_zoom * screen_info.device_scale_factor;
++    dest_rect =
++        gfx::RectF(200 * layout_zoom * css_zoom, 200 * layout_zoom * css_zoom);
++    EXPECT_TRUE(filter.ShouldApplyFilterToImage(
++        ImageClassifierHelper::GetImageTypeForTesting(screen_info, dest_rect,
++                                                      src_rect, layout_zoom)));
++  }
++};
+ 
+ TEST_F(PaintAutoDarkModeTest, ShouldApplyFilterToImage) {
+   DarkModeSettings settings;
+@@ -77,4 +139,21 @@ TEST_F(PaintAutoDarkModeTest, ShouldApplyFilterToImageOnMobile) {
+           screen_info, gfx::RectF(180, 180), gfx::RectF(180, 180))));
+ }
+ 
++TEST_F(PaintAutoDarkModeTest, ShouldApplyFilterToImageIrrespectiveOfPageZoom) {
++  display::ScreenInfo screen_info;
++  screen_info.rect = gfx::Rect(1920, 1080);
++  screen_info.device_scale_factor = 1.0f;
++
++  TestApplyFilterToImageIrrespectiveOfPageZoom(screen_info);
++}
++
++TEST_F(PaintAutoDarkModeTest,
++       ShouldApplyFilterToImageIrrespectiveOfPageZoomOnMobile) {
++  display::ScreenInfo screen_info;
++  screen_info.rect = gfx::Rect(360, 780);
++  screen_info.device_scale_factor = 3.0f;
++
++  TestApplyFilterToImageIrrespectiveOfPageZoom(screen_info);
++}
++
+ }  // namespace blink

diff --git a/sources b/sources
index c2ccaaa..e07b6bb 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
 SHA512 (3a0fcf1e1b6249b50c96ac77c429bfefade09d96.tar.gz) = 450ad00c41029796629edebeb7f589ce4f206c8ffcca55dd6900420cca0aabea869e4dd1996bafff3084b5ab14466bf579486c525bd16a49f5e5a62635736972
 SHA512 (node-v22.22.0-stripped.tar.gz) = f32a8a73063b3c78cbacf941e11dd529ebcf2618b3ba661966312e49ee9870c43a3acf256e8d331a4b0b621b16a501810c02a3ad763c75884cc250addca8e106
-SHA512 (chromium-149.0.7827.155-clean.tar.xz) = c49879d17304af351a43c936a8a903ce5b4a3764aa8a79596b336b7a9dec054e1e8765743b5fe4b1aaf0b3c5fc760b05d9ea89cd5542463f87f87a061bd9e809
+SHA512 (chromium-149.0.7827.196-clean.tar.xz) = 0e4d1bca150fdf63729ca3a794f249e6bd551b0c90109f7d3e3790ef2c4cce71b43f9abf0dd81baf4c8d82cdbe0665a444b8bd48ea3a97e706df084e9d65eda4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-04 17:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-04 17:42 [rpms/cef] rawhide: - Update to 149.0.7827.196 Than Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox