Title: [226654] trunk/Source/WebCore
Revision
226654
Author
[email protected]
Date
2018-01-09 12:15:19 -0800 (Tue, 09 Jan 2018)

Log Message

[RenderTreeBuilder] Move MathML addChild logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=181443
<rdar://problem/36380228>

Reviewed by Antti Koivisto.

This is about moving code, no cleanup and/or normalization (unfortunately it also means
some temporary changes).

No change in functionality.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::addChild):
(WebCore::RenderMathMLFenced::createMathMLOperator): Deleted.
(WebCore::RenderMathMLFenced::makeFences): Deleted.
* rendering/mathml/RenderMathMLFenced.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::RenderTreeBuilder):
(WebCore::RenderTreeBuilder::insertChildToRenderMathMLFenced):
* rendering/updating/RenderTreeBuilder.h:
(WebCore::RenderTreeBuilder::mathMLBuilder):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (226653 => 226654)


--- trunk/Source/WebCore/ChangeLog	2018-01-09 19:27:34 UTC (rev 226653)
+++ trunk/Source/WebCore/ChangeLog	2018-01-09 20:15:19 UTC (rev 226654)
@@ -1,3 +1,29 @@
+2018-01-09  Zalan Bujtas  <[email protected]>
+
+        [RenderTreeBuilder] Move MathML addChild logic to RenderTreeBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=181443
+        <rdar://problem/36380228>
+
+        Reviewed by Antti Koivisto.
+
+        This is about moving code, no cleanup and/or normalization (unfortunately it also means
+        some temporary changes).  
+
+        No change in functionality.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/mathml/RenderMathMLFenced.cpp:
+        (WebCore::RenderMathMLFenced::addChild):
+        (WebCore::RenderMathMLFenced::createMathMLOperator): Deleted.
+        (WebCore::RenderMathMLFenced::makeFences): Deleted.
+        * rendering/mathml/RenderMathMLFenced.h:
+        * rendering/updating/RenderTreeBuilder.cpp:
+        (WebCore::RenderTreeBuilder::RenderTreeBuilder):
+        (WebCore::RenderTreeBuilder::insertChildToRenderMathMLFenced):
+        * rendering/updating/RenderTreeBuilder.h:
+        (WebCore::RenderTreeBuilder::mathMLBuilder):
+
 2018-01-09  Antti Koivisto  <[email protected]>
 
         Blank page except for inner iframes because pending stylesheets cause style.isNotFinal() to be true

Modified: trunk/Source/WebCore/Sources.txt (226653 => 226654)


--- trunk/Source/WebCore/Sources.txt	2018-01-09 19:27:34 UTC (rev 226653)
+++ trunk/Source/WebCore/Sources.txt	2018-01-09 20:15:19 UTC (rev 226654)
@@ -1989,6 +1989,7 @@
 rendering/updating/RenderTreeBuilderFormControls.cpp
 rendering/updating/RenderTreeBuilderInline.cpp
 rendering/updating/RenderTreeBuilderList.cpp
+rendering/updating/RenderTreeBuilderMathML.cpp
 rendering/updating/RenderTreeBuilderMultiColumn.cpp
 rendering/updating/RenderTreeBuilderRuby.cpp
 rendering/updating/RenderTreeBuilderSVG.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (226653 => 226654)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-01-09 19:27:34 UTC (rev 226653)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-01-09 20:15:19 UTC (rev 226654)
@@ -5597,6 +5597,8 @@
 		11C5F11F2003F69F0001AE60 /* RenderTreeBuilderBlockFlow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeBuilderBlockFlow.cpp; sourceTree = "<group>"; };
 		11C5F12A2004231D0001AE60 /* RenderTreeBuilderSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTreeBuilderSVG.h; sourceTree = "<group>"; };
 		11C5F12C2004231E0001AE60 /* RenderTreeBuilderSVG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeBuilderSVG.cpp; sourceTree = "<group>"; };
+		11C5F132200527F80001AE60 /* RenderTreeBuilderMathML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeBuilderMathML.cpp; sourceTree = "<group>"; };
+		11C5F134200527F90001AE60 /* RenderTreeBuilderMathML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTreeBuilderMathML.h; sourceTree = "<group>"; };
 		11E067EB1E62461300162D16 /* SimpleLineLayoutCoverage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleLineLayoutCoverage.cpp; sourceTree = "<group>"; };
 		11E067ED1E6246E500162D16 /* SimpleLineLayoutCoverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutCoverage.h; sourceTree = "<group>"; };
 		1400D7A717136EA70077CE05 /* ScriptWrappableInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptWrappableInlines.h; sourceTree = "<group>"; };
@@ -24645,6 +24647,8 @@
 				11C5F1182003E7760001AE60 /* RenderTreeBuilderInline.h */,
 				E47C392B1FE6E0DF00BBBC6B /* RenderTreeBuilderList.cpp */,
 				E47C39281FE6E0DD00BBBC6B /* RenderTreeBuilderList.h */,
+				11C5F132200527F80001AE60 /* RenderTreeBuilderMathML.cpp */,
+				11C5F134200527F90001AE60 /* RenderTreeBuilderMathML.h */,
 				E47C39231FE6E0DA00BBBC6B /* RenderTreeBuilderMultiColumn.cpp */,
 				E47C39271FE6E0DC00BBBC6B /* RenderTreeBuilderMultiColumn.h */,
 				119340871FEB355D00935F1E /* RenderTreeBuilderRuby.cpp */,

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp (226653 => 226654)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp	2018-01-09 19:27:34 UTC (rev 226653)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp	2018-01-09 20:15:19 UTC (rev 226654)
@@ -34,6 +34,7 @@
 #include "RenderInline.h"
 #include "RenderMathMLFencedOperator.h"
 #include "RenderText.h"
+#include "RenderTreeBuilder.h"
 #include <wtf/IsoMallocInlines.h>
 #include <wtf/text/StringBuilder.h>
 
@@ -84,72 +85,12 @@
     }
 }
 
-RenderPtr<RenderMathMLFencedOperator> RenderMathMLFenced::createMathMLOperator(const String& operatorString, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
-{
-    RenderPtr<RenderMathMLFencedOperator> newOperator = createRenderer<RenderMathMLFencedOperator>(document(), RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK), operatorString, form, flag);
-    newOperator->initializeStyle();
-    return newOperator;
-}
-
-void RenderMathMLFenced::makeFences(RenderTreeBuilder& builder)
-{
-    auto openFence = createMathMLOperator(m_open, MathMLOperatorDictionary::Prefix, MathMLOperatorDictionary::Fence);
-    RenderMathMLRow::addChild(builder, WTFMove(openFence), firstChild());
-
-    auto closeFence = createMathMLOperator(m_close, MathMLOperatorDictionary::Postfix, MathMLOperatorDictionary::Fence);
-    m_closeFenceRenderer = makeWeakPtr(*closeFence);
-    RenderMathMLRow::addChild(builder, WTFMove(closeFence));
-}
-
 void RenderMathMLFenced::addChild(RenderTreeBuilder& builder, RenderPtr<RenderObject> child, RenderObject* beforeChild)
 {
     // make the fences if the render object is empty
-    if (!firstChild()) {
+    if (!firstChild())
         updateFromElement();
-        makeFences(builder);
-    }
-
-    // FIXME: Adding or removing a child should possibly cause all later separators to shift places if they're different, as later child positions change by +1 or -1. This should also handle surrogate pairs. See https://bugs.webkit.org/show_bug.cgi?id=125938.
-
-    RenderPtr<RenderMathMLFencedOperator> separatorRenderer;
-    if (m_separators.get()) {
-        unsigned int count = 0;
-        for (Node* position = child->node(); position; position = position->previousSibling()) {
-            if (position->isElementNode())
-                count++;
-        }
-        if (!beforeChild) {
-            // We're adding at the end (before the closing fence), so a new separator would go before the new child, not after it.
-            --count;
-        }
-        // |count| is now the number of element children that will be before our new separator, i.e. it's the 1-based index of the separator.
-
-        if (count > 0) {
-            UChar separator;
-
-            // Use the last separator if we've run out of specified separators.
-            if (count > m_separators.get()->length())
-                separator = (*m_separators.get())[m_separators.get()->length() - 1];
-            else
-                separator = (*m_separators.get())[count - 1];
-
-            StringBuilder stringBuilder;
-            stringBuilder.append(separator);
-            separatorRenderer = createMathMLOperator(stringBuilder.toString(), MathMLOperatorDictionary::Infix, MathMLOperatorDictionary::Separator);
-        }
-    }
-
-    if (beforeChild) {
-        // Adding |x| before an existing |y| e.g. in element (y) - first insert our new child |x|, then its separator, to get (x, y).
-        RenderMathMLRow::addChild(builder, WTFMove(child), beforeChild);
-        if (separatorRenderer)
-            RenderMathMLRow::addChild(builder, WTFMove(separatorRenderer), beforeChild);
-    } else {
-        // Adding |y| at the end of an existing element e.g. (x) - insert the separator first before the closing fence, then |y|, to get (x, y).
-        if (separatorRenderer)
-            RenderMathMLRow::addChild(builder, WTFMove(separatorRenderer), m_closeFenceRenderer.get());
-        RenderMathMLRow::addChild(builder, WTFMove(child), m_closeFenceRenderer.get());
-    }
+    builder.insertChildToRenderMathMLFenced(*this, WTFMove(child), beforeChild);
 }
 
 }

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h (226653 => 226654)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h	2018-01-09 19:27:34 UTC (rev 226653)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h	2018-01-09 20:15:19 UTC (rev 226654)
@@ -39,6 +39,13 @@
 public:
     RenderMathMLFenced(MathMLRowElement&, RenderStyle&&);
 
+    StringImpl* separators() const { return m_separators.get(); }
+    String openingBrace() const { return m_open; }
+    String closingBrace() const { return m_close; }
+
+    RenderMathMLFencedOperator* closeFenceRenderer() const { return m_closeFenceRenderer.get(); }
+    void setCloseFenceRenderer(RenderMathMLFencedOperator& renderer) { m_closeFenceRenderer = makeWeakPtr(renderer); }
+
 private:
     bool isRenderMathMLFenced() const final { return true; }
     const char* renderName() const final { return "RenderMathMLFenced"; }
@@ -45,9 +52,6 @@
     void addChild(RenderTreeBuilder&, RenderPtr<RenderObject> child, RenderObject* beforeChild) final;
     void updateFromElement();
 
-    RenderPtr<RenderMathMLFencedOperator> createMathMLOperator(const String& operatorString, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
-    void makeFences(RenderTreeBuilder&);
-
     String m_open;
     String m_close;
     RefPtr<StringImpl> m_separators;

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (226653 => 226654)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2018-01-09 19:27:34 UTC (rev 226653)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2018-01-09 20:15:19 UTC (rev 226654)
@@ -41,6 +41,7 @@
 #include "RenderTreeBuilderFormControls.h"
 #include "RenderTreeBuilderInline.h"
 #include "RenderTreeBuilderList.h"
+#include "RenderTreeBuilderMathML.h"
 #include "RenderTreeBuilderMultiColumn.h"
 #include "RenderTreeBuilderRuby.h"
 #include "RenderTreeBuilderSVG.h"
@@ -114,6 +115,7 @@
     , m_blockFlowBuilder(std::make_unique<BlockFlow>(*this))
     , m_inlineBuilder(std::make_unique<Inline>(*this))
     , m_svgBuilder(std::make_unique<SVG>(*this))
+    , m_mathMLBuilder(std::make_unique<MathML>(*this))
 {
     RELEASE_ASSERT(!s_current || &m_view != &s_current->m_view);
     m_previous = s_current;
@@ -334,6 +336,11 @@
     blockFlowBuilder().insertChild(parent, WTFMove(child), beforeChild);
 }
 
+void RenderTreeBuilder::insertChildToRenderMathMLFenced(RenderMathMLFenced& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild)
+{
+    mathMLBuilder().insertChild(parent, WTFMove(child), beforeChild);
+}
+
 void RenderTreeBuilder::updateAfterDescendants(RenderElement& renderer)
 {
     if (is<RenderBlock>(renderer))

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h (226653 => 226654)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h	2018-01-09 19:27:34 UTC (rev 226653)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h	2018-01-09 20:15:19 UTC (rev 226654)
@@ -29,6 +29,7 @@
 
 namespace WebCore {
 
+class RenderMathMLFenced;
 class RenderRubyRun;
 class RenderSVGContainer;
 class RenderSVGInline;
@@ -66,6 +67,7 @@
     void insertChildToRenderTable(RenderTable& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild = nullptr);
     void insertChildToRenderTableSection(RenderTableSection& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild = nullptr);
     void insertChildToRenderTableRow(RenderTableRow& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild = nullptr);
+    void insertChildToRenderMathMLFenced(RenderMathMLFenced& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild = nullptr);
 
     void makeChildrenNonInline(RenderBlock& parent, RenderObject* insertionPoint = nullptr);
     RenderObject* splitAnonymousBoxesAroundChild(RenderBox& parent, RenderObject* beforeChild);
@@ -82,6 +84,7 @@
     class BlockFlow;
     class Inline;
     class SVG;
+    class MathML;
 
     FirstLetter& firstLetterBuilder() { return *m_firstLetterBuilder; }
     List& listBuilder() { return *m_listBuilder; }
@@ -93,6 +96,7 @@
     BlockFlow& blockFlowBuilder() { return *m_blockFlowBuilder; }
     Inline& inlineBuilder() { return *m_inlineBuilder; }
     SVG& svgBuilder() { return *m_svgBuilder; }
+    MathML& mathMLBuilder() { return *m_mathMLBuilder; }
 
     RenderView& m_view;
 
@@ -109,6 +113,7 @@
     std::unique_ptr<BlockFlow> m_blockFlowBuilder;
     std::unique_ptr<Inline> m_inlineBuilder;
     std::unique_ptr<SVG> m_svgBuilder;
+    std::unique_ptr<MathML> m_mathMLBuilder;
 };
 
 }

Added: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMathML.cpp (0 => 226654)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMathML.cpp	                        (rev 0)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMathML.cpp	2018-01-09 20:15:19 UTC (rev 226654)
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "RenderTreeBuilderMathML.h"
+
+#include "RenderMathMLFenced.h"
+#include "RenderMathMLFencedOperator.h"
+
+namespace WebCore {
+
+RenderTreeBuilder::MathML::MathML(RenderTreeBuilder& builder)
+    : m_builder(builder)
+{
+}
+
+RenderPtr<RenderMathMLFencedOperator> RenderTreeBuilder::MathML::createMathMLOperator(RenderMathMLFenced& parent, const String& operatorString,
+    MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
+{
+    RenderPtr<RenderMathMLFencedOperator> newOperator = createRenderer<RenderMathMLFencedOperator>(parent.document(), RenderStyle::createAnonymousStyleWithDisplay(parent.style(), BLOCK), operatorString, form, flag);
+    newOperator->initializeStyle();
+    return newOperator;
+}
+
+void RenderTreeBuilder::MathML::makeFences(RenderMathMLFenced& parent)
+{
+    auto openFence = createMathMLOperator(parent, parent.openingBrace(), MathMLOperatorDictionary::Prefix, MathMLOperatorDictionary::Fence);
+    parent.RenderMathMLRow::addChild(m_builder, WTFMove(openFence), parent.firstChild());
+
+    auto closeFence = createMathMLOperator(parent, parent.closingBrace(), MathMLOperatorDictionary::Postfix, MathMLOperatorDictionary::Fence);
+    parent.setCloseFenceRenderer(*closeFence);
+    parent.RenderMathMLRow::addChild(m_builder, WTFMove(closeFence));
+}
+
+void RenderTreeBuilder::MathML::insertChild(RenderMathMLFenced& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild)
+{
+    if (!parent.firstChild())
+        makeFences(parent);
+    // FIXME: Adding or removing a child should possibly cause all later separators to shift places
+    // if they're different, as later child positions change by +1 or -1.
+    // This should also handle surrogate pairs. See https://bugs.webkit.org/show_bug.cgi?id=125938.
+    RenderPtr<RenderMathMLFencedOperator> separatorRenderer;
+    auto* separators = parent.separators();
+    if (separators) {
+        unsigned count = 0;
+        for (Node* position = child->node(); position; position = position->previousSibling()) {
+            if (position->isElementNode())
+                count++;
+        }
+        if (!beforeChild) {
+            // We're adding at the end (before the closing fence), so a new separator would go before the new child, not after it.
+            --count;
+        }
+        // |count| is now the number of element children that will be before our new separator, i.e. it's the 1-based index of the separator.
+
+        if (count > 0) {
+            UChar separator;
+
+            // Use the last separator if we've run out of specified separators.
+            if (count > separators->length())
+                separator = (*separators)[separators->length() - 1];
+            else
+                separator = (*separators)[count - 1];
+
+            StringBuilder stringBuilder;
+            stringBuilder.append(separator);
+            separatorRenderer = createMathMLOperator(parent, stringBuilder.toString(), MathMLOperatorDictionary::Infix, MathMLOperatorDictionary::Separator);
+        }
+    }
+
+    if (beforeChild) {
+        // Adding |x| before an existing |y| e.g. in element (y) - first insert our new child |x|, then its separator, to get (x, y).
+        parent.RenderMathMLRow::addChild(m_builder, WTFMove(child), beforeChild);
+        if (separatorRenderer)
+            parent.RenderMathMLRow::addChild(m_builder, WTFMove(separatorRenderer), beforeChild);
+    } else {
+        // Adding |y| at the end of an existing element e.g. (x) - insert the separator first before the closing fence, then |y|, to get (x, y).
+        if (separatorRenderer)
+            parent.RenderMathMLRow::addChild(m_builder, WTFMove(separatorRenderer), parent.closeFenceRenderer());
+        parent.RenderMathMLRow::addChild(m_builder, WTFMove(child), parent.closeFenceRenderer());
+    }
+}
+
+}

Added: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMathML.h (0 => 226654)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMathML.h	                        (rev 0)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMathML.h	2018-01-09 20:15:19 UTC (rev 226654)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "MathMLOperatorDictionary.h"
+#include "RenderTreeBuilder.h"
+
+namespace WebCore {
+
+class RenderMathMLFenced;
+class RenderMathMLFencedOperator;
+
+class RenderTreeBuilder::MathML {
+public:
+    MathML(RenderTreeBuilder&);
+
+    void insertChild(RenderMathMLFenced& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild);
+
+private:
+    void makeFences(RenderMathMLFenced& parent);
+    RenderPtr<RenderMathMLFencedOperator> createMathMLOperator(RenderMathMLFenced& parent, const String& operatorString, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
+
+    RenderTreeBuilder& m_builder;
+};
+
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to