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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/getClientRects.html

Issue 2349653002: Added support of getClientRects() for SVG Elements. (Closed)
Patch Set: nits Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <title>SVGElement::getClientRects()</title>
fs 2016/09/22 10:39:44 Element.getClientRects() on an SVGElement
Shanmuga Pandi 2016/09/29 10:45:55 Done.
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <body style="margin:0; border:0; padding:0;">
6 <svg width="100px" height="100px">
7 <rect x="20" y="30" width="40" height="50" />
8 </svg>
9 <script>
10 test(function() {
11 var r1 = document.querySelector("rect").getClientRects()[0];
fs 2016/09/22 10:39:44 assert_equals(rectlist.length, 1); too maybe?
Shanmuga Pandi 2016/09/29 10:45:54 Done.
12 assert_equals(r1.left, 20);
13 assert_equals(r1.top, 30);
14 assert_equals(r1.width, 40);
15 assert_equals(r1.height, 50);
16 assert_equals(r1.right, 60);
17 assert_equals(r1.bottom, 80);
18 });
fs 2016/09/22 10:39:44 Also add a subtest for the <g> with multiple shape
Shanmuga Pandi 2016/09/29 10:45:55 Done.
19 </script>
20 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.h » ('j') | third_party/WebKit/Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698