Changeset 152235 in webkit
- Timestamp:
- Jul 1, 2013 11:41:43 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r152221 r152235 1 2013-07-01 Frédéric Wang <fred.wang@free.fr> 2 3 Add Support for mspace element 4 https://bugs.webkit.org/show_bug.cgi?id=115610 5 6 Reviewed by Chris Fleizach. 7 8 Add a reftest for the mspace element (width, height and depth) and 9 the parsing of MathML lengths. Import a reftest from Gecko to check 10 positive namedspace values. 11 12 * mathml/presentation/mspace-expected.html: Added. 13 * mathml/presentation/mspace-units-expected.html: Added. 14 * mathml/presentation/mspace-units.html: Added. 15 * mathml/presentation/mspace.html: Added. 16 * mathml/presentation/positive-namedspace-expected.html: Added. 17 * mathml/presentation/positive-namedspace.html: Added. 18 1 19 2013-07-01 Gabor Abraham <abrhm@inf.u-szeged.hu> 2 20 -
trunk/Source/WebCore/CMakeLists.txt
r152183 r152235 2220 2220 rendering/mathml/RenderMathMLRoot.cpp 2221 2221 rendering/mathml/RenderMathMLRow.cpp 2222 rendering/mathml/RenderMathMLSpace.cpp 2222 2223 rendering/mathml/RenderMathMLSquareRoot.cpp 2223 2224 rendering/mathml/RenderMathMLSubSup.cpp -
trunk/Source/WebCore/ChangeLog
r152234 r152235 1 2013-07-01 Frédéric Wang <fred.wang@free.fr> 2 3 Add Support for mspace element 4 https://bugs.webkit.org/show_bug.cgi?id=115610 5 6 Reviewed by Chris Fleizach. 7 8 This patch adds basic support for the MathML mspace element. This is 9 important to let people control spacing of mathematical formulas. 10 Attributes width, height and depth are implemented. For the moment, 11 only nonnegative width are accepted. 12 13 * CMakeLists.txt: add references to the RenderMathMLSpace files. 14 * GNUmakefile.list.am: ditto. 15 * Target.pri: ditto. 16 * WebCore.vcxproj/WebCore.vcxproj: ditto. 17 * WebCore.vcxproj/WebCore.vcxproj.filters: ditto. 18 * WebCore.xcodeproj/project.pbxproj: ditto. 19 * css/mathml.css: 20 (mtable[columnlines="dashed"] > mtr > mtd + mtd): remove the obsolete linebreaking rule. 21 * mathml/MathMLTextElement.cpp: 22 (WebCore::MathMLTextElement::createRenderer): map mspaceTag to RenderMathMLSpace. 23 * mathml/mathattrs.in: add width, height and depth attributes 24 * mathml/mathtags.in: add mspace element 25 * rendering/mathml/RenderMathMLBlock.cpp: 26 (WebCore::parseMathMLLength): fix int to float conversion. 27 * rendering/mathml/RenderMathMLBlock.h: declare isRenderMathMLSpace. 28 (WebCore::RenderMathMLBlock::isRenderMathMLSpace): 29 * rendering/mathml/RenderMathMLSpace.cpp: Added. 30 (WebCore::RenderMathMLSpace::RenderMathMLSpace): 31 (WebCore::RenderMathMLSpace::isChildAllowed): 32 (WebCore::RenderMathMLSpace::computePreferredLogicalWidths): 33 (WebCore::RenderMathMLSpace::updateFromElement): 34 (WebCore::RenderMathMLSpace::updateLogicalWidth): 35 (WebCore::RenderMathMLSpace::updateLogicalHeight): 36 (WebCore::RenderMathMLSpace::layout): 37 (WebCore::RenderMathMLSpace::styleDidChange): 38 (WebCore::RenderMathMLSpace::firstLineBoxBaseline): 39 * rendering/mathml/RenderMathMLSpace.h: Added. 40 (WebCore::RenderMathMLSpace::isRenderMathMLSpace): 41 (WebCore::RenderMathMLSpace::renderName): 42 (WebCore::toRenderMathMLSpace): 43 1 44 2013-06-27 Jer Noble <jer.noble@apple.com> 2 45 -
trunk/Source/WebCore/GNUmakefile.list.am
r152167 r152235 4605 4605 Source/WebCore/rendering/mathml/RenderMathMLRow.cpp \ 4606 4606 Source/WebCore/rendering/mathml/RenderMathMLRow.h \ 4607 Source/WebCore/rendering/mathml/RenderMathMLSpace.cpp \ 4608 Source/WebCore/rendering/mathml/RenderMathMLSpace.h \ 4607 4609 Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp \ 4608 4610 Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h \ -
trunk/Source/WebCore/Target.pri
r152183 r152235 2415 2415 rendering/mathml/RenderMathMLRoot.h \ 2416 2416 rendering/mathml/RenderMathMLRow.h \ 2417 rendering/mathml/RenderMathMLSpace.h \ 2417 2418 rendering/mathml/RenderMathMLSquareRoot.h \ 2418 2419 rendering/mathml/RenderMathMLSubSup.h \ … … 3608 3609 rendering/mathml/RenderMathMLRoot.cpp \ 3609 3610 rendering/mathml/RenderMathMLRow.cpp \ 3611 rendering/mathml/RenderMathMLSpace.cpp \ 3610 3612 rendering/mathml/RenderMathMLSquareRoot.cpp \ 3611 3613 rendering/mathml/RenderMathMLSubSup.cpp \ -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r152192 r152235 6685 6685 <ClCompile Include="..\rendering\mathml\RenderMathMLRoot.cpp" /> 6686 6686 <ClCompile Include="..\rendering\mathml\RenderMathMLRow.cpp" /> 6687 <ClCompile Include="..\rendering\mathml\RenderMathMLSpace.cpp" /> 6687 6688 <ClCompile Include="..\rendering\mathml\RenderMathMLSquareRoot.cpp" /> 6688 6689 <ClCompile Include="..\rendering\mathml\RenderMathMLSubSup.cpp" /> … … 12662 12663 <ClInclude Include="..\rendering\mathml\RenderMathMLRoot.h" /> 12663 12664 <ClInclude Include="..\rendering\mathml\RenderMathMLRow.h" /> 12665 <ClInclude Include="..\rendering\mathml\RenderMathMLSpace.h" /> 12664 12666 <ClInclude Include="..\rendering\mathml\RenderMathMLSquareRoot.h" /> 12665 12667 <ClInclude Include="..\rendering\mathml\RenderMathMLSubSup.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r152192 r152235 2866 2866 <Filter>rendering\mathml</Filter> 2867 2867 </ClCompile> 2868 <ClCompile Include="..\rendering\mathml\RenderMathMLSpace.cpp"> 2869 <Filter>rendering\mathml</Filter> 2870 </ClCompile> 2868 2871 <ClCompile Include="..\rendering\mathml\RenderMathMLSquareRoot.cpp"> 2869 2872 <Filter>rendering\mathml</Filter> … … 9824 9827 </ClInclude> 9825 9828 <ClInclude Include="..\rendering\mathml\RenderMathMLRow.h"> 9829 <Filter>rendering\mathml</Filter> 9830 </ClInclude> 9831 <ClInclude Include="..\rendering\mathml\RenderMathMLSpace.h"> 9826 9832 <Filter>rendering\mathml</Filter> 9827 9833 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r152167 r152235 1692 1692 5A574F28131DB96D00471B88 /* QuotesData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5A574F26131DB96D00471B88 /* QuotesData.cpp */; }; 1693 1693 5A574F29131DB96D00471B88 /* QuotesData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A574F27131DB96D00471B88 /* QuotesData.h */; }; 1694 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */; }; 1694 1695 5D21A80213ECE5DF00BB7064 /* WebVTTParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21A80013ECE5DF00BB7064 /* WebVTTParser.cpp */; }; 1695 1696 5D21A80313ECE5DF00BB7064 /* WebVTTParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */; }; … … 7250 7251 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSExceptionBase.cpp; sourceTree = "<group>"; }; 7251 7252 3314ACEA10892086000F0E56 /* JSExceptionBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExceptionBase.h; sourceTree = "<group>"; }; 7253 331FF67DE197B57393C46AA7 /* RenderMathMLSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLSpace.h; path = rendering/mathml/RenderMathMLSpace.h; sourceTree = SOURCE_ROOT; }; 7252 7254 333F704E0FB49CA2008E12A6 /* Notification.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Notification.idl; path = Modules/notifications/Notification.idl; sourceTree = "<group>"; }; 7253 7255 333F704F0FB49CA2008E12A6 /* Notification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Notification.h; path = Modules/notifications/Notification.h; sourceTree = "<group>"; }; … … 12084 12086 DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndentOutdentCommand.cpp; sourceTree = "<group>"; }; 12085 12087 DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndentOutdentCommand.h; sourceTree = "<group>"; }; 12088 DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLSpace.cpp; path = rendering/mathml/RenderMathMLSpace.cpp; sourceTree = SOURCE_ROOT; }; 12086 12089 DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreObjCExtras.h; sourceTree = "<group>"; }; 12087 12090 DD763BB10992C2C900740B8E /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = "<absolute>"; }; … … 13040 13043 1CDD44660BA9C80000F90147 /* Configurations */, 13041 13044 449195900FBE175B00D9F824 /* Exports */, 13045 DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */, 13046 331FF67DE197B57393C46AA7 /* RenderMathMLSpace.h */, 13042 13047 ); 13043 13048 name = WebKit; … … 26263 26268 439046E112DA25E800AF80A2 /* RenderMathMLRoot.cpp in Sources */, 26264 26269 439046E312DA25E800AF80A2 /* RenderMathMLRow.cpp in Sources */, 26270 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */, 26265 26271 439046E512DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp in Sources */, 26266 26272 439046E712DA25E800AF80A2 /* RenderMathMLSubSup.cpp in Sources */, -
trunk/Source/WebCore/css/mathml.css
r150264 r152235 238 238 border-left: dashed thin; 239 239 } 240 241 mspace[linebreak="newline"] {242 display: block;243 } -
trunk/Source/WebCore/mathml/MathMLTextElement.cpp
r140923 r152235 33 33 #include "MathMLNames.h" 34 34 #include "RenderMathMLOperator.h" 35 #include "RenderMathMLSpace.h" 35 36 36 37 namespace WebCore { … … 52 53 if (hasLocalName(MathMLNames::moTag)) 53 54 return new (arena) RenderMathMLOperator(this); 55 if (hasLocalName(MathMLNames::mspaceTag)) 56 return new (arena) RenderMathMLSpace(this); 54 57 55 58 return MathMLElement::createRenderer(arena, style); -
trunk/Source/WebCore/mathml/mathattrs.in
r129695 r152235 11 11 definitionURL 12 12 denomalign 13 depth 13 14 encoding 14 15 fontfamily … … 16 17 fontstyle 17 18 fontweight 19 height 18 20 linethickness 19 21 mathbackground … … 26 28 separators 27 29 stretchy 30 width -
trunk/Source/WebCore/mathml/mathtags.in
r151123 r152235 18 18 mo interfaceName=MathMLTextElement 19 19 mtext interfaceName=MathMLTextElement 20 mspace interfaceName=MathMLTextElement 20 21 msub interfaceName=MathMLInlineContainerElement 21 22 msup interfaceName=MathMLInlineContainerElement -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
r152140 r152235 297 297 } 298 298 if (unit == "pt") { 299 lengthValue = 4 / 3 * floatValue;299 lengthValue = 4 * (floatValue / 3); 300 300 return true; 301 301 } 302 302 if (unit == "pc") { 303 lengthValue = (4 / 3 * floatValue) * 12;303 lengthValue = 16 * floatValue; 304 304 return true; 305 305 } … … 309 309 } 310 310 if (unit == "cm") { 311 lengthValue = 96 * floatValue / 2.54;311 lengthValue = 96 * (floatValue / 2.54); 312 312 return true; 313 313 } 314 314 if (unit == "mm") { 315 lengthValue = (96 * floatValue / 2.54) / 10;315 lengthValue = 96 * (floatValue / 25.4); 316 316 return true; 317 317 } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h
r152140 r152235 53 53 virtual bool isRenderMathMLFraction() const { return false; } 54 54 virtual bool isRenderMathMLRoot() const { return false; } 55 virtual bool isRenderMathMLSpace() const { return false; } 55 56 virtual bool isRenderMathMLSquareRoot() const { return false; } 56 57 virtual bool isRenderMathMLSubSup() const { return false; }
Note: See TracChangeset
for help on using the changeset viewer.