mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-19 11:27:16 +00:00
Fixed opening extensions (closes #34)
This commit is contained in:
18
src/gfx/wr/webrender/src/picture-rs.patch
Normal file
18
src/gfx/wr/webrender/src/picture-rs.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
diff --git a/gfx/wr/webrender/src/picture.rs b/gfx/wr/webrender/src/picture.rs
|
||||
index f22bcadd0624d9a22f5c3fa318d7795e102b890f..68d1eb55abde2a9b5779b1d07c5f111f46f177a8 100644
|
||||
--- a/gfx/wr/webrender/src/picture.rs
|
||||
+++ b/gfx/wr/webrender/src/picture.rs
|
||||
@@ -7449,7 +7449,12 @@ fn get_relative_scale_offset(
|
||||
CoordinateSpaceMapping::Local => ScaleOffset::identity(),
|
||||
CoordinateSpaceMapping::ScaleOffset(scale_offset) => scale_offset,
|
||||
CoordinateSpaceMapping::Transform(m) => {
|
||||
- ScaleOffset::from_transform(&m).expect("bug: pictures caches don't support complex transforms")
|
||||
+ // Temporary fix when opening extensions (#34)
|
||||
+ // TODO: Look more into this
|
||||
+ ScaleOffset {
|
||||
+ scale: Vector2D::new(m.m11, m.m22),
|
||||
+ offset: Vector2D::new(m.m41, m.m42),
|
||||
+ }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
diff --git a/gfx/wr/webrender/src/util.rs b/gfx/wr/webrender/src/util.rs
|
||||
index fa02d87b91c961c08da1a03357f514c71e508476..1d5ca171b7ac5c4369299a1623021279fd8801ad 100644
|
||||
--- a/gfx/wr/webrender/src/util.rs
|
||||
+++ b/gfx/wr/webrender/src/util.rs
|
||||
@@ -164,7 +164,9 @@ impl ScaleOffset {
|
||||
m.m34.abs() > NEARLY_ZERO ||
|
||||
m.m43.abs() > NEARLY_ZERO ||
|
||||
(m.m44 - 1.0).abs() > NEARLY_ZERO {
|
||||
- return None;
|
||||
+ // Ignore this error, this change fixes the bug that crashes when opening an extension popup
|
||||
+ printf("zen bug: Not a pure scale / translation");
|
||||
+ //return None;
|
||||
}
|
||||
|
||||
Some(ScaleOffset {
|
||||
Reference in New Issue
Block a user