[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 11:54:15 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cf1e68c3f89c16497d8f55b86b1800c218bcac0a
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 11 02:34:31 2010 +0000

    2010-08-10  Patrick Gansterer  <paroga at paroga.com>
    
            Reviewed by Nikolas Zimmermann.
    
            Add a toRenderSVGImage function
            https://bugs.webkit.org/show_bug.cgi?id=43789
    
            Add a function for casting to RenderSVGImage and use it.
    
            * rendering/RenderSVGImage.h:
            (WebCore::toRenderSVGImage):
            * rendering/RenderTreeAsText.cpp:
            (WebCore::write):
            * rendering/SVGRenderTreeAsText.cpp:
            (WebCore::writeSVGImage):
            * rendering/SVGRenderTreeAsText.h:
            * svg/SVGImageElement.cpp:
            (WebCore::SVGImageElement::attach):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65116 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e26bb8e..489e475 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-08-10  Patrick Gansterer  <paroga at paroga.com>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add a toRenderSVGImage function
+        https://bugs.webkit.org/show_bug.cgi?id=43789
+
+        Add a function for casting to RenderSVGImage and use it.
+
+        * rendering/RenderSVGImage.h:
+        (WebCore::toRenderSVGImage):
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::write):
+        * rendering/SVGRenderTreeAsText.cpp:
+        (WebCore::writeSVGImage):
+        * rendering/SVGRenderTreeAsText.h:
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::attach):
+
 2010-08-10  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/rendering/RenderSVGImage.h b/WebCore/rendering/RenderSVGImage.h
index 6ee0179..38e3a13 100644
--- a/WebCore/rendering/RenderSVGImage.h
+++ b/WebCore/rendering/RenderSVGImage.h
@@ -81,6 +81,21 @@ private:
     mutable FloatRect m_cachedLocalRepaintRect;
 };
 
+inline RenderSVGImage* toRenderSVGImage(RenderObject* object)
+{
+    ASSERT(!object || object->isSVGImage());
+    return static_cast<RenderSVGImage*>(object);
+}
+
+inline const RenderSVGImage* toRenderSVGImage(const RenderObject* object)
+{
+    ASSERT(!object || object->isSVGImage());
+    return static_cast<const RenderSVGImage*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderSVGImage(const RenderSVGImage*);
+
 } // namespace WebCore
 
 #endif // ENABLE(SVG)
diff --git a/WebCore/rendering/RenderTreeAsText.cpp b/WebCore/rendering/RenderTreeAsText.cpp
index 408015c..e10c2f1 100644
--- a/WebCore/rendering/RenderTreeAsText.cpp
+++ b/WebCore/rendering/RenderTreeAsText.cpp
@@ -442,7 +442,7 @@ void write(TextStream& ts, const RenderObject& o, int indent, RenderAsTextBehavi
         return;
     }
     if (o.isSVGImage()) {
-        writeSVGImage(ts, *toRenderImage(&o), indent);
+        writeSVGImage(ts, *toRenderSVGImage(&o), indent);
         return;
     }
 #endif
diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp
index db4c07a..0c9b7e1 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.cpp
+++ b/WebCore/rendering/SVGRenderTreeAsText.cpp
@@ -43,6 +43,7 @@
 #include "RenderPath.h"
 #include "RenderSVGContainer.h"
 #include "RenderSVGGradientStop.h"
+#include "RenderSVGImage.h"
 #include "RenderSVGInlineText.h"
 #include "RenderSVGResourceClipper.h"
 #include "RenderSVGResourceFilter.h"
@@ -708,7 +709,7 @@ void writeSVGInlineText(TextStream& ts, const RenderText& text, int indent)
     writeSVGInlineTextBoxes(ts, text, indent);
 }
 
-void writeSVGImage(TextStream& ts, const RenderImage& image, int indent)
+void writeSVGImage(TextStream& ts, const RenderSVGImage& image, int indent)
 {
     writeStandardPrefix(ts, image, indent);
     writePositionAndStyle(ts, image);
diff --git a/WebCore/rendering/SVGRenderTreeAsText.h b/WebCore/rendering/SVGRenderTreeAsText.h
index 0fda958..d4aeaac 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.h
+++ b/WebCore/rendering/SVGRenderTreeAsText.h
@@ -44,6 +44,7 @@ namespace WebCore {
     class RenderObject;
     class RenderPath;
     class RenderSVGGradientStop;
+    class RenderSVGImage;
     class RenderSVGRoot;
     class RenderText;
     class AffineTransform;
@@ -55,7 +56,7 @@ void write(TextStream&, const RenderSVGRoot&, int indent);
 void writeSVGGradientStop(TextStream&, const RenderSVGGradientStop&, int indent);
 void writeSVGResourceContainer(TextStream&, const RenderObject&, int indent);
 void writeSVGContainer(TextStream&, const RenderObject&, int indent);
-void writeSVGImage(TextStream&, const RenderImage&, int indent);
+void writeSVGImage(TextStream&, const RenderSVGImage&, int indent);
 void writeSVGInlineText(TextStream&, const RenderText&, int indent);
 void writeSVGText(TextStream&, const RenderBlock&, int indent);
 void writeResources(TextStream&, const RenderObject&, int indent);
diff --git a/WebCore/svg/SVGImageElement.cpp b/WebCore/svg/SVGImageElement.cpp
index df867f3..c5e4802 100644
--- a/WebCore/svg/SVGImageElement.cpp
+++ b/WebCore/svg/SVGImageElement.cpp
@@ -171,7 +171,7 @@ void SVGImageElement::attach()
 {
     SVGStyledTransformableElement::attach();
 
-    if (RenderImage* imageObj = toRenderImage(renderer())) {
+    if (RenderSVGImage* imageObj = toRenderSVGImage(renderer())) {
         if (imageObj->hasImage())
             return;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list