WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-194903-20190307185840.patch (text/plain), 5.75 KB, created by
Simon Fraser (smfr)
on 2019-03-07 18:58:41 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-03-07 18:58:41 PST
Size:
5.75 KB
patch
obsolete
>Subversion Revision: 242605 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6019b5d0e0d307f6d3403e6f49efe445f0c1873c..36dd5d18a018eb3124df672741b6e6d7476d6019 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-03-07 Simon Fraser <simon.fraser@apple.com> >+ >+ Transform-origin on SVG breaks when zoom in or out >+ https://bugs.webkit.org/show_bug.cgi?id=194903 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Page zoom (Command-+) affects neither transform origin nor the bounding box of SVG elements, >+ so the change in r166967 was wrong because it would clobber just the the translation in the >+ matrix. Also, the test case doesn't seem to actually be testing with zoom. >+ >+ Removing this code makes everything work. >+ >+ Test: svg/zoom/page/transform-origin-and-zoom.html >+ >+ * svg/SVGGraphicsElement.cpp: >+ (WebCore::SVGGraphicsElement::animatedLocalTransform const): >+ > 2019-03-07 John Wilander <wilander@apple.com> > > Resource Load Statistics: Log first-party navigations with link decoration >diff --git a/Source/WebCore/svg/SVGGraphicsElement.cpp b/Source/WebCore/svg/SVGGraphicsElement.cpp >index c59636cf7920ac8c1127f2cfaf79ba7fc1c71c2f..a1b1941bca3cd6ac55cd1a4f88cb825d2ddc4fa3 100644 >--- a/Source/WebCore/svg/SVGGraphicsElement.cpp >+++ b/Source/WebCore/svg/SVGGraphicsElement.cpp >@@ -97,14 +97,6 @@ AffineTransform SVGGraphicsElement::animatedLocalTransform() const > > // Flatten any 3D transform. > matrix = transform.toAffineTransform(); >- // CSS bakes the zoom factor into lengths, including translation components. >- // In order to align CSS & SVG transforms, we need to invert this operation. >- float zoom = style->effectiveZoom(); >- if (zoom != 1) { >- matrix.setE(matrix.e() / zoom); >- matrix.setF(matrix.f() / zoom); >- } >- > } else > transform().concatenate(matrix); > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 853b30017c2db9c540c716c6da32fa1203dc7749..2bebf50fe95fbe130773b0610903f3d1f1383197 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2019-03-07 Simon Fraser <simon.fraser@apple.com> >+ >+ Transform-origin on SVG breaks when zoom in or out >+ https://bugs.webkit.org/show_bug.cgi?id=194903 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test still needs some work to avoid antialiasing diffs. >+ >+ * svg/zoom/page/transform-origin-and-zoom-expected.html: Added. >+ * svg/zoom/page/transform-origin-and-zoom.html: Added. >+ > 2019-03-07 John Wilander <wilander@apple.com> > > Resource Load Statistics: Log first-party navigations with link decoration >diff --git a/LayoutTests/svg/zoom/page/transform-origin-and-zoom-expected.html b/LayoutTests/svg/zoom/page/transform-origin-and-zoom-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0047009bb655b74acc7f302a5bcbdf1aeb3f1592 >--- /dev/null >+++ b/LayoutTests/svg/zoom/page/transform-origin-and-zoom-expected.html >@@ -0,0 +1,42 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <style> >+ body { >+ margin: 0; >+ } >+ .rect { >+ position: absolute; >+ left: 50px; >+ transform-box: fill-box; >+ height: 80px; >+ width: 80px; >+ } >+ .gray { >+ background-color: gray; >+ } >+ .green { >+ background-color: green; >+ } >+ </style> >+ <script> >+ function doTest() >+ { >+ const zoomCount = 2; >+ for (let i = 0; i < zoomCount; ++i) >+ eventSender.zoomPageIn(); >+ } >+ window.addEventListener('load', doTest, false); >+ </script> >+</head> >+<body> >+ <div class="gray rect" style="top: 50px"></div> >+ <div class="green rect" style="top: 50px; transform: rotate(90deg); transform-origin: bottom right"></div> >+ >+ <div class="gray rect" style="left: 250px; top: 100px"></div> >+ <div class="green rect" style="left: 250px; top: 100px; transform: rotate(90deg) scale(1.5); transform-origin: bottom right"></div> >+ >+ <div class="gray rect" style="top: 250px"></div> >+ <div class="green rect" style="top: 250px; transform: translate(100%, 0);"></div> >+</body> >+</html> >diff --git a/LayoutTests/svg/zoom/page/transform-origin-and-zoom.html b/LayoutTests/svg/zoom/page/transform-origin-and-zoom.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ca09db56003110c43261c4871629eb257e9755ad >--- /dev/null >+++ b/LayoutTests/svg/zoom/page/transform-origin-and-zoom.html >@@ -0,0 +1,34 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <style> >+ body { >+ margin: 0; >+ } >+ rect { >+ transform-box: fill-box; >+ } >+ </style> >+ <script> >+ function doTest() >+ { >+ const zoomCount = 2; >+ for (let i = 0; i < zoomCount; ++i) >+ eventSender.zoomPageIn(); >+ } >+ window.addEventListener('load', doTest, false); >+ </script> >+</head> >+<body> >+ <svg width="500" height="400" viewBox="0 0 500 400" xmlns="http://www.w3.org/2000/svg"> >+ <rect x="50" y="50" width="80" height="80" fill="gray"/> >+ <rect x="50" y="50" width="80" height="80" fill="green" style="transform: rotate(90deg); transform-origin: bottom right"/> >+ >+ <rect x="250" y="100" width="80" height="80" fill="gray"/> >+ <rect x="250" y="100" width="80" height="80" fill="green" style="transform: rotate(90deg) scale(1.5); transform-origin: bottom right"/> >+ >+ <rect x="50" y="250" width="80" height="80" fill="gray"/> >+ <rect x="50" y="250" width="80" height="80" fill="green" style="transform: translate(100%, 0);"/> >+ </svg> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194903
:
363945
|
363949
|
363972
|
363975
|
363977
|
363980
|
363982
|
364322
|
471211
|
471940