Changeset 155797 in webkit


Ignore:
Timestamp:
Sep 15, 2013 1:08:08 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Implement the mmultiscripts tag
https://bugs.webkit.org/show_bug.cgi?id=99618

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-09-15
Reviewed by Chris Fleizach.

Source/WebCore:

Tests: mathml/invalid-scripts-crash.html

mathml/presentation/multiscripts-equivalence.html
mathml/presentation/multiscripts-noscripts.html
mathml/presentation/multiscripts-positions.html
mathml/presentation/scripts-base-alignment.html
mathml/presentation/scripts-horizontal-alignment.html
mathml/presentation/scripts-vertical-alignment.html
mathml/scripts-addChild.html
mathml/scripts-removeChild.html

This relies on the existing msub/msup/msubsup code to implement the mmultiscripts tag. This also improves dynamic addition/removal of children for these MathML elements and adds a specific style for invalid children, so that they render like an merror tag. Finally, this fixes a bad memory access in the Accessibility render object of msubsup.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • Target.pri:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isMathSubscriptSuperscript):
(WebCore::AccessibilityRenderObject::mathSuperscriptObject):

  • css/mathml.css:

(mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot):
(mover > :last-child, munderover > :last-child):
(msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + *):
(merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ *):

  • mathml/MathMLInlineContainerElement.cpp:

(WebCore::MathMLInlineContainerElement::createRenderer):

  • mathml/mathtags.in:
  • rendering/mathml/RenderMathMLBlock.h:

(WebCore::RenderMathMLBlock::isRenderMathMLScripts):
(WebCore::RenderMathMLBlock::isRenderMathMLScriptsWrapper):

  • rendering/mathml/RenderMathMLScripts.cpp: Added.

(WebCore::isMPrescripts):
(WebCore::RenderMathMLScripts::RenderMathMLScripts):
(WebCore::RenderMathMLScripts::base):
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
(WebCore::RenderMathMLScripts::fixAnonymousStyles):
(WebCore::RenderMathMLScripts::addChildInternal):
(WebCore::RenderMathMLScripts::removeChildInternal):
(WebCore::RenderMathMLScripts::addChild):
(WebCore::RenderMathMLScripts::removeChild):
(WebCore::RenderMathMLScripts::styleDidChange):
(WebCore::RenderMathMLScripts::unembellishedOperator):
(WebCore::RenderMathMLScripts::layout):
(WebCore::RenderMathMLScripts::firstLineBoxBaseline):
(WebCore::RenderMathMLScriptsWrapper::createAnonymousWrapper):
(WebCore::RenderMathMLScriptsWrapper::addChildInternal):
(WebCore::RenderMathMLScriptsWrapper::addChild):
(WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
(WebCore::RenderMathMLScriptsWrapper::removeChild):

  • rendering/mathml/RenderMathMLScripts.h: Added.

(WebCore::RenderMathMLScriptsWrapper::RenderMathMLScriptsWrapper):
(WebCore::RenderMathMLScriptsWrapper::renderName):
(WebCore::RenderMathMLScriptsWrapper::isRenderMathMLScriptsWrapper):
(WebCore::toRenderMathMLScriptsWrapper):
(WebCore::RenderMathMLScripts::isRenderMathMLScripts):
(WebCore::RenderMathMLScripts::renderName):
(WebCore::toRenderMathMLScripts):

  • rendering/mathml/RenderMathMLSubSup.cpp: Removed.
  • rendering/mathml/RenderMathMLSubSup.h: Removed.

LayoutTests:

Add many tests for script msub/msup/msubsup/mmultiscripts:

  • invalid markup
  • equivalence between mmultiscripts without scripts and mrow
  • equivalence between mmultiscripts and msub/msup/msubsup
  • position of scripts in mmultiscripts
  • baseline alignment of msub/msup/msubsup elements
  • horizontal/vertical alignment of scripts
  • adding/removing children with the DOM
  • TestExpectations: Some remaining MathML pixel tests are broken by this patch.
  • mathml/invalid-scripts-crash-expected.txt: Added.
  • mathml/invalid-scripts-crash.html: Added.
  • mathml/presentation/multiscripts-equivalence-expected.html: Added.
  • mathml/presentation/multiscripts-equivalence.html: Added.
  • mathml/presentation/multiscripts-noscripts-expected.html: Added.
  • mathml/presentation/multiscripts-noscripts.html: Added.
  • mathml/presentation/multiscripts-positions-expected.html: Added.
  • mathml/presentation/multiscripts-positions.html: Added.
  • mathml/presentation/scripts-base-alignment-expected.html: Added.
  • mathml/presentation/scripts-base-alignment.html: Added.
  • mathml/presentation/scripts-horizontal-alignment-expected.html: Added.
  • mathml/presentation/scripts-horizontal-alignment.html: Added.
  • mathml/presentation/scripts-vertical-alignment-expected.html: Added.
  • mathml/presentation/scripts-vertical-alignment.html: Added.
  • mathml/scripts-addChild-expected.html: Added.
  • mathml/scripts-addChild.html: Added.
  • mathml/scripts-removeChild-expected.html: Added.
  • mathml/scripts-removeChild.html: Added.
  • platform/mac/accessibility/mathml-multiscript-expected.txt: Reference updated.
Location:
trunk
Files:
20 added
2 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r155794 r155797  
     12013-09-15  Frédéric Wang  <fred.wang@free.fr>
     2
     3        Implement the mmultiscripts tag
     4        https://bugs.webkit.org/show_bug.cgi?id=99618
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Add many tests for script msub/msup/msubsup/mmultiscripts:
     9        - invalid markup
     10        - equivalence between mmultiscripts without scripts and mrow
     11        - equivalence between mmultiscripts and msub/msup/msubsup
     12        - position of scripts in mmultiscripts
     13        - baseline alignment of msub/msup/msubsup elements
     14        - horizontal/vertical alignment of scripts
     15        - adding/removing children with the DOM
     16
     17        * TestExpectations: Some remaining MathML pixel tests are broken by this patch.
     18        * mathml/invalid-scripts-crash-expected.txt: Added.
     19        * mathml/invalid-scripts-crash.html: Added.
     20        * mathml/presentation/multiscripts-equivalence-expected.html: Added.
     21        * mathml/presentation/multiscripts-equivalence.html: Added.
     22        * mathml/presentation/multiscripts-noscripts-expected.html: Added.
     23        * mathml/presentation/multiscripts-noscripts.html: Added.
     24        * mathml/presentation/multiscripts-positions-expected.html: Added.
     25        * mathml/presentation/multiscripts-positions.html: Added.
     26        * mathml/presentation/scripts-base-alignment-expected.html: Added.
     27        * mathml/presentation/scripts-base-alignment.html: Added.
     28        * mathml/presentation/scripts-horizontal-alignment-expected.html: Added.
     29        * mathml/presentation/scripts-horizontal-alignment.html: Added.
     30        * mathml/presentation/scripts-vertical-alignment-expected.html: Added.
     31        * mathml/presentation/scripts-vertical-alignment.html: Added.
     32        * mathml/scripts-addChild-expected.html: Added.
     33        * mathml/scripts-addChild.html: Added.
     34        * mathml/scripts-removeChild-expected.html: Added.
     35        * mathml/scripts-removeChild.html: Added.
     36        * platform/mac/accessibility/mathml-multiscript-expected.txt: Reference updated.
     37
     38
    1392013-09-14  Eric Carlson  <eric.carlson@apple.com>
    240
  • trunk/LayoutTests/TestExpectations

    r155720 r155797  
    1616# media/W3C/video/networkState/networkState_during_progress.html is flaky
    1717webkit.org/b/76280 media/W3C/video/networkState/networkState_during_progress.html [ Pass Failure ]
     18
     19# MathML pixel tests
     20webkit.org/b/99618  mathml/presentation/roots.xhtml [ Failure ]
     21webkit.org/b/99618  mathml/presentation/mo-stretch.html [ Failure ]
    1822
    1923# These conformace tests are no longer in sync with the latest specification
  • trunk/LayoutTests/platform/mac/accessibility/mathml-multiscript-expected.txt

    r151123 r155797  
    1 A 1 2 
    2 A 1 2 3 
    3 A 4 5 
    4 A 4 5 6 
    5 A 1 2 3 4 5 6 
    6 
    7 A 1 3 5 6
     1A
     21
     32
     4 
     5A
     61
     72
     83
     9 
     10A
     114
     125
     13 
     14A
     154
     165
     176
     18 
     19A
     201
     212
     223
     234
     245
     256
     26 
     27A
     28 
     29A
     301
     313
     325
     336
    834This tests checks that mmultiscript tags will create the correct accessibility math hierarchy.
    935
  • trunk/Source/WebCore/CMakeLists.txt

    r155790 r155797  
    22122212    rendering/mathml/RenderMathMLSpace.cpp
    22132213    rendering/mathml/RenderMathMLSquareRoot.cpp
    2214     rendering/mathml/RenderMathMLSubSup.cpp
     2214    rendering/mathml/RenderMathMLScripts.cpp
    22152215    rendering/mathml/RenderMathMLUnderOver.cpp
    22162216
  • trunk/Source/WebCore/ChangeLog

    r155796 r155797  
     12013-09-15  Frédéric Wang  <fred.wang@free.fr>
     2
     3        Implement the mmultiscripts tag
     4        https://bugs.webkit.org/show_bug.cgi?id=99618
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Tests: mathml/invalid-scripts-crash.html
     9               mathml/presentation/multiscripts-equivalence.html
     10               mathml/presentation/multiscripts-noscripts.html
     11               mathml/presentation/multiscripts-positions.html
     12               mathml/presentation/scripts-base-alignment.html
     13               mathml/presentation/scripts-horizontal-alignment.html
     14               mathml/presentation/scripts-vertical-alignment.html
     15               mathml/scripts-addChild.html
     16               mathml/scripts-removeChild.html
     17
     18        This relies on the existing msub/msup/msubsup code to implement the mmultiscripts tag. This also improves dynamic addition/removal of children for these MathML elements and adds a specific style for invalid children, so that they render like an merror tag. Finally, this fixes a bad memory access in the Accessibility render object of msubsup.
     19
     20        * CMakeLists.txt:
     21        * GNUmakefile.list.am:
     22        * Target.pri:
     23        * WebCore.vcxproj/WebCore.vcxproj:
     24        * WebCore.vcxproj/WebCore.vcxproj.filters:
     25        * WebCore.xcodeproj/project.pbxproj:
     26        * accessibility/AccessibilityRenderObject.cpp:
     27        (WebCore::AccessibilityRenderObject::isMathSubscriptSuperscript):
     28        (WebCore::AccessibilityRenderObject::mathSuperscriptObject):
     29        * css/mathml.css:
     30        (mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot):
     31        (mover > :last-child, munderover > :last-child):
     32        (msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + *):
     33        (merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ *):
     34        * mathml/MathMLInlineContainerElement.cpp:
     35        (WebCore::MathMLInlineContainerElement::createRenderer):
     36        * mathml/mathtags.in:
     37        * rendering/mathml/RenderMathMLBlock.h:
     38        (WebCore::RenderMathMLBlock::isRenderMathMLScripts):
     39        (WebCore::RenderMathMLBlock::isRenderMathMLScriptsWrapper):
     40        * rendering/mathml/RenderMathMLScripts.cpp: Added.
     41        (WebCore::isMPrescripts):
     42        (WebCore::RenderMathMLScripts::RenderMathMLScripts):
     43        (WebCore::RenderMathMLScripts::base):
     44        (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
     45        (WebCore::RenderMathMLScripts::fixAnonymousStyles):
     46        (WebCore::RenderMathMLScripts::addChildInternal):
     47        (WebCore::RenderMathMLScripts::removeChildInternal):
     48        (WebCore::RenderMathMLScripts::addChild):
     49        (WebCore::RenderMathMLScripts::removeChild):
     50        (WebCore::RenderMathMLScripts::styleDidChange):
     51        (WebCore::RenderMathMLScripts::unembellishedOperator):
     52        (WebCore::RenderMathMLScripts::layout):
     53        (WebCore::RenderMathMLScripts::firstLineBoxBaseline):
     54        (WebCore::RenderMathMLScriptsWrapper::createAnonymousWrapper):
     55        (WebCore::RenderMathMLScriptsWrapper::addChildInternal):
     56        (WebCore::RenderMathMLScriptsWrapper::addChild):
     57        (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
     58        (WebCore::RenderMathMLScriptsWrapper::removeChild):
     59        * rendering/mathml/RenderMathMLScripts.h: Added.
     60        (WebCore::RenderMathMLScriptsWrapper::RenderMathMLScriptsWrapper):
     61        (WebCore::RenderMathMLScriptsWrapper::renderName):
     62        (WebCore::RenderMathMLScriptsWrapper::isRenderMathMLScriptsWrapper):
     63        (WebCore::toRenderMathMLScriptsWrapper):
     64        (WebCore::RenderMathMLScripts::isRenderMathMLScripts):
     65        (WebCore::RenderMathMLScripts::renderName):
     66        (WebCore::toRenderMathMLScripts):
     67        * rendering/mathml/RenderMathMLSubSup.cpp: Removed.
     68        * rendering/mathml/RenderMathMLSubSup.h: Removed.
     69
    1702013-09-15  Andreas Kling  <akling@apple.com>
    271
  • trunk/Source/WebCore/GNUmakefile.list.am

    r155796 r155797  
    45684568        Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp \
    45694569        Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h \
    4570         Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp \
    4571         Source/WebCore/rendering/mathml/RenderMathMLSubSup.h \
     4570        Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp \
     4571        Source/WebCore/rendering/mathml/RenderMathMLScripts.h \
    45724572        Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp \
    45734573        Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h \
  • trunk/Source/WebCore/Target.pri

    r155774 r155797  
    24152415    rendering/mathml/RenderMathMLSpace.h \
    24162416    rendering/mathml/RenderMathMLSquareRoot.h \
    2417     rendering/mathml/RenderMathMLSubSup.h \
     2417    rendering/mathml/RenderMathMLScripts.h \
    24182418    rendering/mathml/RenderMathMLUnderOver.h \
    24192419    rendering/Pagination.h \
     
    36353635        rendering/mathml/RenderMathMLSpace.cpp \
    36363636        rendering/mathml/RenderMathMLSquareRoot.cpp \
    3637         rendering/mathml/RenderMathMLSubSup.cpp \
     3637        rendering/mathml/RenderMathMLScripts.cpp \
    36383638        rendering/mathml/RenderMathMLUnderOver.cpp
    36393639
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r155774 r155797  
    1113911139    <ClCompile Include="..\rendering\mathml\RenderMathMLSpace.cpp" />
    1114011140    <ClCompile Include="..\rendering\mathml\RenderMathMLSquareRoot.cpp" />
    11141     <ClCompile Include="..\rendering\mathml\RenderMathMLSubSup.cpp" />
     11141    <ClCompile Include="..\rendering\mathml\RenderMathMLScripts.cpp" />
    1114211142    <ClCompile Include="..\rendering\mathml\RenderMathMLUnderOver.cpp" />
    1114311143    <ClCompile Include="..\rendering\style\BasicShapes.cpp" />
     
    2010120101    <ClInclude Include="..\rendering\mathml\RenderMathMLSpace.h" />
    2010220102    <ClInclude Include="..\rendering\mathml\RenderMathMLSquareRoot.h" />
    20103     <ClInclude Include="..\rendering\mathml\RenderMathMLSubSup.h" />
     20103    <ClInclude Include="..\rendering\mathml\RenderMathMLScripts.h" />
    2010420104    <ClInclude Include="..\rendering\mathml\RenderMathMLUnderOver.h" />
    2010520105    <ClInclude Include="..\rendering\style\BasicShapes.h" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r155774 r155797  
    28632863      <Filter>rendering\mathml</Filter>
    28642864    </ClCompile>
    2865     <ClCompile Include="..\rendering\mathml\RenderMathMLSubSup.cpp">
     2865    <ClCompile Include="..\rendering\mathml\RenderMathMLScripts.cpp">
    28662866      <Filter>rendering\mathml</Filter>
    28672867    </ClCompile>
     
    98419841      <Filter>rendering\mathml</Filter>
    98429842    </ClInclude>
    9843     <ClInclude Include="..\rendering\mathml\RenderMathMLSubSup.h">
     9843    <ClInclude Include="..\rendering\mathml\RenderMathMLScripts.h">
    98449844      <Filter>rendering\mathml</Filter>
    98459845    </ClInclude>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r155774 r155797  
    12911291                439046E512DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */; };
    12921292                439046E612DA25E800AF80A2 /* RenderMathMLSquareRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */; };
    1293                 439046E712DA25E800AF80A2 /* RenderMathMLSubSup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D312DA25E800AF80A2 /* RenderMathMLSubSup.cpp */; };
    1294                 439046E812DA25E800AF80A2 /* RenderMathMLSubSup.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D412DA25E800AF80A2 /* RenderMathMLSubSup.h */; };
     1293                439046E712DA25E800AF80A2 /* RenderMathMLScripts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D312DA25E800AF80A2 /* RenderMathMLScripts.cpp */; };
     1294                439046E812DA25E800AF80A2 /* RenderMathMLScripts.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D412DA25E800AF80A2 /* RenderMathMLScripts.h */; };
    12951295                439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */; };
    12961296                439046EA12DA25E800AF80A2 /* RenderMathMLUnderOver.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D612DA25E800AF80A2 /* RenderMathMLUnderOver.h */; };
     
    77827782                439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLSquareRoot.cpp; path = mathml/RenderMathMLSquareRoot.cpp; sourceTree = "<group>"; };
    77837783                439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLSquareRoot.h; path = mathml/RenderMathMLSquareRoot.h; sourceTree = "<group>"; };
    7784                 439046D312DA25E800AF80A2 /* RenderMathMLSubSup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLSubSup.cpp; path = mathml/RenderMathMLSubSup.cpp; sourceTree = "<group>"; };
    7785                 439046D412DA25E800AF80A2 /* RenderMathMLSubSup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLSubSup.h; path = mathml/RenderMathMLSubSup.h; sourceTree = "<group>"; };
     7784                439046D312DA25E800AF80A2 /* RenderMathMLScripts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLScripts.cpp; path = mathml/RenderMathMLScripts.cpp; sourceTree = "<group>"; };
     7785                439046D412DA25E800AF80A2 /* RenderMathMLScripts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLScripts.h; path = mathml/RenderMathMLScripts.h; sourceTree = "<group>"; };
    77867786                439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLUnderOver.cpp; path = mathml/RenderMathMLUnderOver.cpp; sourceTree = "<group>"; };
    77877787                439046D612DA25E800AF80A2 /* RenderMathMLUnderOver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLUnderOver.h; path = mathml/RenderMathMLUnderOver.h; sourceTree = "<group>"; };
     
    1442214422                                439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */,
    1442314423                                439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */,
    14424                                 439046D312DA25E800AF80A2 /* RenderMathMLSubSup.cpp */,
    14425                                 439046D412DA25E800AF80A2 /* RenderMathMLSubSup.h */,
     14424                                439046D312DA25E800AF80A2 /* RenderMathMLScripts.cpp */,
     14425                                439046D412DA25E800AF80A2 /* RenderMathMLScripts.h */,
    1442614426                                439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */,
    1442714427                                439046D612DA25E800AF80A2 /* RenderMathMLUnderOver.h */,
     
    2360923609                                439046E412DA25E800AF80A2 /* RenderMathMLRow.h in Headers */,
    2361023610                                439046E612DA25E800AF80A2 /* RenderMathMLSquareRoot.h in Headers */,
    23611                                 439046E812DA25E800AF80A2 /* RenderMathMLSubSup.h in Headers */,
     23611                                439046E812DA25E800AF80A2 /* RenderMathMLScripts.h in Headers */,
    2361223612                                439046EA12DA25E800AF80A2 /* RenderMathMLUnderOver.h in Headers */,
    2361323613                                E4C279590CF9741900E97B98 /* RenderMedia.h in Headers */,
     
    2680526805                                5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */,
    2680626806                                439046E512DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp in Sources */,
    26807                                 439046E712DA25E800AF80A2 /* RenderMathMLSubSup.cpp in Sources */,
     26807                                439046E712DA25E800AF80A2 /* RenderMathMLScripts.cpp in Sources */,
    2680826808                                439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */,
    2680926809                                E4C279580CF9741900E97B98 /* RenderMedia.cpp in Sources */,
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r155671 r155797  
    34353435        return false;
    34363436   
    3437     return toRenderMathMLBlock(m_renderer)->isRenderMathMLSubSup();
     3437    return toRenderMathMLBlock(m_renderer)->isRenderMathMLScripts() && !isMathMultiscript();
    34383438}
    34393439
     
    36913691   
    36923692    AccessibilityChildrenVector children = this->children();
    3693     if (children.size() < 2)
    3694         return 0;
    3695    
    3696     if (node()->hasTagName(MathMLNames::msupTag))
     3693    unsigned count = children.size();
     3694
     3695    if (count >= 2 && node()->hasTagName(MathMLNames::msupTag))
    36973696        return children[1].get();
    3698     if (node()->hasTagName(MathMLNames::msubsupTag))
     3697
     3698    if (count >= 3 && node()->hasTagName(MathMLNames::msubsupTag))
    36993699        return children[2].get();
    37003700   
  • trunk/Source/WebCore/css/mathml.css

    r152235 r155797  
    3333}
    3434
    35 mo, mrow, mfenced, mfrac, msub, msup, msubsup, munder, mover, munderover, msqrt, mroot {
     35mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot {
    3636    display: -webkit-inline-flex !important;
    37 }
    38 
    39 msup {
    40     -webkit-align-items: flex-start;
    41 }
    42 
    43 msub {
    44     -webkit-align-items: flex-end;
    4537}
    4638
     
    8678}
    8779
    88 msubsup > :last-child, mover > :last-child, munderover > :last-child {
     80mover > :last-child, munderover > :last-child {
    8981    -webkit-order: -1;
    9082}
    9183
    92 msub > * + *, msup > * + *, msubsup > * + *, munder > * + *, mover > * + *, munderover > * + * {
     84msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + * {
    9385    font-size: 0.75em; /* FIXME: MathML standard is 0.71em */
    9486}
     
    170162}
    171163
    172 merror {
     164/* This is a special style for erroneous markup:
     165  - <merror> element.
     166  - extra children in script elements.
     167  - <mprescripts/> and <none/> elements in msub/msup/msubsup.
     168 */
     169merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ * {
    173170    outline: solid thin red;
    174171    font-weight: bold;
  • trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp

    r128837 r155797  
    3737#include "RenderMathMLRoot.h"
    3838#include "RenderMathMLRow.h"
     39#include "RenderMathMLScripts.h"
    3940#include "RenderMathMLSquareRoot.h"
    40 #include "RenderMathMLSubSup.h"
    4141#include "RenderMathMLUnderOver.h"
    4242
     
    6060        return new (arena) RenderMathMLRow(this);
    6161    if (hasLocalName(msubTag))
    62         return new (arena) RenderMathMLSubSup(this);
     62        return new (arena) RenderMathMLScripts(this);
    6363    if (hasLocalName(msupTag))
    64         return new (arena) RenderMathMLSubSup(this);
     64        return new (arena) RenderMathMLScripts(this);
    6565    if (hasLocalName(msubsupTag))
    66         return new (arena) RenderMathMLSubSup(this);
     66        return new (arena) RenderMathMLScripts(this);
     67    if (hasLocalName(mmultiscriptsTag))
     68        return new (arena) RenderMathMLScripts(this);
    6769    if (hasLocalName(moverTag))
    6870        return new (arena) RenderMathMLUnderOver(this);
  • trunk/Source/WebCore/mathml/mathtags.in

    r152235 r155797  
    2525mtd interfaceName=MathMLElement
    2626mmultiscripts interfaceName=MathMLInlineContainerElement
    27 mprescripts interfaceName=MathMLElement
    28 none interfaceName=MathMLElement
     27mprescripts interfaceName=MathMLInlineContainerElement
     28none interfaceName=MathMLInlineContainerElement
    2929
    3030#if 0 // Curently only for MathMLNames used by HTMLTreeBuilder.
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r153380 r155797  
    5555    virtual bool isRenderMathMLSpace() const { return false; }
    5656    virtual bool isRenderMathMLSquareRoot() const { return false; }
    57     virtual bool isRenderMathMLSubSup() const { return false; }
     57    virtual bool isRenderMathMLScripts() const { return false; }
     58    virtual bool isRenderMathMLScriptsWrapper() const { return false; }
    5859    virtual bool isRenderMathMLUnderOver() const { return false; }
    5960   
Note: See TracChangeset for help on using the changeset viewer.