2010-07-09 François Sausset <sausset@gmail.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jul 2010 14:11:14 +0000 (14:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jul 2010 14:11:14 +0000 (14:11 +0000)
        Reviewed by Beth Dakin.

        Add test to be sure that only <mi> elements use italic fonts by default.
        Update test with fractions to take into account the correct behaviour of mtext (regular instead of italic).
        https://bugs.webkit.org/show_bug.cgi?id=41626

        * mathml/presentation/tokenElements.xhtml: Added.
        * platform/mac/mathml/presentation/fractions-expected.checksum:
        * platform/mac/mathml/presentation/fractions-expected.png:
        * platform/mac/mathml/presentation/fractions-expected.txt:
        * platform/mac/mathml/presentation/tokenElements-expected.checksum: Added.
        * platform/mac/mathml/presentation/tokenElements-expected.png: Added.
        * platform/mac/mathml/presentation/tokenElements-expected.txt: Added.
2010-07-09  François Sausset  <sausset@gmail.com>

        Reviewed by Beth Dakin.

        Correct the default font variant of mtext (regular instead of italic).
        https://bugs.webkit.org/show_bug.cgi?id=41626

        Add test to be sure that only <mi> elements use italic fonts by default.
        Update test with fractions to take into account the correct behaviour of mtext (regular instead of italic).

        * css/mathml.css:
        (mi):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62948 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/mathml/presentation/tokenElements.xhtml [new file with mode: 0644]
LayoutTests/platform/mac/mathml/presentation/fractions-expected.checksum
LayoutTests/platform/mac/mathml/presentation/fractions-expected.png
LayoutTests/platform/mac/mathml/presentation/fractions-expected.txt
LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/mathml.css

index 7e18e4d..37a592f 100644 (file)
@@ -1,3 +1,19 @@
+2010-07-09  François Sausset  <sausset@gmail.com>
+
+        Reviewed by Beth Dakin.
+
+        Add test to be sure that only <mi> elements use italic fonts by default.
+        Update test with fractions to take into account the correct behaviour of mtext (regular instead of italic).
+        https://bugs.webkit.org/show_bug.cgi?id=41626
+
+        * mathml/presentation/tokenElements.xhtml: Added.
+        * platform/mac/mathml/presentation/fractions-expected.checksum:
+        * platform/mac/mathml/presentation/fractions-expected.png:
+        * platform/mac/mathml/presentation/fractions-expected.txt:
+        * platform/mac/mathml/presentation/tokenElements-expected.checksum: Added.
+        * platform/mac/mathml/presentation/tokenElements-expected.png: Added.
+        * platform/mac/mathml/presentation/tokenElements-expected.txt: Added.
+
 2010-07-09  Tony Gentilcore  <tonyg@chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/mathml/presentation/tokenElements.xhtml b/LayoutTests/mathml/presentation/tokenElements.xhtml
new file mode 100644 (file)
index 0000000..cc33f6d
--- /dev/null
@@ -0,0 +1,22 @@
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>Token Elements</title>
+<style type='text/css'>
+</style>
+</head>
+<body>
+<p id='t1'>Following elements should use a regular font: 
+<math xmlns='http://www.w3.org/1998/Math/MathML'>
+<mn>1</mn>
+<mo>&#x2207;</mo>
+<mtext>text</mtext>
+<ms>&amp;</ms>
+</math>
+</p>
+<p id='t2'>Following element should be in italic: 
+<math xmlns='http://www.w3.org/1998/Math/MathML'>
+<mi>x</mi>
+</math>
+</p>
+</body>
+</html>
index 86af4a2..a67c5e5 100644 (file)
Binary files a/LayoutTests/platform/mac/mathml/presentation/fractions-expected.png and b/LayoutTests/platform/mac/mathml/presentation/fractions-expected.png differ
index 43d7f6b..d7f40e4 100644 (file)
@@ -49,16 +49,16 @@ layer at (0,0) size 800x338
       RenderBlock {p} at (0,106) size 784x40
         RenderText {#text} at (0,10) size 31x18
           text run at (0,10) width 31: "text: "
-        RenderBlock {math} at (31,0) size 129x40
-          RenderBlock {mfrac} at (1,0) size 127x40
-            RenderBlock {mfrac} at (0,0) size 127x19
+        RenderBlock {math} at (31,0) size 128x40
+          RenderBlock {mfrac} at (1,0) size 126x40
+            RenderBlock {mfrac} at (0,0) size 126x19
               RenderInline {mtext} at (0,0) size 99x16
-                RenderText {#text} at (14,3) size 99x16
-                  text run at (14,3) width 99: "number of bugs"
-            RenderBlock {mfrac} at (0,19) size 127x21
-              RenderInline {mtext} at (0,0) size 121x16
-                RenderText {#text} at (3,5) size 121x16
-                  text run at (3,5) width 121: "number of changes"
+                RenderText {#text} at (13,3) size 99x16
+                  text run at (13,3) width 99: "number of bugs"
+            RenderBlock {mfrac} at (0,19) size 126x21
+              RenderInline {mtext} at (0,0) size 120x16
+                RenderText {#text} at (3,5) size 120x16
+                  text run at (3,5) width 120: "number of changes"
         RenderText {#text} at (0,0) size 0x0
       RenderBlock {p} at (0,162) size 784x38
         RenderText {#text} at (0,7) size 173x18
diff --git a/LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.checksum b/LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.checksum
new file mode 100644 (file)
index 0000000..9e18934
--- /dev/null
@@ -0,0 +1 @@
+eddef3c773f4babed7f4ea3a269c77e7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.png b/LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.png
new file mode 100644 (file)
index 0000000..98d4a57
Binary files /dev/null and b/LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.png differ
diff --git a/LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.txt b/LayoutTests/platform/mac/mathml/presentation/tokenElements-expected.txt
new file mode 100644 (file)
index 0000000..00edb08
--- /dev/null
@@ -0,0 +1,31 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x86
+  RenderBlock {html} at (0,0) size 800x86
+    RenderBody {body} at (8,16) size 784x54
+      RenderBlock {p} at (0,0) size 784x19
+        RenderText {#text} at (0,0) size 291x18
+          text run at (0,0) width 291: "Following elements should use a regular font: "
+        RenderBlock {math} at (291,0) size 56x19
+          RenderInline {mn} at (0,0) size 8x16
+            RenderText {#text} at (1,3) size 8x16
+              text run at (1,3) width 8: "1"
+          RenderBlock {mo} at (9,3) size 11x16
+            RenderBlock {mo} at (0,0) size 11x16
+              RenderText {mo} at (0,0) size 11x16
+                text run at (0,0) width 11: "\x{2211}"
+          RenderInline {mtext} at (0,0) size 23x16
+            RenderText {#text} at (20,3) size 23x16
+              text run at (20,3) width 23: "text"
+          RenderInline {ms} at (0,0) size 12x16
+            RenderText {#text} at (43,3) size 12x16
+              text run at (43,3) width 12: "&"
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {p} at (0,35) size 784x19
+        RenderText {#text} at (0,0) size 241x18
+          text run at (0,0) width 241: "Following element should be in italic: "
+        RenderBlock {math} at (241,0) size 9x19
+          RenderInline {mi} at (0,0) size 7x16
+            RenderText {#text} at (1,3) size 7x16
+              text run at (1,3) width 7: "x"
+        RenderText {#text} at (0,0) size 0x0
index b1b5670..f181e05 100644 (file)
@@ -1,3 +1,16 @@
+2010-07-09  François Sausset  <sausset@gmail.com>
+
+        Reviewed by Beth Dakin.
+
+        Correct the default font variant of mtext (regular instead of italic).
+        https://bugs.webkit.org/show_bug.cgi?id=41626
+
+        Add test to be sure that only <mi> elements use italic fonts by default.
+        Update test with fractions to take into account the correct behaviour of mtext (regular instead of italic).
+
+        * css/mathml.css:
+        (mi):
+
 2010-07-09  Tony Gentilcore  <tonyg@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index 2c396a7..6f25ad9 100644 (file)
@@ -29,7 +29,7 @@ mrow, mfenced {
     padding-right: 1px;
 }
 
-mi, mtext {
+mi{
     font-style: italic;
     padding-right: 0.1em;
 }