Diff
Modified: trunk/LayoutTests/ChangeLog (103212 => 103213)
--- trunk/LayoutTests/ChangeLog 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/ChangeLog 2011-12-19 04:25:29 UTC (rev 103213)
@@ -1,3 +1,27 @@
+2011-12-18 David Barton <[email protected]>
+
+ <msup>, <munder>, <mover>, and <munderover> baseline positions are wrong
+ https://bugs.webkit.org/show_bug.cgi?id=72821
+
+ Reviewed by Darin Adler.
+
+ * platform/mac/mathml/presentation/msup-base-changed-expected.png:
+ * platform/mac/mathml/presentation/msup-base-changed-expected.txt:
+ * platform/mac/mathml/presentation/msup-sup-changed-expected.png:
+ * platform/mac/mathml/presentation/msup-sup-changed-expected.txt:
+ * platform/mac/mathml/presentation/over-expected.png:
+ * platform/mac/mathml/presentation/over-expected.txt:
+ * platform/mac/mathml/presentation/roots-expected.png:
+ * platform/mac/mathml/presentation/roots-expected.txt:
+ * platform/mac/mathml/presentation/row-alignment-expected.png:
+ * platform/mac/mathml/presentation/row-alignment-expected.txt:
+ * platform/mac/mathml/presentation/sup-expected.png:
+ * platform/mac/mathml/presentation/sup-expected.txt:
+ * platform/mac/mathml/presentation/under-expected.png:
+ * platform/mac/mathml/presentation/under-expected.txt:
+ * platform/mac/mathml/presentation/underover-expected.png:
+ * platform/mac/mathml/presentation/underover-expected.txt:
+
2011-12-18 Dan Bernstein <[email protected]>
Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/msup-base-changed-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/msup-base-changed-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/msup-base-changed-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/msup-base-changed-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -1,10 +1,10 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x54
- RenderBlock {html} at (0,0) size 800x54
- RenderBody {body} at (8,16) size 784x22
- RenderBlock {p} at (0,0) size 784x22
- RenderMathMLMath {math} at (0,3) size 15x19
+layer at (0,0) size 800x51
+ RenderBlock {html} at (0,0) size 800x51
+ RenderBody {body} at (8,16) size 784x19
+ RenderBlock {p} at (0,0) size 784x19
+ RenderMathMLMath {math} at (0,0) size 15x19
RenderMathMLSubSup {msup} at (1,0) size 13x19
RenderMathMLBlock {msup} at (0,3) size 7x16
RenderInline {mi} at (0,0) size 7x16
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/msup-sup-changed-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/msup-sup-changed-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/msup-sup-changed-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/msup-sup-changed-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -1,10 +1,10 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x54
- RenderBlock {html} at (0,0) size 800x54
- RenderBody {body} at (8,16) size 784x22
- RenderBlock {p} at (0,0) size 784x22
- RenderMathMLMath {math} at (0,3) size 15x19
+layer at (0,0) size 800x51
+ RenderBlock {html} at (0,0) size 800x51
+ RenderBody {body} at (8,16) size 784x19
+ RenderBlock {p} at (0,0) size 784x19
+ RenderMathMLMath {math} at (0,0) size 15x19
RenderMathMLSubSup {msup} at (1,0) size 13x19
RenderMathMLBlock {msup} at (0,3) size 7x16
RenderInline {mi} at (0,0) size 7x16
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/over-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/over-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/over-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/over-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -1,12 +1,12 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x293
- RenderBlock {html} at (0,0) size 800x293
- RenderBody {body} at (8,16) size 784x261
- RenderBlock {p} at (0,0) size 784x31
- RenderText {#text} at (0,12) size 36x18
- text run at (0,12) width 36: "over: "
- RenderMathMLMath {math} at (36,0) size 12x31
+layer at (0,0) size 800x285
+ RenderBlock {html} at (0,0) size 800x285
+ RenderBody {body} at (8,16) size 784x253
+ RenderBlock {p} at (0,0) size 784x28
+ RenderText {#text} at (0,9) size 36x18
+ text run at (0,9) width 36: "over: "
+ RenderMathMLMath {math} at (36,0) size 12x28
RenderMathMLUnderOver {mover} at (1,0) size 10x28
RenderMathMLBlock (anonymous) at (0,0) size 10x16
RenderInline {mi} at (0,0) size 5x12
@@ -17,10 +17,10 @@
RenderText {#text} at (0,0) size 10x16
text run at (0,0) width 10: "B"
RenderText {#text} at (0,0) size 0x0
- RenderBlock {p} at (0,47) size 784x31
- RenderText {#text} at (0,12) size 36x18
- text run at (0,12) width 36: "over: "
- RenderMathMLMath {math} at (36,0) size 12x31
+ RenderBlock {p} at (0,44) size 784x28
+ RenderText {#text} at (0,9) size 36x18
+ text run at (0,9) width 36: "over: "
+ RenderMathMLMath {math} at (36,0) size 12x28
RenderMathMLUnderOver {mover} at (1,0) size 10x28
RenderMathMLBlock (anonymous) at (0,0) size 10x16
RenderInline {mi} at (0,0) size 5x12
@@ -31,10 +31,10 @@
RenderText {#text} at (0,0) size 10x16
text run at (0,0) width 10: "B"
RenderText {#text} at (0,0) size 0x0
- RenderBlock {p} at (0,94) size 784x37
- RenderText {#text} at (0,18) size 36x18
- text run at (0,18) width 36: "over: "
- RenderMathMLMath {math} at (36,0) size 17x37
+ RenderBlock {p} at (0,88) size 784x36
+ RenderText {#text} at (0,15) size 36x18
+ text run at (0,15) width 36: "over: "
+ RenderMathMLMath {math} at (36,0) size 17x36
RenderMathMLUnderOver {mover} at (1,0) size 15x36
RenderMathMLBlock (anonymous) at (0,0) size 15x16
RenderInline {mi} at (0,0) size 5x12
@@ -45,10 +45,10 @@
RenderText {#text} at (0,0) size 15x24
text run at (0,0) width 15: "B"
RenderText {#text} at (0,0) size 0x0
- RenderBlock {p} at (0,147) size 784x37
- RenderText {#text} at (0,18) size 36x18
- text run at (0,18) width 36: "over: "
- RenderMathMLMath {math} at (36,0) size 19x37
+ RenderBlock {p} at (0,140) size 784x36
+ RenderText {#text} at (0,15) size 36x18
+ text run at (0,15) width 36: "over: "
+ RenderMathMLMath {math} at (36,0) size 19x36
RenderMathMLUnderOver {mover} at (1,0) size 17x36
RenderMathMLBlock (anonymous) at (0,0) size 17x16
RenderInline {mi} at (0,0) size 5x12
@@ -60,9 +60,9 @@
RenderText {mo} at (0,0) size 17x24
text run at (0,0) width 17: "\x{2211}"
RenderText {#text} at (0,0) size 0x0
- RenderBlock {p} at (0,200) size 784x61
- RenderText {#text} at (0,29) size 36x18
- text run at (0,29) width 36: "over: "
+ RenderBlock {p} at (0,192) size 784x61
+ RenderText {#text} at (0,26) size 36x18
+ text run at (0,26) width 36: "over: "
RenderMathMLMath {math} at (36,0) size 52x61
RenderMathMLUnderOver {mover} at (1,0) size 10x61
RenderMathMLBlock (anonymous) at (0,0) size 10x16
@@ -71,29 +71,29 @@
text run at (0,3) width 5: "y"
RenderMathMLBlock (anonymous) at (0,12) size 10x49
RenderMathMLOperator {mo} at (0,0) size 10x49
- RenderBlock {div} at (11,3) size 40x40
+ RenderBlock {div} at (11,0) size 40x40
RenderText {#text} at (0,0) size 0x0
-layer at (45,228) size 10x10 scrollHeight 15
+layer at (45,220) size 10x10 scrollHeight 15
RenderMathMLBlock {mo} at (0,0) size 10x10
-layer at (45,238) size 10x10 scrollHeight 14
+layer at (45,230) size 10x10 scrollHeight 14
RenderMathMLBlock {mo} at (0,10) size 10x10
RenderText {mo} at (0,-3) size 10x17
text run at (0,-3) width 10: "\x{23AE}"
-layer at (45,248) size 10x10 scrollHeight 14
+layer at (45,240) size 10x10 scrollHeight 14
RenderMathMLBlock {mo} at (0,20) size 10x10
RenderText {mo} at (0,-3) size 10x17
text run at (0,-3) width 10: "\x{23AE}"
-layer at (45,258) size 10x8 scrollHeight 14
+layer at (45,250) size 10x8 scrollHeight 14
RenderMathMLBlock {mo} at (0,30) size 10x8
RenderText {mo} at (0,-3) size 10x17
text run at (0,-3) width 10: "\x{23AE}"
-layer at (45,266) size 10x11 scrollHeight 14
+layer at (45,258) size 10x11 scrollHeight 14
RenderMathMLBlock {mo} at (0,38) size 10x11
-layer at (45,229) size 10x11 backgroundClip at (45,228) size 10x10 clip at (45,228) size 10x10 outlineClip at (45,228) size 10x10
+layer at (45,221) size 10x11 backgroundClip at (45,220) size 10x10 clip at (45,220) size 10x10 outlineClip at (45,220) size 10x10
RenderBlock (relative positioned) {mo} at (0,0) size 10x11
RenderText {mo} at (0,-3) size 10x17
text run at (0,-3) width 10: "\x{2320}"
-layer at (45,263) size 10x11 backgroundClip at (45,266) size 10x11 clip at (45,266) size 10x11 outlineClip at (45,266) size 10x11
+layer at (45,255) size 10x11 backgroundClip at (45,258) size 10x11 clip at (45,258) size 10x11 outlineClip at (45,258) size 10x11
RenderBlock (relative positioned) {mo} at (0,0) size 10x11
RenderText {mo} at (0,-3) size 10x17
text run at (0,-3) width 10: "\x{2321}"
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/roots-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/roots-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/roots-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/roots-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -28,8 +28,8 @@
RenderText {#text} at (17,0) size 8x16
text run at (17,0) width 8: "1"
RenderBlock {p} at (0,70) size 784x22
- RenderText {#text} at (0,0) size 222x18
- text run at (0,0) width 222: "long square root with implied row: "
+ RenderText {#text} at (0,3) size 222x18
+ text run at (0,3) width 222: "long square root with implied row: "
RenderMathMLMath {math} at (222,0) size 44x22
RenderMathMLSquareRoot {msqrt} at (1,0) size 42x22
RenderMathMLSubSup {msup} at (12,3) size 13x19
@@ -40,13 +40,13 @@
RenderInline {mn} at (0,0) size 6x12
RenderText {#text} at (7,0) size 6x12
text run at (7,0) width 6: "2"
- RenderMathMLOperator {mo} at (25,3) size 9x16
+ RenderMathMLOperator {mo} at (25,6) size 9x16
RenderMathMLBlock {mo} at (0,0) size 9x16
RenderText {mo} at (0,0) size 9x16
text run at (0,0) width 9: "+"
RenderInline {mn} at (0,0) size 8x16
- RenderText {#text} at (34,3) size 8x16
- text run at (34,3) width 8: "1"
+ RenderText {#text} at (34,6) size 8x16
+ text run at (34,6) width 8: "1"
RenderBlock {p} at (0,108) size 784x40
RenderText {#text} at (0,10) size 113x18
text run at (0,10) width 113: "root of a fraction: "
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/row-alignment-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/row-alignment-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/row-alignment-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/row-alignment-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -121,7 +121,7 @@
RenderText {#text} at (1,38) size 7x16
text run at (1,38) width 7: "y"
RenderMathMLOperator {mo} at (8,0) size 6x85
- RenderMathMLUnderOver {munder} at (14,35) size 13x27
+ RenderMathMLUnderOver {munder} at (14,38) size 13x27
RenderMathMLBlock (anonymous) at (0,0) size 13x16
RenderInline {mi} at (0,0) size 13x16
RenderText {#text} at (0,0) size 13x16
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/sup-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/sup-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/sup-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/sup-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -1,12 +1,12 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x54
- RenderBlock {html} at (0,0) size 800x54
- RenderBody {body} at (8,16) size 784x22
- RenderBlock {p} at (0,0) size 784x22
+layer at (0,0) size 800x51
+ RenderBlock {html} at (0,0) size 800x51
+ RenderBody {body} at (8,16) size 784x19
+ RenderBlock {p} at (0,0) size 784x19
RenderText {#text} at (0,0) size 76x18
text run at (0,0) width 76: "superscript: "
- RenderMathMLMath {math} at (76,3) size 15x19
+ RenderMathMLMath {math} at (76,0) size 15x19
RenderMathMLSubSup {msup} at (1,0) size 13x19
RenderMathMLBlock {msup} at (0,3) size 7x16
RenderInline {mi} at (0,0) size 7x16
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/under-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/under-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/under-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/under-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -1,12 +1,12 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x102
- RenderBlock {html} at (0,0) size 800x102
- RenderBody {body} at (8,16) size 784x70
- RenderBlock {p} at (0,0) size 784x27
+layer at (0,0) size 800x108
+ RenderBlock {html} at (0,0) size 800x108
+ RenderBody {body} at (8,16) size 784x76
+ RenderBlock {p} at (0,0) size 784x30
RenderText {#text} at (0,0) size 44x18
text run at (0,0) width 44: "under: "
- RenderMathMLMath {math} at (44,0) size 12x27
+ RenderMathMLMath {math} at (44,3) size 12x27
RenderMathMLUnderOver {munder} at (1,0) size 10x27
RenderMathMLBlock (anonymous) at (0,0) size 10x16
RenderInline {mi} at (0,0) size 10x16
@@ -17,10 +17,10 @@
RenderText {#text} at (0,3) size 5x12
text run at (0,3) width 5: "x"
RenderText {#text} at (0,0) size 0x0
- RenderBlock {p} at (0,43) size 784x27
+ RenderBlock {p} at (0,46) size 784x30
RenderText {#text} at (0,0) size 44x18
text run at (0,0) width 44: "under: "
- RenderMathMLMath {math} at (44,0) size 12x27
+ RenderMathMLMath {math} at (44,3) size 12x27
RenderMathMLUnderOver {munder} at (1,0) size 10x27
RenderMathMLBlock (anonymous) at (0,0) size 10x16
RenderInline {mi} at (0,0) size 10x16
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/underover-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/mathml/presentation/underover-expected.txt (103212 => 103213)
--- trunk/LayoutTests/platform/mac/mathml/presentation/underover-expected.txt 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/underover-expected.txt 2011-12-19 04:25:29 UTC (rev 103213)
@@ -4,8 +4,8 @@
RenderBlock {html} at (0,0) size 800x262
RenderBody {body} at (8,16) size 784x230
RenderBlock {p} at (0,0) size 784x39
- RenderText {#text} at (0,12) size 92x18
- text run at (0,12) width 92: "under & over: "
+ RenderText {#text} at (0,9) size 92x18
+ text run at (0,9) width 92: "under & over: "
RenderMathMLMath {math} at (92,0) size 12x39
RenderMathMLUnderOver {munderover} at (1,0) size 10x39
RenderMathMLBlock (anonymous) at (0,0) size 10x16
@@ -22,8 +22,8 @@
text run at (0,3) width 5: "x"
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,55) size 784x39
- RenderText {#text} at (0,12) size 92x18
- text run at (0,12) width 92: "under & over: "
+ RenderText {#text} at (0,9) size 92x18
+ text run at (0,9) width 92: "under & over: "
RenderMathMLMath {math} at (92,0) size 12x39
RenderMathMLUnderOver {munderover} at (1,0) size 10x39
RenderMathMLBlock (anonymous) at (0,0) size 10x16
@@ -40,8 +40,8 @@
text run at (0,3) width 7: "X"
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,110) size 784x52
- RenderText {#text} at (0,18) size 92x18
- text run at (0,18) width 92: "under & over: "
+ RenderText {#text} at (0,15) size 92x18
+ text run at (0,15) width 92: "under & over: "
RenderMathMLMath {math} at (92,0) size 20x52
RenderMathMLUnderOver {munderover} at (1,0) size 18x52
RenderMathMLBlock (anonymous) at (0,0) size 18x16
@@ -75,8 +75,8 @@
text run at (11,0) width 6: "0"
RenderText {#text} at (0,0) size 0x0
RenderBlock {p} at (0,178) size 784x52
- RenderText {#text} at (0,18) size 92x18
- text run at (0,18) width 92: "under & over: "
+ RenderText {#text} at (0,15) size 92x18
+ text run at (0,15) width 92: "under & over: "
RenderMathMLMath {math} at (92,0) size 22x52
RenderMathMLUnderOver {munderover} at (1,0) size 20x52
RenderMathMLBlock (anonymous) at (0,0) size 20x16
Modified: trunk/Source/WebCore/ChangeLog (103212 => 103213)
--- trunk/Source/WebCore/ChangeLog 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/Source/WebCore/ChangeLog 2011-12-19 04:25:29 UTC (rev 103213)
@@ -1,3 +1,19 @@
+2011-12-18 David Barton <[email protected]>
+
+ <msup>, <munder>, <mover>, and <munderover> baseline positions are wrong
+ https://bugs.webkit.org/show_bug.cgi?id=72821
+
+ Reviewed by Darin Adler.
+
+ Tested by rebaselining 8 existing tests. (Pardon the pun.)
+
+ * rendering/mathml/RenderMathMLSubSup.cpp:
+ (WebCore::RenderMathMLSubSup::baselinePosition):
+ Just using the base's (these puns are not my fault) baseline did not leave room for the exponent.
+ * rendering/mathml/RenderMathMLUnderOver.cpp:
+ (WebCore::RenderMathMLUnderOver::baselinePosition):
+ Added a guard condition, and removed some bad lines apparently mistakenly copied from RenderMathMLSubSup.cpp.
+
2011-12-18 Luke Macpherson <[email protected]>
Implement CSS line-height property in CSSStyleApplyProperty.
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp (103212 => 103213)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp 2011-12-19 04:25:29 UTC (rev 103213)
@@ -207,9 +207,7 @@
break;
case Sup:
case Sub:
- RenderBoxModelObject* box = toRenderBoxModelObject(base);
- baseline = box->baselinePosition(AlphabeticBaseline, firstLine, direction, linePositionMode);
- break;
+ return RenderMathMLBlock::baselinePosition(AlphabeticBaseline, firstLine, direction, linePositionMode);
}
return baseline;
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp (103212 => 103213)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp 2011-12-19 03:50:08 UTC (rev 103212)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp 2011-12-19 04:25:29 UTC (rev 103213)
@@ -247,7 +247,7 @@
int RenderMathMLUnderOver::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
{
RenderObject* current = firstChild();
- if (!current)
+ if (!current || linePositionMode == PositionOfInteriorLineBoxes)
return RenderBlock::baselinePosition(AlphabeticBaseline, firstLine, direction, linePositionMode);
int baseline = 0;
@@ -272,9 +272,6 @@
baseline += toRenderBoxModelObject(base)->baselinePosition(AlphabeticBaseline, true, HorizontalLine);
}
- // FIXME: Where is the extra 2-3px adjusted for zoom coming from?
- float zoomFactor = style()->effectiveZoom();
- baseline += static_cast<int>((zoomFactor > 1.25 ? 2 : 3) * zoomFactor);
return baseline;
}