Changeset 63079 in webkit


Ignore:
Timestamp:
Jul 12, 2010 6:20:50 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-12 François Sausset <François Sausset>

Reviewed by Kenneth Rohde Christiansen.

Test the mathsize MathML attribute.
https://bugs.webkit.org/show_bug.cgi?id=42067

  • mathml/presentation/attributes.xhtml:
  • platform/mac/mathml/presentation/attributes-expected.checksum:
  • platform/mac/mathml/presentation/attributes-expected.png:
  • platform/mac/mathml/presentation/attributes-expected.txt:

2010-07-12 François Sausset <François Sausset>

Reviewed by Kenneth Rohde Christiansen.

Make the mathsize MathML attribute handle values in em, px, pt,...
https://bugs.webkit.org/show_bug.cgi?id=42067

Test: mathml/presentation/attributes.xhtml

  • css/mathml.css: (math[mathsize="small"], mstyle[mathsize="small"], mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"], mtext[mathsize="small"], mspace[mathsize="small"], ms[mathsize="small"]): (math[mathsize="normal"], mstyle[mathsize="normal"], mo[mathsize="normal"], mn[mathsize="normal"], mi[mathsize="normal"], mtext[mathsize="normal"], mspace[mathsize="normal"], ms[mathsize="normal"]): (math[mathsize="big"], mstyle[mathsize="big"], mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"], mtext[mathsize="big"], mspace[mathsize="big"], ms[mathsize="big"]):
  • mathml/MathMLElement.cpp: (WebCore::MathMLElement::parseMappedAttribute):
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63076 r63079  
     12010-07-12  François Sausset  <sausset@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Test the mathsize MathML attribute.
     6        https://bugs.webkit.org/show_bug.cgi?id=42067
     7
     8        * mathml/presentation/attributes.xhtml:
     9        * platform/mac/mathml/presentation/attributes-expected.checksum:
     10        * platform/mac/mathml/presentation/attributes-expected.png:
     11        * platform/mac/mathml/presentation/attributes-expected.txt:
     12
    1132010-07-12  Pavel Podivilov  <podivilov@chromium.org>
    214
  • trunk/LayoutTests/mathml/presentation/attributes.xhtml

    r62968 r63079  
    1414</math>
    1515</p>
     16<p id='t2'>following elements should appear with increasing size:
     17<math xmlns='http://www.w3.org/1998/Math/MathML'>
     18<mi mathsize="small">x</mi>
     19<mi mathsize="normal">x</mi>
     20<mi mathsize="big">x</mi>
     21<mi mathsize="2em">x</mi>
     22</math>
     23</p>
    1624</body>
    1725</html>
  • trunk/LayoutTests/platform/mac/mathml/presentation/attributes-expected.checksum

    r62968 r63079  
    1 d215f2984a12a6f78d87aa777c0e8d46
     1ca66f60b621697f15cd827ff3e41b513
  • trunk/LayoutTests/platform/mac/mathml/presentation/attributes-expected.txt

    r62968 r63079  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x75
    4   RenderBlock {html} at (0,0) size 800x75
    5     RenderBody {body} at (8,16) size 784x43
     3layer at (0,0) size 800x128
     4  RenderBlock {html} at (0,0) size 800x128
     5    RenderBody {body} at (8,16) size 784x96
    66      RenderBlock {p} at (0,0) size 784x43
    77        RenderText {#text} at (0,13) size 432x18
     
    2929                text run at (12,3) width 8: "2"
    3030        RenderText {#text} at (0,0) size 0x0
     31      RenderBlock {p} at (0,59) size 784x37
     32        RenderText {#text} at (0,13) size 348x18
     33          text run at (0,13) width 348: "following elements should appear with increasing size: "
     34        RenderBlock {math} at (348,0) size 39x37
     35          RenderInline {mi} at (0,0) size 5x12
     36            RenderText {#text} at (1,19) size 5x12
     37              text run at (1,19) width 5: "x"
     38          RenderInline {mi} at (0,0) size 7x16
     39            RenderText {#text} at (6,16) size 7x16
     40              text run at (6,16) width 7: "x"
     41          RenderInline {mi} at (0,0) size 11x24
     42            RenderText {#text} at (13,10) size 11x24
     43              text run at (13,10) width 11: "x"
     44          RenderInline {mi} at (0,0) size 14x32
     45            RenderText {#text} at (24,5) size 14x32
     46              text run at (24,5) width 14: "x"
     47        RenderText {#text} at (0,0) size 0x0
  • trunk/WebCore/ChangeLog

    r63078 r63079  
     12010-07-12  François Sausset  <sausset@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Make the mathsize MathML attribute handle values in em, px, pt,...
     6        https://bugs.webkit.org/show_bug.cgi?id=42067
     7
     8        Test: mathml/presentation/attributes.xhtml
     9
     10        * css/mathml.css:
     11        (math[mathsize="small"], mstyle[mathsize="small"], mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"], mtext[mathsize="small"], mspace[mathsize="small"], ms[mathsize="small"]):
     12        (math[mathsize="normal"], mstyle[mathsize="normal"], mo[mathsize="normal"], mn[mathsize="normal"], mi[mathsize="normal"], mtext[mathsize="normal"], mspace[mathsize="normal"], ms[mathsize="normal"]):
     13        (math[mathsize="big"], mstyle[mathsize="big"], mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"], mtext[mathsize="big"], mspace[mathsize="big"], ms[mathsize="big"]):
     14        * mathml/MathMLElement.cpp:
     15        (WebCore::MathMLElement::parseMappedAttribute):
     16
    1172010-07-12  Xan Lopez  <xlopez@igalia.com>
    218
  • trunk/WebCore/css/mathml.css

    r62948 r63079  
    9595}
    9696
    97 mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"] {
    98     font-size: 0.75em;
    99 }
    100 
    101 mo[mathsize="normal"],mn[mathsize="normal"],mi[mathsize="normal"] {
     97math[mathsize="small"], mstyle[mathsize="small"], mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"], mtext[mathsize="small"], mspace[mathsize="small"], ms[mathsize="small"]{
     98    font-size: 0.75em;
     99}
     100
     101math[mathsize="normal"], mstyle[mathsize="normal"], mo[mathsize="normal"], mn[mathsize="normal"], mi[mathsize="normal"], mtext[mathsize="normal"], mspace[mathsize="normal"], ms[mathsize="normal"]{
    102102    font-size: 1em;
    103103}
    104104
    105 mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"] {
     105math[mathsize="big"], mstyle[mathsize="big"], mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"], mtext[mathsize="big"], mspace[mathsize="big"], ms[mathsize="big"]{
    106106    font-size: 1.5em;
    107107}
  • trunk/WebCore/mathml/MathMLElement.cpp

    r62968 r63079  
    6060void MathMLElement::parseMappedAttribute(Attribute* attr)
    6161{
    62     if (attr->name() == MathMLNames::mathcolorAttr)
     62    if (attr->name() == MathMLNames::mathbackgroundAttr)
     63        addCSSProperty(attr, CSSPropertyBackgroundColor, attr->value());
     64    else if (attr->name() == MathMLNames::mathcolorAttr)
    6365        addCSSProperty(attr, CSSPropertyColor, attr->value());
    64     else if (attr->name() == MathMLNames::mathbackgroundAttr)
    65         addCSSProperty(attr, CSSPropertyBackgroundColor, attr->value());
     66    else if (attr->name() == MathMLNames::mathsizeAttr) {
     67        // The following three values of mathsize are handled in WebCore/css/mathml.css
     68        if (attr->value() != "normal" && attr->value() != "small" && attr->value() != "big")
     69            addCSSProperty(attr, CSSPropertyFontSize, attr->value());
     70    }
    6671    else
    6772        StyledElement::parseMappedAttribute(attr);
Note: See TracChangeset for help on using the changeset viewer.