[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/ksvg2/impl
From:       Nikolas Zimmermann <wildfox () kde ! org>
Date:       2005-02-05 11:19:00
Message-ID: 20050205111900.8D3341BC31 () office ! kde ! org
[Download RAW message or body]

CVS commit by wildfox: 

If svg's width/height attributes are not set, specify a value of 100%
-> now we still need to fix SVGLengthImpl to support "percentage of viewport"
   (then butterfly.svg & the svg 1.1 testsuite will actually show up again)


  M +14 -2     SVGSVGElementImpl.cc   1.34


--- kdenonbeta/ksvg2/impl/SVGSVGElementImpl.cc  #1.33:1.34
@@ -88,10 +88,22 @@ SVGAnimatedLengthImpl *SVGSVGElementImpl
 SVGAnimatedLengthImpl *SVGSVGElementImpl::width() const
 {
-        return lazy_create<SVGAnimatedLengthImpl>(m_width);
+        if(!m_width)
+        {
+                lazy_create<SVGAnimatedLengthImpl>(m_width);
+                m_width->baseVal()->setValueAsString("100%");
+        }
+
+        return m_width;
 }
 
 SVGAnimatedLengthImpl *SVGSVGElementImpl::height() const
 {
-        return lazy_create<SVGAnimatedLengthImpl>(m_height);
+        if(!m_height)
+        {
+                lazy_create<SVGAnimatedLengthImpl>(m_height);
+                m_height->baseVal()->setValueAsString("100%");
+        }
+
+        return m_height;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic