Changeset 155797 in webkit
- Timestamp:
- Sep 15, 2013 1:08:08 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 20 added
- 2 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r155794 r155797 1 2013-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 1 39 2013-09-14 Eric Carlson <eric.carlson@apple.com> 2 40 -
trunk/LayoutTests/TestExpectations
r155720 r155797 16 16 # media/W3C/video/networkState/networkState_during_progress.html is flaky 17 17 webkit.org/b/76280 media/W3C/video/networkState/networkState_during_progress.html [ Pass Failure ] 18 19 # MathML pixel tests 20 webkit.org/b/99618 mathml/presentation/roots.xhtml [ Failure ] 21 webkit.org/b/99618 mathml/presentation/mo-stretch.html [ Failure ] 18 22 19 23 # 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 A 7 A 1 3 5 6 1 A 2 1 3 2 4 5 A 6 1 7 2 8 3 9 10 A 11 4 12 5 13 14 A 15 4 16 5 17 6 18 19 A 20 1 21 2 22 3 23 4 24 5 25 6 26 27 A 28 29 A 30 1 31 3 32 5 33 6 8 34 This tests checks that mmultiscript tags will create the correct accessibility math hierarchy. 9 35 -
trunk/Source/WebCore/CMakeLists.txt
r155790 r155797 2212 2212 rendering/mathml/RenderMathMLSpace.cpp 2213 2213 rendering/mathml/RenderMathMLSquareRoot.cpp 2214 rendering/mathml/RenderMathMLS ubSup.cpp2214 rendering/mathml/RenderMathMLScripts.cpp 2215 2215 rendering/mathml/RenderMathMLUnderOver.cpp 2216 2216 -
trunk/Source/WebCore/ChangeLog
r155796 r155797 1 2013-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 1 70 2013-09-15 Andreas Kling <akling@apple.com> 2 71 -
trunk/Source/WebCore/GNUmakefile.list.am
r155796 r155797 4568 4568 Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp \ 4569 4569 Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h \ 4570 Source/WebCore/rendering/mathml/RenderMathMLS ubSup.cpp \4571 Source/WebCore/rendering/mathml/RenderMathMLS ubSup.h \4570 Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp \ 4571 Source/WebCore/rendering/mathml/RenderMathMLScripts.h \ 4572 4572 Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp \ 4573 4573 Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h \ -
trunk/Source/WebCore/Target.pri
r155774 r155797 2415 2415 rendering/mathml/RenderMathMLSpace.h \ 2416 2416 rendering/mathml/RenderMathMLSquareRoot.h \ 2417 rendering/mathml/RenderMathMLS ubSup.h \2417 rendering/mathml/RenderMathMLScripts.h \ 2418 2418 rendering/mathml/RenderMathMLUnderOver.h \ 2419 2419 rendering/Pagination.h \ … … 3635 3635 rendering/mathml/RenderMathMLSpace.cpp \ 3636 3636 rendering/mathml/RenderMathMLSquareRoot.cpp \ 3637 rendering/mathml/RenderMathMLS ubSup.cpp \3637 rendering/mathml/RenderMathMLScripts.cpp \ 3638 3638 rendering/mathml/RenderMathMLUnderOver.cpp 3639 3639 -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r155774 r155797 11139 11139 <ClCompile Include="..\rendering\mathml\RenderMathMLSpace.cpp" /> 11140 11140 <ClCompile Include="..\rendering\mathml\RenderMathMLSquareRoot.cpp" /> 11141 <ClCompile Include="..\rendering\mathml\RenderMathMLS ubSup.cpp" />11141 <ClCompile Include="..\rendering\mathml\RenderMathMLScripts.cpp" /> 11142 11142 <ClCompile Include="..\rendering\mathml\RenderMathMLUnderOver.cpp" /> 11143 11143 <ClCompile Include="..\rendering\style\BasicShapes.cpp" /> … … 20101 20101 <ClInclude Include="..\rendering\mathml\RenderMathMLSpace.h" /> 20102 20102 <ClInclude Include="..\rendering\mathml\RenderMathMLSquareRoot.h" /> 20103 <ClInclude Include="..\rendering\mathml\RenderMathMLS ubSup.h" />20103 <ClInclude Include="..\rendering\mathml\RenderMathMLScripts.h" /> 20104 20104 <ClInclude Include="..\rendering\mathml\RenderMathMLUnderOver.h" /> 20105 20105 <ClInclude Include="..\rendering\style\BasicShapes.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r155774 r155797 2863 2863 <Filter>rendering\mathml</Filter> 2864 2864 </ClCompile> 2865 <ClCompile Include="..\rendering\mathml\RenderMathMLS ubSup.cpp">2865 <ClCompile Include="..\rendering\mathml\RenderMathMLScripts.cpp"> 2866 2866 <Filter>rendering\mathml</Filter> 2867 2867 </ClCompile> … … 9841 9841 <Filter>rendering\mathml</Filter> 9842 9842 </ClInclude> 9843 <ClInclude Include="..\rendering\mathml\RenderMathMLS ubSup.h">9843 <ClInclude Include="..\rendering\mathml\RenderMathMLScripts.h"> 9844 9844 <Filter>rendering\mathml</Filter> 9845 9845 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r155774 r155797 1291 1291 439046E512DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */; }; 1292 1292 439046E612DA25E800AF80A2 /* RenderMathMLSquareRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */; }; 1293 439046E712DA25E800AF80A2 /* RenderMathMLS ubSup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D312DA25E800AF80A2 /* RenderMathMLSubSup.cpp */; };1294 439046E812DA25E800AF80A2 /* RenderMathMLS ubSup.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 */; }; 1295 1295 439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */; }; 1296 1296 439046EA12DA25E800AF80A2 /* RenderMathMLUnderOver.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D612DA25E800AF80A2 /* RenderMathMLUnderOver.h */; }; … … 7782 7782 439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLSquareRoot.cpp; path = mathml/RenderMathMLSquareRoot.cpp; sourceTree = "<group>"; }; 7783 7783 439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLSquareRoot.h; path = mathml/RenderMathMLSquareRoot.h; sourceTree = "<group>"; }; 7784 439046D312DA25E800AF80A2 /* RenderMathMLS ubSup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLSubSup.cpp; path = mathml/RenderMathMLSubSup.cpp; sourceTree = "<group>"; };7785 439046D412DA25E800AF80A2 /* RenderMathMLS ubSup.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>"; }; 7786 7786 439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLUnderOver.cpp; path = mathml/RenderMathMLUnderOver.cpp; sourceTree = "<group>"; }; 7787 7787 439046D612DA25E800AF80A2 /* RenderMathMLUnderOver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLUnderOver.h; path = mathml/RenderMathMLUnderOver.h; sourceTree = "<group>"; }; … … 14422 14422 439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */, 14423 14423 439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */, 14424 439046D312DA25E800AF80A2 /* RenderMathMLS ubSup.cpp */,14425 439046D412DA25E800AF80A2 /* RenderMathMLS ubSup.h */,14424 439046D312DA25E800AF80A2 /* RenderMathMLScripts.cpp */, 14425 439046D412DA25E800AF80A2 /* RenderMathMLScripts.h */, 14426 14426 439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */, 14427 14427 439046D612DA25E800AF80A2 /* RenderMathMLUnderOver.h */, … … 23609 23609 439046E412DA25E800AF80A2 /* RenderMathMLRow.h in Headers */, 23610 23610 439046E612DA25E800AF80A2 /* RenderMathMLSquareRoot.h in Headers */, 23611 439046E812DA25E800AF80A2 /* RenderMathMLS ubSup.h in Headers */,23611 439046E812DA25E800AF80A2 /* RenderMathMLScripts.h in Headers */, 23612 23612 439046EA12DA25E800AF80A2 /* RenderMathMLUnderOver.h in Headers */, 23613 23613 E4C279590CF9741900E97B98 /* RenderMedia.h in Headers */, … … 26805 26805 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */, 26806 26806 439046E512DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp in Sources */, 26807 439046E712DA25E800AF80A2 /* RenderMathMLS ubSup.cpp in Sources */,26807 439046E712DA25E800AF80A2 /* RenderMathMLScripts.cpp in Sources */, 26808 26808 439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */, 26809 26809 E4C279580CF9741900E97B98 /* RenderMedia.cpp in Sources */, -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r155671 r155797 3435 3435 return false; 3436 3436 3437 return toRenderMathMLBlock(m_renderer)->isRenderMathMLS ubSup();3437 return toRenderMathMLBlock(m_renderer)->isRenderMathMLScripts() && !isMathMultiscript(); 3438 3438 } 3439 3439 … … 3691 3691 3692 3692 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)) 3697 3696 return children[1].get(); 3698 if (node()->hasTagName(MathMLNames::msubsupTag)) 3697 3698 if (count >= 3 && node()->hasTagName(MathMLNames::msubsupTag)) 3699 3699 return children[2].get(); 3700 3700 -
trunk/Source/WebCore/css/mathml.css
r152235 r155797 33 33 } 34 34 35 mo, mrow, mfenced, mfrac, msub, msup, msubsup, m under, mover, munderover, msqrt, mroot {35 mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot { 36 36 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;45 37 } 46 38 … … 86 78 } 87 79 88 m subsup > :last-child, mover > :last-child, munderover > :last-child {80 mover > :last-child, munderover > :last-child { 89 81 -webkit-order: -1; 90 82 } 91 83 92 msub > * + *, msup > * + *, msubsup > * + *, m under > * + *, mover > * + *, munderover > * + * {84 msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + * { 93 85 font-size: 0.75em; /* FIXME: MathML standard is 0.71em */ 94 86 } … … 170 162 } 171 163 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 */ 169 merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ * { 173 170 outline: solid thin red; 174 171 font-weight: bold; -
trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp
r128837 r155797 37 37 #include "RenderMathMLRoot.h" 38 38 #include "RenderMathMLRow.h" 39 #include "RenderMathMLScripts.h" 39 40 #include "RenderMathMLSquareRoot.h" 40 #include "RenderMathMLSubSup.h"41 41 #include "RenderMathMLUnderOver.h" 42 42 … … 60 60 return new (arena) RenderMathMLRow(this); 61 61 if (hasLocalName(msubTag)) 62 return new (arena) RenderMathMLS ubSup(this);62 return new (arena) RenderMathMLScripts(this); 63 63 if (hasLocalName(msupTag)) 64 return new (arena) RenderMathMLS ubSup(this);64 return new (arena) RenderMathMLScripts(this); 65 65 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); 67 69 if (hasLocalName(moverTag)) 68 70 return new (arena) RenderMathMLUnderOver(this); -
trunk/Source/WebCore/mathml/mathtags.in
r152235 r155797 25 25 mtd interfaceName=MathMLElement 26 26 mmultiscripts interfaceName=MathMLInlineContainerElement 27 mprescripts interfaceName=MathML Element28 none interfaceName=MathML Element27 mprescripts interfaceName=MathMLInlineContainerElement 28 none interfaceName=MathMLInlineContainerElement 29 29 30 30 #if 0 // Curently only for MathMLNames used by HTMLTreeBuilder. -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h
r153380 r155797 55 55 virtual bool isRenderMathMLSpace() const { return false; } 56 56 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; } 58 59 virtual bool isRenderMathMLUnderOver() const { return false; } 59 60
Note: See TracChangeset
for help on using the changeset viewer.