diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index fbdf147c6771..3a351e6bf4ac 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -182,6 +182,10 @@ LayoutObject* LayoutObject::createObject(Element* element,
       return nullptr;
     case EDisplay::Inline:
       return new LayoutInline(element);
+    case EDisplay::Contents:
+      if (!isSVGElement(element))
+        return nullptr;
+      // falthrough
     case EDisplay::Block:
     case EDisplay::FlowRoot:
     case EDisplay::InlineBlock:
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
index c8d0d2b705f2..02cfd07cf17a 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
@@ -1036,6 +1036,12 @@ MutableStylePropertySet* SVGElement::ensureAnimatedSMILStyleProperties() {
   return ensureSVGRareData()->ensureAnimatedSMILStyleProperties();
 }
 
+bool SVGElement::layoutObjectIsNeeded(const ComputedStyle& style) {
+  if (style.display() == EDisplay::Contents)
+    return true;
+  return Element::layoutObjectIsNeeded(style);
+}
+
 void SVGElement::setUseOverrideComputedStyle(bool value) {
   if (hasSVGRareData())
     svgRareData()->setUseOverrideComputedStyle(value);
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.h b/third_party/WebKit/Source/core/svg/SVGElement.h
index bf453f915606..e0618714f5e4 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.h
+++ b/third_party/WebKit/Source/core/svg/SVGElement.h
@@ -157,6 +157,8 @@ class CORE_EXPORT SVGElement : public Element {
   MutableStylePropertySet* ensureAnimatedSMILStyleProperties();
   void setUseOverrideComputedStyle(bool);
 
+  bool layoutObjectIsNeeded(const ComputedStyle&) override;
+
   virtual bool haveLoadedRequiredResources();
 
   void invalidateRelativeLengthClients(SubtreeLayoutScope* = 0);
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index 4efa77cdc91b..7b4c27069411 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -510,7 +510,7 @@ bool SVGSVGElement::layoutObjectIsNeeded(const ComputedStyle& style) {
   // https://bugs.webkit.org/show_bug.cgi?id=103493
   if (document().documentElement() == this)
     return true;
-  return Element::layoutObjectIsNeeded(style);
+  return SVGElement::layoutObjectIsNeeded(style);
 }
 
 LayoutObject* SVGSVGElement::createLayoutObject(const ComputedStyle&) {
diff --git a/third_party/WebKit/Source/core/svg/SVGTSpanElement.cpp b/third_party/WebKit/Source/core/svg/SVGTSpanElement.cpp
index b85387284071..2957ba5acbd9 100644
--- a/third_party/WebKit/Source/core/svg/SVGTSpanElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGTSpanElement.cpp
@@ -38,7 +38,7 @@ bool SVGTSpanElement::layoutObjectIsNeeded(const ComputedStyle& style) {
   if (parentNode() &&
       (isSVGAElement(*parentNode()) || isSVGTextElement(*parentNode()) ||
        isSVGTextPathElement(*parentNode()) || isSVGTSpanElement(*parentNode())))
-    return Element::layoutObjectIsNeeded(style);
+    return SVGElement::layoutObjectIsNeeded(style);
 
   return false;
 }
diff --git a/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp b/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp
index c96236ea9504..f4fa07b5e4ff 100644
--- a/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp
@@ -112,7 +112,7 @@ LayoutObject* SVGTextPathElement::createLayoutObject(const ComputedStyle&) {
 bool SVGTextPathElement::layoutObjectIsNeeded(const ComputedStyle& style) {
   if (parentNode() &&
       (isSVGAElement(*parentNode()) || isSVGTextElement(*parentNode())))
-    return Element::layoutObjectIsNeeded(style);
+    return SVGElement::layoutObjectIsNeeded(style);
 
   return false;
 }
