mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
LibWeb: Remove post_transform_translation for stacking context
There is no explanation why it's needed and removing it does not break any of our tests.
This commit is contained in:
parent
10acf3f6c7
commit
35d0d11e65
Notes:
github-actions[bot]
2024-10-11 15:28:07 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/35d0d11e656 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1728
3 changed files with 0 additions and 9 deletions
|
@ -110,7 +110,6 @@ struct PushStackingContext {
|
|||
// The bounding box of the source paintable (pre-transform).
|
||||
Gfx::IntRect source_paintable_rect;
|
||||
// A translation to be applied after the stacking context has been transformed.
|
||||
Gfx::IntPoint post_transform_translation;
|
||||
StackingContextTransform transform;
|
||||
Optional<Gfx::Path> clip_path = {};
|
||||
|
||||
|
@ -388,7 +387,6 @@ struct ApplyOpacity {
|
|||
struct ApplyTransform {
|
||||
Gfx::FloatPoint origin;
|
||||
Gfx::FloatMatrix4x4 matrix;
|
||||
Gfx::IntPoint post_transform_translation;
|
||||
|
||||
void translate_by(Gfx::IntPoint const& offset)
|
||||
{
|
||||
|
|
|
@ -433,7 +433,6 @@ void DisplayListPlayerSkia::push_stacking_context(PushStackingContext const& com
|
|||
|
||||
auto affine_transform = Gfx::extract_2d_affine_transform(command.transform.matrix);
|
||||
auto new_transform = Gfx::AffineTransform {}
|
||||
.set_translation(command.post_transform_translation.to_type<float>())
|
||||
.translate(command.transform.origin)
|
||||
.multiply(affine_transform)
|
||||
.translate(-command.transform.origin);
|
||||
|
@ -1254,7 +1253,6 @@ void DisplayListPlayerSkia::apply_transform(ApplyTransform const& command)
|
|||
{
|
||||
auto affine_transform = Gfx::extract_2d_affine_transform(command.matrix);
|
||||
auto new_transform = Gfx::AffineTransform {}
|
||||
.set_translation(command.post_transform_translation.to_type<float>())
|
||||
.translate(command.origin)
|
||||
.multiply(affine_transform)
|
||||
.translate(-command.origin);
|
||||
|
|
|
@ -298,10 +298,6 @@ void DisplayListRecorder::push_stacking_context(PushStackingContextParams params
|
|||
append(PushStackingContext {
|
||||
.opacity = params.opacity,
|
||||
.source_paintable_rect = params.source_paintable_rect,
|
||||
// No translations apply to fixed-position stacking contexts.
|
||||
.post_transform_translation = params.is_fixed_position
|
||||
? Gfx::IntPoint {}
|
||||
: state().translation.translation().to_rounded<int>(),
|
||||
.transform = {
|
||||
.origin = params.transform.origin,
|
||||
.matrix = params.transform.matrix,
|
||||
|
@ -419,7 +415,6 @@ void DisplayListRecorder::apply_transform(Gfx::FloatPoint origin, Gfx::FloatMatr
|
|||
append(ApplyTransform {
|
||||
.origin = origin,
|
||||
.matrix = matrix,
|
||||
.post_transform_translation = state().translation.translation().to_rounded<int>(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue