Skip to content
  • commit-queue@webkit.org's avatar
    Add Support for mspace element · 4496a299
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=115610
    
    Patch by Frédéric Wang <fred.wang@free.fr> on 2013-07-01
    Reviewed by Chris Fleizach.
    
    Source/WebCore:
    
    This patch adds basic support for the MathML mspace element. This is
    important to let people control spacing of mathematical formulas.
    Attributes width, height and depth are implemented. For the moment,
    only nonnegative width are accepted.
    
    * CMakeLists.txt: add references to the RenderMathMLSpace files.
    * GNUmakefile.list.am: ditto.
    * Target.pri: ditto.
    * WebCore.vcxproj/WebCore.vcxproj: ditto.
    * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
    * WebCore.xcodeproj/project.pbxproj: ditto.
    * css/mathml.css:
    (mtable[columnlines="dashed"] > mtr > mtd + mtd): remove the obsolete linebreaking rule.
    * mathml/MathMLTextElement.cpp:
    (WebCore::MathMLTextElement::createRenderer): map mspaceTag to RenderMathMLSpace.
    * mathml/mathattrs.in: add width, height and depth attributes
    * mathml/mathtags.in: add mspace element
    * rendering/mathml/RenderMathMLBlock.cpp:
    (WebCore::parseMathMLLength): fix int to float conversion.
    * rendering/mathml/RenderMathMLBlock.h: declare isRenderMathMLSpace.
    (WebCore::RenderMathMLBlock::isRenderMathMLSpace):
    * rendering/mathml/RenderMathMLSpace.cpp: Added.
    (WebCore::RenderMathMLSpace::RenderMathMLSpace):
    (WebCore::RenderMathMLSpace::isChildAllowed):
    (WebCore::RenderMathMLSpace::computePreferredLogicalWidths):
    (WebCore::RenderMathMLSpace::updateFromElement):
    (WebCore::RenderMathMLSpace::updateLogicalWidth):
    (WebCore::RenderMathMLSpace::updateLogicalHeight):
    (WebCore::RenderMathMLSpace::layout):
    (WebCore::RenderMathMLSpace::styleDidChange):
    (WebCore::RenderMathMLSpace::firstLineBoxBaseline):
    * rendering/mathml/RenderMathMLSpace.h: Added.
    (WebCore::RenderMathMLSpace::isRenderMathMLSpace):
    (WebCore::RenderMathMLSpace::renderName):
    (WebCore::toRenderMathMLSpace):
    
    LayoutTests:
    
    Add a reftest for the mspace element (width, height and depth) and
    the parsing of MathML lengths. Import a reftest from Gecko to check
    positive namedspace values.
    
    * mathml/presentation/mspace-expected.html: Added.
    * mathml/presentation/mspace-units-expected.html: Added.
    * mathml/presentation/mspace-units.html: Added.
    * mathml/presentation/mspace.html: Added.
    * mathml/presentation/positive-namedspace-expected.html: Added.
    * mathml/presentation/positive-namedspace.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4496a299