Changeset 202934 in webkit
- Timestamp:
- Jul 7, 2016 2:48:12 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202933 r202934 1 2016-07-07 Frederic Wang <fwang@igalia.com> 2 3 Refactor layout functions to avoid using flexbox in MathML 4 https://bugs.webkit.org/show_bug.cgi?id=153991 5 6 Reviewed by Brent Fulgham. 7 8 Update expectations of some MathML tests to take into account the 9 removal of some line breaks and a better computation of the width of 10 MathML expressions with vertical stretchy operators. 11 12 * mathml/presentation/stretchy-depth-height-expected.txt: 13 * platform/gtk/mathml/opentype/opentype-stretchy-expected.png: 14 * platform/gtk/mathml/opentype/opentype-stretchy-expected.txt: 15 * platform/gtk/mathml/opentype/vertical-expected.png: 16 * platform/gtk/mathml/opentype/vertical-expected.txt: 17 * platform/gtk/mathml/presentation/mo-stretch-expected.png: 18 * platform/gtk/mathml/presentation/mo-stretch-expected.txt: 19 * platform/gtk/mathml/presentation/roots-expected.png: 20 * platform/gtk/mathml/presentation/roots-expected.txt: 21 * platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.png: 22 * platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt: 23 * platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt: 24 * platform/mac/mathml/opentype/opentype-stretchy-expected.png: 25 * platform/mac/mathml/opentype/opentype-stretchy-expected.txt: 26 * platform/mac/mathml/presentation/mo-stretch-expected.png: 27 * platform/mac/mathml/presentation/mo-stretch-expected.txt: 28 * accessibility/mac/mathml-elements-expected.txt: 29 * imported/blink/fast/text/output-isolate-at-end-of-line-crash-expected.txt: 30 1 31 2016-07-07 Joseph Pecoraro <pecoraro@apple.com> 2 32 -
trunk/LayoutTests/accessibility/mac/mathml-elements-expected.txt
r202497 r202934 34 34 over 35 35 36 3 37 2 38 1 36 3 2 1 39 37 This tests ensures that Mac specific attributes and roles for MathML elements work as expected. 40 38 -
trunk/LayoutTests/imported/blink/fast/text/output-isolate-at-end-of-line-crash-expected.txt
r190629 r202934 1 1 >>>> 2 >hCi* > This test has passed if it doesn't crash under ASAN 2 >hCi* > 3 This test has passed if it doesn't crash under ASAN -
trunk/LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt
r202420 r202934 8 8 9 9 { 10 x y z 11 x y z 12 x y z 13 x y z 14 x y z 15 10 x y z x y z x y z x y z x y z 16 11 { 17 12 1 -
trunk/LayoutTests/platform/gtk/mathml/opentype/opentype-stretchy-expected.txt
r202420 r202934 5 5 RenderBody {BODY} at (8,16) size 784x315 6 6 RenderBlock {P} at (0,0) size 784x34 7 RenderMathMLMath {math} at (0,20) size 49x11 [padding: 0 1 0 1]7 RenderMathMLMath {math} at (0,20) size 28x11 [padding: 0 1 0 1] 8 8 RenderMathMLRow {mrow} at (1,0) size 26x11 9 9 RenderMathMLOperator {mo} at (0,0) size 26x11 … … 11 11 RenderText {#text} at (0,-3) size 2x0 12 12 text run at (0,-3) width 2: "\x{219F}" 13 RenderText {#text} at ( 48,17) size 5x1714 text run at ( 48,17) width 5: " "15 RenderMathMLMath {math} at ( 52,10) size 50x21 [padding: 0 1 0 1]13 RenderText {#text} at (27,17) size 5x17 14 text run at (27,17) width 5: " " 15 RenderMathMLMath {math} at (31,10) size 29x21 [padding: 0 1 0 1] 16 16 RenderMathMLRow {mrow} at (1,0) size 26x21 17 17 RenderMathMLOperator {mo} at (0,0) size 26x21 … … 19 19 RenderText {#text} at (0,-3) size 2x0 20 20 text run at (0,-3) width 2: "\x{219F}" 21 RenderText {#text} at ( 101,17) size 5x1722 text run at ( 101,17) width 5: " "23 RenderMathMLMath {math} at ( 105,0) size 49x31 [padding: 0 1 0 1]21 RenderText {#text} at (59,17) size 5x17 22 text run at (59,17) width 5: " " 23 RenderMathMLMath {math} at (63,0) size 28x31 [padding: 0 1 0 1] 24 24 RenderMathMLRow {mrow} at (1,0) size 26x31 25 25 RenderMathMLOperator {mo} at (0,0) size 26x31 -
trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt
r202420 r202934 5 5 RenderBody {BODY} at (8,16) size 784x339 6 6 RenderBlock {P} at (0,0) size 784x18 7 RenderMathMLMath {math} at (0,2) size 1 94x16 [padding: 0 1 0 1]7 RenderMathMLMath {math} at (0,2) size 100x16 [padding: 0 1 0 1] 8 8 RenderMathMLOperator {mo} at (1,0) size 4x16 9 9 RenderBlock (anonymous) at (0,0) size 4x16 … … 69 69 RenderText {#text} at (0,0) size 0x0 70 70 RenderBlock {P} at (0,34) size 784x30 71 RenderMathMLMath {math} at (0,0) size 1 94x30 [padding: 0 1 0 1]71 RenderMathMLMath {math} at (0,0) size 142x30 [padding: 0 1 0 1] 72 72 RenderMathMLOperator {mo} at (1,0) size 8x30 73 73 RenderBlock (anonymous) at (0,0) size 4x16 … … 131 131 text run at (0,-45) width 6: "\x{27E9}" 132 132 RenderMathMLSpace {mspace} at (140,3) size 0x16 133 RenderText {#text} at (1 93,5) size 5x17134 text run at (1 93,5) width 5: " "135 RenderMathMLMath {math} at (1 97,3) size 213x23 [padding: 0 1 0 1]133 RenderText {#text} at (141,5) size 5x17 134 text run at (141,5) width 5: " " 135 RenderMathMLMath {math} at (145,3) size 212x23 [padding: 0 1 0 1] 136 136 RenderMathMLOperator {mo} at (1,1) size 17x22 137 137 RenderBlock (anonymous) at (0,0) size 8x15 … … 185 185 RenderText {#text} at (0,0) size 0x0 186 186 RenderBlock {P} at (0,80) size 784x48 187 RenderMathMLMath {math} at (0,0) size 19 4x48 [padding: 0 1 0 1]187 RenderMathMLMath {math} at (0,0) size 190x48 [padding: 0 1 0 1] 188 188 RenderMathMLOperator {mo} at (1,0) size 11x48 189 189 RenderBlock (anonymous) at (0,0) size 4x16 -
trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt
r202420 r202934 4 4 RenderBlock {HTML} at (0,0) size 800x270 5 5 RenderBody {BODY} at (8,8) size 784x254 6 RenderMathMLMath {math} at (0,0) size 1 73x36 [padding: 0 1 0 1]6 RenderMathMLMath {math} at (0,0) size 140x36 [padding: 0 1 0 1] 7 7 RenderMathMLRow {mrow} at (1,0) size 138x36 8 8 RenderMathMLOperator {mo} at (0,3) size 10x30 … … 62 62 RenderText {#text} at (0,-45) size 8x106 63 63 text run at (0,-45) width 8: "\x{2225}" 64 RenderText {#text} at (1 72,8) size 5x1765 text run at (1 72,8) width 5: " "64 RenderText {#text} at (139,8) size 5x17 65 text run at (139,8) width 5: " " 66 66 RenderBR {BR} at (0,0) size 0x0 67 RenderMathMLMath {math} at (0,36) size 17 3x143 [padding: 0 1 0 1]67 RenderMathMLMath {math} at (0,36) size 172x143 [padding: 0 1 0 1] 68 68 RenderMathMLRow {mrow} at (1,0) size 170x143 69 69 RenderMathMLOperator {mo} at (0,0) size 14x143 … … 124 124 text run at (0,-45) width 8: "\x{2225}" 125 125 RenderMathMLSpace {mspace} at (169,0) size 0x76 126 RenderText {#text} at (17 2,97) size 5x17127 text run at (17 2,97) width 5: " "128 RenderMathMLMath {math} at (17 6,61) size 173x93 [padding: 0 1 0 1]126 RenderText {#text} at (171,97) size 5x17 127 text run at (171,97) width 5: " " 128 RenderMathMLMath {math} at (175,61) size 172x93 [padding: 0 1 0 1] 129 129 RenderMathMLRow {mrow} at (1,0) size 170x93 130 130 RenderMathMLOperator {mo} at (0,0) size 14x93 … … 185 185 text run at (0,-45) width 8: "\x{2225}" 186 186 RenderMathMLSpace {mspace} at (169,0) size 0x51 187 RenderText {#text} at (34 8,97) size 5x17188 text run at (34 8,97) width 5: " "189 RenderMathMLMath {math} at (35 2,89) size 173x36 [padding: 0 1 0 1]187 RenderText {#text} at (346,97) size 5x17 188 text run at (346,97) width 5: " " 189 RenderMathMLMath {math} at (350,89) size 144x36 [padding: 0 1 0 1] 190 190 RenderMathMLRow {mrow} at (1,0) size 142x36 191 191 RenderMathMLOperator {mo} at (0,1) size 11x34 … … 246 246 text run at (0,-45) width 8: "\x{2225}" 247 247 RenderMathMLSpace {mspace} at (141,2) size 0x21 248 RenderText {#text} at ( 524,97) size 5x17249 text run at ( 524,97) width 5: " "248 RenderText {#text} at (493,97) size 5x17 249 text run at (493,97) width 5: " " 250 250 RenderBR {BR} at (0,0) size 0x0 251 RenderMathMLMath {math} at (0,179) size 1 90x76 [padding: 0 1 0 1]251 RenderMathMLMath {math} at (0,179) size 187x76 [padding: 0 1 0 1] 252 252 RenderMathMLRoot {msqrt} at (1,0) size 185x76 253 253 RenderMathMLOperator {mo} at (17,2) size 14x74 -
trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt
r202420 r202934 7 7 RenderText {#text} at (0,0) size 177x17 8 8 text run at (0,0) width 177: "square root (should be red): " 9 RenderMathMLMath {math} at (177,1) size 2 7x18 [padding: 0 1 0 1]9 RenderMathMLMath {math} at (177,1) size 23x18 [padding: 0 1 0 1] 10 10 RenderMathMLRoot {msqrt} at (1,0) size 21x18 [color=#FF0000] 11 11 RenderMathMLToken {mn} at (13,2) size 8x13 … … 16 16 RenderText {#text} at (0,0) size 110x17 17 17 text run at (0,0) width 110: "long square root: " 18 RenderMathMLMath {math} at (110,1) size 5 6x18 [padding: 0 1 0 1]18 RenderMathMLMath {math} at (110,1) size 52x18 [padding: 0 1 0 1] 19 19 RenderMathMLRoot {msqrt} at (1,0) size 50x18 20 20 RenderMathMLRow {mrow} at (13,2) size 37x14 … … 34 34 RenderText {#text} at (0,2) size 222x17 35 35 text run at (0,2) width 222: "long square root with implied row: " 36 RenderMathMLMath {math} at (222,0) size 62x19 [padding: 0 1 0 1]36 RenderMathMLMath {math} at (222,0) size 58x19 [padding: 0 1 0 1] 37 37 RenderMathMLRoot {msqrt} at (1,0) size 56x19 38 38 RenderMathMLScripts {msup} at (13,2) size 16x15 … … 56 56 RenderText {#text} at (0,8) size 113x17 57 57 text run at (0,8) width 113: "root of a fraction: " 58 RenderMathMLMath {math} at (113,0) size 5 6x41 [padding: 0 1 0 1]58 RenderMathMLMath {math} at (113,0) size 55x41 [padding: 0 1 0 1] 59 59 RenderMathMLRoot {msqrt} at (1,0) size 53x41 60 60 RenderMathMLFraction {mfrac} at (16,2) size 37x34 … … 88 88 RenderText {#text} at (0,0) size 173x17 89 89 text run at (0,0) width 173: "cube root (should be blue): " 90 RenderMathMLMath {math} at (173,1) size 2 8x18 [color=#0000FF] [padding: 0 1 0 1]90 RenderMathMLMath {math} at (173,1) size 24x18 [color=#0000FF] [padding: 0 1 0 1] 91 91 RenderMathMLRoot {mroot} at (1,0) size 22x18 92 92 RenderMathMLToken {mn} at (13,2) size 9x13 … … 101 101 RenderText {#text} at (0,0) size 75x17 102 102 text run at (0,0) width 75: "long index: " 103 RenderMathMLMath {math} at (75,0) size 5 8x19 [padding: 0 1 0 1]103 RenderMathMLMath {math} at (75,0) size 54x19 [padding: 0 1 0 1] 104 104 RenderMathMLRoot {mroot} at (1,0) size 52x19 105 105 RenderMathMLToken {mn} at (43,2) size 9x13 … … 131 131 RenderText {#text} at (0,8) size 185x17 132 132 text run at (0,8) width 185: "long index w/ complex base: " 133 RenderMathMLMath {math} at (185,0) size 8 6x41 [padding: 0 1 0 1]133 RenderMathMLMath {math} at (185,0) size 85x41 [padding: 0 1 0 1] 134 134 RenderMathMLRoot {mroot} at (1,0) size 83x41 135 135 RenderMathMLFraction {mfrac} at (46,2) size 37x34 … … 184 184 RenderText {#text} at (0,16) size 75x17 185 185 text run at (0,16) width 75: "high index: " 186 RenderMathMLMath {math} at (75,0) size 2 8x35 [padding: 0 1 0 1]186 RenderMathMLMath {math} at (75,0) size 24x35 [padding: 0 1 0 1] 187 187 RenderMathMLRoot {mroot} at (1,0) size 22x35 188 188 RenderMathMLToken {mn} at (13,18) size 9x13 … … 207 207 RenderText {#text} at (0,14) size 155x17 208 208 text run at (0,14) width 155: "Imbricated square roots: " 209 RenderMathMLMath {math} at (155,0) size 3 40x55 [padding: 0 1 0 1]209 RenderMathMLMath {math} at (155,0) size 332x55 [padding: 0 1 0 1] 210 210 RenderMathMLRoot {msqrt} at (1,0) size 330x55 211 211 RenderMathMLToken {mn} at (17,17) size 8x13 … … 286 286 RenderText {#text} at (0,24) size 110x17 287 287 text run at (0,24) width 110: "Imbricated roots: " 288 RenderMathMLMath {math} at (110,0) size 3 60x57 [padding: 0 1 0 1]288 RenderMathMLMath {math} at (110,0) size 353x57 [padding: 0 1 0 1] 289 289 RenderMathMLRoot {mroot} at (1,0) size 351x57 290 290 RenderMathMLRow {mrow} at (17,2) size 334x55 … … 412 412 RenderText {#text} at (0,24) size 74x17 413 413 text run at (0,24) width 74: "RTL roots: " 414 RenderMathMLMath {math} at (74,0) size 3 60x57 [padding: 0 1 0 1]415 RenderMathMLRoot {mroot} at ( 8,0) size 351x57414 RenderMathMLMath {math} at (74,0) size 353x57 [padding: 0 1 0 1] 415 RenderMathMLRoot {mroot} at (1,0) size 351x57 416 416 RenderMathMLRow {mrow} at (0,2) size 333x55 417 417 RenderMathMLToken {mn} at (324,25) size 9x12 -
trunk/LayoutTests/platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt
r202420 r202934 5 5 RenderBody {BODY} at (8,16) size 784x310 6 6 RenderBlock {P} at (0,0) size 784x36 7 RenderMathMLMath {math} at (0,21) size 49x11 [padding: 0 1 0 1]7 RenderMathMLMath {math} at (0,21) size 28x11 [padding: 0 1 0 1] 8 8 RenderMathMLRow {mrow} at (1,0) size 26x11 9 9 RenderMathMLOperator {mo} at (0,0) size 26x11 … … 11 11 RenderText {#text} at (0,-3) size 3x0 12 12 text run at (0,-3) width 3: "\x{219F}" 13 RenderText {#text} at ( 48,16) size 5x1914 text run at ( 48,16) width 5: " "15 RenderMathMLMath {math} at ( 52,11) size 49x21 [padding: 0 1 0 1]13 RenderText {#text} at (28,16) size 4x19 14 text run at (28,16) width 4: " " 15 RenderMathMLMath {math} at (32,11) size 28x21 [padding: 0 1 0 1] 16 16 RenderMathMLRow {mrow} at (1,0) size 26x21 17 17 RenderMathMLOperator {mo} at (0,0) size 26x21 … … 19 19 RenderText {#text} at (0,-3) size 3x0 20 20 text run at (0,-3) width 3: "\x{219F}" 21 RenderText {#text} at ( 100,16) size 5x1922 text run at ( 100,16) width 5: " "23 RenderMathMLMath {math} at ( 104,0) size 50x31 [padding: 0 1 0 1]21 RenderText {#text} at (60,16) size 4x19 22 text run at (60,16) width 4: " " 23 RenderMathMLMath {math} at (64,0) size 28x31 [padding: 0 1 0 1] 24 24 RenderMathMLRow {mrow} at (1,0) size 26x31 25 25 RenderMathMLOperator {mo} at (0,0) size 26x31 -
trunk/LayoutTests/platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt
r202748 r202934 4 4 RenderBlock {HTML} at (0,0) size 800x254 5 5 RenderBody {BODY} at (8,8) size 784x238 6 RenderMathMLMath {math} at (0,2) size 70x18 [padding: 0 1 0 1]6 RenderMathMLMath {math} at (0,2) size 60x18 [padding: 0 1 0 1] 7 7 RenderMathMLRow {mrow} at (1,0) size 58x18 8 8 RenderMathMLOperator {mo} at (0,1) size 6x15 … … 62 62 RenderText {#text} at (0,0) size 11x17 63 63 text run at (0,0) width 11: "\x{2225}" 64 RenderText {#text} at ( 69,0) size 5x1965 text run at ( 69,0) width 5: " "64 RenderText {#text} at (59,0) size 5x19 65 text run at (59,0) width 5: " " 66 66 RenderBR {BR} at (0,0) size 0x0 67 67 RenderMathMLMath {math} at (0,20) size 70x143 [padding: 0 1 0 1] -
trunk/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-expected.txt
r202420 r202934 5 5 RenderBody {BODY} at (8,16) size 784x307 6 6 RenderBlock {P} at (0,0) size 784x35 7 RenderMathMLMath {math} at (0,21) size 49x11 [padding: 0 1 0 1]7 RenderMathMLMath {math} at (0,21) size 28x11 [padding: 0 1 0 1] 8 8 RenderMathMLRow {mrow} at (1,0) size 26x11 9 9 RenderMathMLOperator {mo} at (0,0) size 26x11 … … 11 11 RenderText {#text} at (0,-3) size 3x0 12 12 text run at (0,-3) width 3: "\x{219F}" 13 RenderText {#text} at ( 48,17) size 5x1814 text run at ( 48,17) width 5: " "15 RenderMathMLMath {math} at ( 52,11) size 49x21 [padding: 0 1 0 1]13 RenderText {#text} at (28,17) size 4x18 14 text run at (28,17) width 4: " " 15 RenderMathMLMath {math} at (32,11) size 28x21 [padding: 0 1 0 1] 16 16 RenderMathMLRow {mrow} at (1,0) size 26x21 17 17 RenderMathMLOperator {mo} at (0,0) size 26x21 … … 19 19 RenderText {#text} at (0,-3) size 3x0 20 20 text run at (0,-3) width 3: "\x{219F}" 21 RenderText {#text} at ( 100,17) size 5x1822 text run at ( 100,17) width 5: " "23 RenderMathMLMath {math} at ( 104,0) size 50x31 [padding: 0 1 0 1]21 RenderText {#text} at (60,17) size 4x18 22 text run at (60,17) width 4: " " 23 RenderMathMLMath {math} at (64,0) size 28x31 [padding: 0 1 0 1] 24 24 RenderMathMLRow {mrow} at (1,0) size 26x31 25 25 RenderMathMLOperator {mo} at (0,0) size 26x31 -
trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt
r202748 r202934 4 4 RenderBlock {HTML} at (0,0) size 800x258 5 5 RenderBody {BODY} at (8,8) size 784x242 6 RenderMathMLMath {math} at (0,0) size 1 26x25 [padding: 0 1 0 1]6 RenderMathMLMath {math} at (0,0) size 110x25 [padding: 0 1 0 1] 7 7 RenderMathMLRow {mrow} at (1,0) size 108x25 8 8 RenderMathMLOperator {mo} at (0,5) size 6x14 … … 62 62 RenderText {#text} at (0,-5) size 9x24 63 63 text run at (0,-5) width 9: "\x{2225}" 64 RenderText {#text} at (1 25,2) size 5x1865 text run at (1 25,2) width 5: " "64 RenderText {#text} at (109,2) size 5x18 65 text run at (109,2) width 5: " " 66 66 RenderBR {BR} at (0,0) size 0x0 67 RenderMathMLMath {math} at (0,24) size 12 6x143 [padding: 0 1 0 1]67 RenderMathMLMath {math} at (0,24) size 125x143 [padding: 0 1 0 1] 68 68 RenderMathMLRow {mrow} at (1,0) size 123x143 69 69 RenderMathMLOperator {mo} at (0,0) size 8x143 … … 124 124 text run at (0,-5) width 9: "\x{2225}" 125 125 RenderMathMLSpace {mspace} at (122,0) size 0x76 126 RenderText {#text} at (12 5,85) size 5x18127 text run at (12 5,85) width 5: " "128 RenderMathMLMath {math} at (12 9,49) size 126x93 [padding: 0 1 0 1]126 RenderText {#text} at (124,85) size 5x18 127 text run at (124,85) width 5: " " 128 RenderMathMLMath {math} at (128,49) size 125x93 [padding: 0 1 0 1] 129 129 RenderMathMLRow {mrow} at (1,0) size 123x93 130 130 RenderMathMLOperator {mo} at (0,0) size 8x93 … … 185 185 text run at (0,-5) width 9: "\x{2225}" 186 186 RenderMathMLSpace {mspace} at (122,0) size 0x51 187 RenderText {#text} at (25 4,85) size 5x18188 text run at (25 4,85) width 5: " "189 RenderMathMLMath {math} at (25 8,79) size 127x33 [padding: 0 1 0 1]187 RenderText {#text} at (252,85) size 5x18 188 text run at (252,85) width 5: " " 189 RenderMathMLMath {math} at (256,79) size 116x33 [padding: 0 1 0 1] 190 190 RenderMathMLRow {mrow} at (1,0) size 114x33 191 191 RenderMathMLOperator {mo} at (0,0) size 8x33 … … 246 246 text run at (0,-5) width 9: "\x{2225}" 247 247 RenderMathMLSpace {mspace} at (113,0) size 0x21 248 RenderText {#text} at (3 84,85) size 5x18249 text run at (3 84,85) width 5: " "248 RenderText {#text} at (371,85) size 5x18 249 text run at (371,85) width 5: " " 250 250 RenderBR {BR} at (0,0) size 0x0 251 RenderMathMLMath {math} at (0,166) size 1 41x77 [padding: 0 1 0 1]251 RenderMathMLMath {math} at (0,166) size 139x77 [padding: 0 1 0 1] 252 252 RenderMathMLRoot {msqrt} at (1,0) size 137x77 253 253 RenderMathMLOperator {mo} at (14,3) size 9x74 -
trunk/Source/WebCore/ChangeLog
r202931 r202934 1 2016-07-07 Frederic Wang <fwang@igalia.com> 2 3 Refactor layout functions to avoid using flexbox in MathML 4 https://bugs.webkit.org/show_bug.cgi?id=153991 5 6 Reviewed by Brent Fulgham. 7 8 No new tests, already covered by existing tests. 9 10 * css/mathml.css: 11 (math): Change inline mathematical formulas from inline-flex to inline. 12 (math[display="block"]): Change display mathematical formulas from flex to block and 13 remove flexbox property justify-content. 14 (ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, 15 mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle) 16 menclose, semantics, mpadded, maction): In order to render properly, all children of the 17 classes derived from RenderMathMLBlock must now be block-level. So we add more elements in 18 this list and update the display property. 19 (mtd > *): However, we use inline-block for children of the cell so that the text-align 20 property is taken into account. 21 * rendering/RenderBox.cpp: 22 (WebCore::RenderBox::computeLogicalWidthInRegion): Add a special case for RenderMathMLBlock 23 to preserve the old behavior. 24 (WebCore::RenderBox::sizesLogicalWidthToFitContent): Ditto. 25 * rendering/RenderFlexibleBox.h: No need to override layoutBlock anymore. 26 * rendering/mathml/RenderMathMLBlock.cpp: Include LayoutRepainter header for use in layoutBlock. 27 (WebCore::RenderMathMLBlock::RenderMathMLBlock): Inherit from RenderBlock and ensure that 28 our children are block-level. 29 (WebCore::RenderMathMLBlock::~RenderMathMLBlock): Added. 30 (WebCore::RenderMathMLBlock::baselinePosition): If the baselinefirstLineBaseline() is 31 undefined, just returns 0. 32 (WebCore::RenderMathMLBlock::paint): Call RenderBlock::paint. 33 (WebCore::RenderMathMLBlock::layoutItems): Implement a simplified version of 34 RenderFlexibleBox::layoutItems where we assume horizontal layout for all children. 35 (WebCore::RenderMathMLBlock::layoutBlock): Add a basic implementation based on 36 RenderFlexibleBox::layoutBlock. 37 (WebCore::RenderMathMLBlock::renderName): Deleted. There is now a simple implementation in the header. 38 * rendering/mathml/RenderMathMLBlock.h: Use RenderBlock instead of RenderFlexibleBox and 39 define layout functions. Define avoidsFloats and canDropAnonymousBlockChild to preserve 40 the old behavior and remove isFlexibleBoxImpl. 41 * rendering/mathml/RenderMathMLFenced.cpp: 42 (WebCore::RenderMathMLFenced::createMathMLOperator): Use block for anonymous RenderMathMLOperator. 43 * rendering/mathml/RenderMathMLRow.cpp: 44 (WebCore::RenderMathMLRow::layoutRowItems): No need to handle the flexbox case anymore. 45 (WebCore::RenderMathMLRow::paintChildren): Deleted. We now just use RenderBlock::paintChildren. 46 * rendering/mathml/RenderMathMLRow.h: 47 * rendering/mathml/RenderMathMLFraction.cpp: 48 (WebCore::RenderMathMLFraction::paintChildren): Deleted. We now just use RenderBlock::paintChildren. 49 * rendering/mathml/RenderMathMLFraction.h: 50 * rendering/mathml/RenderMathMLRoot.cpp: 51 (WebCore::RenderMathMLRoot::paintChildren): Deleted. We now just use RenderBlock::paintChildren. 52 * rendering/mathml/RenderMathMLRoot.h: 53 * rendering/mathml/RenderMathMLScripts.cpp: 54 (WebCore::RenderMathMLScripts::paintChildren): Deleted. We now just use RenderBlock::paintChildren. 55 * rendering/mathml/RenderMathMLScripts.h: 56 * rendering/mathml/RenderMathMLUnderOver.cpp: 57 (WebCore::RenderMathMLUnderOver::paintChildren): Deleted. We now just use RenderBlock::paintChildren. 58 * rendering/mathml/RenderMathMLUnderOver.h: 59 1 60 2016-07-07 Antti Koivisto <antti@apple.com> 2 61 -
trunk/Source/WebCore/css/mathml.css
r202420 r202934 96 96 97 97 math { 98 display: -webkit-inline-flex!important;98 display: inline !important; 99 99 padding-left: 1px; 100 100 padding-right: 1px; … … 102 102 103 103 math[display="block"] { 104 display: flex !important; 105 justify-content: center; 104 display: block !important; 106 105 page-break-inside: avoid; 107 106 /* -webkit-margin-before: 1em; -- FIXME: Ask www-math for a default MathML stylesheet, including this (or margin-top). */ … … 109 108 } 110 109 111 ms, m i, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose{112 display: -webkit-inline-flex!important;110 ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose, semantics, mpadded, maction { 111 display: block !important; 113 112 } 114 113 … … 191 190 padding: 0.5ex; 192 191 } 192 /* Use inline-block for children so that the text-align property is taken into account */ 193 mtd > * { 194 display: inline-block !important; 195 } 193 196 194 197 mtable[columnalign="left"], mtr[columnalign="left"], mtd[columnalign="left"] { -
trunk/Source/WebCore/rendering/RenderBox.cpp
r202856 r202934 2442 2442 if (!hasPerpendicularContainingBlock && containerLogicalWidth && containerLogicalWidth != (computedValues.m_extent + computedValues.m_margins.m_start + computedValues.m_margins.m_end) 2443 2443 && !isFloating() && !isInline() && !cb.isFlexibleBoxIncludingDeprecated() 2444 #if ENABLE(MATHML) 2445 // RenderMathMLBlocks take the size of their content so we must not adjust the margin to fill the container size. 2446 && !cb.isRenderMathMLBlock() 2447 #endif 2444 2448 #if ENABLE(CSS_GRID_LAYOUT) 2445 2449 && !cb.isRenderGrid() … … 2588 2592 return true; 2589 2593 } 2594 2595 #if ENABLE(MATHML) 2596 // RenderMathMLBlocks take the size of their content, not of their container. 2597 if (parent()->isRenderMathMLBlock()) 2598 return true; 2599 #endif 2590 2600 2591 2601 // Flexible box items should shrink wrap, so we lay them out at their intrinsic widths. -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r201516 r202934 47 47 bool avoidsFloats() const final { return true; } 48 48 bool canDropAnonymousBlockChild() const final { return false; } 49 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;49 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; 50 50 51 51 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
r202727 r202934 32 32 33 33 #include "GraphicsContext.h" 34 #include "LayoutRepainter.h" 34 35 #include "MathMLNames.h" 35 36 #include "RenderView.h" … … 45 46 46 47 RenderMathMLBlock::RenderMathMLBlock(Element& container, RenderStyle&& style) 47 : RenderFlexibleBox(container, WTFMove(style)) 48 { 48 : RenderBlock(container, WTFMove(style), 0) 49 { 50 setChildrenInline(false); // All of our children must be block-level. 49 51 } 50 52 51 53 RenderMathMLBlock::RenderMathMLBlock(Document& document, RenderStyle&& style) 52 : RenderFlexibleBox(document, WTFMove(style)) 54 : RenderBlock(document, WTFMove(style), 0) 55 { 56 setChildrenInline(false); // All of our children must be block-level. 57 } 58 59 RenderMathMLBlock::~RenderMathMLBlock() 53 60 { 54 61 } … … 83 90 return 0; 84 91 85 // FIXME: This may be unnecessary after flex baselines are implemented (https://bugs.webkit.org/show_bug.cgi?id=96188). 86 return firstLineBaseline().valueOrCompute([&] { 87 return RenderFlexibleBox::baselinePosition(baselineType, firstLine, direction, linePositionMode); 88 }); 89 } 90 91 const char* RenderMathMLBlock::renderName() const 92 { 93 EDisplay display = style().display(); 94 if (display == FLEX) 95 return isAnonymous() ? "RenderMathMLBlock (anonymous, flex)" : "RenderMathMLBlock (flex)"; 96 if (display == INLINE_FLEX) 97 return isAnonymous() ? "RenderMathMLBlock (anonymous, inline-flex)" : "RenderMathMLBlock (inline-flex)"; 98 // |display| should be one of the above. 99 ASSERT_NOT_REACHED(); 100 return isAnonymous() ? "RenderMathMLBlock (anonymous)" : "RenderMathMLBlock"; 92 return firstLineBaseline().valueOr(RenderBlock::baselinePosition(baselineType, firstLine, direction, linePositionMode)); 101 93 } 102 94 … … 104 96 void RenderMathMLBlock::paint(PaintInfo& info, const LayoutPoint& paintOffset) 105 97 { 106 Render FlexibleBox::paint(info, paintOffset);98 RenderBlock::paint(info, paintOffset); 107 99 108 100 if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground) … … 317 309 } 318 310 311 void RenderMathMLBlock::layoutItems(bool relayoutChildren) 312 { 313 LayoutUnit verticalOffset = borderBefore() + paddingBefore(); 314 LayoutUnit horizontalOffset = borderStart() + paddingStart(); 315 316 LayoutUnit preferredHorizontalExtent = 0; 317 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { 318 LayoutUnit childHorizontalExtent = child->maxPreferredLogicalWidth() - child->horizontalBorderAndPaddingExtent(); 319 LayoutUnit childHorizontalMarginBoxExtent = child->horizontalBorderAndPaddingExtent() + childHorizontalExtent; 320 childHorizontalMarginBoxExtent += child->horizontalMarginExtent(); 321 322 preferredHorizontalExtent += childHorizontalMarginBoxExtent; 323 } 324 325 LayoutUnit currentHorizontalExtent = contentLogicalWidth(); 326 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { 327 LayoutUnit childSize = child->maxPreferredLogicalWidth() - child->horizontalBorderAndPaddingExtent(); 328 329 if (preferredHorizontalExtent > currentHorizontalExtent) 330 childSize = currentHorizontalExtent; 331 332 LayoutUnit childPreferredSize = childSize + child->horizontalBorderAndPaddingExtent(); 333 334 if (childPreferredSize != child->width()) 335 child->setChildNeedsLayout(MarkOnlyThis); 336 337 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child); 338 child->layoutIfNeeded(); 339 340 LayoutUnit childVerticalMarginBoxExtent; 341 childVerticalMarginBoxExtent = child->height() + child->verticalMarginExtent(); 342 343 setLogicalHeight(std::max(logicalHeight(), verticalOffset + borderAfter() + paddingAfter() + childVerticalMarginBoxExtent + horizontalScrollbarHeight())); 344 345 horizontalOffset += child->marginStart(); 346 347 LayoutUnit childHorizontalExtent = child->width(); 348 LayoutPoint childLocation(style().isLeftToRightDirection() ? horizontalOffset : width() - horizontalOffset - childHorizontalExtent, 349 verticalOffset + child->marginBefore()); 350 351 child->setLocation(childLocation); 352 horizontalOffset += childHorizontalExtent + child->marginEnd(); 353 } 354 } 355 356 void RenderMathMLBlock::layoutBlock(bool relayoutChildren, LayoutUnit) 357 { 358 ASSERT(needsLayout()); 359 360 if (!relayoutChildren && simplifiedLayout()) 361 return; 362 363 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); 364 365 if (recomputeLogicalWidth()) 366 relayoutChildren = true; 367 368 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight()); 369 370 layoutItems(relayoutChildren); 371 372 updateLogicalHeight(); 373 374 repainter.repaintAfterLayout(); 375 376 clearNeedsLayout(); 377 } 378 319 379 } 320 380 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h
r202727 r202934 30 30 #if ENABLE(MATHML) 31 31 32 #include "Render FlexibleBox.h"32 #include "RenderBlock.h" 33 33 #include "RenderTable.h" 34 34 #include "StyleInheritedData.h" … … 40 40 class RenderMathMLOperator; 41 41 42 class RenderMathMLBlock : public Render FlexibleBox{42 class RenderMathMLBlock : public RenderBlock { 43 43 public: 44 44 RenderMathMLBlock(Element&, RenderStyle&&); 45 45 RenderMathMLBlock(Document&, RenderStyle&&); 46 virtual ~RenderMathMLBlock(); 46 47 47 48 bool isChildAllowed(const RenderObject&, const RenderStyle&) const override; … … 72 73 } 73 74 75 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override; 76 74 77 private: 75 78 bool isRenderMathMLBlock() const final { return true; } 76 const char* renderName() const override; 77 bool isFlexibleBoxImpl() const override { return true; } 79 const char* renderName() const override { return "RenderMathMLBlock"; } 80 bool avoidsFloats() const final { return true; } 81 bool canDropAnonymousBlockChild() const final { return false; } 82 void layoutItems(bool relayoutChildren); 78 83 }; 79 84 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp
r202727 r202934 86 86 RenderPtr<RenderMathMLOperator> RenderMathMLFenced::createMathMLOperator(const String& operatorString, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag) 87 87 { 88 RenderPtr<RenderMathMLOperator> newOperator = createRenderer<RenderMathMLOperator>(document(), RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX), operatorString, form, flag);88 RenderPtr<RenderMathMLOperator> newOperator = createRenderer<RenderMathMLOperator>(document(), RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK), operatorString, form, flag); 89 89 newOperator->initializeStyle(); 90 90 return newOperator; -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
r202727 r202934 228 228 } 229 229 230 void RenderMathMLFraction::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)231 {232 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {233 if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))234 return;235 }236 }237 238 230 } 239 231 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h
r202727 r202934 44 44 45 45 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; 46 void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;47 46 48 47 protected: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
r202727 r202934 239 239 } 240 240 241 void RenderMathMLRoot::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)242 {243 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {244 if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))245 return;246 }247 }248 249 241 void RenderMathMLRoot::paint(PaintInfo& info, const LayoutPoint& paintOffset) 250 242 { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h
r202168 r202934 50 50 void computePreferredLogicalWidths() final; 51 51 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; 52 void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;53 52 54 53 protected: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
r202441 r202934 162 162 163 163 LayoutUnit centerBlockOffset = 0; 164 // FIXME: Remove the FLEX when it is not required by the css. 165 if (style().display() == BLOCK || style().display() == FLEX) 164 if (style().display() == BLOCK) 166 165 centerBlockOffset = std::max<LayoutUnit>(0, (logicalWidth() - (horizontalOffset + borderEnd() + paddingEnd())) / 2); 167 166 … … 201 200 } 202 201 203 void RenderMathMLRow::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)204 {205 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {206 if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))207 return;208 }209 }210 211 202 } 212 203 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h
r202569 r202934 44 44 45 45 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override; 46 void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) override;47 46 Optional<int> firstLineBaseline() const override; 48 47 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
r202727 r202934 427 427 } 428 428 429 void RenderMathMLScripts::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)430 {431 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {432 if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))433 return;434 }435 }436 437 429 } 438 430 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h
r202168 r202934 41 41 Optional<int> firstLineBaseline() const final; 42 42 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; 43 void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;44 43 45 44 private: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp
r202727 r202934 223 223 } 224 224 225 void RenderMathMLUnderOver::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)226 {227 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {228 if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))229 return;230 }231 }232 233 225 } 234 226 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h
r202727 r202934 44 44 void computePreferredLogicalWidths() final; 45 45 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; 46 void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;47 46 48 47 private:
Note: See TracChangeset
for help on using the changeset viewer.