[Webkit-unassigned] [Bug 138481] Repaint of HTML div inside scaled SVG is wrong

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 6 16:32:21 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=138481

--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
This fixes it:
diff --git a/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp b/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
index d423695704e73f6340b789941d9fcd657a05a720..13a08c35a3af6ff04b734924c972ea6d488b0285 100644
--- a/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
+++ b/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
@@ -102,6 +102,14 @@ void RenderSVGForeignObject::computeFloatRectForRepaint(const RenderLayerModelOb
     SVGRenderSupport::computeFloatRectForRepaint(*this, repaintContainer, repaintRect, fixed);
 }

+// Map from HTML-style (computeRectForRepaint) to SVG-style (computeFloatRectForRepaint).
+void RenderSVGForeignObject::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& repaintRect, bool fixed) const
+{
+    FloatRect floatRect(repaintRect);
+    computeFloatRectForRepaint(repaintContainer, floatRect, fixed);
+    repaintRect = enclosingLayoutRect(floatRect);
+}
+
 const AffineTransform& RenderSVGForeignObject::localToParentTransform() const
 {
     m_localToParentTransform = localTransform();
diff --git a/Source/WebCore/rendering/svg/RenderSVGForeignObject.h b/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
index c75bbff14da489428cb97f8d407dae4c006c47d3..86a534d976b70b67345a8f55f0df32b8a1ace9b1 100644
--- a/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
+++ b/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
@@ -41,6 +41,7 @@ public:

     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
     virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override;
+    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override;

     virtual bool requiresLayer() const override { return false; }
     virtual void layout() override;

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141107/e3a2ca63/attachment-0002.html>


More information about the webkit-unassigned mailing list