tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7555406ff90809104b0df19c1e0067976194ea75
parent f1bdaf7092cdd41f6c1c8649ad76e5ee335166b3
Author: Serban Stanca <sstanca@mozilla.com>
Date:   Fri, 28 Nov 2025 11:25:14 +0200

Revert "Bug 2001524 - Disable ShouldSnapToGrid in more cases. r=tnikkel" for causing reftests failures in 1193519-sideways-lr-4.html.

This reverts commit 5bf5fd5566cf109cde73651cdb7c71b6219cc417.

Diffstat:
Mgfx/wr/webrender/src/spatial_node.rs | 28+---------------------------
Mgfx/wr/wrench/reftests/filters/blend-clipped.png | 0
Mgfx/wr/wrench/reftests/tiles/tile-cache-raster-root.png | 0
Mlayout/base/nsLayoutUtils.cpp | 5-----
Dtesting/web-platform/meta/css/css-transforms/individual-transform/animation/individual-transform-combine.html.ini | 3---
Dtesting/web-platform/meta/css/css-transforms/transform-input-009.html.ini | 3---
6 files changed, 1 insertion(+), 38 deletions(-)

diff --git a/gfx/wr/webrender/src/spatial_node.rs b/gfx/wr/webrender/src/spatial_node.rs @@ -446,34 +446,8 @@ impl SpatialNode { ReferenceFrameKind::Transform { .. } => source_transform, }; - // Previously, the origin of a stacking context transform was snapped - // in Gecko. However, this causes jittering issues during scrolling in - // some cases when fractional scrolling is enabled. The origin used in - // Gecko doesn't have the external scroll offset from the content process - // removed, so if that content-side scroll amount is fractional, it can - // cause inconsistent snapping during scene building. Instead, we need - // to apply the device-pixel snap _after_ the external scroll offset - // has been removed. To further complicate matters, we _don't_ want to - // snap this if this spatial node has a snapping transform, as we rely - // on the fractional intermediate nodes in order to arrive at a correct - // final snapping result. If we don't have a snapping offset, we've - // reached a spatial node where snapping will no longer apply (e.g. a - // complex transform) and then we need to snap the device pixel position - // of that transform. - let parent_origin = match self.snapping_transform { - Some(..) => { - info.origin_in_parent_reference_frame - } - None => { - snap_offset( - info.origin_in_parent_reference_frame, - state.coordinate_system_relative_scale_offset.scale, - ) - } - }; - let resolved_transform = - LayoutFastTransform::with_vector(parent_origin) + LayoutFastTransform::with_vector(info.origin_in_parent_reference_frame) .pre_transform(&source_transform); // The transformation for this viewport in world coordinates is the transformation for diff --git a/gfx/wr/wrench/reftests/filters/blend-clipped.png b/gfx/wr/wrench/reftests/filters/blend-clipped.png Binary files differ. diff --git a/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.png b/gfx/wr/wrench/reftests/tiles/tile-cache-raster-root.png Binary files differ. diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp @@ -1925,11 +1925,6 @@ void nsLayoutUtils::PostTranslate(Matrix4x4& aTransform, const nsPoint& aOrigin, } bool nsLayoutUtils::ShouldSnapToGrid(const nsIFrame* aFrame) { - // TODO: Remove this function when this pref is being removed. - if (StaticPrefs::layout_disable_pixel_alignment()) { - return aFrame && aFrame->IsSVGOuterSVGAnonChildFrame(); - } - return !aFrame || !aFrame->HasAnyStateBits(NS_FRAME_SVG_LAYOUT) || aFrame->IsSVGOuterSVGAnonChildFrame(); } diff --git a/testing/web-platform/meta/css/css-transforms/individual-transform/animation/individual-transform-combine.html.ini b/testing/web-platform/meta/css/css-transforms/individual-transform/animation/individual-transform-combine.html.ini @@ -1,3 +0,0 @@ -[individual-transform-combine.html] - fuzzy: - if (os == "win") and not swgl: maxDifference=255-255;totalPixels=596-596 diff --git a/testing/web-platform/meta/css/css-transforms/transform-input-009.html.ini b/testing/web-platform/meta/css/css-transforms/transform-input-009.html.ini @@ -1,3 +0,0 @@ -[transform-input-009.html] - fuzzy: - if useDrawSnapshot: maxDifference=0-52;totalPixels=0-115