Changeset 64982 in webkit
- Timestamp:
- Aug 9, 2010 8:40:40 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64979 r64982 1 2010-08-09 François Sausset <sausset@gmail.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Add test for some deprecated MathML style attributes 6 https://bugs.webkit.org/show_bug.cgi?id=43503 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 1 13 2010-08-09 Pavel Feldman <pfeldman@chromium.org> 2 14 -
trunk/LayoutTests/mathml/presentation/attributes.xhtml
r64753 r64982 12 12 <mn mathcolor="#00F">1</mn> 13 13 <msqrt mathcolor="#0000FF"><mn>2</mn></msqrt> 14 </math> 15 <math xmlns='http://www.w3.org/1998/Math/MathML' background="orange"> 16 <mfrac color="blue"><mi>x</mi><mi>y</mi></mfrac> 14 17 </math> 15 18 </p> … … 30 33 </math> 31 34 </p> 35 <p id='t4'>test font style attributes: 36 <math xmlns='http://www.w3.org/1998/Math/MathML'> 37 <mtext fontsize="2em">A</mtext> 38 <mtext fontfamily="sans-serif">A</mtext> 39 <mtext fontstyle="italic">A</mtext> 40 <mtext fontweight="bold">A</mtext> 41 </math> 42 </p> 32 43 </body> 33 44 </html> -
trunk/LayoutTests/platform/mac/mathml/presentation/attributes-expected.checksum
r64753 r64982 1 573c0ea5a0013b193f34b258498e0a6e 1 684bc130d96bc4b74df32b4b69116b31 -
trunk/LayoutTests/platform/mac/mathml/presentation/attributes-expected.txt
r64753 r64982 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x 1634 RenderBlock {html} at (0,0) size 800x 1635 RenderBody {body} at (8,16) size 784x1 313 layer at (0,0) size 800x216 4 RenderBlock {html} at (0,0) size 800x216 5 RenderBody {body} at (8,16) size 784x184 6 6 RenderBlock {p} at (0,0) size 784x43 7 7 RenderText {#text} at (0,13) size 432x18 … … 28 28 RenderText {#text} at (12,3) size 8x16 29 29 text run at (12,3) width 8: "2" 30 RenderText {#text} at (486,13) size 4x18 31 text run at (486,13) width 4: " " 32 RenderBlock {math} at (490,3) size 15x40 [bgcolor=#FFA500] 33 RenderBlock {mfrac} at (1,0) size 13x40 [color=#0000FF] 34 RenderBlock {mfrac} at (0,0) size 13x19 35 RenderInline {mi} at (0,0) size 7x16 36 RenderText {#text} at (3,3) size 7x16 37 text run at (3,3) width 7: "x" 38 RenderBlock {mfrac} at (0,19) size 13x21 39 RenderInline {mi} at (0,0) size 7x16 40 RenderText {#text} at (3,5) size 7x16 41 text run at (3,5) width 7: "y" 30 42 RenderText {#text} at (0,0) size 0x0 31 43 RenderBlock {p} at (0,59) size 784x37 … … 63 75 text run at (35,3) width 11: "A" 64 76 RenderText {#text} at (0,0) size 0x0 77 RenderBlock {p} at (0,147) size 784x37 78 RenderText {#text} at (0,13) size 152x18 79 text run at (0,13) width 152: "test font style attributes: " 80 RenderBlock {math} at (152,0) size 58x37 81 RenderInline {mtext} at (0,0) size 23x32 82 RenderText {#text} at (1,5) size 23x32 83 text run at (1,5) width 23: "A" 84 RenderInline {mtext} at (0,0) size 11x18 85 RenderText {#text} at (24,13) size 11x18 86 text run at (24,13) width 11: "A" 87 RenderInline {mtext} at (0,0) size 10x16 88 RenderText {#text} at (35,16) size 10x16 89 text run at (35,16) width 10: "A" 90 RenderInline {mtext} at (0,0) size 12x16 91 RenderText {#text} at (45,16) size 12x16 92 text run at (45,16) width 12: "A" 93 RenderText {#text} at (0,0) size 0x0 -
trunk/WebCore/ChangeLog
r64981 r64982 1 2010-08-09 François Sausset <sausset@gmail.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Implement MathML deprecated style attributes 6 https://bugs.webkit.org/show_bug.cgi?id=43503 7 8 Test: mathml/presentation/attributes.xhtml 9 10 * mathml/MathMLElement.cpp: 11 (WebCore::MathMLElement::mapToEntry): 12 (WebCore::MathMLElement::parseMappedAttribute): 13 * mathml/mathattrs.in: 14 1 15 2010-08-09 Ilya Tikhonovsky <loislo@chromium.org> 2 16 -
trunk/WebCore/mathml/MathMLElement.cpp
r63079 r64982 51 51 bool MathMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const 52 52 { 53 if (attrName == MathMLNames::mathcolorAttr || attrName == MathMLNames::mathbackgroundAttr) { 53 if (attrName == mathcolorAttr || attrName == mathbackgroundAttr 54 || attrName == colorAttr || attrName == backgroundAttr 55 || attrName == fontsizeAttr || attrName == fontstyleAttr 56 || attrName == fontweightAttr || attrName == fontfamilyAttr) { 54 57 result = eMathML; 55 58 return false; … … 60 63 void MathMLElement::parseMappedAttribute(Attribute* attr) 61 64 { 62 if (attr->name() == MathMLNames::mathbackgroundAttr)65 if (attr->name() == mathbackgroundAttr) 63 66 addCSSProperty(attr, CSSPropertyBackgroundColor, attr->value()); 64 else if (attr->name() == MathMLNames::mathcolorAttr) 65 addCSSProperty(attr, CSSPropertyColor, attr->value()); 66 else if (attr->name() == MathMLNames::mathsizeAttr) { 67 else if (attr->name() == mathsizeAttr) { 67 68 // The following three values of mathsize are handled in WebCore/css/mathml.css 68 69 if (attr->value() != "normal" && attr->value() != "small" && attr->value() != "big") 69 70 addCSSProperty(attr, CSSPropertyFontSize, attr->value()); 70 } 71 } else if (attr->name() == mathcolorAttr) 72 addCSSProperty(attr, CSSPropertyColor, attr->value()); 73 // FIXME: deprecated attributes that should loose in a conflict with a non deprecated attribute 74 else if (attr->name() == fontsizeAttr) 75 addCSSProperty(attr, CSSPropertyFontSize, attr->value()); 76 else if (attr->name() == backgroundAttr) 77 addCSSProperty(attr, CSSPropertyBackgroundColor, attr->value()); 78 else if (attr->name() == colorAttr) 79 addCSSProperty(attr, CSSPropertyColor, attr->value()); 80 else if (attr->name() == fontstyleAttr) 81 addCSSProperty(attr, CSSPropertyFontStyle, attr->value()); 82 else if (attr->name() == fontweightAttr) 83 addCSSProperty(attr, CSSPropertyFontWeight, attr->value()); 84 else if (attr->name() == fontfamilyAttr) 85 addCSSProperty(attr, CSSPropertyFontFamily, attr->value()); 71 86 else 72 87 StyledElement::parseMappedAttribute(attr); -
trunk/WebCore/mathml/mathattrs.in
r64753 r64982 4 4 attrsNullNamespace 5 5 6 background 6 7 close 8 color 7 9 definitionURL 8 10 denomalign 11 fontfamily 12 fontsize 13 fontstyle 14 fontweight 9 15 linethickness 10 16 mathbackground
Note: See TracChangeset
for help on using the changeset viewer.