Changeset 162933 in webkit


Ignore:
Timestamp:
Jan 28, 2014 8:34:52 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Add support for menclose element
https://bugs.webkit.org/show_bug.cgi?id=85729

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2014-01-28
Reviewed by Chris Fleizach.

Source/WebCore:

Added support for menclose element. MathML <menclose> element renders
its content inside an enclosing notation specified by the notation
attribute. The notation attribute can have values longdiv, box, left,
right, top, bottom , radical, madruwb, actuarial, roundedbox, circle,
updiagonalstrike, downdiagonalstrike, verticalstrike and
horizontalstrike.

Tests: mathml/presentation/menclose-add-children.html

mathml/presentation/menclose-notation-attribute-add.html
mathml/presentation/menclose-notation-attribute-change-value.html
mathml/presentation/menclose-notation-attribute-remove.html
mathml/presentation/menclose-notation-attribute-set1.html
mathml/presentation/menclose-notation-attribute-set2.html
mathml/presentation/menclose-notation-no-overlap.html
mathml/presentation/menclose-notation-radical.html
mathml/presentation/menclose-remove-children.html

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • css/mathml.css:

(mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose):
(math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose):

  • mathml/MathMLAllInOne.cpp:
  • mathml/MathMLElement.h:
  • mathml/MathMLInlineContainerElement.cpp:
  • mathml/MathMLMencloseElement.cpp: Added.

(WebCore::MathMLMencloseElement::MathMLMencloseElement):
(WebCore::MathMLMencloseElement::create):
(WebCore::MathMLMencloseElement::createElementRenderer):
(WebCore::MathMLMencloseElement::isPresentationAttribute):
(WebCore::MathMLMencloseElement::finishParsingChildren):
(WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
(WebCore::MathMLMencloseElement::longDivLeftPadding):

  • mathml/MathMLMencloseElement.h: Added.

(WebCore::toMathMLMencloseElement):

  • mathml/mathattrs.in:
  • mathml/mathtags.in:
  • rendering/mathml/RenderMathMLMenclose.cpp: Added.

(WebCore::RenderMathMLMenclose::RenderMathMLMenclose):
(WebCore::RenderMathMLMenclose::addChild):
(WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
(WebCore::RenderMathMLMenclose::updateLogicalHeight):
(WebCore::RenderMathMLMenclose::paint):
(WebCore::RenderMathMLMenclose::checkNotationalValuesValidity):

  • rendering/mathml/RenderMathMLMenclose.h: Added.
  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::RenderMathMLRoot):

  • rendering/mathml/RenderMathMLRoot.h:
  • rendering/mathml/RenderMathMLSquareRoot.cpp:

(WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot):
(WebCore::RenderMathMLSquareRoot::createAnonymousWithParentRenderer):

  • rendering/mathml/RenderMathMLSquareRoot.h:

Added new file related to menclose element implementation. Menclose
element is created and while parsing its notation attribute based on
its values like top, left CSSBorder properties are applied and for
values like circle, verticalstrike, longidv its taken care in paint.
For radical value an anonymous RenderMathMLSquareRoot is created as
a child of menclose.

LayoutTests:

  • mathml/presentation/inferred-mrow-baseline-expected.txt:
  • mathml/presentation/inferred-mrow-baseline.html:
  • mathml/presentation/inferred-mrow-stretchy-expected.txt:
  • mathml/presentation/inferred-mrow-stretchy.html:

Rebaselining existing tests as per the new behavior.

  • mathml/presentation/menclose-add-children-expected.html: Added.
  • mathml/presentation/menclose-add-children.html: Added.
  • mathml/presentation/menclose-notation-attribute-add-expected.html: Added.
  • mathml/presentation/menclose-notation-attribute-add.html: Added.
  • mathml/presentation/menclose-notation-attribute-change-value-expected.html: Added.
  • mathml/presentation/menclose-notation-attribute-change-value.html: Added.
  • mathml/presentation/menclose-notation-attribute-remove-expected.html: Added.
  • mathml/presentation/menclose-notation-attribute-remove.html: Added.
  • mathml/presentation/menclose-notation-attribute-set1-expected.txt: Added.
  • mathml/presentation/menclose-notation-attribute-set1.html: Added.
  • mathml/presentation/menclose-notation-attribute-set2-expected-mismatch.html: Added.
  • mathml/presentation/menclose-notation-attribute-set2.html: Added.
  • mathml/presentation/menclose-notation-no-overlap-expected.txt: Added.
  • mathml/presentation/menclose-notation-no-overlap.html: Added.
  • mathml/presentation/menclose-notation-radical-expected.html: Added.
  • mathml/presentation/menclose-notation-radical.html: Added.
  • mathml/presentation/menclose-remove-children-expected.html: Added.
  • mathml/presentation/menclose-remove-children.html: Added.

Added new test cases for verifying the behaviour of menclose element
with different values of notation attribute and removing/changing/adding
notation attribute.

Location:
trunk
Files:
20 added
21 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r162896 r162933  
     12014-01-28  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 Chris Fleizach.
     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-27  Brian Burg  <bburg@apple.com>
    237
  • trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt

    r160711 r162933  
    11This test passes if rectangles are correctly aligned with respect to the baseline.
    22
     3 
    34 
    45 
     
    1314Phantom: PASS
    1415Math: PASS
     16Menclose: PASS
    1517
  • trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline.html

    r160711 r162933  
    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) {
     
    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
  • trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt

    r160711 r162933  
    11This test passes if all the vertical bars stretch.
    22
     3 
    34 
    45 
     
    1314Phantom: PASS
    1415Math: PASS
     16Menclose: PASS
    1517
  • trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy.html

    r160711 r162933  
    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) {
     
    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
  • trunk/Source/WebCore/CMakeLists.txt

    r162821 r162933  
    17021702    mathml/MathMLInlineContainerElement.cpp
    17031703    mathml/MathMLMathElement.cpp
     1704    mathml/MathMLMencloseElement.cpp
    17041705    mathml/MathMLSelectElement.cpp
    17051706    mathml/MathMLTextElement.cpp
     
    22142215    rendering/mathml/RenderMathMLFraction.cpp
    22152216    rendering/mathml/RenderMathMLMath.cpp
     2217    rendering/mathml/RenderMathMLMenclose.cpp
    22162218    rendering/mathml/RenderMathMLOperator.cpp
    22172219    rendering/mathml/RenderMathMLRoot.cpp
  • trunk/Source/WebCore/ChangeLog

    r162932 r162933  
     12014-01-28  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 Chris Fleizach.
     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        * mathml/MathMLInlineContainerElement.cpp:
     36        * mathml/MathMLMencloseElement.cpp: Added.
     37        (WebCore::MathMLMencloseElement::MathMLMencloseElement):
     38        (WebCore::MathMLMencloseElement::create):
     39        (WebCore::MathMLMencloseElement::createElementRenderer):
     40        (WebCore::MathMLMencloseElement::isPresentationAttribute):
     41        (WebCore::MathMLMencloseElement::finishParsingChildren):
     42        (WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
     43        (WebCore::MathMLMencloseElement::longDivLeftPadding):
     44        * mathml/MathMLMencloseElement.h: Added.
     45        (WebCore::toMathMLMencloseElement):
     46        * mathml/mathattrs.in:
     47        * mathml/mathtags.in:
     48        * rendering/mathml/RenderMathMLMenclose.cpp: Added.
     49        (WebCore::RenderMathMLMenclose::RenderMathMLMenclose):
     50        (WebCore::RenderMathMLMenclose::addChild):
     51        (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
     52        (WebCore::RenderMathMLMenclose::updateLogicalHeight):
     53        (WebCore::RenderMathMLMenclose::paint):
     54        (WebCore::RenderMathMLMenclose::checkNotationalValuesValidity):
     55        * rendering/mathml/RenderMathMLMenclose.h: Added.
     56        * rendering/mathml/RenderMathMLRoot.cpp:
     57        (WebCore::RenderMathMLRoot::RenderMathMLRoot):
     58        * rendering/mathml/RenderMathMLRoot.h:
     59        * rendering/mathml/RenderMathMLSquareRoot.cpp:
     60        (WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot):
     61        (WebCore::RenderMathMLSquareRoot::createAnonymousWithParentRenderer):
     62        * rendering/mathml/RenderMathMLSquareRoot.h:
     63        Added new file related to menclose element implementation. Menclose
     64        element is created and while parsing its notation attribute based on
     65        its values like top, left CSSBorder properties are applied and for
     66        values like circle, verticalstrike, longidv its taken care in paint.
     67        For radical value an anonymous RenderMathMLSquareRoot is created as
     68        a child of menclose.
     69
    1702014-01-28  Krzysztof Czech  <k.czech@samsung.com>
    271
  • trunk/Source/WebCore/GNUmakefile.list.am

    r162922 r162933  
    40314031        Source/WebCore/mathml/MathMLMathElement.cpp \
    40324032        Source/WebCore/mathml/MathMLMathElement.h \
     4033        Source/WebCore/mathml/MathMLMencloseElement.cpp \
     4034        Source/WebCore/mathml/MathMLMencloseElement.h \
    40334035        Source/WebCore/mathml/MathMLSelectElement.cpp \
    40344036        Source/WebCore/mathml/MathMLSelectElement.h  \
     
    45204522        Source/WebCore/rendering/mathml/RenderMathMLMath.cpp \
    45214523        Source/WebCore/rendering/mathml/RenderMathMLMath.h \
     4524        Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp \
     4525        Source/WebCore/rendering/mathml/RenderMathMLMenclose.h \
    45224526        Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp \
    45234527        Source/WebCore/rendering/mathml/RenderMathMLOperator.h \
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r162821 r162933  
    1122111221    <ClCompile Include="..\rendering\mathml\RenderMathMLFraction.cpp" />
    1122211222    <ClCompile Include="..\rendering\mathml\RenderMathMLMath.cpp" />
     11223    <ClCompile Include="..\rendering\mathml\RenderMathMLMenclose.cpp" />
    1122311224    <ClCompile Include="..\rendering\mathml\RenderMathMLOperator.cpp" />
    1122411225    <ClCompile Include="..\rendering\mathml\RenderMathMLRoot.cpp" />
     
    1794217943    </ClCompile>
    1794317944    <ClCompile Include="..\mathml\MathMLMathElement.cpp">
     17945      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
     17946      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     17947      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
     17948      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     17949      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     17950      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     17951    </ClCompile>
     17952    <ClCompile Include="..\mathml\MathMLMencloseElement.cpp">
    1794417953      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    1794517954      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     
    1990319912    <ClInclude Include="..\rendering\mathml\RenderMathMLFraction.h" />
    1990419913    <ClInclude Include="..\rendering\mathml\RenderMathMLMath.h" />
     19914    <ClInclude Include="..\rendering\mathml\RenderMathMLMenclose.h" />
    1990519915    <ClInclude Include="..\rendering\mathml\RenderMathMLOperator.h" />
    1990619916    <ClInclude Include="..\rendering\mathml\RenderMathMLRoot.h" />
     
    2088520895    <ClInclude Include="..\mathml\MathMLInlineContainerElement.h" />
    2088620896    <ClInclude Include="..\mathml\MathMLMathElement.h" />
     20897    <ClInclude Include="..\mathml\MathMLMencloseElement.h" />
    2088720898    <ClInclude Include="..\mathml\MathMLSelectElement.h" />
    2088820899    <ClInclude Include="..\mathml\MathMLTextElement.h" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r162821 r162933  
    27222722      <Filter>rendering\mathml</Filter>
    27232723    </ClCompile>
     2724        <ClCompile Include="..\rendering\mathml\RenderMathMLMenclose.cpp">
     2725      <Filter>rendering\mathml</Filter>
     2726    </ClCompile>
    27242727    <ClCompile Include="..\rendering\mathml\RenderMathMLOperator.cpp">
    27252728      <Filter>rendering\mathml</Filter>
     
    48864889    </ClCompile>
    48874890    <ClCompile Include="..\mathml\MathMLMathElement.cpp">
     4891      <Filter>rendering\mathml</Filter>
     4892    </ClCompile>
     4893    <ClCompile Include="..\mathml\MathMLMencloseElement.cpp">
    48884894      <Filter>rendering\mathml</Filter>
    48894895    </ClCompile>
     
    95649570      <Filter>rendering\mathml</Filter>
    95659571    </ClInclude>
     9572    <ClInclude Include="..\rendering\mathml\RenderMathMLMenclose.h">
     9573      <Filter>rendering\mathml</Filter>
     9574    </ClInclude>
    95669575    <ClInclude Include="..\rendering\mathml\RenderMathMLOperator.h">
    95679576      <Filter>rendering\mathml</Filter>
     
    1242712436    </ClInclude>
    1242812437    <ClInclude Include="..\mathml\MathMLMathElement.h">
     12438      <Filter>rendering\mathml</Filter>
     12439    </ClInclude>
     12440    <ClInclude Include="..\mathml\MathMLMencloseElement.h">
    1242912441      <Filter>rendering\mathml</Filter>
    1243012442    </ClInclude>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r162875 r162933  
    6666                01E6C2E41194B2820050821C /* SpellingDot@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 01E6C2E31194B2820050821C /* SpellingDot@2x.png */; };
    6767                0562F9611573F88F0031CA16 /* PlatformLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0562F9601573F88F0031CA16 /* PlatformLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
     68                05D913CEEAB2A60534218ACF /* MathMLMencloseElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */; };
    6869                05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 05FD69DF12845D4300B2BEB3 /* DOMTimeStamp.h */; settings = {ATTRIBUTES = (Private, ); }; };
    6970                06027CAD0B1CBFC000884B2D /* ContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    12291230                339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
    12301231                33D0212D131DB37B004091A8 /* CookieStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = E13F01EA1270E10D00DFBA71 /* CookieStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1232                3571883EEF618793751E4089 /* RenderMathMLMenclose.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */; };
    12311233                3717D7E817ECC591003C276D /* extract-localizable-strings.pl in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */; };
    12321234                371941961566B37200A276D8 /* WebCoreNSCellExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 371941941566B37200A276D8 /* WebCoreNSCellExtras.m */; };
     
    80468048                3390CA530FFC157B00921962 /* NotificationCenter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NotificationCenter.idl; sourceTree = "<group>"; };
    80478049                339B5B62131DAA3200F48D02 /* CookiesStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookiesStrategy.h; sourceTree = "<group>"; };
     8050                3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLMenclose.cpp; path = rendering/mathml/RenderMathMLMenclose.cpp; sourceTree = SOURCE_ROOT; };
    80488051                3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = "extract-localizable-strings.pl"; sourceTree = "<group>"; };
    80498052                371941941566B37200A276D8 /* WebCoreNSCellExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebCoreNSCellExtras.m; sourceTree = "<group>"; };
     
    1053710540                A1E1154513015C4E0054AC8C /* PointLightSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PointLightSource.cpp; path = filters/PointLightSource.cpp; sourceTree = "<group>"; };
    1053810541                A1E1154713015C5D0054AC8C /* SpotLightSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SpotLightSource.cpp; path = filters/SpotLightSource.cpp; sourceTree = "<group>"; };
     10542                A208E222A56A0C7575F2A72E /* RenderMathMLMenclose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderMathMLMenclose.h; path = rendering/mathml/RenderMathMLMenclose.h; sourceTree = SOURCE_ROOT; };
    1053910543                A2B9217216C5CC420041DCD9 /* IntRectExtent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntRectExtent.h; sourceTree = "<group>"; };
    1054010544                A31C4E4C16E02AA6002F7957 /* OESTextureHalfFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OESTextureHalfFloat.cpp; path = canvas/OESTextureHalfFloat.cpp; sourceTree = "<group>"; };
     
    1256712571                C3CF17A215B0063F00276D39 /* IdTargetObserverRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IdTargetObserverRegistry.cpp; sourceTree = "<group>"; };
    1256812572                C3CF17A315B0063F00276D39 /* IdTargetObserverRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdTargetObserverRegistry.h; sourceTree = "<group>"; };
     12573                C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLMencloseElement.cpp; sourceTree = "<group>"; };
    1256912574                C4CD629818383766007EBAF1 /* FrameSnapshotting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameSnapshotting.cpp; sourceTree = "<group>"; };
    1257012575                C4CD629918383766007EBAF1 /* FrameSnapshotting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameSnapshotting.h; sourceTree = "<group>"; };
     
    1282512830                CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlternativeTextController.h; sourceTree = "<group>"; };
    1282612831                CE5CB1B314EDAB6F00BB2795 /* EventSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSender.h; sourceTree = "<group>"; };
     12832                CE6D89294C7AACE0AD89B3DD /* MathMLMencloseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLMencloseElement.h; sourceTree = "<group>"; };
    1282712833                CE7B2DAF1586ABAD0098B3FA /* AlternativeTextUIController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlternativeTextUIController.h; path = mac/AlternativeTextUIController.h; sourceTree = "<group>"; };
    1282812834                CE7B2DB01586ABAD0098B3FA /* AlternativeTextUIController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AlternativeTextUIController.mm; path = mac/AlternativeTextUIController.mm; sourceTree = "<group>"; };
     
    1425514261                                1CDD44660BA9C80000F90147 /* Configurations */,
    1425614262                                449195900FBE175B00D9F824 /* Exports */,
     14263                                3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */,
     14264                                A208E222A56A0C7575F2A72E /* RenderMathMLMenclose.h */,
    1425714265                        );
    1425814266                        name = WebKit;
     
    2219922207                                FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */,
    2220022208                                FABE72F21059C1EB00D999DD /* MathMLMathElement.h */,
     22209                                C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */,
     22210                                CE6D89294C7AACE0AD89B3DD /* MathMLMencloseElement.h */,
    2220122211                                F75A059AF170D8FAA5B8CABE /* MathMLSelectElement.cpp */,
    2220222212                                59780849D41E6F65D81198BC /* MathMLSelectElement.h */,
     
    2624826258                        buildActionMask = 2147483647;
    2624926259                        files = (
     26260                                05D913CEEAB2A60534218ACF /* MathMLMencloseElement.cpp in Sources */,
     26261                                3571883EEF618793751E4089 /* RenderMathMLMenclose.cpp in Sources */,
    2625026262                                7A29BA6A187B7C1D00F29CEB /* TemporaryOpenGLSetting.cpp in Sources */,
    2625126263                                41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */,
  • trunk/Source/WebCore/css/mathml.css

    r161286 r162933  
    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}
  • trunk/Source/WebCore/mathml/MathMLAllInOne.cpp

    r160005 r162933  
    2929#include "MathMLInlineContainerElement.cpp"
    3030#include "MathMLMathElement.cpp"
     31#include "MathMLMencloseElement.cpp"
    3132#include "MathMLSelectElement.cpp"
    3233#include "MathMLTextElement.cpp"
  • trunk/Source/WebCore/mathml/MathMLElement.h

    r162139 r162933  
    6262    virtual void attributeChanged(const QualifiedName&, const AtomicString& newValue, AttributeModificationReason) override;
    6363
    64 private:   
    6564    virtual bool isPresentationAttribute(const QualifiedName&) const override;
    6665    virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
     66private:   
    6767
    6868    virtual void updateSelectedChild() { };
  • trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp

    r161181 r162933  
    3535#include "RenderMathMLFenced.h"
    3636#include "RenderMathMLFraction.h"
     37#include "RenderMathMLMenclose.h"
    3738#include "RenderMathMLRoot.h"
    3839#include "RenderMathMLRow.h"
  • trunk/Source/WebCore/mathml/MathMLMencloseElement.h

    • Property svn:executable set to *
    r162932 r162933  
    11/*
    2  * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
     2 * Copyright (C) 2014 Gurpreet Kaur (k.gurpreet@samsung.com). All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #ifndef RenderMathMLSquareRoot_h
    27 #define RenderMathMLSquareRoot_h
     25
     26#ifndef MathMLMencloseElement_h
     27#define MathMLMencloseElement_h
    2828
    2929#if ENABLE(MATHML)
    30 
    31 #include "RenderMathMLRoot.h"
     30#include "MathMLInlineContainerElement.h"
    3231
    3332namespace WebCore {
    34    
    35 // Render sqrt(base), using radical notation.
    36 class RenderMathMLSquareRoot final : public RenderMathMLRoot {
     33
     34class MathMLMencloseElement final: public MathMLInlineContainerElement {
    3735public:
    38     RenderMathMLSquareRoot(Element&, PassRef<RenderStyle>);
    39    
     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
    4040private:
    41     virtual bool isRenderMathMLSquareRoot() const override { return true; }
    42     virtual const char* renderName() const override { return "RenderMathMLSquareRoot"; }
     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;
    4350};
    44    
     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
    4558}
    4659
    4760#endif // ENABLE(MATHML)
    48 
    49 #endif // RenderMathMLSquareRoot_h
     61#endif // MathMLMencloseElement_h
  • trunk/Source/WebCore/mathml/mathattrs.in

    r161430 r162933  
    2525mathsize
    2626mathvariant
     27notation
    2728numalign
    2829open
  • trunk/Source/WebCore/mathml/mathtags.in

    r161495 r162933  
    3232mmultiscripts interfaceName=MathMLInlineContainerElement
    3333mprescripts interfaceName=MathMLInlineContainerElement
     34menclose interfaceName=MathMLMencloseElement
    3435none interfaceName=MathMLInlineContainerElement
    3536semantics interfaceName=MathMLSelectElement
     
    3738maligngroup interfaceName=MathMLElement
    3839malignmark interfaceName=MathMLElement
    39 menclose interfaceName=MathMLElement
    4040mglyph interfaceName=MathMLElement
    4141mlabeledtr interfaceName=MathMLElement
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h

    • Property svn:executable set to *
    r162932 r162933  
    11/*
    2  * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
     2 * Copyright (C) 2014 Gurpreet Kaur (k.gurpreet@samsung.com). All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #ifndef RenderMathMLSquareRoot_h
    27 #define RenderMathMLSquareRoot_h
     25
     26#ifndef RenderMathMLMenclose_h
     27#define RenderMathMLMenclose_h
    2828
    2929#if ENABLE(MATHML)
    30 
    31 #include "RenderMathMLRoot.h"
     30#include "RenderMathMLRow.h"
    3231
    3332namespace WebCore {
    3433   
    35 // Render sqrt(base), using radical notation.
    36 class RenderMathMLSquareRoot final : public RenderMathMLRoot {
     34class RenderMathMLMenclose final: public RenderMathMLRow {
    3735public:
    38     RenderMathMLSquareRoot(Element&, PassRef<RenderStyle>);
    39    
     36    RenderMathMLMenclose(Element&, PassRef<RenderStyle>);
     37
    4038private:
    41     virtual bool isRenderMathMLSquareRoot() const override { return true; }
    42     virtual const char* renderName() const override { return "RenderMathMLSquareRoot"; }
     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 = nullptr) override;
     43    virtual void computePreferredLogicalWidths() override;
     44    bool checkNotationalValuesValidity(const Vector<String>&) const;
    4345};
    4446   
     
    4648
    4749#endif // ENABLE(MATHML)
    48 
    49 #endif // RenderMathMLSquareRoot_h
     50#endif // RenderMathMLMenclose_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r161493 r162933  
    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{
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h

    r162158 r162933  
    3737public:
    3838    RenderMathMLRoot(Element&, PassRef<RenderStyle>);
     39    RenderMathMLRoot(Document&, PassRef<RenderStyle>);
    3940
    4041    virtual LayoutUnit paddingTop() const override;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp

    r158097 r162933  
    3131#include "RenderMathMLSquareRoot.h"
    3232
     33#include "RenderMathMLMenclose.h"
     34
    3335namespace WebCore {
    3436   
     
    3840}
    3941
     42RenderMathMLSquareRoot::RenderMathMLSquareRoot(Document& document, PassRef<RenderStyle> style)
     43    : RenderMathMLRoot(document, std::move(style))
     44{
    4045}
    4146
     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;
     52}
     53
     54}
    4255#endif // ENABLE(MATHML)
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h

    r162158 r162933  
    3131#include "RenderMathMLRoot.h"
    3232
     33
    3334namespace WebCore {
    34    
     35
     36class RenderMathMLMenclose;
     37
    3538// Render sqrt(base), using radical notation.
    3639class RenderMathMLSquareRoot final : public RenderMathMLRoot {
    3740public:
    3841    RenderMathMLSquareRoot(Element&, PassRef<RenderStyle>);
     42    RenderMathMLSquareRoot(Document&, PassRef<RenderStyle>);
     43    static RenderPtr<RenderMathMLSquareRoot> createAnonymousWithParentRenderer(RenderMathMLMenclose&);
    3944   
    4045private:
Note: See TracChangeset for help on using the changeset viewer.