Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * The default style sheet used to render SVG. | 2 * The default style sheet used to render SVG. |
| 3 * | 3 * |
| 4 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. | 4 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar | 32 When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar |
| 33 which does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'ov erflow' property on the | 33 which does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'ov erflow' property on the |
| 34 outermost 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set | 34 outermost 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set |
| 35 to the bounds of the initial viewport. | 35 to the bounds of the initial viewport. |
| 36 | 36 |
| 37 When an outermost 'svg' element is embedded inline within a parent XML gramm ar which uses CSS layout | 37 When an outermost 'svg' element is embedded inline within a parent XML gramm ar which uses CSS layout |
| 38 [CSS2-LAYOUT] or XSL formatting [XSL], if the 'overflow' property has the va lue hidden or scroll, then | 38 [CSS2-LAYOUT] or XSL formatting [XSL], if the 'overflow' property has the va lue hidden or scroll, then |
| 39 the user agent will establish an initial clipping path equal to the bounds o f the initial viewport; otherwise, | 39 the user agent will establish an initial clipping path equal to the bounds o f the initial viewport; otherwise, |
| 40 the initial clipping path is set according to the clipping rules as defined in [CSS2-overflow]. | 40 the initial clipping path is set according to the clipping rules as defined in [CSS2-overflow]. |
| 41 | 41 |
| 42 Opera/Firefox & WebKit agreed on NOT setting "overflow: hidden" for the oute rmost svg element - SVG 1.1 Errata | 42 Opera/Firefox & WebKit agreed on NOT setting "overflow: hidden" for a root s vg element - SVG 1.1 Errata |
| 43 contains these changes as well as all future SVG specifications: see http:// lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0347.html | 43 contains these changes as well as all future SVG specifications: see http:// lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0347.html |
| 44 Note that here "root svg element" means a frame with purely SVG content, and in which SVG is the root element. | |
|
fs
2017/03/29 21:35:00
This could also be referred to as "when <svg> is t
chrishtr
2017/03/30 00:43:14
Done.
| |
| 45 LayoutSVGRoot objects embededed within containing content get overflow: hidd en by default. | |
|
fs
2017/03/29 21:35:00
Nit: s/embededed/embedded/
chrishtr
2017/03/30 00:43:14
Done.
| |
| 46 https://svgwg.org/svg2-draft/single-page.html#render-OverflowAndClipProperti es | |
| 44 */ | 47 */ |
| 45 | 48 |
| 46 svg:not(:root), symbol, image, marker, pattern, foreignObject { | 49 svg:not(:root), symbol, image, marker, pattern, foreignObject { |
| 47 overflow: hidden | 50 overflow: hidden |
| 48 } | 51 } |
| 49 | 52 |
| 50 svg:root { | 53 svg:root { |
| 51 width: 100%; | 54 width: 100%; |
| 52 height: 100%; | 55 height: 100%; |
| 53 } | 56 } |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 72 | 75 |
| 73 /* CSS transform specification: "transform-origin 0 0 for SVG elements without a ssociated CSS layout box, 50% 50% for all other elements". */ | 76 /* CSS transform specification: "transform-origin 0 0 for SVG elements without a ssociated CSS layout box, 50% 50% for all other elements". */ |
| 74 | 77 |
| 75 * { | 78 * { |
| 76 -webkit-transform-origin: 0 0; | 79 -webkit-transform-origin: 0 0; |
| 77 } | 80 } |
| 78 | 81 |
| 79 html|* > svg { | 82 html|* > svg { |
| 80 -webkit-transform-origin: 50% 50%; | 83 -webkit-transform-origin: 50% 50%; |
| 81 } | 84 } |
| OLD | NEW |