2009-09-19 Alex Milowski <alex@milowski.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Sep 2009 18:02:33 +0000 (18:02 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Sep 2009 18:02:33 +0000 (18:02 +0000)
        Reviewed by Maciej Stachowiak.

        Basic tests for msub, msup, and mtable/mtr/mtd

        * mathml: Added.
        * mathml/presentation: Added.
        * mathml/presentation/sub.xhtml: Added.
        * mathml/presentation/sup.xhtml: Added.
        * mathml/presentation/tables.xhtml: Added.
        * platform/mac/mathml: Added.
        * platform/mac/mathml/presentation: Added.
        * platform/mac/mathml/presentation/sub-expected.txt: Added.
        * platform/mac/mathml/presentation/sup-expected.txt: Added.
        * platform/mac/mathml/presentation/tables-expected.txt: Added.
2009-09-19  Alex Milowski  <alex@milowski.com>

        Reviewed by Maciej Stachowiak.

        Adds CSS styling and basic DOM element support for MathML

        * DerivedSources.make:
          Added user stylesheet and tag factory generation

        * WebCore.xcodeproj/project.pbxproj:
          Added new DOM element code

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseAttr):
          Added check for document since stylesheet can be added before there is a document

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleForElement):
          Added check to add MathML user agent stylesheet

        * css/mathml.css: Added.
          MathML user agent stylesheet

        * dom/Document.cpp:
        (WebCore::Document::createElement):
          Added support for creation of MathML DOM objects

        * dom/Node.h:
        (WebCore::Node::isMathMLElement):
          Added check method for whether the node is a MathML node

        * mathml: Added.
        * mathml/MathMLElement.cpp: Added.
        (WebCore::MathMLElement::MathMLElement):
        (WebCore::MathMLElement::create):
        (WebCore::MathMLElement::createRenderer):
        * mathml/MathMLElement.h: Added.
        (WebCore::MathMLElement::isMathMLElement):
          MathML DOM base class

        * mathml/MathMLInlineContainerElement.cpp: Added.
        (WebCore::MathMLInlineContainerElement::MathMLInlineContainerElement):
        (WebCore::MathMLInlineContainerElement::create):
        (WebCore::MathMLInlineContainerElement::createRenderer):
        * mathml/MathMLInlineContainerElement.h: Added.
          Base class for non-text containers

        * mathml/MathMLMathElement.cpp: Added.
        (WebCore::MathMLMathElement::MathMLMathElement):
        (WebCore::MathMLMathElement::create):
        * mathml/MathMLMathElement.h: Added.
          Root Math element

        * mathml/mathtags.in: Added.
          Element list mappings

        * page/Frame.cpp:
        (WebCore::Frame::Frame):

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

23 files changed:
LayoutTests/ChangeLog
LayoutTests/mathml/presentation/sub.xhtml [new file with mode: 0644]
LayoutTests/mathml/presentation/sup.xhtml [new file with mode: 0644]
LayoutTests/mathml/presentation/tables.xhtml [new file with mode: 0644]
LayoutTests/platform/mac/mathml/presentation/sub-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/mathml/presentation/sup-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/mathml/presentation/tables-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/CSSParser.cpp
WebCore/css/CSSStyleSelector.cpp
WebCore/css/mathml.css [new file with mode: 0644]
WebCore/dom/Document.cpp
WebCore/dom/Node.h
WebCore/mathml/MathMLElement.cpp [new file with mode: 0644]
WebCore/mathml/MathMLElement.h [new file with mode: 0644]
WebCore/mathml/MathMLInlineContainerElement.cpp [new file with mode: 0644]
WebCore/mathml/MathMLInlineContainerElement.h [new file with mode: 0644]
WebCore/mathml/MathMLMathElement.cpp [new file with mode: 0644]
WebCore/mathml/MathMLMathElement.h [new file with mode: 0644]
WebCore/mathml/mathtags.in [new file with mode: 0644]
WebCore/page/Frame.cpp

index 9354c1b..3504d55 100644 (file)
@@ -1,3 +1,20 @@
+2009-09-19  Alex Milowski  <alex@milowski.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        Basic tests for msub, msup, and mtable/mtr/mtd
+
+        * mathml: Added.
+        * mathml/presentation: Added.
+        * mathml/presentation/sub.xhtml: Added.
+        * mathml/presentation/sup.xhtml: Added.
+        * mathml/presentation/tables.xhtml: Added.
+        * platform/mac/mathml: Added.
+        * platform/mac/mathml/presentation: Added.
+        * platform/mac/mathml/presentation/sub-expected.txt: Added.
+        * platform/mac/mathml/presentation/sup-expected.txt: Added.
+        * platform/mac/mathml/presentation/tables-expected.txt: Added.
+
 2009-09-19  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/mathml/presentation/sub.xhtml b/LayoutTests/mathml/presentation/sub.xhtml
new file mode 100644 (file)
index 0000000..553da80
--- /dev/null
@@ -0,0 +1,12 @@
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>Subscripts</title>
+</head>
+<body>
+<p id='t1'>subscript: 
+<math xmlns='http://www.w3.org/1998/Math/MathML'>
+<msub><mi>x</mi><mn>1</mn></msub>
+</math>
+</p>
+</body>
+</html>
diff --git a/LayoutTests/mathml/presentation/sup.xhtml b/LayoutTests/mathml/presentation/sup.xhtml
new file mode 100644 (file)
index 0000000..9a48406
--- /dev/null
@@ -0,0 +1,12 @@
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>Superscripts</title>
+</head>
+<body>
+<p id='t1'>superscript: 
+<math xmlns='http://www.w3.org/1998/Math/MathML'>
+<msup><mi>x</mi><mn>2</mn></msup>
+</math>
+</p>
+</body>
+</html>
diff --git a/LayoutTests/mathml/presentation/tables.xhtml b/LayoutTests/mathml/presentation/tables.xhtml
new file mode 100644 (file)
index 0000000..89f6268
--- /dev/null
@@ -0,0 +1,28 @@
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>tables</title>
+</head>
+<body>
+<p id='t1'>simple: 
+<math xmlns='http://www.w3.org/1998/Math/MathML'>
+<mtable>
+<mtr>
+<mtd><msub><mi>a</mi><mn>11</mn></msub></mtd>
+<mtd><msub><mi>a</mi><mn>12</mn></msub></mtd>
+<mtd><msub><mi>a</mi><mn>13</mn></msub></mtd>
+</mtr>
+<mtr>
+<mtd><msub><mi>b</mi><mn>21</mn></msub></mtd>
+<mtd><msub><mi>b</mi><mn>22</mn></msub></mtd>
+<mtd><msub><mi>b</mi><mn>23</mn></msub></mtd>
+</mtr>
+<mtr>
+<mtd><msub><mi>c</mi><mn>31</mn></msub></mtd>
+<mtd><msub><mi>c</mi><mn>32</mn></msub></mtd>
+<mtd><msub><mi>c</mi><mn>33</mn></msub></mtd>
+</mtr>
+</mtable>
+</math>
+</p>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/mathml/presentation/sub-expected.txt b/LayoutTests/platform/mac/mathml/presentation/sub-expected.txt
new file mode 100644 (file)
index 0000000..2e61a46
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x52
+  RenderBlock {html} at (0,0) size 800x52
+    RenderBody {body} at (8,16) size 784x20
+      RenderBlock {p} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 64x18
+          text run at (0,0) width 64: "subscript: "
+        RenderBlock {math} at (64,1) size 16x19
+          RenderBlock {msub} at (0,0) size 16x19
+            RenderInline {mi} at (0,0) size 9x18
+              RenderText {#text} at (0,0) size 9x18
+                text run at (0,0) width 9: "x"
+            RenderInline {mn} at (0,0) size 7x13
+              RenderText {#text} at (9,8) size 7x13
+                text run at (9,8) width 7: "1"
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/mathml/presentation/sup-expected.txt b/LayoutTests/platform/mac/mathml/presentation/sup-expected.txt
new file mode 100644 (file)
index 0000000..9fe0496
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x51
+  RenderBlock {html} at (0,0) size 800x51
+    RenderBody {body} at (8,16) size 784x19
+      RenderBlock {p} at (0,0) size 784x19
+        RenderText {#text} at (0,0) size 76x18
+          text run at (0,0) width 76: "superscript: "
+        RenderBlock {math} at (76,0) size 16x19
+          RenderBlock {msup} at (0,0) size 16x19
+            RenderInline {mi} at (0,0) size 9x18
+              RenderText {#text} at (0,1) size 9x18
+                text run at (0,1) width 9: "x"
+            RenderInline {mn} at (0,0) size 7x13
+              RenderText {#text} at (9,-2) size 7x13
+                text run at (9,-2) width 7: "2"
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/mathml/presentation/tables-expected.txt b/LayoutTests/platform/mac/mathml/presentation/tables-expected.txt
new file mode 100644 (file)
index 0000000..9f14dba
--- /dev/null
@@ -0,0 +1,88 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x110
+  RenderBlock {html} at (0,0) size 800x110
+    RenderBody {body} at (8,16) size 784x78
+      RenderBlock {p} at (0,0) size 784x78
+        RenderText {#text} at (0,29) size 49x18
+          text run at (0,29) width 49: "simple: "
+        RenderBlock {math} at (49,0) size 93x78
+          RenderTable {mtable} at (0,0) size 93x78
+            RenderTableSection (anonymous) at (0,0) size 93x78
+              RenderTableRow {mtr} at (0,0) size 93x26
+                RenderTableCell {mtd} at (0,0) size 31x26 [r=0 c=0 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 22x26
+                    RenderInline {mi} at (0,0) size 8x18
+                      RenderText {#text} at (0,4) size 8x18
+                        text run at (0,4) width 8: "a"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (8,12) size 14x13
+                        text run at (8,12) width 14: "11"
+                RenderTableCell {mtd} at (31,0) size 31x26 [r=0 c=1 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 22x26
+                    RenderInline {mi} at (0,0) size 8x18
+                      RenderText {#text} at (0,4) size 8x18
+                        text run at (0,4) width 8: "a"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (8,12) size 14x13
+                        text run at (8,12) width 14: "12"
+                RenderTableCell {mtd} at (62,0) size 31x26 [r=0 c=2 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 22x26
+                    RenderInline {mi} at (0,0) size 8x18
+                      RenderText {#text} at (0,4) size 8x18
+                        text run at (0,4) width 8: "a"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (8,12) size 14x13
+                        text run at (8,12) width 14: "13"
+              RenderTableRow {mtr} at (0,26) size 93x26
+                RenderTableCell {mtd} at (0,26) size 31x26 [r=1 c=0 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 23x26
+                    RenderInline {mi} at (0,0) size 9x18
+                      RenderText {#text} at (0,4) size 9x18
+                        text run at (0,4) width 9: "b"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (9,12) size 14x13
+                        text run at (9,12) width 14: "21"
+                RenderTableCell {mtd} at (31,26) size 31x26 [r=1 c=1 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 23x26
+                    RenderInline {mi} at (0,0) size 9x18
+                      RenderText {#text} at (0,4) size 9x18
+                        text run at (0,4) width 9: "b"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (9,12) size 14x13
+                        text run at (9,12) width 14: "22"
+                RenderTableCell {mtd} at (62,26) size 31x26 [r=1 c=2 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 23x26
+                    RenderInline {mi} at (0,0) size 9x18
+                      RenderText {#text} at (0,4) size 9x18
+                        text run at (0,4) width 9: "b"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (9,12) size 14x13
+                        text run at (9,12) width 14: "23"
+              RenderTableRow {mtr} at (0,52) size 93x26
+                RenderTableCell {mtd} at (0,52) size 31x26 [r=2 c=0 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 22x26
+                    RenderInline {mi} at (0,0) size 8x18
+                      RenderText {#text} at (0,4) size 8x18
+                        text run at (0,4) width 8: "c"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (8,12) size 14x13
+                        text run at (8,12) width 14: "31"
+                RenderTableCell {mtd} at (31,52) size 31x26 [r=2 c=1 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 22x26
+                    RenderInline {mi} at (0,0) size 8x18
+                      RenderText {#text} at (0,4) size 8x18
+                        text run at (0,4) width 8: "c"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (8,12) size 14x13
+                        text run at (8,12) width 14: "32"
+                RenderTableCell {mtd} at (62,52) size 31x26 [r=2 c=2 rs=1 cs=1]
+                  RenderBlock {msub} at (4,0) size 22x26
+                    RenderInline {mi} at (0,0) size 8x18
+                      RenderText {#text} at (0,4) size 8x18
+                        text run at (0,4) width 8: "c"
+                    RenderInline {mn} at (0,0) size 14x13
+                      RenderText {#text} at (8,12) size 14x13
+                        text run at (8,12) width 14: "33"
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
index 7f2a94d..776a245 100644 (file)
@@ -1,3 +1,63 @@
+2009-09-19  Alex Milowski  <alex@milowski.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        Adds CSS styling and basic DOM element support for MathML
+
+        * DerivedSources.make:
+          Added user stylesheet and tag factory generation
+
+        * WebCore.xcodeproj/project.pbxproj:
+          Added new DOM element code
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseAttr):
+          Added check for document since stylesheet can be added before there is a document
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::styleForElement):
+          Added check to add MathML user agent stylesheet
+
+        * css/mathml.css: Added.
+          MathML user agent stylesheet
+
+        * dom/Document.cpp:
+        (WebCore::Document::createElement):
+          Added support for creation of MathML DOM objects
+
+        * dom/Node.h:
+        (WebCore::Node::isMathMLElement):
+          Added check method for whether the node is a MathML node
+
+        * mathml: Added.
+        * mathml/MathMLElement.cpp: Added.
+        (WebCore::MathMLElement::MathMLElement):
+        (WebCore::MathMLElement::create):
+        (WebCore::MathMLElement::createRenderer):
+        * mathml/MathMLElement.h: Added.
+        (WebCore::MathMLElement::isMathMLElement):
+          MathML DOM base class
+
+
+        * mathml/MathMLInlineContainerElement.cpp: Added.
+        (WebCore::MathMLInlineContainerElement::MathMLInlineContainerElement):
+        (WebCore::MathMLInlineContainerElement::create):
+        (WebCore::MathMLInlineContainerElement::createRenderer):
+        * mathml/MathMLInlineContainerElement.h: Added.
+          Base class for non-text containers
+
+        * mathml/MathMLMathElement.cpp: Added.
+        (WebCore::MathMLMathElement::MathMLMathElement):
+        (WebCore::MathMLMathElement::create):
+        * mathml/MathMLMathElement.h: Added.
+          Root Math element
+
+        * mathml/mathtags.in: Added.
+          Element list mappings
+
+        * page/Frame.cpp:
+        (WebCore::Frame::Frame):
+          Added MathML name initialization
 2009-09-19  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Oliver Hunt.
index d82d449..7fd63d2 100644 (file)
@@ -441,6 +441,8 @@ all : \
     UserAgentStyleSheets.h \
     XLinkNames.cpp \
     XMLNames.cpp \
+    MathMLElementFactory.cpp \
+    MathMLNames.cpp \
     XPathGrammar.cpp \
     tokenizer.cpp \
 #
@@ -582,6 +584,10 @@ ifeq ($(findstring ENABLE_WML,$(FEATURE_DEFINES)), ENABLE_WML)
     USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/wml.css
 endif
 
+ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)
+    USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/mathml.css
+endif
+
 ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
     USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/mediaControls.css
 ifeq ($(OS),MACOS)
@@ -723,6 +729,26 @@ WMLNames.cpp :
 
 endif
 
+# --------
+# MathML tag and attribute names, and element factory
+
+ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)
+
+MathMLElementFactory.cpp MathMLNames.cpp : dom/make_names.pl mathml/mathtags.in
+       perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --factory --wrapperFactory
+
+else
+
+MathMLElementFactory.cpp :
+       echo > $@
+
+MathMLNames.cpp :
+       echo > $@
+
+endif
+
+
 
 # --------
 
index 5b151bd..24b7641 100644 (file)
                F916C48D0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */; };
                F916C48E0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */; };
                F9F0ED7A0DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F9F0ED770DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h */; };
+               FABE72F41059C1EB00D999DD /* MathMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */; };
+               FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FABE72EE1059C1EB00D999DD /* MathMLElement.h */; };
+               FABE72F61059C1EB00D999DD /* MathMLInlineContainerElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72EF1059C1EB00D999DD /* MathMLInlineContainerElement.cpp */; };
+               FABE72F71059C1EB00D999DD /* MathMLInlineContainerElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FABE72F01059C1EB00D999DD /* MathMLInlineContainerElement.h */; };
+               FABE72F81059C1EB00D999DD /* MathMLMathElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */; };
+               FABE72F91059C1EB00D999DD /* MathMLMathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FABE72F21059C1EB00D999DD /* MathMLMathElement.h */; };
+               FABE72FD1059C21100D999DD /* MathMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */; };
+               FABE72FE1059C21100D999DD /* MathMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72FC1059C21100D999DD /* MathMLNames.cpp */; };
                FE6FD4880F676E5700092873 /* Coordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD4850F676E5700092873 /* Coordinates.h */; settings = {ATTRIBUTES = (Private, ); }; };
                FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */; };
                FE6FD48E0F676E9300092873 /* JSCoordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD48C0F676E9300092873 /* JSCoordinates.h */; };
                F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLHttpRequestProgressEvent.h; sourceTree = "<group>"; };
                F9F0ED770DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequestProgressEvent.h; sourceTree = "<group>"; };
                F9F0ED780DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = XMLHttpRequestProgressEvent.idl; sourceTree = "<group>"; };
+               FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLElement.cpp; sourceTree = "<group>"; };
+               FABE72EE1059C1EB00D999DD /* MathMLElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLElement.h; sourceTree = "<group>"; };
+               FABE72EF1059C1EB00D999DD /* MathMLInlineContainerElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLInlineContainerElement.cpp; sourceTree = "<group>"; };
+               FABE72F01059C1EB00D999DD /* MathMLInlineContainerElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLInlineContainerElement.h; sourceTree = "<group>"; };
+               FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLMathElement.cpp; sourceTree = "<group>"; };
+               FABE72F21059C1EB00D999DD /* MathMLMathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLMathElement.h; sourceTree = "<group>"; };
+               FABE72F31059C1EB00D999DD /* mathtags.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mathtags.in; sourceTree = "<group>"; };
+               FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLElementFactory.cpp; sourceTree = "<group>"; };
+               FABE72FC1059C21100D999DD /* MathMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLNames.cpp; sourceTree = "<group>"; };
                FE49BD301061719100D0E1AE /* WebCore.Inspector.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = WebCore.Inspector.exp; sourceTree = "<group>"; };
                FE49EF970DC51462004266E1 /* DashboardSupportCSSPropertyNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DashboardSupportCSSPropertyNames.in; sourceTree = "<group>"; };
                FE6FD4850F676E5700092873 /* Coordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Coordinates.h; sourceTree = "<group>"; };
                                93EEC1EC09C2877700C515D1 /* html */,
                                1C81B94D0E9732D900266E07 /* inspector */,
                                BCB16BFB0979C38700467741 /* loader */,
+                               FABE72EC1059C1EB00D999DD /* mathml */,
                                333F703D0FB49C16008E12A6 /* notifications */,
                                65BF02180974806300C43196 /* page */,
                                BCF1A5BA097832090061A123 /* platform */,
                                938E65F009F09840008A48EC /* JSHTMLElementWrapperFactory.h */,
                                8574D1F10ADE6122004CBA11 /* JSSVGElementWrapperFactory.cpp */,
                                8574D1F20ADE6122004CBA11 /* JSSVGElementWrapperFactory.h */,
+                               FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */,
+                               FABE72FC1059C21100D999DD /* MathMLNames.cpp */,
                                656581E609D1508D000E61D7 /* SVGElementFactory.cpp */,
                                656581E709D1508D000E61D7 /* SVGElementFactory.h */,
                                656581E809D1508D000E61D7 /* SVGNames.cpp */,
                        tabWidth = 4;
                        usesTabs = 0;
                };
+               FABE72EC1059C1EB00D999DD /* mathml */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */,
+                               FABE72EE1059C1EB00D999DD /* MathMLElement.h */,
+                               FABE72EF1059C1EB00D999DD /* MathMLInlineContainerElement.cpp */,
+                               FABE72F01059C1EB00D999DD /* MathMLInlineContainerElement.h */,
+                               FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */,
+                               FABE72F21059C1EB00D999DD /* MathMLMathElement.h */,
+                               FABE72F31059C1EB00D999DD /* mathtags.in */,
+                       );
+                       path = mathml;
+                       sourceTree = "<group>";
+               };
 /* End PBXGroup section */
 
 /* Begin PBXHeadersBuildPhase section */
                                510D4A4F103177A20049EA54 /* WebSocketChannel.h in Headers */,
                                510D4A50103177A20049EA54 /* WebSocketChannelClient.h in Headers */,
                                51ABAE451043AB4A008C5260 /* WebSocketHandshake.h in Headers */,
+                               FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */,
+                               FABE72F71059C1EB00D999DD /* MathMLInlineContainerElement.h in Headers */,
+                               FABE72F91059C1EB00D999DD /* MathMLMathElement.h in Headers */,
                                37202199106213C600F25C4B /* FontSmoothingMode.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                                51A052341058774F00CC9E95 /* CredentialStorage.cpp in Sources */,
                                510D4A4E103177A20049EA54 /* WebSocketChannel.cpp in Sources */,
                                51ABAE441043AB4A008C5260 /* WebSocketHandshake.cpp in Sources */,
+                               FABE72F41059C1EB00D999DD /* MathMLElement.cpp in Sources */,
+                               FABE72F61059C1EB00D999DD /* MathMLInlineContainerElement.cpp in Sources */,
+                               FABE72F81059C1EB00D999DD /* MathMLMathElement.cpp in Sources */,
+                               FABE72FD1059C21100D999DD /* MathMLElementFactory.cpp in Sources */,
+                               FABE72FE1059C21100D999DD /* MathMLNames.cpp in Sources */,
                                BCCE58AC1061E8CF008FB35A /* JSDatabaseCustom.cpp in Sources */,
                                BCCE58AF1061E90C008FB35A /* JSDocumentFragmentCustom.cpp in Sources */,
                        );
index aa2be59..c46bf36 100644 (file)
@@ -2150,7 +2150,7 @@ PassRefPtr<CSSValue> CSSParser::parseAttr(CSSParserValueList* args)
     if (attrName[0] == '-')
         return 0;
 
-    if (document()->isHTMLDocument())
+    if (document() && document()->isHTMLDocument())
         attrName = attrName.lower();
     
     return CSSPrimitiveValue::create(attrName, CSSPrimitiveValue::CSS_ATTR);
index 6a6e962..dc9f2e5 100644 (file)
@@ -1139,6 +1139,17 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
     }
 #endif
 
+#if ENABLE(MATHML)
+    static bool loadedMathMLUserAgentSheet;
+    if (e->isMathMLElement() && !loadedMathMLUserAgentSheet) {
+        // MathML rules.
+        loadedMathMLUserAgentSheet = true;
+        CSSStyleSheet* mathMLSheet = parseUASheet(mathmlUserAgentStyleSheet, sizeof(mathmlUserAgentStyleSheet));
+        defaultStyle->addRulesFromSheet(mathMLSheet, screenEval());
+        defaultPrintStyle->addRulesFromSheet(mathMLSheet, printEval());
+    }
+#endif
+
 #if ENABLE(WML)
     static bool loadedWMLUserAgentSheet;
     if (e->isWMLElement() && !loadedWMLUserAgentSheet) {
diff --git a/WebCore/css/mathml.css b/WebCore/css/mathml.css
new file mode 100644 (file)
index 0000000..e725d8c
--- /dev/null
@@ -0,0 +1,170 @@
+@namespace "http://www.w3.org/1998/Math/MathML";
+
+/* approved */
+math {
+    font-family: Symbol, STIXGeneral, "Times New Roman";
+    display: inline-block;
+    padding: 0px;
+    margin: 0px;
+    text-indent: 0;
+    font-size: 1.1em;
+    vertical-align: baseline;
+}
+math[display="block"] {
+    font-family: "New Times Roman"
+    display: block;
+    text-align: center;
+    page-break-inside: avoid;
+}
+
+mfrac {
+    vertical-align: middle;
+}
+
+msub, msup {
+   display: inline-block;
+}
+
+msub > * + * {
+   vertical-align: sub;
+   font-size: 0.75em;
+   line-height: 0.75em;
+}
+
+msup > * + * {
+   vertical-align: super;
+   font-size: 0.75em;
+   line-height: 0.75em;
+}
+
+msubsup > * {
+    margin: 0px;
+    padding: 0px;
+    vertical-align: middle;
+}
+
+msubsup > * + * {
+   font-size: 0.75em;
+   line-height: 0.75em;
+}
+
+munderover {
+    vertical-align: middle;
+}
+
+munderover > * + *, mover > * + *, munder > * + * {
+   font-size: 0.75em;
+   line-height: 0.5625em;
+}
+
+mrow {
+    line-height: 1em;
+    white-space: nowrap;
+    vertical-align: middle;
+}
+
+mfenced > * {
+    vertical-align: middle;
+}
+
+mo, mn, mi {
+   line-height: 0.75em;
+   padding: 0px;
+   margin: 0px;
+}
+
+mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"] {
+   font-size: 0.75em;
+   line-height: 0.5625em;
+}
+
+mo[mathsize="normal"],mn[mathsize="normal"],mi[mathsize="normal"] {
+   font-size: 1em;
+   line-height: 0.75em;
+}
+
+mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"] {
+   line-height: 1.2em;
+   font-size: 1.5em;
+}
+annotation, annotation-xml {
+    display:none;
+}
+
+mphantom {
+    visibility: hidden;
+}
+merror {
+    outline: solid thin red;
+}
+
+msqrt {
+    padding-top: 0.2em;
+    padding-left: 0.75em;
+}
+
+mroot {
+    padding-top: 0.2em;
+    padding-left: 0.2em;
+}
+
+mroot > * + * {
+    font-size: 0.75em;
+    line-height: 0.75em;
+    vertical-align: top;
+    padding-right: 0.3em;
+}
+
+mtable {
+    display: inline-table;
+    line-height: 1.5em;
+    text-align: center;
+    vertical-align: middle;
+}
+mtr {
+    display: table-row;
+}
+mtd {
+    display: table-cell;
+    padding: 0 0.5ex;
+}
+
+mtable[columnalign="left"], mtr[columnalign="left"], mtd[columnalign="left"] {
+    text-align: left;
+}
+
+mtable[columnalign="right"], mtr[columnalign="right"], mtd[columnalign="right"] {
+    text-align: right;
+}
+mtable[rowalign="top"] mtd, mtable mtr[rowalign="top"] mtd, mtable mtr mtd[rowalign="top"] {
+    vertical-align: top;
+}
+mtable[rowalign="bottom"] mtd, mtable mtr[rowalign="bottom"] mtd, mtable mtr mtd[rowalign="bottom"] {
+    vertical-align: bottom;
+}
+mtable[rowalign="center"] mtd, mtable mtr[rowalign="center"] mtd, mtable mtr mtd[rowalign="center"] {
+    vertical-align: middle;
+}
+mtable[frame="solid"] {
+    border: solid thin;
+}
+mtable[frame="dashed"] {
+    border: dashed thin;
+}
+mtable[rowlines="solid"], mtable[rowlines="dashed"], mtable[columnlines="solid"], mtable[columnlines="dashed"] {
+    border-collapse: collapse;
+}
+mtable[rowlines="solid"] > mtr + mtr {
+    border-top: solid thin;
+}
+mtable[rowlines="dashed"] > mtr + mtr {
+    border-top: dashed thin;
+}
+mtable[columnlines="solid"] > mtr > mtd + mtd {
+    border-left: solid thin;
+}
+mtable[columnlines="dashed"] > mtr > mtd + mtd {
+    border-left: dashed thin;
+}
+
index 1b8afe7..f26ee87 100644 (file)
 #include "WMLNames.h"
 #endif
 
+#if ENABLE(MATHML)
+#include "MathMLElement.h"
+#include "MathMLElementFactory.h"
+#include "MathMLNames.h"
+#endif
+
 #if ENABLE(XHTMLMP)
 #include "HTMLNoScriptElement.h"
 #endif
@@ -803,6 +809,10 @@ PassRefPtr<Element> Document::createElement(const QualifiedName& qName, bool cre
     else if (isWMLDocument())
         e = WMLElementFactory::createWMLElement(QualifiedName(nullAtom, qName.localName(), WMLNames::wmlNamespaceURI), this, createdByParser);
 #endif
+#if ENABLE(MATHML)
+    else if (qName.namespaceURI() == MathMLNames::mathmlNamespaceURI)
+        e = MathMLElementFactory::createMathMLElement(qName, this, createdByParser);
+#endif
     
     if (!e)
         e = Element::create(qName, document());
index af1e73b..4f70b87 100644 (file)
@@ -183,6 +183,13 @@ public:
     static bool isWMLElement() { return false; }
 #endif
 
+#if ENABLE(MATHML)
+    virtual bool isMathMLElement() const { return false; }
+#else
+    static bool isMathMLElement() { return false; }
+#endif
+
+
     virtual bool isMediaControlElement() const { return false; }
     virtual bool isStyledElement() const { return false; }
     virtual bool isFrameOwnerElement() const { return false; }
diff --git a/WebCore/mathml/MathMLElement.cpp b/WebCore/mathml/MathMLElement.cpp
new file mode 100644 (file)
index 0000000..14febe5
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ *  Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
+ * 
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *  
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the
+ *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ *  Boston, MA  02110-1301, USA. 
+ *  
+ */
+
+#include "config.h"
+
+#if ENABLE(MATHML)
+
+#include "MathMLElement.h"
+
+#include "MathMLNames.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+    
+using namespace MathMLNames;
+    
+MathMLElement::MathMLElement(const QualifiedName& tagName, Document* document)
+    : StyledElement(tagName, document, CreateElementZeroRefCount)
+{
+}
+    
+PassRefPtr<MathMLElement> MathMLElement::create(const QualifiedName& tagName, Document* document)
+{
+    return new MathMLElement(tagName, document);
+}
+
+RenderObject* MathMLElement::createRenderer(RenderArena*, RenderStyle* style)
+{
+    return RenderObject::createObject(this, style);
+}
+    
+    
+}
+
+#endif // ENABLE(MATHML)
diff --git a/WebCore/mathml/MathMLElement.h b/WebCore/mathml/MathMLElement.h
new file mode 100644 (file)
index 0000000..b00af47
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ *  Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
+ * 
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *  
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the
+ *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ *  Boston, MA  02110-1301, USA. 
+ *  
+ */
+
+#ifndef MathMLElement_h
+#define MathMLElement_h
+
+#if ENABLE(MATHML)
+#include "StyledElement.h"
+
+namespace WebCore {
+    
+class MathMLElement : public StyledElement {
+public:
+    static PassRefPtr<MathMLElement> create(const QualifiedName& tagName, Document*);
+    
+    virtual bool isMathMLElement() const { return true; }
+    
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+    
+protected:
+    MathMLElement(const QualifiedName& tagName, Document*);
+    
+};
+    
+}
+
+#endif // ENABLE(MATHML)
+#endif // MathMLElement_h
diff --git a/WebCore/mathml/MathMLInlineContainerElement.cpp b/WebCore/mathml/MathMLInlineContainerElement.cpp
new file mode 100644 (file)
index 0000000..2bb02f6
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ *  Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
+ * 
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *  
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the
+ *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ *  Boston, MA  02110-1301, USA. 
+ *  
+ */
+
+#include "config.h"
+
+#if ENABLE(MATHML)
+
+#include "MathMLInlineContainerElement.h"
+
+#include "MathMLNames.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+    
+using namespace MathMLNames;
+
+MathMLInlineContainerElement::MathMLInlineContainerElement(const QualifiedName& tagName, Document* document)
+    : MathMLElement(tagName, document)
+{
+}
+
+PassRefPtr<MathMLInlineContainerElement> MathMLInlineContainerElement::create(const QualifiedName& tagName, Document* document)
+{
+    return new MathMLInlineContainerElement(tagName, document);
+}
+
+RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena *, RenderStyle* style)
+{
+    // FIXME: This method will contain the specialized renderers based on element name
+    return RenderObject::createObject(this, style);
+}
+    
+    
+}
+
+#endif // ENABLE(MATHML)
+
diff --git a/WebCore/mathml/MathMLInlineContainerElement.h b/WebCore/mathml/MathMLInlineContainerElement.h
new file mode 100644 (file)
index 0000000..4529d3b
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ *  Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
+ * 
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *  
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the
+ *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ *  Boston, MA  02110-1301, USA. 
+ *  
+ */
+
+#ifndef MathMLInlineContainerElement_h
+#define MathMLInlineContainerElement_h
+
+#if ENABLE(MATHML)
+#include "MathMLElement.h"
+
+namespace WebCore {
+    
+class MathMLInlineContainerElement : public MathMLElement {
+public:
+    static PassRefPtr<MathMLInlineContainerElement> create(const QualifiedName& tagName, Document*);
+
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+
+protected:
+    MathMLInlineContainerElement(const QualifiedName& tagName, Document*);
+
+};
+    
+}
+
+#endif // ENABLE(MATHML)
+#endif // MathMLInlineContainerElement_h
diff --git a/WebCore/mathml/MathMLMathElement.cpp b/WebCore/mathml/MathMLMathElement.cpp
new file mode 100644 (file)
index 0000000..8b083f4
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ *  Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
+ * 
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *  
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the
+ *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ *  Boston, MA  02110-1301, USA. 
+ *  
+ */
+
+#include "config.h"
+
+#if ENABLE(MATHML)
+
+#include "MathMLMathElement.h"
+
+#include "MathMLNames.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+    
+using namespace MathMLNames;
+
+MathMLMathElement::MathMLMathElement(const QualifiedName& tagName, Document* document)
+    : MathMLInlineContainerElement(tagName, document)
+{
+}
+
+PassRefPtr<MathMLMathElement> MathMLMathElement::create(const QualifiedName& tagName, Document* document)
+{
+    return new MathMLMathElement(tagName, document);
+}
+
+}
+
+#endif // ENABLE(MATHML)
diff --git a/WebCore/mathml/MathMLMathElement.h b/WebCore/mathml/MathMLMathElement.h
new file mode 100644 (file)
index 0000000..f363cd2
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ *  Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
+ * 
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *  
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the
+ *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ *  Boston, MA  02110-1301, USA. 
+ *  
+ */
+
+#ifndef MathMLMathElement_h
+#define MathMLMathElement_h
+
+#if ENABLE(MATHML)
+#include "MathMLInlineContainerElement.h"
+
+namespace WebCore {
+    
+class MathMLMathElement : public MathMLInlineContainerElement {
+public:
+    static PassRefPtr<MathMLMathElement> create(const QualifiedName& tagName, Document*);
+    
+protected:
+    MathMLMathElement(const QualifiedName& tagName, Document*);
+    
+};
+    
+}
+
+#endif // ENABLE(MATHML)
+#endif // MathMLMathElement_h
diff --git a/WebCore/mathml/mathtags.in b/WebCore/mathml/mathtags.in
new file mode 100644 (file)
index 0000000..8704dbf
--- /dev/null
@@ -0,0 +1,21 @@
+namespace="MathML"
+namespaceURI="http://www.w3.org/1998/Math/MathML"
+guardFactoryWith="ENABLE(MATHML)"
+exportStrings
+
+math
+mfrac interfaceName=MathMLInlineContainerElement
+mfenced interfaceName=MathMLInlineContainerElement
+msubsup interfaceName=MathMLInlineContainerElement
+mrow interfaceName=MathMLInlineContainerElement
+mover interfaceName=MathMLInlineContainerElement
+munder interfaceName=MathMLInlineContainerElement
+munderover interfaceName=MathMLInlineContainerElement
+msqrt interfaceName=MathMLInlineContainerElement
+mroot interfaceName=MathMLInlineContainerElement
+mi interfaceName=MathMLElement, createWithNew
+mn interfaceName=MathMLElement, createWithNew
+mo interfaceName=MathMLElement, createWithNew
+msub interfaceName=MathMLElement, createWithNew
+msup interfaceName=MathMLElement, createWithNew
+
index 7a3ed27..7a7c457 100644 (file)
 #include "WMLNames.h"
 #endif
 
+#if ENABLE(MATHML)
+#include "MathMLNames.h"
+#endif
+
 using namespace std;
 
 namespace WebCore {
@@ -152,6 +156,10 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient*
     WMLNames::init();
 #endif
 
+#if ENABLE(MATHML)
+    MathMLNames::init();
+#endif
+
     XMLNames::init();
 
     if (!ownerElement)