Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: LayoutTests/css3/motion-path/origin-expected.html

Issue 1220793011: CSS Motion Path: Centre transform-origin on the path (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: current-transformation-matrix Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/css3/motion-path/origin-expected.html
diff --git a/LayoutTests/css3/motion-path/origin-expected.html b/LayoutTests/css3/motion-path/origin-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..c9d1e79082c44da59a053bd995ec49cfd7f2daa8
--- /dev/null
+++ b/LayoutTests/css3/motion-path/origin-expected.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+
+ .box {
+ position: absolute;
+ background-color: lime;
+ width: 70px;
+ height: 40px;
+ line-height: 40px;
+ transform-origin: 20% 40%;
+
+ /* The midpoint of the path is (350, 150).
+ Subtract (20% * 70px, 40% * 40px). */
+ transform: translate(336px, 134px) rotate(135deg);
alancutter (OOO until 2018) 2015/07/03 03:08:05 You can just add a translate(-20%, -40%) here inst
Eric Willigers 2015/07/03 03:31:38 Done.
+ }
+
+</style>
+</head>
+<body>
+ <div class="box">@</div>
+ <svg width="700" height="300" viewBox="0 0 700 300">
+ <path stroke="green" d="M 500 0 L 200 300" />
+ </svg>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698