Skip to content
  • gyuyoung.kim@samsung.com's avatar
    Do refactor in collectGradientAttributes() and renderStyleForLengthResolve() · 9fbfea1a
    gyuyoung.kim@samsung.com authored
    https://bugs.webkit.org/show_bug.cgi?id=126869
    
    Reviewed by Dirk Schulze.
    
    Some SVG functions have done a first iteration by using a boolean flag. This is
    one of poor implementations. This patch fix it by extracting a logic into a new method.
    Additionally it would be good to use do-while() loop instead of using while() in
    renderStyleForLengthResolving() because a first condition is always true.
    
    Merge r165358 from blink.
    
    * svg/SVGLengthContext.cpp:
    (WebCore::renderStyleForLengthResolving):
    * svg/SVGLinearGradientElement.cpp:
    (WebCore::setGradientAttributes):
    (WebCore::SVGLinearGradientElement::collectGradientAttributes):
    * svg/SVGRadialGradientElement.cpp:
    (WebCore::setGradientAttributes):
    (WebCore::SVGRadialGradientElement::collectGradientAttributes):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    9fbfea1a