{"url":"https://api.github.com/gists/590163","forks_url":"https://api.github.com/gists/590163/forks","commits_url":"https://api.github.com/gists/590163/commits","id":"590163","node_id":"MDQ6R2lzdDU5MDE2Mw==","git_pull_url":"https://gist.github.com/590163.git","git_push_url":"https://gist.github.com/590163.git","html_url":"https://gist.github.com/mbostock/590163","files":{".block":{"filename":".block","type":"text/plain","language":null,"raw_url":"https://gist.githubusercontent.com/mbostock/590163/raw/703d310b399098a243a76a50bc209167e924cfd2/.block","size":17,"truncated":false,"content":"license: gpl-3.0\n","encoding":"utf-8"},"README.mkd":{"filename":"README.mkd","type":"text/markdown","language":"Markdown","raw_url":"https://gist.githubusercontent.com/mbostock/590163/raw/76233a5a0430411adada2a65ad879040cec75d12/README.mkd","size":1276,"truncated":false,"content":"Test case for WebKit [bug 46203](https://bugs.webkit.org/show_bug.cgi?id=46203).\n\n<p><b>getBBox()</b>\nReturns the tight bounding box in current user space (i.e., after application of the 'transform' attribute, if any) on the geometry of all contained graphics elements, exclusive of stroking, clipping, masking and filter effects). Note that getBBox must return the actual bounding box at the time the method was called, even in case the element has not yet been rendered. [<a href=\"http://www.w3.org/TR/SVG11/types.html#__svg__SVGLocatable__getBBox\">SVG</a>]</p>\n\n<p><b>getClientRects()</b>\nIf the element does not have an associated CSS layout box and is in the http://www.w3.org/2000/svg namespace return a ClientRectList object containing a single ClientRect object that describes the bounding box of the element as defined by SVG specification. [<a href=\"http://www.w3.org/TR/cssom-view/#the-getclientrects-and-getboundingclient\">CSSOM</a>]</p>\n\n<p><b>getBoundingClientRect()</b>\nOtherwise, return a ClientRect object describing the smallest rectangle that includes the first rectangle in list and all of the remaining rectangles of which the height or width is not zero. [<a href=\"http://www.w3.org/TR/cssom-view/#the-getclientrects-and-getboundingclient\">CSSOM</a>]</p>","encoding":"utf-8"},"index.html":{"filename":"index.html","type":"text/html","language":"HTML","raw_url":"https://gist.githubusercontent.com/mbostock/590163/raw/53f6680192822550d05ad5a3e4e5db282b2e2463/index.html","size":1424,"truncated":false,"content":"<!DOCTYPE html>\n<html>\n  <head>\n    <style type=\"text/css\">\n\nbody {\n  font: 14px Helvetica Neue;\n  text-rendering: optimizeLegibility;\n}\n\ndiv {\n  width: 960px;\n  margin: auto;\n}\n\nth {\n  font-family: Courier New;\n  text-align: right;\n  padding-left: 100px;\n  padding-right: 10px;\n}\n\nrect {\n  stroke: #000;\n  fill: #eee;\n}\n\n    </style>\n  </head>\n  <body>\n    <div id=\"div\"></div>\n    <script type=\"text/javascript\">\n\nvar div = document.getElementById(\"div\"),\n    svg = div.appendChild(create(\"svg\")),\n    rect = svg.appendChild(create(\"rect\"));\n\nsvg.setAttribute(\"width\", 960);\nsvg.setAttribute(\"height\", 400);\nrect.setAttribute(\"x\", \"10%\");\nrect.setAttribute(\"y\", \"10%\");\nrect.setAttribute(\"width\", \"80%\");\nrect.setAttribute(\"height\", \"80%\");\n\ntext(\"EXPECTED\", {width: 768, height: 320});\ntext(\"getBBox()\", svg.getBBox());\ntext(\"getBoundingClientRect()\", svg.getBoundingClientRect());\ntext(\"getClientRects()[0]\", svg.getClientRects()[0]);\n\nfunction text(name, size) {\n  document.body.appendChild(document.createElement(\"tr\"))\n      .appendChild(document.createElement(\"th\"))\n      .appendChild(document.createTextNode(name))\n      .parentNode\n      .parentNode\n      .appendChild(document.createElement(\"td\"))\n      .appendChild(document.createTextNode(size.width + \" \\xd7 \" + size.height));\n}\n\nfunction create(type) {\n  return document.createElementNS(\"http://www.w3.org/2000/svg\", type);\n}\n\n    </script>\n  </body>\n</html>","encoding":"utf-8"},"thumbnail.png":{"filename":"thumbnail.png","type":"image/png","language":null,"raw_url":"https://gist.githubusercontent.com/mbostock/590163/raw/804c53fae0538cf453ee259e72576eb392fa2982/thumbnail.png","size":2982,"truncated":false,"content":"iVBORw0KGgoAAAANSUhEUgAAAOYAAAB4CAYAAADmBo6IAAAAGXRFWHRTb2Z0\nd2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAC0hJREFUeNrs3Plv0/cdx/G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xh2tjo+jbf1AcJS1oyysIxsWOnotiYjqMelMa\nH14YQ3/vDqh6B7KBaRibu+Cb+BwBVY+9O5phEXOsXsnBZHFhcuQ8nnnxNVy7\nfA5P/PQsvBOfYWfvXgwNjeDV13+GuQU/TGoSM8vLkCQZq4HEZpjL3gVMi+tf\nPP/B2owpS19hxpy6Y8bs54xJX9u3+lrZdDqJ0Kof4YgPc7O3kFck9O7qRFZc\nXqwuCeU8Rq5chs/nx8T4MIZHJ7Aolp0Bvw/R1WW0du2Bmo+LWVBBi82MK6Of\n4fr4GMLxJOqcDvQfOoAV7yxuTU4hHIuJaMRoKpaYRTEbKkoFRpMBjjq7+Pol\n1DsbakvjL5sxW+vqajPmwlJMLGVdKOdKd82YDoerNmPmVSu06RyiYs7ljElb\nesb8X/7wm7fg2HEIz37/OLRiRswk4xDrU+TzORiNptrMqBcfF8rVeFwoiMsl\nMaeKJmA2GxGJhGvv6Kie8vkSzEYD8tmU2IYJZoMWyVQWBoMB7gY3fN45hOJp\nWGx27BFHxsGPh/Dd48cgl8rIpkKYX47j1MlHa7dLEcvqeDItQnSKZXQUVqsV\n2VwBTWIGrb4Hc+1XQGszZnV+rb5NDJIR2uoDCiTx/+zcu2h7zJhEtBYm/7QI\nEWdMImKYRAyTiBgm0Tamk2U5Ls6rbx4s8+4g+tZVW4z/W4ABAK/VtZ6I4bDC\nAAAAAElFTkSuQmCC\n","encoding":"base64"}},"public":true,"created_at":"2010-09-21T18:07:26Z","updated_at":"2016-02-08T23:03:46Z","description":"CSSOM/SVG Test","comments":0,"user":null,"comments_enabled":true,"comments_url":"https://api.github.com/gists/590163/comments","owner":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"forks":[],"history":[{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"f81eaa7af7c36314a1d72bb64e874a9cbe48708c","committed_at":"2016-02-08T23:03:44Z","change_status":{"total":1,"additions":1,"deletions":0},"url":"https://api.github.com/gists/590163/f81eaa7af7c36314a1d72bb64e874a9cbe48708c"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"391aa597a05e683e742f0a75bc028e70dc4f44d5","committed_at":"2012-10-12T03:39:53Z","change_status":{"total":0,"additions":0,"deletions":0},"url":"https://api.github.com/gists/590163/391aa597a05e683e742f0a75bc028e70dc4f44d5"},{"user":null,"version":"76e692eb40f2b8bfb1e932150ed286a195c2c066","committed_at":"2010-09-21T18:27:45Z","change_status":{"total":2,"additions":2,"deletions":0},"url":"https://api.github.com/gists/590163/76e692eb40f2b8bfb1e932150ed286a195c2c066"},{"user":null,"version":"f468a7311d11ce62eedf11f587ae86c73d52ce09","committed_at":"2010-09-21T18:08:16Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/590163/f468a7311d11ce62eedf11f587ae86c73d52ce09"},{"user":null,"version":"9119f9ad57641815743541a1a52eb2abaeb3f327","committed_at":"2010-09-21T18:07:26Z","change_status":{"total":74,"additions":74,"deletions":0},"url":"https://api.github.com/gists/590163/9119f9ad57641815743541a1a52eb2abaeb3f327"}],"truncated":false}