Commit 58a0542e authored by zimmermann's avatar zimmermann

Reviewed by Sam Weinig.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=13046 (CSS styles on hover and focus are broken for <use>)
Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> CSS styles broken)
Added test: svg/custom/use-css-events.svg

In general this fixes the peepo.co.uk website.

Forgot to pass the actual StyleChange to the recalcStyle() function,
when calling it on the shadow tree root element.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e8882bef
2007-03-17 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Sam Weinig.
Added new layout test checking CSS pseudo styles work with <use> elements.
* svg/custom/use-css-events-expected.checksum: Added.
* svg/custom/use-css-events-expected.png: Added.
* svg/custom/use-css-events-expected.txt: Added.
* svg/custom/use-css-events.svg: Added.
2007-03-17 Antti Koivisto <antti@apple.com>
Reviewed by Adele.
f5c6e70aabcee09d661629e82b052a2e
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
RenderSVGContainer {svg} at (0,0) size 800x600
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderPath {rect} at (0,0) size 800x600 [fill={[type=SOLID] [color=#CCCCAA]}] [data="M0.00,0.00L800.00,0.00L800.00,600.00L0.00,600.00"]
RenderSVGContainer {a} at (7,85) size 228x207.19
RenderSVGContainer {use} at (7,156.09) size 136x136.09
RenderSVGContainer {g} at (7,156.09) size 136x136.09 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,150.00)}]
RenderSVGContainer {svg} at (7.47,166.50) size 145.07x145.16
RenderPath {path} at (7.47,166.50) size 145.07x145.16 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M143.00,103.00L143.00,117.00C143.00,130.91,112.56,142.19,75.00,142.19C37.44,142.19,7.00,130.91,7.00,117.00L7.00,117.00L7.00,103.00C7.00,89.09,37.44,77.81,75.00,77.81C112.56,77.81,143.00,89.09,143.00,103.00L52.00,72.00C34.31,70.66,20.85,55.57,21.52,37.84C22.20,20.12,36.76,6.09,54.50,6.09C72.24,6.09,86.80,20.12,87.48,37.84C88.15,55.57,74.69,70.66,57.00,72.00"]
RenderSVGContainer {use} at (9,160) size 132x130
RenderSVGContainer {g} at (9,160) size 132x130 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,150.00)}]
RenderSVGContainer {svg} at (9.60,170.67) size 140.80x138.67
RenderPath {ellipse} at (10.67,256) size 138.67x53.33 [fill={[type=SOLID] [color=#666666]}] [data="M140.00,115.00L139.87,116.57L139.49,118.13L138.85,119.68L137.96,121.22L136.82,122.73L135.44,124.20L133.81,125.64L131.96,127.04L129.88,128.40L127.59,129.69L125.08,130.94L122.38,132.11L119.50,133.22L116.43,134.26L113.21,135.23L109.83,136.11L106.31,136.91L102.68,137.62L98.93,138.24L95.09,138.78L91.16,139.21L87.18,139.56L83.15,139.80L79.08,139.95L75.00,140.00L70.92,139.95L66.85,139.80L62.82,139.56L58.84,139.21L54.91,138.78L51.07,138.24L47.32,137.62L43.69,136.91L40.17,136.11L36.79,135.23L33.57,134.26L30.50,133.22L27.62,132.11L24.92,130.94L22.41,129.69L20.12,128.40L18.04,127.04L16.19,125.64L14.56,124.20L13.18,122.73L12.04,121.22L11.15,119.68L10.51,118.13L10.13,116.57L10.00,115.00L10.13,113.43L10.51,111.87L11.15,110.32L12.04,108.78L13.18,107.27L14.56,105.80L16.19,104.36L18.04,102.96L20.12,101.60L22.41,100.31L24.92,99.06L27.62,97.89L30.50,96.78L33.57,95.74L36.79,94.77L40.17,93.89L43.69,93.09L47.32,92.38L51.07,91.76L54.91,91.22L58.84,90.79L62.82,90.44L66.85,90.20L70.92,90.05L75.00,90.00L79.08,90.05L83.15,90.20L87.18,90.44L91.16,90.79L95.09,91.22L98.93,91.76L102.68,92.38L106.31,93.09L109.83,93.89L113.21,94.77L116.43,95.74L119.50,96.78L122.38,97.89L125.08,99.06L127.59,100.31L129.88,101.60L131.96,102.96L133.81,104.36L135.44,105.80L136.82,107.27L137.96,108.78L138.85,110.32L139.49,111.87L139.87,113.43"]
RenderPath {line} at (9.60,272) size 6.40x10.67 [stroke={[type=SOLID] [color=#666666] [stroke width=6.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M12.00,115.00L12.00,105.00"]
RenderPath {line} at (144,272) size 6.40x10.67 [stroke={[type=SOLID] [color=#666666] [stroke width=6.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M138.00,115.00L138.00,105.00"]
RenderPath {ellipse} at (10.67,245.33) size 138.67x53.33 [fill={[type=SOLID] [color=#999999]}] [data="M140.00,105.00L139.87,106.57L139.49,108.13L138.85,109.68L137.96,111.22L136.82,112.73L135.44,114.20L133.81,115.64L131.96,117.04L129.88,118.40L127.59,119.69L125.08,120.94L122.38,122.11L119.50,123.22L116.43,124.26L113.21,125.23L109.83,126.11L106.31,126.91L102.68,127.62L98.93,128.24L95.09,128.78L91.16,129.21L87.18,129.56L83.15,129.80L79.08,129.95L75.00,130.00L70.92,129.95L66.85,129.80L62.82,129.56L58.84,129.21L54.91,128.78L51.07,128.24L47.32,127.62L43.69,126.91L40.17,126.11L36.79,125.23L33.57,124.26L30.50,123.22L27.62,122.11L24.92,120.94L22.41,119.69L20.12,118.40L18.04,117.04L16.19,115.64L14.56,114.20L13.18,112.73L12.04,111.22L11.15,109.68L10.51,108.13L10.13,106.57L10.00,105.00L10.13,103.43L10.51,101.87L11.15,100.32L12.04,98.78L13.18,97.27L14.56,95.80L16.19,94.36L18.04,92.96L20.12,91.60L22.41,90.31L24.92,89.06L27.62,87.89L30.50,86.78L33.57,85.74L36.79,84.77L40.17,83.89L43.69,83.09L47.32,82.38L51.07,81.76L54.91,81.22L58.84,80.79L62.82,80.44L66.85,80.20L70.92,80.05L75.00,80.00L79.08,80.05L83.15,80.20L87.18,80.44L91.16,80.79L95.09,81.22L98.93,81.76L102.68,82.38L106.31,83.09L109.83,83.89L113.21,84.77L116.43,85.74L119.50,86.78L122.38,87.89L125.08,89.06L127.59,90.31L129.88,91.60L131.96,92.96L133.81,94.36L135.44,95.80L136.82,97.27L137.96,98.78L138.85,100.32L139.49,101.87L139.87,103.43"]
RenderPath {path} at (48,197.33) size 37.33x82.84 [fill={[type=SOLID] [color=#666666]}] [data="M70.00,110.00C73.33,112.67,76.67,112.67,80.00,110.00C70.00,60.00,58.33,35.00,45.00,35.00"]
RenderPath {circle} at (26.67,170.67) size 64x64 [fill={[type=SOLID] [color=#333333]}] [data="M85.00,40.00L84.94,41.88L84.76,43.76L84.47,45.62L84.06,47.46L83.53,49.27L82.89,51.04L82.14,52.77L81.29,54.45L80.33,56.07L79.27,57.63L78.12,59.12L76.87,60.54L75.54,61.87L74.12,63.12L72.63,64.27L71.07,65.33L69.45,66.29L67.77,67.14L66.04,67.89L64.27,68.53L62.46,69.06L60.62,69.47L58.76,69.76L56.88,69.94L55.00,70.00L53.12,69.94L51.24,69.76L49.38,69.47L47.54,69.06L45.73,68.53L43.96,67.89L42.23,67.14L40.55,66.29L38.93,65.33L37.37,64.27L35.88,63.12L34.46,61.87L33.13,60.54L31.88,59.12L30.73,57.63L29.67,56.07L28.71,54.45L27.86,52.77L27.11,51.04L26.47,49.27L25.94,47.46L25.53,45.62L25.24,43.76L25.06,41.88L25.00,40.00L25.06,38.12L25.24,36.24L25.53,34.38L25.94,32.54L26.47,30.73L27.11,28.96L27.86,27.23L28.71,25.55L29.67,23.93L30.73,22.37L31.88,20.88L33.13,19.46L34.46,18.13L35.88,16.88L37.37,15.73L38.93,14.67L40.55,13.71L42.23,12.86L43.96,12.11L45.73,11.47L47.54,10.94L49.38,10.53L51.24,10.24L53.12,10.06L55.00,10.00L56.88,10.06L58.76,10.24L60.62,10.53L62.46,10.94L64.27,11.47L66.04,12.11L67.77,12.86L69.45,13.71L71.07,14.67L72.63,15.73L74.12,16.88L75.54,18.13L76.87,19.46L78.12,20.88L79.27,22.37L80.33,23.93L81.29,25.55L82.14,27.23L82.89,28.96L83.53,30.73L84.06,32.54L84.47,34.38L84.76,36.24L84.94,38.12"]
RenderSVGContainer {use} at (75,85) size 160x160
RenderSVGContainer {g} at (75,85) size 160x160 [transform={m=((1.00,0.00)(0.00,1.00)) t=(80.00,90.00)}]
RenderSVGContainer {svg} at (74.67,94.67) size 170.67x170.67
RenderPath {path} at (84.80,130.71) size 70.40x98.58 [stroke={[type=SOLID] [color=#FFFFFF]}] [fill={[type=SOLID] [color=#FFFFFF]}] [data="M5.00,55.00L45.00,55.00L70.00,30.00L70.00,120.00L45.00,95.00L5.00,95.00"]
RenderSVGContainer {g} at (161.24,111.90) size 82.86x136.20
RenderPath {path} at (161.24,159.90) size 18.86x40.20 [stroke={[type=SOLID] [color=#FFFFFF] [stroke width=7.00] [line cap=ROUND]}] [data="M80.00,60.00C90.00,70.00,90.00,80.00,80.00,90.00"]
RenderPath {path} at (177.24,143.90) size 24.20x72.20 [stroke={[type=SOLID] [color=#FFFFFF] [stroke width=7.00] [line cap=ROUND]}] [data="M95.00,45.00C110.00,60.00,110.00,90.00,95.00,105.00"]
RenderPath {path} at (193.24,127.90) size 29.53x104.20 [stroke={[type=SOLID] [color=#FFFFFF] [stroke width=7.00] [line cap=ROUND]}] [data="M110.00,30.00C130.00,50.00,130.00,100.00,110.00,120.00"]
RenderPath {path} at (209.24,111.90) size 34.86x136.20 [stroke={[type=SOLID] [color=#FFFFFF] [stroke width=7.00] [line cap=ROUND]}] [data="M125.00,15.00C150.00,40.00,150.00,110.00,125.00,135.00"]
RenderPath {circle} at (74.67,94.67) size 170.67x170.67 [fill={[type=SOLID] [color=#FFFFFF] [opacity=0.04]}] [data="M155.00,75.00L154.84,80.02L154.37,85.03L153.58,89.99L152.49,94.90L151.08,99.72L149.38,104.45L147.39,109.06L145.10,113.54L142.55,117.87L139.72,122.02L136.64,125.99L133.32,129.76L129.76,133.32L125.99,136.64L122.02,139.72L117.87,142.55L113.54,145.10L109.06,147.39L104.45,149.38L99.72,151.08L94.90,152.49L89.99,153.58L85.03,154.37L80.02,154.84L75.00,155.00L69.98,154.84L64.97,154.37L60.01,153.58L55.10,152.49L50.28,151.08L45.55,149.38L40.94,147.39L36.46,145.10L32.13,142.55L27.98,139.72L24.01,136.64L20.24,133.32L16.68,129.76L13.36,125.99L10.28,122.02L7.45,117.87L4.90,113.54L2.61,109.06L0.62,104.45L-1.08,99.72L-2.49,94.90L-3.58,89.99L-4.37,85.03L-4.84,80.02L-5.00,75.00L-4.84,69.98L-4.37,64.97L-3.58,60.01L-2.49,55.10L-1.08,50.28L0.62,45.55L2.61,40.94L4.90,36.46L7.45,32.13L10.28,27.98L13.36,24.01L16.68,20.24L20.24,16.68L24.01,13.36L27.98,10.28L32.13,7.45L36.46,4.90L40.94,2.61L45.55,0.62L50.28,-1.08L55.10,-2.49L60.01,-3.58L64.97,-4.37L69.98,-4.84L75.00,-5.00L80.02,-4.84L85.03,-4.37L89.99,-3.58L94.90,-2.49L99.72,-1.08L104.45,0.62L109.06,2.61L113.54,4.90L117.87,7.45L122.02,10.28L125.99,13.36L129.76,16.68L133.32,20.24L136.64,24.01L139.72,27.98L142.55,32.13L145.10,36.46L147.39,40.94L149.38,45.55L151.08,50.28L152.49,55.10L153.58,60.01L154.37,64.97L154.84,69.98"]
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="600">
<defs>
<style type="text/css"><![CDATA[
.rt { visibility: hidden; fill: #fff; }
.st { visibility: hidden; fill: #fff; stroke: #fff; }
a:hover .rt { visibility: visible; }
a:hover .st { visibility: visible; }
a:focus .rt { visibility: visible; }
]]></style>
<symbol id="gamesBorder" viewBox="0 0 150 150">
<path d="M143 103 143 117 a27,10 0 1 1 -136 0 L 7 117 7 103 a27,10 0 0 1 136 0 L52 72 a33,33 0 1 1 5 0" />
</symbol>
<symbol id="games" viewBox="0 0 150 150">
<ellipse cx="75" cy="115" rx="65" ry="25" fill="#666" />
<line x1="12" y1="115" x2="12" y2="105" stroke="#666" stroke-width="6"/>
<line x1="138" y1="115" x2="138" y2="105" stroke="#666" stroke-width="6"/>
<ellipse cx="75" cy="105" rx="65" ry="25" fill="#999" />
<path d="M70 110 Q75 114 80 110 65 35 45 35 z" fill="#666" />
<circle cx="55" cy="40" r="30" fill="#333" />
</symbol>
<symbol id="sound" viewBox="0 0 150 150" >
<path d="M5 55 45 55 70 30 70 120 45 95 5 95 z" />
<g fill="none" stroke-width="7" stroke-linecap="round">
<path d="M80 60 C90 70 90 80 80 90" />
<path d="M95 45 C110 60 110 90 95 105" />
<path d="M110 30 C130 50 130 100 110 120" />
<path d="M125 15 C150 40 150 110 125 135" />
</g>
<circle cx="75" cy="75" r="80" fill-opacity="0.04" stroke="none"/>
</symbol>
</defs>
<rect x="0" y="0" width="100%" height="100%" fill="#cca" stroke="none" />
<a xlink:href="http://www.peepo.co.uk/launch/music.svg">
<use xlink:href="#gamesBorder" x="0" y="25%" width="20%" height="30%" class="rt"/>
<use xlink:href="#games" x="0" y="25%" width="20%" height="30%"/>
<use xlink:href="#sound" x="10%" y="15%" width="20%" height="30%" class="st"/>
</a>
<script type="text/ecmascript"><![CDATA[
eventSender.mouseMoveTo(50, 200);
eventSender.mouseDown();
]]></script>
</svg>
2007-03-17 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Sam Weinig.
Fixes: http://bugs.webkit.org/show_bug.cgi?id=13046 (CSS styles on hover and focus are broken for <use>)
Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> CSS styles broken)
Added test: svg/custom/use-css-events.svg
In general this fixes the peepo.co.uk website.
Forgot to pass the actual StyleChange to the recalcStyle() function,
when calling it on the shadow tree root element.
* ksvg2/svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::recalcStyle):
2007-03-17 Timothy Hatcher <timothy@apple.com>
Reviewed by Mark Rowe.
......
......@@ -197,7 +197,7 @@ void SVGUseElement::recalcStyle(StyleChange change)
}
// Only change==Detach needs special treatment, for anything else recalcStyle() works.
m_shadowTreeRootElement->recalcStyle();
m_shadowTreeRootElement->recalcStyle(change);
}
#ifdef DUMP_INSTANCE_TREE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment