Fix build with MathML disabled
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 17:59:36 +0000 (17:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 17:59:36 +0000 (17:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177744

Patch by Olivier Blin <olivier.blin@softathome.com> on 2017-10-02
Reviewed by Michael Catanzaro.

These are regressions from r217549 (StyleResolver) and r221379 (RenderBlockFlow), which do not guard MathML usage.

* css/StyleResolver.cpp:
(WebCore::hasEffectiveDisplayNoneForDisplayContents):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willCreateColumns const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222721 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/RenderBlockFlow.cpp

index 0835303..9d9568c 100644 (file)
@@ -1,3 +1,17 @@
+2017-10-02  Olivier Blin  <olivier.blin@softathome.com>
+
+        Fix build with MathML disabled
+        https://bugs.webkit.org/show_bug.cgi?id=177744
+
+        Reviewed by Michael Catanzaro.
+
+        These are regressions from r217549 (StyleResolver) and r221379 (RenderBlockFlow), which do not guard MathML usage.
+
+        * css/StyleResolver.cpp:
+        (WebCore::hasEffectiveDisplayNoneForDisplayContents):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::willCreateColumns const):
+
 2017-10-02  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Use ThreadIdentifier instead of thread::this_thread::get_id
index 1963622..5990020 100644 (file)
@@ -779,9 +779,11 @@ static bool hasEffectiveDisplayNoneForDisplayContents(const Element& element)
     // FIXME: <g>, <use> and <tspan> have special (?) behavior for display:contents in the current draft spec.
     if (is<SVGElement>(element))
         return true;
+#if ENABLE(MATHML)
     // Not sure MathML code can handle it.
     if (is<MathMLElement>(element))
         return true;
+#endif // ENABLE(MATHML)
     if (!is<HTMLElement>(element))
         return false;
     return tagNames.get().contains(element.localName());
index de14ef6..2e26a8f 100644 (file)
@@ -430,8 +430,12 @@ bool RenderBlockFlow::willCreateColumns(std::optional<unsigned> desiredColumnCou
     // The following types are not supposed to create multicol context.
     if (isFileUploadControl() || isTextControl() || isListBox())
         return false;
-    if (isRenderSVGBlock() || isRenderMathMLBlock() || isRubyRun())
+    if (isRenderSVGBlock() || isRubyRun())
         return false;
+#if ENABLE(MATHML)
+    if (isRenderMathMLBlock())
+        return false;
+#endif // ENABLE(MATHML)
 
     if (!firstChild())
         return false;