Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Clipping path fix for browsers that don't use correct units when applying clip-path css using svg #15712

Merged
merged 11 commits into from
Jan 17, 2020

Conversation

ferhatb
Copy link
Contributor

@ferhatb ferhatb commented Jan 17, 2020

Safari requires objectBoundingBox units on svg clipPaths to function correctly, the default units don't scale correctly on these browsers when page is zoomed or used on highdpi devices.
Fixes flutter/flutter#48683

@auto-assign auto-assign bot requested a review from gaaclarke January 17, 2020 02:53
@ferhatb ferhatb requested review from yjbanov and removed request for gaaclarke January 17, 2020 02:53
{double offsetX = 0,
double offsetY = 0,
double scaleX = 1.0,
double scaleY = 1.0}) {
_clipIdCounter += 1;
final ui.Rect bounds = path.getBounds();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

});

// Regression test for https://github.com/flutter/flutter/issues/48683
test('Clips triangle with oval clip path devicePixelRatio2', () async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "devicePixelRatio2" in the description mean? I wasn't able to parse it from the test itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed. Initially explored EngineWindow.debugDevicePixelRatio but snapshots still need some infra updates as discussed.

@ferhatb
Copy link
Contributor Author

ferhatb commented Jan 17, 2020

Merging on red, infra failures.

@ferhatb ferhatb merged commit 98c1aea into flutter:master Jan 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 17, 2020
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Jan 17, 2020
flutter/engine@8df1757...98c1aea

git log 8df1757..98c1aea --first-parent --oneline
2020-01-17 ferhat@gmail.com Clipping path fix for browsers that don't use correct units when applying clip-path css using svg (flutter/engine#15712)
2020-01-17 dnfield@google.com fix typo, update path metrics docs (flutter/engine#15715)
2020-01-17 skia-flutter-autoroll@skia.org Roll src/third_party/dart c8f8c11b70b4..843bd2990881 (5 commits) (flutter/engine#15714)
2020-01-17 aam@google.com Roll dart to c8f8c11b70 (flutter/engine#15708)
2020-01-17 garyq@google.com Samsung fix duplication on punctuation: Update keyboard on finish compose. (flutter/engine#15701)
2020-01-17 skia-flutter-autoroll@skia.org Roll src/third_party/skia 2cd5d43f022c..d58b643f10f5 (21 commits) (flutter/engine#15707)
2020-01-17 chinmaygarde@google.com Disable GPUThreadMerger tests inline instead of via harness flags. (flutter/engine#15706)
2020-01-17 dnfield@google.com implicit casts and add missing docs (flutter/engine#15698)
2020-01-17 47866232+chunhtai@users.noreply.github.com loadfontfromlist should send fontchange message to framework (flutter/engine#14805)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
NoamDev pushed a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
NoamDev added a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
…hen applying clip-path css using svg (flutter#15712)"

This reverts commit 80b1162.
filmil pushed a commit to filmil/engine that referenced this pull request Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClipOval masking is off on iOS (all browsers), macOS (Safari) and Windows (Edge) - Flutter Web
3 participants