Commit 2d2bdd50 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2011-01-18 Leo Yang <leo.yang@torchmobile.com.cn>

        Reviewed by Nikolas Zimmermann.

        Unable to indirectly animate visibility of SVGUseElement
        https://bugs.webkit.org/show_bug.cgi?id=50240

        Test case to verify if SVGUseElement inherits parent's
        style change.

        * svg/custom/use-inherit-style-expected.txt: Added.
        * svg/custom/use-inherit-style.svg: Added.
2011-01-18  Leo Yang  <leo.yang@torchmobile.com.cn>

        Reviewed by Nikolas Zimmermann.

        Unable to indirectly animate visibility of SVGUseElement
        https://bugs.webkit.org/show_bug.cgi?id=50240

        SVGUseElement::recalcStyle should take care of its shadow
        tree's style recalculation when it is called with change >= Inherit
        or when childNeedsStyleRecalc() is true because in these two
        cases needStyleRecalc() may not be true.

        Test: svg/custom/use-inherit-style.svg

        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::recalcStyle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 95363d75
2011-01-18 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Nikolas Zimmermann.
Unable to indirectly animate visibility of SVGUseElement
https://bugs.webkit.org/show_bug.cgi?id=50240
Test case to verify if SVGUseElement inherits parent's
style change.
* svg/custom/use-inherit-style-expected.txt: Added.
* svg/custom/use-inherit-style.svg: Added.
2011-01-18 Pavel Podivilov <podivilov@chromium.org>
 
Unreviewed, remove wrong chromium expectation for console-xhr-logging test.
......
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderSVGRoot {svg} at (0,0) size 100x60
RenderSVGContainer {g} at (0,0) size 100x60
RenderSVGContainer {use} at (0,0) size 100x60
RenderSVGContainer {g} at (0,0) size 100x60
RenderSVGPath {rect} at (0,0) size 100x60 [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=60.00]
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGPath {rect} at (0,0) size 100x60 [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=100.00] [height=60.00]
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="g">
<use xlink:href="#rect" />
</g>
<defs>
<rect id="rect" x="0" y="0" width="100" height="60" />
</defs>
<script>
if (window.layoutTestController)
layoutTestController.waitUntilDone();
function runTest()
{
document.getElementById("g").setAttribute("fill", "#00FF00");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
window.setTimeout("runTest()", 0);
</script>
</svg>
2011-01-18 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Nikolas Zimmermann.
Unable to indirectly animate visibility of SVGUseElement
https://bugs.webkit.org/show_bug.cgi?id=50240
SVGUseElement::recalcStyle should take care of its shadow
tree's style recalculation when it is called with change >= Inherit
or when childNeedsStyleRecalc() is true because in these two
cases needStyleRecalc() may not be true.
Test: svg/custom/use-inherit-style.svg
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::recalcStyle):
2011-01-18 Pavel Podivilov <podivilov@chromium.org>
 
Reviewed by Yury Semikhatsky.
......@@ -330,7 +330,7 @@ void SVGUseElement::updateContainerOffsets()
void SVGUseElement::recalcStyle(StyleChange change)
{
// Eventually mark shadow root element needing style recalc
if (needsStyleRecalc() && m_targetElementInstance && !m_updatesBlocked) {
if ((change >= Inherit || needsStyleRecalc() || childNeedsStyleRecalc()) && m_targetElementInstance && !m_updatesBlocked) {
if (SVGElement* shadowRoot = m_targetElementInstance->shadowTreeElement())
shadowRoot->setNeedsStyleRecalc();
}
......
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