Title: [152293] trunk/Source/WebCore
Revision
152293
Author
[email protected]
Date
2013-07-02 08:00:31 -0700 (Tue, 02 Jul 2013)

Log Message

[CSSRegions] No other SVG elements except the SVGRoot must have RegionInfo objects attached
https://bugs.webkit.org/show_bug.cgi?id=118295

Patch by Radu Stavila <[email protected]> on 2013-07-02
Reviewed by Antti Koivisto.

Only the SVGRoot element can be collected in a named flow. As such, no SVG element below the root should
be attached to a RenderBoxRegionInfo object.

A larger patch's test (https://bugs.webkit.org/show_bug.cgi?id=118300) is failing because of this.
This change will be covered by that test.

* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152292 => 152293)


--- trunk/Source/WebCore/ChangeLog	2013-07-02 14:32:45 UTC (rev 152292)
+++ trunk/Source/WebCore/ChangeLog	2013-07-02 15:00:31 UTC (rev 152293)
@@ -1,3 +1,22 @@
+2013-07-02  Radu Stavila  <[email protected]>
+
+        [CSSRegions] No other SVG elements except the SVGRoot must have RegionInfo objects attached
+        https://bugs.webkit.org/show_bug.cgi?id=118295
+
+        Reviewed by Antti Koivisto.
+
+        Only the SVGRoot element can be collected in a named flow. As such, no SVG element below the root should
+        be attached to a RenderBoxRegionInfo object.
+
+        A larger patch's test (https://bugs.webkit.org/show_bug.cgi?id=118300) is failing because of this.
+        This change will be covered by that test.
+
+        * rendering/RenderBoxModelObject.h:
+        (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isRenderSVGBlock):
+        * rendering/svg/RenderSVGBlock.h:
+
 2013-07-02  Kangil Han  <[email protected]>
 
         is/toHTMLStyleElement should use Element* for its argument

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (152292 => 152293)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h	2013-07-02 14:32:45 UTC (rev 152292)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h	2013-07-02 15:00:31 UTC (rev 152293)
@@ -174,8 +174,9 @@
 
     virtual void setSelectionState(SelectionState s);
 
-    bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !hasColumns() && !isTableCell() && isBlockFlow(); }
+    bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !hasColumns() && !isTableCell() && isBlockFlow() && !isRenderSVGBlock(); }
 
+
     void getGeometryForBackgroundImage(const RenderLayerModelObject* paintContainer, IntRect& destRect, IntPoint& phase, IntSize& tileSize) const;
 #if USE(ACCELERATED_COMPOSITING)
     void contentChanged(ContentChangeType);

Modified: trunk/Source/WebCore/rendering/RenderObject.h (152292 => 152293)


--- trunk/Source/WebCore/rendering/RenderObject.h	2013-07-02 14:32:45 UTC (rev 152292)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2013-07-02 15:00:31 UTC (rev 152293)
@@ -353,6 +353,7 @@
     virtual bool isProgress() const { return false; }
 #endif
     virtual bool isRenderBlock() const { return false; }
+    virtual bool isRenderSVGBlock() const { return false; };
     virtual bool isRenderButton() const { return false; }
     virtual bool isRenderIFrame() const { return false; }
     virtual bool isRenderImage() const { return false; }

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h (152292 => 152293)


--- trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h	2013-07-02 14:32:45 UTC (rev 152292)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h	2013-07-02 15:00:31 UTC (rev 152293)
@@ -41,6 +41,8 @@
     virtual void setStyle(PassRefPtr<RenderStyle>);
     virtual void updateFromStyle() OVERRIDE;
 
+    virtual bool isRenderSVGBlock() const OVERRIDE { return true; };
+
     virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
 
     virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to