Changeset 54551 in webkit
- Timestamp:
- Feb 9, 2010 8:08:18 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 46 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r54544 r54551 1 2010-02-09 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Dirk Schulze. 4 5 No scroll bars are displayed for standalone SVG image 6 https://bugs.webkit.org/show_bug.cgi?id=11225 7 8 Height and width defined for svg element are not honored 9 https://bugs.webkit.org/show_bug.cgi?id=24033 10 11 SVG file does not pan and has no scroll bars 12 https://bugs.webkit.org/show_bug.cgi?id=24448 13 14 Modify some tests to account that overflow is now properly handled. Add new results for several overflow tests. 15 16 * platform/mac/svg/custom/baseval-animval-equality-expected.txt: 17 * platform/mac/svg/custom/focus-ring-expected.txt: 18 * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt: 19 * platform/mac/svg/custom/path-bad-data-expected.txt: 20 * platform/mac/svg/overflow: Added. 21 * platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.checksum: Added. 22 * platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.png: Added. 23 * platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.txt: Added. 24 * platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.checksum: Added. 25 * platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.png: Added. 26 * platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.txt: Added. 27 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.checksum: Added. 28 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.png: Added. 29 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.txt: Added. 30 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.checksum: Added. 31 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.png: Added. 32 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.txt: Added. 33 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.checksum: Added. 34 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.png: Added. 35 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.txt: Added. 36 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.checksum: Added. 37 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.png: Added. 38 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.txt: Added. 39 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.checksum: Added. 40 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.png: Added. 41 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt: Added. 42 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.checksum: Added. 43 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.png: Added. 44 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.txt: Added. 45 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.checksum: Added. 46 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.png: Added. 47 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt: Added. 48 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.checksum: Added. 49 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.png: Added. 50 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt: Added. 51 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.checksum: Added. 52 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.png: Added. 53 * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt: Added. 54 * platform/mac/svg/text/text-gradient-positioning-expected.checksum: 55 * platform/mac/svg/text/text-gradient-positioning-expected.png: 56 * platform/mac/svg/text/text-gradient-positioning-expected.txt: 57 * svg/custom/focus-ring.svg: Shrink viewport size to avoid displaying scrollbars. 58 * svg/custom/foreignObject-crash-on-hover.xml: Ditto. 59 * svg/custom/path-bad-data.svg: Ditto. 60 * svg/overflow: Added. 61 * svg/overflow/overflow-on-inner-svg-element-defaults.svg: Added. 62 * svg/overflow/overflow-on-inner-svg-element.svg: Added. 63 * svg/overflow/overflow-on-outermost-svg-element-defaults.svg: Added. 64 * svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg: Added. 65 * svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg: Added. 66 * svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg: Added. 67 * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml: Added. 68 * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml: Added. 69 * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml: Added. 70 * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml: Added. 71 * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml: Added. 72 * svg/text/text-gradient-positioning.svg: Shrink viewport size to avoid displaying scrollbars. 73 1 74 2010-02-09 Yuzo Fujishima <yuzo@google.com> 2 75 -
trunk/LayoutTests/platform/mac/svg/custom/baseval-animval-equality-expected.txt
r54483 r54551 3 3 layer at (0,0) size 600x400 4 4 RenderSVGRoot {svg} at (0,0) size 600x400 5 RenderForeignObject {foreignObject} at (0,0) size 800x1986 RenderBlock {html} at (0,0) size 800x1987 RenderBlock {div} at (0,0) size 800x1988 RenderBlock (anonymous) at (0,0) size 800x185 RenderForeignObject {foreignObject} at (0,0) size 785x198 6 RenderBlock {html} at (0,0) size 785x198 7 RenderBlock {div} at (0,0) size 785x198 8 RenderBlock (anonymous) at (0,0) size 785x18 9 9 RenderText {#text} at (0,0) size 560x18 10 10 text run at (0,0) width 560: "This tests to make sure that baseVal and animVal are tied when animation is not enabled:" 11 RenderBlock {div} at (0,18) size 800x1811 RenderBlock {div} at (0,18) size 785x18 12 12 RenderText {#text} at (0,0) size 152x18 13 13 text run at (0,0) width 152: "svg.x.baseVal.value = 0" 14 RenderBlock {div} at (0,36) size 800x1814 RenderBlock {div} at (0,36) size 785x18 15 15 RenderText {#text} at (0,0) size 155x18 16 16 text run at (0,0) width 155: "svg.x.animVal.value = 0" 17 RenderBlock {div} at (0,54) size 800x1817 RenderBlock {div} at (0,54) size 785x18 18 18 RenderText {#text} at (0,0) size 205x18 19 19 text run at (0,0) width 205: "setting svg.x.baseVal.value = 10" 20 RenderBlock {div} at (0,72) size 800x1820 RenderBlock {div} at (0,72) size 785x18 21 21 RenderText {#text} at (0,0) size 160x18 22 22 text run at (0,0) width 160: "svg.x.baseVal.value = 10" 23 RenderBlock {div} at (0,90) size 800x1823 RenderBlock {div} at (0,90) size 785x18 24 24 RenderText {#text} at (0,0) size 163x18 25 25 text run at (0,0) width 163: "svg.x.animVal.value = 10" 26 RenderBlock {div} at (0,108) size 800x1826 RenderBlock {div} at (0,108) size 785x18 27 27 RenderText {#text} at (0,0) size 122x18 28 28 text run at (0,0) width 122: "SUCCESS (1 of 2)" 29 RenderBlock {div} at (0,126) size 800x1829 RenderBlock {div} at (0,126) size 785x18 30 30 RenderText {#text} at (0,0) size 200x18 31 31 text run at (0,0) width 200: "setting svg.x.animVal.value = 5" 32 RenderBlock {div} at (0,144) size 800x1832 RenderBlock {div} at (0,144) size 785x18 33 33 RenderText {#text} at (0,0) size 152x18 34 34 text run at (0,0) width 152: "svg.x.baseVal.value = 5" 35 RenderBlock {div} at (0,162) size 800x1835 RenderBlock {div} at (0,162) size 785x18 36 36 RenderText {#text} at (0,0) size 155x18 37 37 text run at (0,0) width 155: "svg.x.animVal.value = 5" 38 RenderBlock {div} at (0,180) size 800x1838 RenderBlock {div} at (0,180) size 785x18 39 39 RenderText {#text} at (0,0) size 122x18 40 40 text run at (0,0) width 122: "SUCCESS (2 of 2)" -
trunk/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
r54483 r54551 1 1 KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]} 2 layer at (0,0) size 800x 10002 layer at (0,0) size 800x600 3 3 RenderView at (0,0) size 800x600 4 layer at (0,0) size 800x 10005 RenderSVGRoot {svg} at (0,0) size 800x 10004 layer at (0,0) size 800x600 5 RenderSVGRoot {svg} at (0,0) size 800x600 6 6 RenderPath {circle} at (15,10) size 100x100 [fill={[type=SOLID] [color=#FFA500]}] [data="M115.00,60.00 L114.90,63.14 L114.61,66.27 L114.11,69.37 L113.43,72.43 L112.55,75.45 L111.49,78.41 L110.24,81.29 L108.82,84.09 L107.22,86.79 L105.45,89.39 L103.53,91.87 L101.45,94.23 L99.23,96.45 L96.87,98.53 L94.39,100.45 L91.79,102.22 L89.09,103.82 L86.29,105.24 L83.41,106.49 L80.45,107.55 L77.43,108.43 L74.37,109.11 L71.27,109.61 L68.14,109.90 L65.00,110.00 L61.86,109.90 L58.73,109.61 L55.63,109.11 L52.57,108.43 L49.55,107.55 L46.59,106.49 L43.71,105.24 L40.91,103.82 L38.21,102.22 L35.61,100.45 L33.13,98.53 L30.77,96.45 L28.55,94.23 L26.47,91.87 L24.55,89.39 L22.78,86.79 L21.18,84.09 L19.76,81.29 L18.51,78.41 L17.45,75.45 L16.57,72.43 L15.89,69.37 L15.39,66.27 L15.10,63.14 L15.00,60.00 L15.10,56.86 L15.39,53.73 L15.89,50.63 L16.57,47.57 L17.45,44.55 L18.51,41.59 L19.76,38.71 L21.18,35.91 L22.78,33.21 L24.55,30.61 L26.47,28.13 L28.55,25.77 L30.77,23.55 L33.13,21.47 L35.61,19.55 L38.21,17.78 L40.91,16.18 L43.71,14.76 L46.59,13.51 L49.55,12.45 L52.57,11.57 L55.63,10.89 L58.73,10.39 L61.86,10.10 L65.00,10.00 L68.14,10.10 L71.27,10.39 L74.37,10.89 L77.43,11.57 L80.45,12.45 L83.41,13.51 L86.29,14.76 L89.09,16.18 L91.79,17.78 L94.39,19.55 L96.87,21.47 L99.23,23.55 L101.45,25.77 L103.53,28.13 L105.45,30.61 L107.22,33.21 L108.82,35.91 L110.24,38.71 L111.49,41.59 L112.55,44.55 L113.43,47.57 L114.11,50.63 L114.61,53.73 L114.90,56.86 Z"] 7 7 RenderPath {path} at (140,10) size 100x100 [fill={[type=SOLID] [color=#FFA500]}] [data="M140.00,10.00 L190.00,110.00 L240.00,60.00 L220.00,60.00 L200.00,30.00 Z"] -
trunk/LayoutTests/platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt
r54483 r54551 1 layer at (0,0) size 800x 8001 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x 8004 RenderSVGRoot {svg} at (0,0) size 800x 8003 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (0,0) size 800x600 5 5 RenderSVGContainer {g} at (49,49) size 302x302 [transform={m=((1.00,0.00)(0.00,1.00)) t=(50.00,50.00)}] 6 6 RenderPath {polygon} at (49,49) size 302x302 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#ADD8E6]}] [data="M0.00,0.00 L300.00,0.00 L300.00,300.00 L0.00,300.00 Z"] -
trunk/LayoutTests/platform/mac/svg/custom/path-bad-data-expected.txt
r54483 r54551 7 7 CONSOLE MESSAGE: line 15: Error: Problem parsing d="M 0" 8 8 CONSOLE MESSAGE: line 16: Error: Problem parsing d="M 0 0 0" 9 layer at (0,0) size 800x 7559 layer at (0,0) size 800x600 10 10 RenderView at (0,0) size 800x600 11 layer at (0,0) size 755x75512 RenderSVGRoot {svg} at (0,0) size 755x75511 layer at (0,0) size 800x600 12 RenderSVGRoot {svg} at (0,0) size 800x600 13 13 RenderPath {path} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00"] 14 14 RenderPath {path} at (0,0) size 0x0 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#FF0000]}] [data=""] -
trunk/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.checksum
r42966 r54551 1 5c0c51950ad3e846aec9734d2e36e766 1 772fa354840f50d49bc6d9c715228fcb -
trunk/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.txt
r54483 r54551 1 1 KRenderingPaintServer {id="gradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#FF0000), (1.00,#FF0000)]] [bounding box mode=0] [transform={m=((1.23,0.00)(0.00,1.26)) t=(-38.87,-39.26)}] [start=(120.03,161.07)] [end=(497.52,184.77)]} 2 layer at (0,0) size 8 50x6002 layer at (0,0) size 800x600 3 3 RenderView at (0,0) size 800x600 4 layer at (0,0) size 8 50x2005 RenderSVGRoot {svg} at (0,0) size 8 50x2004 layer at (0,0) size 800x200 5 RenderSVGRoot {svg} at (0,0) size 800x200 6 6 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 7 7 RenderSVGHiddenContainer {linearGradient} at (0,0) size 0x0 8 8 RenderSVGGradientStop {stop} at (0,0) size 0x0 9 9 RenderSVGGradientStop {stop} at (0,0) size 0x0 10 RenderSVGContainer {g} at (0, 54) size 826x5911 RenderSVGText {text} at (0,100) size 826x59contains 1 chunk(s)12 RenderSVGInlineText {#text} at (0,- 46) size 826x5913 chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 826.00: "This should be GREEN and appear once."14 RenderSVGContainer {use} at (0, 54) size 826x5915 RenderSVGContainer {g} at (0, 54) size 826x5916 RenderSVGText {text} at (0,100) size 826x59contains 1 chunk(s)17 RenderSVGInlineText {#text} at (0,- 46) size 826x5918 chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 826.00: "This should be GREEN and appear once."10 RenderSVGContainer {g} at (0,64) size 660x46 11 RenderSVGText {text} at (0,100) size 660x46 contains 1 chunk(s) 12 RenderSVGInlineText {#text} at (0,-36) size 660x46 13 chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 660.00: "This should be GREEN and appear once." 14 RenderSVGContainer {use} at (0,64) size 660x46 15 RenderSVGContainer {g} at (0,64) size 660x46 16 RenderSVGText {text} at (0,100) size 660x46 contains 1 chunk(s) 17 RenderSVGInlineText {#text} at (0,-36) size 660x46 18 chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 660.00: "This should be GREEN and appear once." -
trunk/LayoutTests/svg/custom/focus-ring.svg
r26424 r54551 1 <svg width="800" height=" 1000" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">1 <svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2 2 <style> 3 3 .ring { -
trunk/LayoutTests/svg/custom/foreignObject-crash-on-hover.xml
r28962 r54551 5 5 xmlns:xlink="http://www.w3.org/1999/xlink" 6 6 xmlns:html="http://www.w3.org/1999/xhtml" 7 height=" 800" width="800">7 height="600" width="800"> 8 8 <g transform="translate(50,50)"> 9 9 <polygon points="0,0 300,0 300,300 0,300" style="fill:lightblue; stroke:red;"/> -
trunk/LayoutTests/svg/custom/path-bad-data.svg
r18489 r54551 3 3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 4 4 <svg 5 width=" 200mm"6 height=" 200mm"5 width="800" 6 height="600" 7 7 xmlns="http://www.w3.org/2000/svg"> 8 8 <path fill="green" d="M 0 0 L 200 0 L 200 200 L 0 200"/> -
trunk/LayoutTests/svg/text/text-gradient-positioning.svg
r42966 r54551 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="8 50" height="200">1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="200"> 2 2 <defs> 3 3 <linearGradient gradientTransform="matrix(1.23267, 0, 0, 1.25718, -38.8716, -39.2565)" gradientUnits="userSpaceOnUse" id="gradient" x1="120.02892" x2="497.52158" y1="161.06746" y2="184.7655"> … … 7 7 </defs> 8 8 <g fill="url(#gradient)"> 9 <text id="text" y="100" font-size=" 50px">This should be GREEN and appear once.</text>9 <text id="text" y="100" font-size="40px">This should be GREEN and appear once.</text> 10 10 </g> 11 11 <use xlink:href="#text" fill="green"/> -
trunk/WebCore/ChangeLog
r54542 r54551 1 2010-02-09 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Dirk Schulze. 4 5 No scroll bars are displayed for standalone SVG image 6 https://bugs.webkit.org/show_bug.cgi?id=11225 7 8 Height and width defined for svg element are not honored 9 https://bugs.webkit.org/show_bug.cgi?id=24033 10 11 SVG file does not pan and has no scroll bars 12 https://bugs.webkit.org/show_bug.cgi?id=24448 13 14 Adapt to SVG 1.1 errata to change the overflow handling: 15 Replace "svg { overflow: hidden }" by "svg:not(:root) { overflow: hidden }" to allow standalone SVG documents to contain scrolllbars. 16 Agreed by SVG WG to make this the default behaviour, already implemented by Opera & FireFox (partial support). 17 18 Add new tests in svg/overflow covering all special SVG css overflow handling rules on inner/outer svg elements. 19 20 Tests: svg/overflow/overflow-on-inner-svg-element-defaults.svg 21 svg/overflow/overflow-on-inner-svg-element.svg 22 svg/overflow/overflow-on-outermost-svg-element-defaults.svg 23 svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg 24 svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg 25 svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg 26 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml 27 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml 28 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml 29 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml 30 svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml 31 32 * css/svg.css: Change default <svg> overflow rule to only apply to inner <svg> elements. 33 * page/FrameView.cpp: 34 (WebCore::FrameView::layout): Only apply overflow rules for non-standalone SVG documents. 35 * rendering/RenderSVGRoot.cpp: Remove all calls to isOverflowHidden - it's always the case for the outermost SVG element, see spec + errata. 36 (WebCore::RenderSVGRoot::paint): Always clip to initial viewport size. 37 (WebCore::RenderSVGRoot::computeRectForRepaint): Ditto. 38 (WebCore::RenderSVGRoot::nodeAtPoint): Simplify. 39 * rendering/RenderSVGViewportContainer.cpp: 40 (WebCore::RenderSVGViewportContainer::applyViewportClip): Use isOverflowHidden() instead of a manual oveflow query and clip in float precision. 41 * rendering/SVGRenderSupport.cpp: 42 (WebCore::SVGRenderBase::isOverflowHidden): Simplify implementation, assure the function is not called anymore for RenderSVGRoot objects. 43 1 44 2010-02-09 Kwang Yul Seo <skyul@company100.net> 2 45 -
trunk/WebCore/css/svg.css
r26821 r54551 33 33 outermost 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set 34 34 to the bounds of the initial viewport. 35 36 When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout 37 [CSS2-LAYOUT] or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then 38 the user agent will establish an initial clipping path equal to the bounds of the initial viewport; otherwise, 39 the initial clipping path is set according to the clipping rules as defined in [CSS2-overflow]. 40 41 Opera/Firefox & WebKit agreed on NOT setting "overflow: hidden" for the outermost svg element - SVG 1.1 Errata 42 contains these changes as well as all future SVG specifications: see http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0347.html 35 43 */ 36 svg:root { 37 overflow: hidden !important 44 45 svg:not(:root), symbol, image, marker, pattern, foreignObject { 46 overflow: hidden 38 47 } 39 48 … … 41 50 width: 100%; 42 51 height: 100%; 43 }44 45 svg, symbol, marker, pattern {46 overflow: hidden47 52 } 48 53 -
trunk/WebCore/page/FrameView.cpp
r54440 r54551 619 619 if (!m_firstLayout && (m_size.width() != layoutWidth() || m_size.height() != layoutHeight())) 620 620 rootRenderer->setChildNeedsLayout(true); 621 } 622 #endif 621 } else 622 applyOverflowToViewport(rootRenderer, hMode, vMode); 623 #else 623 624 applyOverflowToViewport(rootRenderer, hMode, vMode); 625 #endif 624 626 } 625 627 #ifdef INSTRUMENT_LAYOUT_SCHEDULING -
trunk/WebCore/rendering/RenderSVGRoot.cpp
r54503 r54551 141 141 childPaintInfo.context->save(); 142 142 143 // In SVG special rules need to be applied that differ from the CSS overflow handling, 144 // see comments in svg.css for spec references, explaining this behaviour 145 if (SVGRenderBase::isOverflowHidden(this)) 146 childPaintInfo.context->clip(overflowClipRect(borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y())); 143 // Apply initial viewport clip - not affected by overflow handling 144 childPaintInfo.context->clip(overflowClipRect(borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y())); 147 145 148 146 // Convert from container offsets (html renderers) to a relative transform (svg renderers). … … 256 254 repaintRect = localToBorderBoxTransform().mapRect(repaintRect); 257 255 258 // In SVG special rules need to be applied that differ from the CSS overflow handling, 259 // see comments in svg.css for spec references, explaining this behaviour 260 if (SVGRenderBase::isOverflowHidden(this)) 261 repaintRect.intersect(enclosingIntRect(FloatRect(FloatPoint(), m_viewportSize))); 256 // Apply initial viewport clip - not affected by overflow settings 257 repaintRect.intersect(enclosingIntRect(FloatRect(FloatPoint(), m_viewportSize))); 262 258 263 259 style()->svgStyle()->inflateForShadow(repaintRect); … … 284 280 285 281 // Note: For now, we're ignoring hits to border and padding for <svg> 286 if (SVGRenderBase::isOverflowHidden(this)) { 287 IntPoint pointInContentBox = pointInBorderBox - borderOriginToContentBox(); 288 if (!contentBoxRect().contains(pointInContentBox)) 289 return false; 290 } 282 IntPoint pointInContentBox = pointInBorderBox - borderOriginToContentBox(); 283 if (!contentBoxRect().contains(pointInContentBox)) 284 return false; 291 285 292 286 IntPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent); -
trunk/WebCore/rendering/RenderSVGViewportContainer.cpp
r54503 r54551 64 64 void RenderSVGViewportContainer::applyViewportClip(PaintInfo& paintInfo) 65 65 { 66 if ( style()->overflowX() != OVISIBLE)67 paintInfo.context->clip( enclosingIntRect(m_viewport)); // FIXME: Eventually we'll want float-precision clipping66 if (SVGRenderBase::isOverflowHidden(this)) 67 paintInfo.context->clip(m_viewport); 68 68 } 69 69 -
trunk/WebCore/rendering/SVGRenderSupport.cpp
r54503 r54551 261 261 bool SVGRenderBase::isOverflowHidden(const RenderObject* object) 262 262 { 263 if (object->style()->overflowX() == OHIDDEN) { 264 // SVG doesn't support independent x/y overflow 265 ASSERT(object->style()->overflowY() == OHIDDEN); 266 return true; 267 } 268 269 return false; 263 // SVG doesn't support independent x/y overflow 264 ASSERT(object->style()->overflowX() == object->style()->overflowY()); 265 266 // OSCROLL is never set for SVG - see CSSStyleSelector::adjustRenderStyle 267 ASSERT(object->style()->overflowX() != OSCROLL); 268 269 // RenderSVGRoot should never query for overflow state - it should always clip itself to the initial viewport size. 270 ASSERT(!object->isRoot()); 271 272 return object->style()->overflowX() == OHIDDEN; 270 273 } 271 274
Note: See TracChangeset
for help on using the changeset viewer.