Diff
Modified: branches/safari-603-branch/LayoutTests/ChangeLog (210338 => 210339)
--- branches/safari-603-branch/LayoutTests/ChangeLog 2017-01-05 17:08:50 UTC (rev 210338)
+++ branches/safari-603-branch/LayoutTests/ChangeLog 2017-01-05 17:08:54 UTC (rev 210339)
@@ -1,5 +1,20 @@
2017-01-05 Matthew Hanson <[email protected]>
+ Merge r210035. rdar://problem/29704862
+
+ 2016-12-20 Zalan Bujtas <[email protected]>
+
+ SVG elements should inherit the root's flow thread state.
+ https://bugs.webkit.org/show_bug.cgi?id=166173
+ rdar://problem/29704862
+
+ Reviewed by Simon Fraser.
+
+ * fast/multicol/svg-inside-multicolumn-expected.txt: Added.
+ * fast/multicol/svg-inside-multicolumn.html: Added.
+
+2017-01-05 Matthew Hanson <[email protected]>
+
Merge r210033. rdar://problem/29755339
2016-12-20 Joseph Pecoraro <[email protected]>
Added: branches/safari-603-branch/LayoutTests/fast/multicol/svg-inside-multicolumn-expected.txt (0 => 210339)
--- branches/safari-603-branch/LayoutTests/fast/multicol/svg-inside-multicolumn-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/multicol/svg-inside-multicolumn-expected.txt 2017-01-05 17:08:54 UTC (rev 210339)
@@ -0,0 +1,2 @@
+Pass if no crash or assert.
+
Added: branches/safari-603-branch/LayoutTests/fast/multicol/svg-inside-multicolumn.html (0 => 210339)
--- branches/safari-603-branch/LayoutTests/fast/multicol/svg-inside-multicolumn.html (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/multicol/svg-inside-multicolumn.html 2017-01-05 17:08:54 UTC (rev 210339)
@@ -0,0 +1,50 @@
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!--======================================================================-->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="svgroot" width="100%" height="100%" viewBox="0 0 480 360">
+ <text fill="black">Pass if no crash or assert.</text>
+<style>
+svg {
+ position: absolute;
+}
+
+body {
+ animation-name: name0;
+ animation-duration: 100s;
+}
+
+@-webkit-keyframes name0 {
+ from {
+ column-width: auto;
+ }
+ to {
+ column-width: 1;
+ }
+}
+
+body:last-child {
+ animation-name: foobar;
+}
+</style>
+
+<script type="text/_javascript_">
+// <![CDATA[
+if (window.testRunner)
+ testRunner.dumpAsText();
+document.getElementById("svgroot").offsetHeight;
+document.getElementById("svgroot").insertBefore(document.createElementNS("http://www.w3.org/2000/svg", "text"), null);
+// ]]>
+</script>
+</svg>
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (210338 => 210339)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-01-05 17:08:50 UTC (rev 210338)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-01-05 17:08:54 UTC (rev 210339)
@@ -1,3 +1,26 @@
+2017-01-05 Matthew Hanson <[email protected]>
+
+ Merge r210035. rdar://problem/29704862
+
+ 2016-12-20 Zalan Bujtas <[email protected]>
+
+ SVG elements should inherit the root's flow thread state.
+ https://bugs.webkit.org/show_bug.cgi?id=166173
+ rdar://problem/29704862
+
+ Reviewed by Simon Fraser.
+
+ When the <svg> is not part of the multicolumn context (out of flow positioning), its descendants should not be in the flow either.
+
+ Test: fast/multicol/svg-inside-multicolumn.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::computedFlowThreadState):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isProgress):
+ (WebCore::RenderObject::isRenderSVGBlock):
+ * rendering/svg/RenderSVGBlock.h:
+
2017-01-04 Matthew Hanson <[email protected]>
Merge r209990. rdar://problem/29705967
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderObject.cpp (210338 => 210339)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderObject.cpp 2017-01-05 17:08:50 UTC (rev 210338)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderObject.cpp 2017-01-05 17:08:54 UTC (rev 210339)
@@ -57,7 +57,11 @@
#include "RenderNamedFlowFragment.h"
#include "RenderNamedFlowThread.h"
#include "RenderRuby.h"
+#include "RenderSVGBlock.h"
+#include "RenderSVGInline.h"
+#include "RenderSVGModelObject.h"
#include "RenderSVGResourceContainer.h"
+#include "RenderSVGRoot.h"
#include "RenderScrollbarPart.h"
#include "RenderTableRow.h"
#include "RenderTheme.h"
@@ -185,7 +189,11 @@
auto inheritedFlowState = RenderObject::NotInsideFlowThread;
if (is<RenderText>(renderer))
inheritedFlowState = renderer.parent()->flowThreadState();
- else if (auto* containingBlock = renderer.containingBlock())
+ else if (is<RenderSVGBlock>(renderer) || is<RenderSVGInline>(renderer) || is<RenderSVGModelObject>(renderer)) {
+ // containingBlock() skips svg boundary (SVG root is a RenderReplaced).
+ if (auto* svgRoot = SVGRenderSupport::findTreeRootObject(downcast<RenderElement>(renderer)))
+ inheritedFlowState = svgRoot->flowThreadState();
+ } else if (auto* containingBlock = renderer.containingBlock())
inheritedFlowState = containingBlock->flowThreadState();
else {
// Splitting lines or doing continuation, so just keep the current state.
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderObject.h (210338 => 210339)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderObject.h 2017-01-05 17:08:50 UTC (rev 210338)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderObject.h 2017-01-05 17:08:54 UTC (rev 210339)
@@ -243,7 +243,6 @@
#endif
virtual bool isSnapshottedPlugIn() const { return false; }
virtual bool isProgress() 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; }
@@ -351,6 +350,7 @@
// FIXME: Until all SVG renders can be subclasses of RenderSVGModelObject we have
// to add SVG renderer methods to RenderObject with an ASSERT_NOT_REACHED() default implementation.
virtual bool isRenderSVGModelObject() const { return false; }
+ virtual bool isRenderSVGBlock() const { return false; };
virtual bool isSVGRoot() const { return false; }
virtual bool isSVGContainer() const { return false; }
virtual bool isSVGTransformableContainer() const { return false; }
Modified: branches/safari-603-branch/Source/WebCore/rendering/svg/RenderSVGBlock.h (210338 => 210339)
--- branches/safari-603-branch/Source/WebCore/rendering/svg/RenderSVGBlock.h 2017-01-05 17:08:50 UTC (rev 210338)
+++ branches/safari-603-branch/Source/WebCore/rendering/svg/RenderSVGBlock.h 2017-01-05 17:08:54 UTC (rev 210339)
@@ -50,3 +50,5 @@
};
} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGBlock, isRenderSVGBlock())