Source/WebCore/ChangeLog

 12014-01-16 Gurpreet Kaur <k.gurpreet@samsung.com>
 2
 3 Add support for menclose element
 4 https://bugs.webkit.org/show_bug.cgi?id=85729
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Added support for menclose element. MathML <menclose> element renders
 9 its content inside an enclosing notation specified by the notation
 10 attribute. The notation attribute can have values longdiv, box, left,
 11 right, top, bottom , radical, madruwb, actuarial, roundedbox, circle,
 12 updiagonalstrike, downdiagonalstrike, verticalstrike and
 13 horizontalstrike.
 14
 15 Tests: mathml/presentation/menclose-add-children.html
 16 mathml/presentation/menclose-notation-attribute-add.html
 17 mathml/presentation/menclose-notation-attribute-change-value.html
 18 mathml/presentation/menclose-notation-attribute-remove.html
 19 mathml/presentation/menclose-notation-attribute-set1.html
 20 mathml/presentation/menclose-notation-attribute-set2.html
 21 mathml/presentation/menclose-notation-no-overlap.html
 22 mathml/presentation/menclose-notation-radical.html
 23 mathml/presentation/menclose-remove-children.html
 24
 25 * CMakeLists.txt:
 26 * GNUmakefile.list.am:
 27 * WebCore.vcxproj/WebCore.vcxproj:
 28 * WebCore.vcxproj/WebCore.vcxproj.filters:
 29 * WebCore.xcodeproj/project.pbxproj:
 30 * css/mathml.css:
 31 (mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose):
 32 (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose):
 33 * mathml/MathMLAllInOne.cpp:
 34 * mathml/MathMLElement.h:
 35 (WebCore::MathMLElement::isMathMLToken):
 36 * mathml/MathMLInlineContainerElement.cpp:
 37 * mathml/MathMLMencloseElement.cpp: Added.
 38 (WebCore::MathMLMencloseElement::MathMLMencloseElement):
 39 (WebCore::MathMLMencloseElement::create):
 40 (WebCore::MathMLMencloseElement::createElementRenderer):
 41 (WebCore::MathMLMencloseElement::isPresentationAttribute):
 42 (WebCore::MathMLMencloseElement::finishParsingChildren):
 43 (WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
 44 (WebCore::MathMLMencloseElement::longDivLeftPadding):
 45 * mathml/MathMLMencloseElement.h: Added.
 46 (WebCore::toMathMLMencloseElement):
 47 * mathml/mathattrs.in:
 48 * mathml/mathtags.in:
 49 * rendering/mathml/RenderMathMLMenclose.cpp: Added.
 50 (WebCore::RenderMathMLMenclose::RenderMathMLMenclose):
 51 (WebCore::RenderMathMLMenclose::addChild):
 52 (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
 53 (WebCore::RenderMathMLMenclose::updateLogicalHeight):
 54 (WebCore::RenderMathMLMenclose::paint):
 55 (WebCore::RenderMathMLMenclose::checkNotationalValuesValidity):
 56 * rendering/mathml/RenderMathMLMenclose.h: Added.
 57 * rendering/mathml/RenderMathMLRoot.cpp:
 58 (WebCore::RenderMathMLRoot::RenderMathMLRoot):
 59 * rendering/mathml/RenderMathMLRoot.h:
 60 * rendering/mathml/RenderMathMLSquareRoot.cpp:
 61 (WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot):
 62 (WebCore::RenderMathMLSquareRoot::createAnonymousWithParentRenderer):
 63 * rendering/mathml/RenderMathMLSquareRoot.h:
 64 Added new file related to menclose element implementation. Menclose
 65 element is created and while parsing its notation attribute based on
 66 its values liek top, left CSSBorder properties are applied and for
 67 values like circle, verticalstrike, longidv its taken care in paint.
 68 For radical value an anonymous RenderMathMLSquareRoot is created as
 69 child of menclose.
 70
1712014-01-15 Carlos Garcia Campos <cgarcia@igalia.com>
272
373 [GTK][EFL][NIX] Do not use PrintContext, Frame and DocumentLoader in Errors
162118

Source/WebCore/CMakeLists.txt

@@set(WebCore_SOURCES
17171717 mathml/MathMLElement.cpp
17181718 mathml/MathMLInlineContainerElement.cpp
17191719 mathml/MathMLMathElement.cpp
 1720 mathml/MathMLMencloseElement.cpp
17201721 mathml/MathMLSelectElement.cpp
17211722 mathml/MathMLTextElement.cpp
17221723

@@set(WebCore_SOURCES
22442245 rendering/mathml/RenderMathMLFenced.cpp
22452246 rendering/mathml/RenderMathMLFraction.cpp
22462247 rendering/mathml/RenderMathMLMath.cpp
 2248 rendering/mathml/RenderMathMLMenclose.cpp
22472249 rendering/mathml/RenderMathMLOperator.cpp
22482250 rendering/mathml/RenderMathMLRoot.cpp
22492251 rendering/mathml/RenderMathMLRow.cpp
161548

Source/WebCore/GNUmakefile.list.am

@@webcore_sources += \
40724072 Source/WebCore/mathml/MathMLInlineContainerElement.h \
40734073 Source/WebCore/mathml/MathMLMathElement.cpp \
40744074 Source/WebCore/mathml/MathMLMathElement.h \
 4075 Source/WebCore/mathml/MathMLMencloseElement.cpp \
 4076 Source/WebCore/mathml/MathMLMencloseElement.h \
40754077 Source/WebCore/mathml/MathMLSelectElement.cpp \
40764078 Source/WebCore/mathml/MathMLSelectElement.h \
40774079 Source/WebCore/mathml/MathMLTextElement.cpp \

@@webcore_sources += \
45594561 Source/WebCore/rendering/mathml/RenderMathMLFraction.h \
45604562 Source/WebCore/rendering/mathml/RenderMathMLMath.cpp \
45614563 Source/WebCore/rendering/mathml/RenderMathMLMath.h \
 4564 Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp \
 4565 Source/WebCore/rendering/mathml/RenderMathMLMenclose.h \
45624566 Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp \
45634567 Source/WebCore/rendering/mathml/RenderMathMLOperator.h \
45644568 Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp \
161548

Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

1124711247 <ClCompile Include="..\rendering\mathml\RenderMathMLFenced.cpp" />
1124811248 <ClCompile Include="..\rendering\mathml\RenderMathMLFraction.cpp" />
1124911249 <ClCompile Include="..\rendering\mathml\RenderMathMLMath.cpp" />
 11250 <ClCompile Include="..\rendering\mathml\RenderMathMLMenclose.cpp" />
1125011251 <ClCompile Include="..\rendering\mathml\RenderMathMLOperator.cpp" />
1125111252 <ClCompile Include="..\rendering\mathml\RenderMathMLRoot.cpp" />
1125211253 <ClCompile Include="..\rendering\mathml\RenderMathMLRow.cpp" />

1811118112 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
1811218113 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
1811318114 </ClCompile>
 18115 <ClCompile Include="..\mathml\MathMLMencloseElement.cpp">
 18116 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 18117 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
 18118 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
 18119 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
 18120 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
 18121 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
 18122 </ClCompile>
1811418123 <ClCompile Include="..\mathml\MathMLSelectElement.cpp">
1811518124 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
1811618125 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>

2008220091 <ClInclude Include="..\rendering\mathml\RenderMathMLFenced.h" />
2008320092 <ClInclude Include="..\rendering\mathml\RenderMathMLFraction.h" />
2008420093 <ClInclude Include="..\rendering\mathml\RenderMathMLMath.h" />
 20094 <ClInclude Include="..\rendering\mathml\RenderMathMLMenclose.h" />
2008520095 <ClInclude Include="..\rendering\mathml\RenderMathMLOperator.h" />
2008620096 <ClInclude Include="..\rendering\mathml\RenderMathMLRoot.h" />
2008720097 <ClInclude Include="..\rendering\mathml\RenderMathMLRow.h" />

2107921089 <ClInclude Include="..\mathml\MathMLElement.h" />
2108021090 <ClInclude Include="..\mathml\MathMLInlineContainerElement.h" />
2108121091 <ClInclude Include="..\mathml\MathMLMathElement.h" />
 21092 <ClInclude Include="..\mathml\MathMLMencloseElement.h" />
2108221093 <ClInclude Include="..\mathml\MathMLSelectElement.h" />
2108321094 <ClInclude Include="..\mathml\MathMLTextElement.h" />
2108421095 <ClInclude Include="..\editing\AlternativeTextController.h" />
161548

Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

27782778 <ClCompile Include="..\rendering\mathml\RenderMathMLMath.cpp">
27792779 <Filter>rendering\mathml</Filter>
27802780 </ClCompile>
 2781 <ClCompile Include="..\rendering\mathml\RenderMathMLMenclose.cpp">
 2782 <Filter>rendering\mathml</Filter>
 2783 </ClCompile>
27812784 <ClCompile Include="..\rendering\mathml\RenderMathMLOperator.cpp">
27822785 <Filter>rendering\mathml</Filter>
27832786 </ClCompile>

49924995 <ClCompile Include="..\mathml\MathMLMathElement.cpp">
49934996 <Filter>rendering\mathml</Filter>
49944997 </ClCompile>
 4998 <ClCompile Include="..\mathml\MathMLMencloseElement.cpp">
 4999 <Filter>rendering\mathml</Filter>
 5000 </ClCompile>
49955001 <ClCompile Include="..\mathml\MathMLSelectElement.cpp">
49965002 <Filter>rendering\mathml</Filter>
49975003 </ClCompile>

97379743 <ClInclude Include="..\rendering\mathml\RenderMathMLMath.h">
97389744 <Filter>rendering\mathml</Filter>
97399745 </ClInclude>
 9746 <ClInclude Include="..\rendering\mathml\RenderMathMLMenclose.h">
 9747 <Filter>rendering\mathml</Filter>
 9748 </ClInclude>
97409749 <ClInclude Include="..\rendering\mathml\RenderMathMLOperator.h">
97419750 <Filter>rendering\mathml</Filter>
97429751 </ClInclude>

1262312632 <ClInclude Include="..\mathml\MathMLMathElement.h">
1262412633 <Filter>rendering\mathml</Filter>
1262512634 </ClInclude>
 12635 <ClInclude Include="..\mathml\MathMLMencloseElement.h">
 12636 <Filter>rendering\mathml</Filter>
 12637 </ClInclude>
1262612638 <ClInclude Include="..\mathml\MathMLSelectElement.h">
1262712639 <Filter>rendering\mathml</Filter>
1262812640 </ClInclude>
161548

Source/WebCore/WebCore.xcodeproj/project.pbxproj

6666 0562F9461573ECEB0031CA16 /* WebKitCSSSVGDocumentValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0562F9441573ECEB0031CA16 /* WebKitCSSSVGDocumentValue.cpp */; };
6767 0562F9471573ECEB0031CA16 /* WebKitCSSSVGDocumentValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0562F9451573ECEB0031CA16 /* WebKitCSSSVGDocumentValue.h */; };
6868 0562F9611573F88F0031CA16 /* PlatformLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0562F9601573F88F0031CA16 /* PlatformLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
 69 05D913CEEAB2A60534218ACF /* MathMLMencloseElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */; };
6970 05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 05FD69DF12845D4300B2BEB3 /* DOMTimeStamp.h */; settings = {ATTRIBUTES = (Private, ); }; };
7071 06027CAD0B1CBFC000884B2D /* ContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
7172 06027CB30B1CC03D00884B2D /* ContextMenuItemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 06027CB20B1CC03D00884B2D /* ContextMenuItemMac.mm */; };

11621163 3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA520FFC157B00921962 /* NotificationCenter.h */; };
11631164 339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
11641165 33D0212D131DB37B004091A8 /* CookieStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = E13F01EA1270E10D00DFBA71 /* CookieStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
 1166 3571883EEF618793751E4089 /* RenderMathMLMenclose.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */; };
11651167 3717D7E817ECC591003C276D /* extract-localizable-strings.pl in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */; };
11661168 371941961566B37200A276D8 /* WebCoreNSCellExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 371941941566B37200A276D8 /* WebCoreNSCellExtras.m */; };
11671169 371941971566B37200A276D8 /* WebCoreNSCellExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 371941951566B37200A276D8 /* WebCoreNSCellExtras.h */; };

78797881 3390CA520FFC157B00921962 /* NotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationCenter.h; sourceTree = "<group>"; };
78807882 3390CA530FFC157B00921962 /* NotificationCenter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NotificationCenter.idl; sourceTree = "<group>"; };
78817883 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookiesStrategy.h; sourceTree = "<group>"; };
 7884 3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLMenclose.cpp; path = rendering/mathml/RenderMathMLMenclose.cpp; sourceTree = SOURCE_ROOT; };
78827885 3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = "extract-localizable-strings.pl"; sourceTree = "<group>"; };
78837886 371941941566B37200A276D8 /* WebCoreNSCellExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebCoreNSCellExtras.m; sourceTree = "<group>"; };
78847887 371941951566B37200A276D8 /* WebCoreNSCellExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreNSCellExtras.h; sourceTree = "<group>"; };

1036010363 A1E1154313015C3D0054AC8C /* DistantLightSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DistantLightSource.cpp; path = filters/DistantLightSource.cpp; sourceTree = "<group>"; };
1036110364 A1E1154513015C4E0054AC8C /* PointLightSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PointLightSource.cpp; path = filters/PointLightSource.cpp; sourceTree = "<group>"; };
1036210365 A1E1154713015C5D0054AC8C /* SpotLightSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SpotLightSource.cpp; path = filters/SpotLightSource.cpp; sourceTree = "<group>"; };
 10366 A208E222A56A0C7575F2A72E /* RenderMathMLMenclose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLMenclose.h; path = rendering/mathml/RenderMathMLMenclose.h; sourceTree = SOURCE_ROOT; };
1036310367 A24BF77915CC3BAF003191F2 /* WebKitCSSMixFunctionValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSMixFunctionValue.h; sourceTree = "<group>"; };
1036410368 A24BF77A15CC3BAF003191F2 /* WebKitCSSMixFunctionValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSMixFunctionValue.cpp; sourceTree = "<group>"; };
1036510369 A29532CD15DD5E1700469EBC /* CustomFilterValidatedProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CustomFilterValidatedProgram.cpp; path = filters/CustomFilterValidatedProgram.cpp; sourceTree = "<group>"; };

1239912403 C3CF17A115B0063F00276D39 /* IdTargetObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdTargetObserver.h; sourceTree = "<group>"; };
1240012404 C3CF17A215B0063F00276D39 /* IdTargetObserverRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IdTargetObserverRegistry.cpp; sourceTree = "<group>"; };
1240112405 C3CF17A315B0063F00276D39 /* IdTargetObserverRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdTargetObserverRegistry.h; sourceTree = "<group>"; };
 12406 C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLMencloseElement.cpp; sourceTree = "<group>"; };
1240212407 C4CD629818383766007EBAF1 /* FrameSnapshotting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameSnapshotting.cpp; sourceTree = "<group>"; };
1240312408 C4CD629918383766007EBAF1 /* FrameSnapshotting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameSnapshotting.h; sourceTree = "<group>"; };
1240412409 C50B561412119D23008B46E0 /* GroupSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GroupSettings.cpp; sourceTree = "<group>"; };

1265212657 CE08C3CF152B599A0021B8C2 /* AlternativeTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlternativeTextController.cpp; sourceTree = "<group>"; };
1265312658 CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlternativeTextController.h; sourceTree = "<group>"; };
1265412659 CE5CB1B314EDAB6F00BB2795 /* EventSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSender.h; sourceTree = "<group>"; };
 12660 CE6D89294C7AACE0AD89B3DD /* MathMLMencloseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLMencloseElement.h; sourceTree = "<group>"; };
1265512661 CE7B2DAF1586ABAD0098B3FA /* AlternativeTextUIController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlternativeTextUIController.h; path = mac/AlternativeTextUIController.h; sourceTree = "<group>"; };
1265612662 CE7B2DB01586ABAD0098B3FA /* AlternativeTextUIController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AlternativeTextUIController.mm; path = mac/AlternativeTextUIController.mm; sourceTree = "<group>"; };
1265712663 CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextAlternativeWithRange.h; path = mac/TextAlternativeWithRange.h; sourceTree = "<group>"; };

1407414080 034768DFFF38A50411DB9C8B /* Products */,
1407514081 1CDD44660BA9C80000F90147 /* Configurations */,
1407614082 449195900FBE175B00D9F824 /* Exports */,
 14083 3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */,
 14084 A208E222A56A0C7575F2A72E /* RenderMathMLMenclose.h */,
1407714085 );
1407814086 name = WebKit;
1407914087 sourceTree = "<group>";

2185821866 FABE72F01059C1EB00D999DD /* MathMLInlineContainerElement.h */,
2185921867 FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */,
2186021868 FABE72F21059C1EB00D999DD /* MathMLMathElement.h */,
 21869 C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */,
 21870 CE6D89294C7AACE0AD89B3DD /* MathMLMencloseElement.h */,
2186121871 F75A059AF170D8FAA5B8CABE /* MathMLSelectElement.cpp */,
2186221872 59780849D41E6F65D81198BC /* MathMLSelectElement.h */,
2186321873 FA654A691108ABED002615E0 /* MathMLTextElement.cpp */,

2586225872 isa = PBXSourcesBuildPhase;
2586325873 buildActionMask = 2147483647;
2586425874 files = (
 25875 05D913CEEAB2A60534218ACF /* MathMLMencloseElement.cpp in Sources */,
 25876 3571883EEF618793751E4089 /* RenderMathMLMenclose.cpp in Sources */,
2586525877 7A29BA6A187B7C1D00F29CEB /* TemporaryOpenGLSetting.cpp in Sources */,
2586625878 41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */,
2586725879 0F29C16E1300C2E2002D794E /* AccessibilityAllInOne.cpp in Sources */,
161548

Source/WebCore/css/mathml.css

@@math[display="block"] {
4242 -webkit-margin-after: 1em;
4343}
4444
45 mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle {
 45mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose {
4646 display: -webkit-inline-flex !important;
4747}
4848
49 math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle {
 49math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose {
5050 -webkit-align-items: baseline;
5151}
5252msqrt > * { /* This rule is needed because of <msqrt>'s anonymous <mrow>. */
161548

Source/WebCore/mathml/MathMLAllInOne.cpp

2828#include "MathMLElement.cpp"
2929#include "MathMLInlineContainerElement.cpp"
3030#include "MathMLMathElement.cpp"
 31#include "MathMLMencloseElement.cpp"
3132#include "MathMLSelectElement.cpp"
3233#include "MathMLTextElement.cpp"
3334
161548

Source/WebCore/mathml/MathMLElement.h

@@public:
5757protected:
5858 MathMLElement(const QualifiedName& tagName, Document&);
5959
60  virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
61  virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
62  virtual void attributeChanged(const QualifiedName&, const AtomicString& newValue, AttributeModificationReason) OVERRIDE;
 60 virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
 61 virtual bool childShouldCreateRenderer(const Node&) const override;
 62 virtual void attributeChanged(const QualifiedName&, const AtomicString& newValue, AttributeModificationReason) override;
6363
 64 virtual bool isPresentationAttribute(const QualifiedName&) const override;
 65 virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
6466private:
65  virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
66  virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) OVERRIDE;
6767
6868 virtual void updateSelectedChild() { };
6969};
161548

Source/WebCore/mathml/MathMLInlineContainerElement.cpp

3434#include "RenderMathMLBlock.h"
3535#include "RenderMathMLFenced.h"
3636#include "RenderMathMLFraction.h"
 37#include "RenderMathMLMenclose.h"
3738#include "RenderMathMLRoot.h"
3839#include "RenderMathMLRow.h"
3940#include "RenderMathMLScripts.h"
161548

Source/WebCore/mathml/MathMLMencloseElement.cpp

 1/*
 2 * Copyright (C) 2014 Gurpreet Kaur (k.gurpreet@samsung.com). All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 15 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 16 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 17 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 19 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(MATHML)
 29#include "MathMLMencloseElement.h"
 30
 31#include "MathMLNames.h"
 32#include "RenderElement.h"
 33#include "RenderMathMLMenclose.h"
 34#include "RenderObject.h"
 35#include "TextRun.h"
 36#include <wtf/Ref.h>
 37#include <wtf/text/StringBuilder.h>
 38
 39
 40namespace WebCore {
 41
 42MathMLMencloseElement::MathMLMencloseElement(const QualifiedName& tagName, Document& document)
 43 : MathMLInlineContainerElement(tagName, document)
 44 , m_isRadicalValue(false)
 45{
 46}
 47
 48PassRefPtr<MathMLMencloseElement> MathMLMencloseElement::create(const QualifiedName& tagName, Document& document)
 49{
 50 return adoptRef(new MathMLMencloseElement(tagName, document));
 51}
 52
 53RenderPtr<RenderElement> MathMLMencloseElement::createElementRenderer(PassRef<RenderStyle> style)
 54{
 55 return createRenderer<RenderMathMLMenclose>(*this, std::move(style));
 56}
 57
 58bool MathMLMencloseElement::isPresentationAttribute(const QualifiedName& name) const
 59{
 60 if (name == MathMLNames::notationAttr)
 61 return true;
 62 return MathMLElement::isPresentationAttribute(name);
 63}
 64
 65void MathMLMencloseElement::finishParsingChildren()
 66{
 67 MathMLInlineContainerElement::finishParsingChildren();
 68 // when notation value is radical and menclose does not have any child then
 69 // we add anonymous squareroot child to menclose so that square root symbol
 70 // can be rendered.
 71 if (m_isRadicalValue && !firstElementChild())
 72 renderer()->addChild(nullptr, nullptr);
 73}
 74
 75void MathMLMencloseElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style)
 76{
 77 if (name == MathMLNames::notationAttr) {
 78 String val = value;
 79 if (!val.isEmpty()) {
 80 val.split(" ", m_notationValues);
 81 size_t attrvaluesSize = m_notationValues.size();
 82 for (size_t i = 0; i < attrvaluesSize; i++) {
 83 if (m_notationValues[i] == "top" || m_notationValues[i] == "longdiv") {
 84 if (m_notationValues[i]== "longdiv")
 85 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingLeft, longDivLeftPadding());
 86 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderTopStyle, "solid");
 87 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderTopWidth, "thin");
 88 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingTop, ".3ex");
 89 } else if (m_notationValues[i] == "bottom") {
 90 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderBottomStyle, "solid");
 91 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderBottomWidth, "thin");
 92 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingBottom, ".3ex");
 93 } else if (m_notationValues[i] == "left") {
 94 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderLeftStyle, "solid");
 95 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderLeftWidth, "thin");
 96 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingLeft, ".3ex");
 97 } else if (m_notationValues[i] == "right") {
 98 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderRightStyle, "solid");
 99 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderRightWidth, "thin");
 100 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingRight, ".3ex");
 101 } else if (m_notationValues[i] == "box" || m_notationValues[i] == "roundedbox") {
 102 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, "solid");
 103 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidth, "thin");
 104 addPropertyToPresentationAttributeStyle(style, CSSPropertyPadding, ".3ex");
 105 if (m_notationValues[i] == "roundedbox")
 106 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderRadius, ASCIILiteral("5px"));
 107 } else if (m_notationValues[i] == "actuarial" || m_notationValues[i] == "madruwb") {
 108 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderRightStyle, "solid");
 109 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderRightWidth, "thin");
 110 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingRight, ".3ex");
 111 if (m_notationValues[i] == "actuarial") {
 112 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderTopStyle, "solid");
 113 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderTopWidth, "thin");
 114 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingTop, ".3ex");
 115 } else if (m_notationValues[i] == "madruwb") {
 116 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderBottomStyle, "solid");
 117 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderBottomWidth, "thin");
 118 addPropertyToPresentationAttributeStyle(style, CSSPropertyPaddingBottom, ".3ex");
 119 }
 120 } else if (m_notationValues[i] == "radical")
 121 m_isRadicalValue = true;
 122 }
 123 }
 124 } else
 125 MathMLInlineContainerElement::collectStyleForPresentationAttribute(name, value, style);
 126}
 127
 128
 129String MathMLMencloseElement::longDivLeftPadding() const
 130{
 131 StringBuilder padding;
 132 float fontSize = 0;
 133 String closingBrace = ")";
 134 TextRun run(closingBrace.impl(), closingBrace.length());
 135 Node* node = parentNode();
 136 if (node && node->renderer()) {
 137 const Font& font = node->renderer()->style().font();
 138 fontSize = font.width(run);
 139 padding.append(String::number(fontSize));
 140 padding.append("px");
 141 }
 142 return padding.toString();
 143}
 144
 145}
 146#endif // ENABLE(MATHML)
0

Source/WebCore/mathml/MathMLMencloseElement.h

 1/*
 2 * Copyright (C) 2014 Gurpreet Kaur (k.gurpreet@samsung.com). All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 15 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 16 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 17 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 19 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef MathMLMencloseElement_h
 27#define MathMLMencloseElement_h
 28
 29#if ENABLE(MATHML)
 30#include "MathMLInlineContainerElement.h"
 31
 32namespace WebCore {
 33
 34class MathMLMencloseElement final: public MathMLInlineContainerElement {
 35public:
 36 static PassRefPtr<MathMLMencloseElement> create(const QualifiedName& tagName, Document&);
 37 const Vector<String>& notationValues() const { return m_notationValues; }
 38 bool isRadical() const { return m_isRadicalValue; }
 39
 40private:
 41 MathMLMencloseElement(const QualifiedName&, Document&);
 42 virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
 43 virtual bool isPresentationAttribute(const QualifiedName&) const override;
 44 virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
 45 virtual void finishParsingChildren() override;
 46 String longDivLeftPadding() const;
 47
 48 Vector<String> m_notationValues;
 49 bool m_isRadicalValue;
 50};
 51
 52inline MathMLMencloseElement* toMathMLMencloseElement(Node* node)
 53{
 54 ASSERT_WITH_SECURITY_IMPLICATION(!node || (node->isElementNode() && toElement(node)->hasTagName(MathMLNames::mencloseTag)));
 55 return static_cast<MathMLMencloseElement*>(node);
 56}
 57
 58}
 59
 60#endif // ENABLE(MATHML)
 61#endif // MathMLMencloseElement_h
0

Source/WebCore/mathml/mathattrs.in

@@mathbackground
2424mathcolor
2525mathsize
2626mathvariant
 27notation
2728numalign
2829open
2930rowspan
161548

Source/WebCore/mathml/mathtags.in

@@mtr interfaceName=MathMLElement
3131mtd interfaceName=MathMLElement
3232mmultiscripts interfaceName=MathMLInlineContainerElement
3333mprescripts interfaceName=MathMLInlineContainerElement
 34menclose interfaceName=MathMLMencloseElement
3435none interfaceName=MathMLInlineContainerElement
3536semantics interfaceName=MathMLSelectElement
3637
3738maligngroup interfaceName=MathMLElement
3839malignmark interfaceName=MathMLElement
39 menclose interfaceName=MathMLElement
4040mglyph interfaceName=MathMLElement
4141mlabeledtr interfaceName=MathMLElement
4242mlongdiv interfaceName=MathMLElement
161548

Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp

 1/*
 2 * Copyright (C) 2014 Gurpreet Kaur (k.gurpreet@samsung.com). All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 15 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 16 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 17 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 19 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(MATHML)
 29#include "RenderMathMLMenclose.h"
 30
 31#include "GraphicsContext.h"
 32#include "MathMLMencloseElement.h"
 33#include "PaintInfo.h"
 34#include "RenderMathMLSquareRoot.h"
 35#include <wtf/MathExtras.h>
 36
 37namespace WebCore {
 38
 39using namespace MathMLNames;
 40
 41RenderMathMLMenclose::RenderMathMLMenclose(Element& element, PassRef<RenderStyle> style)
 42 : RenderMathMLRow(element, std::move(style))
 43{
 44}
 45
 46void RenderMathMLMenclose::addChild(RenderObject* newChild, RenderObject* beforeChild)
 47{
 48 MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
 49 // For radical notation creating an anonymous RenderMathMLSquareRoot.
 50 // since we need to draw a square root symbol. So instead of handling it
 51 // in paint the anonymous RenderMathMLSquareRoot will take care of it.
 52 if (!firstChild() && menclose->isRadical())
 53 RenderMathMLBlock::addChild(RenderMathMLSquareRoot::createAnonymousWithParentRenderer(*this).leakPtr());
 54
 55 if (newChild) {
 56 if (firstChild() && menclose->isRadical())
 57 toRenderElement(firstChild())->addChild(newChild, beforeChild && beforeChild->parent() == firstChild() ? beforeChild : nullptr);
 58 else
 59 RenderMathMLBlock::addChild(newChild, beforeChild);
 60 }
 61}
 62
 63void RenderMathMLMenclose::computePreferredLogicalWidths()
 64{
 65 ASSERT(preferredLogicalWidthsDirty());
 66
 67 RenderMathMLBlock::computePreferredLogicalWidths();
 68
 69 MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
 70 const Vector<String>& notationVal = menclose->notationValues();
 71 size_t notationalValueSize = notationVal.size();
 72 for (size_t i = 0; i < notationalValueSize; i++) {
 73 if (notationVal[i] == "circle") {
 74 m_minPreferredLogicalWidth = minPreferredLogicalWidth() * sqrt(float(2));
 75 m_maxPreferredLogicalWidth = maxPreferredLogicalWidth() * sqrt(float(2));
 76 }
 77 }
 78
 79 setPreferredLogicalWidthsDirty(false);
 80}
 81
 82void RenderMathMLMenclose::updateLogicalHeight()
 83{
 84 MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
 85 const Vector<String>& notationVal = menclose->notationValues();
 86 size_t notationalValueSize = notationVal.size();
 87 for (size_t i = 0; i < notationalValueSize; i++)
 88 if (notationVal[i] == "circle")
 89 setLogicalHeight(logicalHeight() * sqrt(float(2)));
 90}
 91
 92void RenderMathMLMenclose::paint(PaintInfo& info, const LayoutPoint& paintOffset)
 93{
 94 RenderMathMLBlock::paint(info, paintOffset);
 95
 96 if (info.context->paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE)
 97 return;
 98
 99 MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
 100 const Vector<String>& notationVal = menclose->notationValues();
 101 size_t notationalValueSize = notationVal.size();
 102 bool isDefaultLongDiv = !notationalValueSize;
 103 if ((notationalValueSize && checkNotationalValuesValidity(notationVal)) || isDefaultLongDiv) {
 104 IntRect rect = absoluteBoundingBoxRect();
 105 int left = rect.x();
 106 int top = rect.y();
 107 int boxWidth = rect.width();
 108 int boxHeight = rect.height();
 109 int halfboxWidth = rect.width() / 2;
 110 int halfboxHeight = rect.height() / 2;
 111
 112 GraphicsContextStateSaver stateSaver(*info.context);
 113 info.context->setStrokeThickness(1);
 114 info.context->setStrokeStyle(SolidStroke);
 115 info.context->setStrokeColor(style().visitedDependentColor(CSSPropertyColor), ColorSpaceDeviceRGB);
 116 for (size_t i = 0; i < notationalValueSize; i++) {
 117 if (notationVal[i] == "updiagonalstrike")
 118 info.context->drawLine(IntPoint(left, top + boxHeight), IntPoint(left + boxWidth, top));
 119 else if (notationVal[i] == "downdiagonalstrike")
 120 info.context->drawLine(IntPoint(left, top), IntPoint(left + boxWidth, top + boxHeight));
 121 else if (notationVal[i] == "verticalstrike")
 122 info.context->drawLine(IntPoint(left + halfboxWidth, top), IntPoint(left + halfboxWidth, top + boxHeight));
 123 else if (notationVal[i] == "horizontalstrike")
 124 info.context->drawLine(IntPoint(left, top + halfboxHeight), IntPoint(left + boxWidth, top + halfboxHeight));
 125 else if (notationVal[i] == "circle") {
 126 info.context->setFillColor(Color::transparent, ColorSpaceDeviceRGB);
 127 info.context->drawEllipse(rect);
 128 } else if (notationVal[i] == "longdiv")
 129 isDefaultLongDiv = true;
 130 }
 131 if (isDefaultLongDiv) {
 132 Path root;
 133 int midxPoint = 0;
 134 root.moveTo(FloatPoint(left, top));
 135 int childLeft = firstChild() ? firstChild()->absoluteBoundingBoxRect().x() : 0;
 136 if (childLeft)
 137 midxPoint= childLeft-left;
 138 else
 139 midxPoint = style().paddingLeft().value();
 140 root.addBezierCurveTo(FloatPoint(left, top), FloatPoint(left + midxPoint, top + halfboxHeight), FloatPoint(left, top + boxHeight));
 141 info.context->strokePath(root);
 142 }
 143 }
 144}
 145
 146bool RenderMathMLMenclose::checkNotationalValuesValidity(const Vector<String>& attr) const
 147{
 148 size_t attrSize = attr.size();
 149 for (size_t i = 0; i < attrSize; i++) {
 150 if (attr[i] == "updiagonalstrike" || attr[i] == "downdiagonalstrike" || attr[i] == "horizontalstrike" || attr[i] == "verticalstrike"
 151 || attr[i] == "circle" || attr[i] == "longdiv")
 152 return true;
 153 }
 154 return false;
 155}
 156
 157}
 158#endif // ENABLE(MATHML)
0

Source/WebCore/rendering/mathml/RenderMathMLMenclose.h

 1/*
 2 * Copyright (C) 2014 Gurpreet Kaur (k.gurpreet@samsung.com). All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 15 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 16 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 17 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 19 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef RenderMathMLMenclose_h
 27#define RenderMathMLMenclose_h
 28
 29#if ENABLE(MATHML)
 30#include "RenderMathMLRow.h"
 31
 32namespace WebCore {
 33
 34class RenderMathMLMenclose final: public RenderMathMLRow {
 35public:
 36 RenderMathMLMenclose(Element&, PassRef<RenderStyle>);
 37
 38private:
 39 virtual const char* renderName() const { return "RenderMathMLMenclose"; }
 40 virtual void paint(PaintInfo&, const LayoutPoint&) override;
 41 virtual void updateLogicalHeight() override;
 42 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override;
 43 virtual void computePreferredLogicalWidths() override;
 44 bool checkNotationalValuesValidity(const Vector<String>&) const;
 45};
 46
 47}
 48
 49#endif // ENABLE(MATHML)
 50#endif // RenderMathMLMenclose_h
0

Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

@@RenderMathMLRoot::RenderMathMLRoot(Eleme
7474{
7575}
7676
 77RenderMathMLRoot::RenderMathMLRoot(Document& document, PassRef<RenderStyle> style)
 78 : RenderMathMLBlock(document, std::move(style))
 79 , m_intrinsicPaddingBefore(0)
 80 , m_intrinsicPaddingAfter(0)
 81 , m_intrinsicPaddingStart(0)
 82 , m_intrinsicPaddingEnd(0)
 83{
 84}
7785LayoutUnit RenderMathMLRoot::paddingTop() const
7886{
7987 LayoutUnit result = computedCSSPaddingTop();
161548

Source/WebCore/rendering/mathml/RenderMathMLRoot.h

@@namespace WebCore {
3636class RenderMathMLRoot : public RenderMathMLBlock {
3737public:
3838 RenderMathMLRoot(Element&, PassRef<RenderStyle>);
 39 RenderMathMLRoot(Document&, PassRef<RenderStyle>);
3940
40  virtual LayoutUnit paddingTop() const OVERRIDE;
41  virtual LayoutUnit paddingBottom() const OVERRIDE;
42  virtual LayoutUnit paddingLeft() const OVERRIDE;
43  virtual LayoutUnit paddingRight() const OVERRIDE;
44  virtual LayoutUnit paddingBefore() const OVERRIDE;
45  virtual LayoutUnit paddingAfter() const OVERRIDE;
46  virtual LayoutUnit paddingStart() const OVERRIDE;
47  virtual LayoutUnit paddingEnd() const OVERRIDE;
 41 virtual LayoutUnit paddingTop() const override;
 42 virtual LayoutUnit paddingBottom() const override;
 43 virtual LayoutUnit paddingLeft() const override;
 44 virtual LayoutUnit paddingRight() const override;
 45 virtual LayoutUnit paddingBefore() const override;
 46 virtual LayoutUnit paddingAfter() const override;
 47 virtual LayoutUnit paddingStart() const override;
 48 virtual LayoutUnit paddingEnd() const override;
4849
49  virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE;
 50 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override;
5051
5152protected:
52  virtual void layout() OVERRIDE;
53 
54  virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
 53 virtual void layout() override;
 54
 55 virtual void paint(PaintInfo&, const LayoutPoint&) override;
5556
5657private:
57  virtual bool isRenderMathMLRoot() const OVERRIDE FINAL { return true; }
58  virtual const char* renderName() const OVERRIDE { return "RenderMathMLRoot"; }
 58 virtual bool isRenderMathMLRoot() const override final { return true; }
 59 virtual const char* renderName() const override { return "RenderMathMLRoot"; }
5960
6061 // This may return 0 for a non-MathML index (which won't occur in valid MathML).
6162 RenderBox* index() const;
161548

Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp

3030
3131#include "RenderMathMLSquareRoot.h"
3232
 33#include "RenderMathMLMenclose.h"
 34
3335namespace WebCore {
3436
3537RenderMathMLSquareRoot::RenderMathMLSquareRoot(Element& element, PassRef<RenderStyle> style)

@@RenderMathMLSquareRoot::RenderMathMLSqua
3739{
3840}
3941
 42RenderMathMLSquareRoot::RenderMathMLSquareRoot(Document& document, PassRef<RenderStyle> style)
 43 : RenderMathMLRoot(document, std::move(style))
 44{
 45}
 46
 47RenderPtr<RenderMathMLSquareRoot> RenderMathMLSquareRoot::createAnonymousWithParentRenderer(RenderMathMLMenclose& parent)
 48{
 49 RenderPtr<RenderMathMLSquareRoot> squareRoot = createRenderer<RenderMathMLSquareRoot>(parent.document(), RenderStyle::createAnonymousStyleWithDisplay(&parent.style(), FLEX));
 50 squareRoot->initializeStyle();
 51 return squareRoot;
4052}
4153
 54}
4255#endif // ENABLE(MATHML)
161548

Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h

3030
3131#include "RenderMathMLRoot.h"
3232
 33
3334namespace WebCore {
34 
 35
 36class RenderMathMLMenclose;
 37
3538// Render sqrt(base), using radical notation.
36 class RenderMathMLSquareRoot FINAL : public RenderMathMLRoot {
 39class RenderMathMLSquareRoot final : public RenderMathMLRoot {
3740public:
3841 RenderMathMLSquareRoot(Element&, PassRef<RenderStyle>);
 42 RenderMathMLSquareRoot(Document&, PassRef<RenderStyle>);
 43 static RenderPtr<RenderMathMLSquareRoot> createAnonymousWithParentRenderer(RenderMathMLMenclose&);
3944
4045private:
41  virtual bool isRenderMathMLSquareRoot() const OVERRIDE { return true; }
42  virtual const char* renderName() const OVERRIDE { return "RenderMathMLSquareRoot"; }
 46 virtual bool isRenderMathMLSquareRoot() const override { return true; }
 47 virtual const char* renderName() const override { return "RenderMathMLSquareRoot"; }
4348};
4449
4550}
161548

LayoutTests/ChangeLog

 12014-01-16 Gurpreet Kaur <k.gurpreet@samsung.com>
 2
 3 Add support for menclose element
 4 https://bugs.webkit.org/show_bug.cgi?id=85729
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * mathml/presentation/inferred-mrow-baseline-expected.txt:
 9 * mathml/presentation/inferred-mrow-baseline.html:
 10 * mathml/presentation/inferred-mrow-stretchy-expected.txt:
 11 * mathml/presentation/inferred-mrow-stretchy.html:
 12 Rebaselining existing tests as per the new behavior.
 13
 14 * mathml/presentation/menclose-add-children-expected.html: Added.
 15 * mathml/presentation/menclose-add-children.html: Added.
 16 * mathml/presentation/menclose-notation-attribute-add-expected.html: Added.
 17 * mathml/presentation/menclose-notation-attribute-add.html: Added.
 18 * mathml/presentation/menclose-notation-attribute-change-value-expected.html: Added.
 19 * mathml/presentation/menclose-notation-attribute-change-value.html: Added.
 20 * mathml/presentation/menclose-notation-attribute-remove-expected.html: Added.
 21 * mathml/presentation/menclose-notation-attribute-remove.html: Added.
 22 * mathml/presentation/menclose-notation-attribute-set1-expected.txt: Added.
 23 * mathml/presentation/menclose-notation-attribute-set1.html: Added.
 24 * mathml/presentation/menclose-notation-attribute-set2-expected-mismatch.html: Added.
 25 * mathml/presentation/menclose-notation-attribute-set2.html: Added.
 26 * mathml/presentation/menclose-notation-no-overlap-expected.txt: Added.
 27 * mathml/presentation/menclose-notation-no-overlap.html: Added.
 28 * mathml/presentation/menclose-notation-radical-expected.html: Added.
 29 * mathml/presentation/menclose-notation-radical.html: Added.
 30 * mathml/presentation/menclose-remove-children-expected.html: Added.
 31 * mathml/presentation/menclose-remove-children.html: Added.
 32 Added new test cases for verifying the behaviour of menclose element
 33 with different values of notation attribute and removing/changing/adding
 34 notation attribute.
 35
1362014-01-15 Mihnea Ovidenie <mihnea@adobe.com>
237
338 [CSS Regions] Enable accelerated compositing for fixed elements in named flows
162118

LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt

@@This test passes if rectangles are corre
55
66
77
 8
89
910Mrow: PASS
1011Sqrt: PASS

@@Style: PASS
1213Error: PASS
1314Phantom: PASS
1415Math: PASS
 16Menclose: PASS
1517
161548

LayoutTests/mathml/presentation/inferred-mrow-baseline.html

55 <script type="text/javascript">
66 function test()
77 {
8  var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math"];
 8 var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose"];
99 var result = "";
1010 for (var i in tags) {
1111 var tag = tags[i];

3636 <math><mphantom><mspace style="visibility: visible;" id="abovePhantom" width="10px" height="30px" mathbackground="red"></mspace><mspace style="visibility: visible;" id="belowPhantom" width="10px" depth="30px" mathbackground="blue"></mspace></mphantom></math>
3737
3838 <math><mspace id="aboveMath" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMath" width="10px" depth="30px" mathbackground="blue"></mspace></math>
 39
 40 <math><menclose notation="box"><mspace id="aboveMenclose" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMenclose" width="10px" depth="30px" mathbackground="blue"></mspace></menclose></math>
3941 </p>
4042
4143 <div id="result"></div>
161548

LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt

@@This test passes if all the vertical bar
55
66
77
 8
89
910Mrow: PASS
1011Sqrt: PASS

@@Style: PASS
1213Error: PASS
1314Phantom: PASS
1415Math: PASS
 16Menclose: PASS
1517
161548

LayoutTests/mathml/presentation/inferred-mrow-stretchy.html

55 <script type="text/javascript">
66 function test()
77 {
8  var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math"];
 8 var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose"];
99 var result = "";
1010 for (var i in tags) {
1111 var tag = tags[i];

3030 <math><merror><mo id="moError">|</mo><mspace width="1px" height="30px" depth="30px" mathbackground="red"></mspace></merror></math>
3131 <math><mphantom><mo style="visibilty: visible;" id="moPhantom">|</mo><mspace width="1px" height="30px" depth="30px" mathbackground="red"></mspace></mphantom></math>
3232 <math><mo id="moMath">|</mo><mspace width="1px" height="30px" depth="30px" mathbackground="red"></mspace></math>
 33 <math><menclose notation="box"><mo id="moMenclose">|</mo><mspace width="1px" height="30px" depth="30px" mathbackground="red"></mspace></menclose></math>
3334 </p>
3435
3536 <div id="result"></div>
161548

LayoutTests/mathml/presentation/menclose-add-children-expected.html

 1<!DOCTYPE html>
 2<html>
 3 <body>
 4 <p>
 5 <math><menclose notation="box"><mspace width="100px" height="100px" mathbackground="red"/></menclose></math>
 6 </p>
 7 </body>
 8</html>
0

LayoutTests/mathml/presentation/menclose-add-children.html

 1<!DOCTYPE html>
 2 <head>
 3 <script type="text/javascript">
 4 function runTest() {
 5 var mathmlNS = "http://www.w3.org/1998/Math/MathML";
 6 var node = document.createElementNS(mathmlNS, "mspace");
 7 node.setAttribute("width","100px");
 8 node.setAttribute("height","100px");
 9 node.setAttribute("mathbackground","red");
 10 document.getElementById('testMenclose').appendChild(node);
 11 }
 12 </script>
 13 </head>
 14 <body onload="runTest()">
 15 <p>
 16 <math><menclose id="testMenclose" notation="box"></menclose></math>
 17 </p>
 18 </body>
 19</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-add-expected.html

 1<!DOCTYPE html>
 2<html>
 3 <body>
 4 <p>
 5 <math><menclose notation="box"><mspace width="100px" height="50px" mathbackground="red"/></menclose></math>
 6 </p>
 7 </body>
 8</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-add.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <script type="text/javascript">
 5 function runTest() {
 6 document.getElementById('testMenclose').setAttribute("notation","box");
 7 }
 8 </script>
 9 </head>
 10 <body onload="runTest()">
 11 <p>
 12 <math><menclose id="testMenclose"><mspace width="100px" height="50px" mathbackground="red"></mspace></menclose></math>
 13 </p>
 14 </body>
 15</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-change-value-expected.html

 1<!DOCTYPE html>
 2<html>
 3 <body>
 4 <p>
 5 <math><menclose notation="longdiv"><mspace width="100px" height="50px" mathbackground="red"/></menclose></math>
 6 </p>
 7 </body>
 8</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-change-value.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <script type="text/javascript">
 5 function runTest() {
 6 document.getElementById('testMenclose').setAttribute("notation","longdiv");
 7 }
 8 </script>
 9 </head>
 10 <body onload="runTest()">
 11 <p>
 12 <math><menclose id="testMenclose" notation="box"><mspace width="100px" height="50px" mathbackground="red"></mspace></menclose></math>
 13 </p>
 14 </body>
 15</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-remove-expected.html

 1<!DOCTYPE html>
 2<html>
 3 <body>
 4 <p>
 5 <math><mspace width="100px" height="50px" mathbackground="red"/></math>
 6 </p>
 7 </body>
 8</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-remove.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <script type="text/javascript">
 5 function runTest() {
 6 document.getElementById('testMenclose').removeAttribute("notation");
 7 }
 8 </script>
 9 </head>
 10 <body onload="runTest()">
 11 <p>
 12 <math><menclose id="testMenclose" notation="box"><mspace width="100px" height="50px" mathbackground="red"></mspace></menclose></math>
 13 </p>
 14 </body>
 15</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-set1-expected.txt

 1Tests that left, right, top, bottom, box, roundedbox, madruwb, actuarial attribute value is applied for menclose
 2
 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 4
 5
 6PASS window.getComputedStyle(document.getElementById('mathmenclose1'),null).getPropertyValue('border-left-style') is "solid"
 7PASS window.getComputedStyle(document.getElementById('mathmenclose1'),null).getPropertyValue('border-left-width') is "1px"
 8PASS window.getComputedStyle(document.getElementById('mathmenclose2'),null).getPropertyValue('border-right-style') is "solid"
 9PASS window.getComputedStyle(document.getElementById('mathmenclose2'),null).getPropertyValue('border-right-width') is "1px"
 10PASS window.getComputedStyle(document.getElementById('mathmenclose3'),null).getPropertyValue('border-top-style') is "solid"
 11PASS window.getComputedStyle(document.getElementById('mathmenclose3'),null).getPropertyValue('border-top-width') is "1px"
 12PASS window.getComputedStyle(document.getElementById('mathmenclose4'),null).getPropertyValue('border-bottom-style') is "solid"
 13PASS window.getComputedStyle(document.getElementById('mathmenclose4'),null).getPropertyValue('border-bottom-width') is "1px"
 14PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-right-style') is "solid"
 15PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-right-width') is "1px"
 16PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-bottom-style') is "solid"
 17PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-bottom-width') is "1px"
 18PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-left-style') is "solid"
 19PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-left-width') is "1px"
 20PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-top-style') is "solid"
 21PASS window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-top-width') is "1px"
 22PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-right-style') is "solid"
 23PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-right-width') is "1px"
 24PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-bottom-style') is "solid"
 25PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-bottom-width') is "1px"
 26PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-left-style') is "solid"
 27PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-left-width') is "1px"
 28PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-top-style') is "solid"
 29PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-top-width') is "1px"
 30PASS window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-radius') is "5px"
 31PASS window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-right-style') is "solid"
 32PASS window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-right-width') is "1px"
 33PASS window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-bottom-style') is "solid"
 34PASS window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-bottom-width') is "1px"
 35PASS window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-right-style') is "solid"
 36PASS window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-right-width') is "1px"
 37PASS window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-top-style') is "solid"
 38PASS window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-top-width') is "1px"
 39PASS successfullyParsed is true
 40
 41TEST COMPLETE
 42
 43
 44
 45
 46
 47
 48
 49
0

LayoutTests/mathml/presentation/menclose-notation-attribute-set1.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <script src="../../resources/js-test-pre.js"></script>
 5 <script>
 6 function runTest() {
 7 description('Tests that left, right, top, bottom, box, roundedbox, madruwb, actuarial attribute value is applied for menclose');
 8
 9 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose1'),null).getPropertyValue('border-left-style')","solid");
 10 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose1'),null).getPropertyValue('border-left-width')","1px");
 11 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose2'),null).getPropertyValue('border-right-style')","solid");
 12 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose2'),null).getPropertyValue('border-right-width')","1px");
 13 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose3'),null).getPropertyValue('border-top-style')","solid");
 14 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose3'),null).getPropertyValue('border-top-width')","1px");
 15 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose4'),null).getPropertyValue('border-bottom-style')","solid");
 16 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose4'),null).getPropertyValue('border-bottom-width')","1px");
 17 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-right-style')","solid");
 18 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-right-width')","1px");
 19 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-bottom-style')","solid");
 20 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-bottom-width')","1px");
 21 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-left-style')","solid");
 22 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-left-width')","1px");
 23 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-top-style')","solid");
 24 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose5'),null).getPropertyValue('border-top-width')","1px");
 25 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-right-style')","solid");
 26 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-right-width')","1px");
 27 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-bottom-style')","solid");
 28 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-bottom-width')","1px");
 29 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-left-style')","solid");
 30 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-left-width')","1px");
 31 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-top-style')","solid");
 32 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-top-width')","1px");
 33 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose6'),null).getPropertyValue('border-radius')","5px");
 34 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-right-style')","solid");
 35 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-right-width')","1px");
 36 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-bottom-style')","solid");
 37 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose7'),null).getPropertyValue('border-bottom-width')","1px");
 38 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-right-style')","solid");
 39 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-right-width')","1px");
 40 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-top-style')","solid");
 41 shouldBeEqualToString("window.getComputedStyle(document.getElementById('mathmenclose8'),null).getPropertyValue('border-top-width')","1px");
 42 isSuccessfullyParsed();
 43 }
 44 </script>
 45 </head>
 46 <body onload="runTest()">
 47 <p>
 48 <math>
 49 <menclose notation="left" id="mathmenclose1"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 50 </math>
 51 </p>
 52 <p>
 53 <math>
 54 <menclose notation="right" id="mathmenclose2"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 55 </math>
 56 </p>
 57 <p>
 58 <math>
 59 <menclose notation="top" id="mathmenclose3"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 60 </math>
 61 </p>
 62 <p>
 63 <math>
 64 <menclose notation="bottom" id="mathmenclose4"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 65 </math>
 66 </p>
 67 <p>
 68 <math>
 69 <menclose notation="box" id="mathmenclose5"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 70 </math>
 71 </p>
 72 <p>
 73 <math>
 74 <menclose notation="roundedbox" id="mathmenclose6"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 75 </math>
 76 </p>
 77 <p>
 78 <math>
 79 <menclose notation="madruwb" id="mathmenclose7"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 80 </math>
 81 </p>
 82 <p>
 83 <math>
 84 <menclose notation="actuarial" id="mathmenclose8"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 85 </math>
 86 </p>
 87 </body>
 88</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-set2-expected-mismatch.html

 1<!DOCTYPE html>
 2<html>
 3 <body>
 4 <p>
 5 <math>
 6 <mrow><mspace width="100px" height="50px" mathbackground="red"/></mrow>
 7 </math>
 8 <p>
 9 </body>
 10</html>
0

LayoutTests/mathml/presentation/menclose-notation-attribute-set2.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <title>menclose notation downdiagonalstrike test</title>
 5 </head>
 6 <body>
 7 <p>
 8 <math>
 9 <menclose notation="downdiagonalstrike"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 10 </math>
 11 </p>
 12 </body>
 13</html>
0

LayoutTests/mathml/presentation/menclose-notation-no-overlap-expected.txt

 1Tests that menclose with notation valus as circle is sqrt(2) times the inner width/height.
 2
 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 4
 5
 6PASS document.getElementById('mathmenclose1').offsetWidth >= 141 is true
 7PASS document.getElementById('mathmenclose1').offsetHeight >= 70 is true
 8PASS successfullyParsed is true
 9
 10TEST COMPLETE
 11
0

LayoutTests/mathml/presentation/menclose-notation-no-overlap.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <script src="../../resources/js-test-pre.js"></script>
 5 <script>
 6 function runTest() {
 7 description('Tests that menclose with notation valus as circle is sqrt(2) times the inner width/height.');
 8
 9 shouldBeTrue("document.getElementById('mathmenclose1').offsetWidth >= 141");
 10 shouldBeTrue("document.getElementById('mathmenclose1').offsetHeight >= 70");
 11 isSuccessfullyParsed();
 12 }
 13 </script>
 14 </head>
 15 <body onload="runTest()">
 16 <p>
 17 <math>
 18 <menclose notation="circle" id="mathmenclose1"><mspace width="100px" height="50px" mathbackground="red"/></menclose>
 19 </math>
 20 </p>
 21 </body>
 22</html>
0

LayoutTests/mathml/presentation/menclose-notation-radical-expected.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <title>msqrt test</title>
 5 </head>
 6 <body>
 7 <p>
 8 <math><mrow><msqrt><mspace width="100px" height="50px" mathbackground="red"/></msqrt></mrow></math>
 9 </p>
 10 </body>
 11</html>
0

LayoutTests/mathml/presentation/menclose-notation-radical.html

 1<!DOCTYPE html>
 2<html>
 3 <head>
 4 <title>menclose notation radical test</title>
 5 </head>
 6 <body>
 7 <p>
 8 <math><mrow><menclose notation="radical"><mspace width="100px" height="50px" mathbackground="red"/></menclose></mrow></math>
 9 </p>
 10 </body>
 11</html>
0

LayoutTests/mathml/presentation/menclose-remove-children-expected.html

 1<!DOCTYPE html>
 2 <body>
 3 <p>
 4 <math><menclose notation="box"></menclose></math>
 5 </p>
 6 </body>
 7</html>
0

LayoutTests/mathml/presentation/menclose-remove-children.html

 1<!DOCTYPE html>
 2 <head>
 3 <script type="text/javascript">
 4 function runTest() {
 5 var node=document.getElementById('testMenclose').firstChild;
 6 document.getElementById('testMenclose').removeChild(node);
 7 }
 8 </script>
 9 </head>
 10 <body onload="runTest()">
 11 <p>
 12 <math><menclose id="testMenclose" notation="box"><mspace width="100px" height="50px" mathbackground="red"></mspace></menclose></math>
 13 </p>
 14 </body>
 15</html>
0