Changeset 164535 in webkit
- Timestamp:
- Feb 22, 2014 1:57:35 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r164534 r164535 1 2014-02-22 Frédéric Wang <fred.wang@free.fr> 2 3 Unreviewed, rolling out r164534. 4 http://trac.webkit.org/changeset/164534 5 https://bugs.webkit.org/show_bug.cgi?id=119043 6 7 missing tests 8 9 * mathml/presentation/stretchy-depth-height-expected.txt: Removed. 10 * mathml/presentation/stretchy-depth-height.html: Removed. 11 * platform/mac/mathml/presentation/mo-stretch-expected.txt: 12 1 13 2014-02-22 Frédéric Wang <fred.wang@free.fr> 2 14 -
trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt
r164534 r164535 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x 1664 RenderBlock {HTML} at (0,0) size 800x 1665 RenderBody {BODY} at (8,8) size 784x 1503 layer at (0,0) size 800x216 4 RenderBlock {HTML} at (0,0) size 800x216 5 RenderBody {BODY} at (8,8) size 784x200 6 6 RenderMathMLMath {math} at (0,0) size 195x20 [padding: 0 1 0 1] 7 7 RenderMathMLRow {mrow} at (1,0) size 193x20 … … 79 79 text run at (194,0) width 5: " " 80 80 RenderBR {BR} at (0,0) size 0x0 81 RenderMathMLMath {math} at (0,20) size 199x 76[padding: 0 1 0 1]82 RenderMathMLRow {mrow} at (1,0) size 197x 7683 RenderMathMLOperator {mo} at (1, 0) size 8x7681 RenderMathMLMath {math} at (0,20) size 199x114 [padding: 0 1 0 1] 82 RenderMathMLRow {mrow} at (1,0) size 197x114 83 RenderMathMLOperator {mo} at (1,22) size 8x92 84 84 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 85 85 RenderBlock (anonymous) at (0,0) size 5x14 86 86 RenderText at (0,-6) size 5x24 87 87 text run at (0,-6) width 5: "(" 88 RenderMathMLOperator {mo} at (13, 0) size 8x7688 RenderMathMLOperator {mo} at (13,22) size 8x92 89 89 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 90 90 RenderBlock (anonymous) at (0,0) size 5x14 91 91 RenderText at (0,-6) size 5x24 92 92 text run at (0,-6) width 5: ")" 93 RenderMathMLOperator {mo} at (26, 0) size 11x7693 RenderMathMLOperator {mo} at (26,22) size 11x92 94 94 RenderMathMLBlock (flex) {mo} at (0,0) size 10x14 95 95 RenderBlock (anonymous) at (0,0) size 8x14 96 96 RenderText at (0,-6) size 8x24 97 97 text run at (0,-6) width 8: "{" 98 RenderMathMLOperator {mo} at (43, 0) size 11x7698 RenderMathMLOperator {mo} at (43,22) size 11x92 99 99 RenderMathMLBlock (flex) {mo} at (0,0) size 10x14 100 100 RenderBlock (anonymous) at (0,0) size 8x14 101 101 RenderText at (0,-6) size 8x24 102 102 text run at (0,-6) width 8: "}" 103 RenderMathMLOperator {mo} at (59, 0) size 8x76103 RenderMathMLOperator {mo} at (59,22) size 8x92 104 104 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 105 105 RenderBlock (anonymous) at (0,0) size 5x14 106 106 RenderText at (0,-6) size 5x24 107 107 text run at (0,-6) width 5: "[" 108 RenderMathMLOperator {mo} at (72, 0) size 8x76108 RenderMathMLOperator {mo} at (72,22) size 8x92 109 109 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 110 110 RenderBlock (anonymous) at (0,0) size 5x14 111 111 RenderText at (0,-6) size 5x24 112 112 text run at (0,-6) width 5: "]" 113 RenderMathMLOperator {mo} at (86, 0) size 9x76113 RenderMathMLOperator {mo} at (86,22) size 9x92 114 114 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 115 115 RenderBlock (anonymous) at (0,0) size 8x16 116 116 RenderText at (0,-5) size 8x24 117 117 text run at (0,-5) width 8: "\x{2308}" 118 RenderMathMLOperator {mo} at (100, 0) size 9x76118 RenderMathMLOperator {mo} at (100,22) size 9x92 119 119 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 120 120 RenderBlock (anonymous) at (0,0) size 8x16 121 121 RenderText at (0,-5) size 8x24 122 122 text run at (0,-5) width 8: "\x{2309}" 123 RenderMathMLOperator {mo} at (115, 0) size 8x76123 RenderMathMLOperator {mo} at (115,22) size 8x92 124 124 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 125 125 RenderBlock (anonymous) at (0,0) size 8x16 126 126 RenderText at (0,-5) size 8x24 127 127 text run at (0,-5) width 8: "\x{230A}" 128 RenderMathMLOperator {mo} at (129, 0) size 9x76128 RenderMathMLOperator {mo} at (129,22) size 9x92 129 129 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 130 130 RenderBlock (anonymous) at (0,0) size 8x16 131 131 RenderText at (0,-5) size 8x24 132 132 text run at (0,-5) width 8: "\x{230B}" 133 RenderMathMLOperator {mo} at (143, 0) size 12x76133 RenderMathMLOperator {mo} at (143,22) size 12x92 134 134 RenderMathMLBlock (flex) {mo} at (0,0) size 11x20 135 135 RenderBlock (anonymous) at (0,0) size 7x20 136 136 RenderText at (0,-3) size 7x24 137 137 text run at (0,-3) width 7: "\x{222B}" 138 RenderMathMLOperator {mo} at (161, 0) size 4x76138 RenderMathMLOperator {mo} at (161,22) size 4x92 139 139 RenderMathMLBlock (flex) {mo} at (0,0) size 3x12 140 140 RenderBlock (anonymous) at (0,0) size 3x12 141 141 RenderText at (0,-6) size 3x24 142 142 text run at (0,-6) width 3: "|" 143 RenderMathMLOperator {mo} at (170, 0) size 9x76143 RenderMathMLOperator {mo} at (170,22) size 9x92 144 144 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 145 145 RenderBlock (anonymous) at (0,0) size 8x16 146 146 RenderText at (0,-5) size 8x24 147 147 text run at (0,-5) width 8: "\x{2016}" 148 RenderMathMLOperator {mo} at (184, 0) size 9x76148 RenderMathMLOperator {mo} at (184,22) size 9x92 149 149 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 150 150 RenderBlock (anonymous) at (0,0) size 8x16 … … 154 154 RenderText {#text} at (198,81) size 5x18 155 155 text run at (198,81) width 5: " " 156 RenderMathMLMath {math} at (202,45) size 199x 51[padding: 0 1 0 1]157 RenderMathMLRow {mrow} at (1,0) size 197x 51158 RenderMathMLOperator {mo} at (1, 0) size 8x51156 RenderMathMLMath {math} at (202,45) size 199x77 [padding: 0 1 0 1] 157 RenderMathMLRow {mrow} at (1,0) size 197x77 158 RenderMathMLOperator {mo} at (1,15) size 8x62 159 159 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 160 160 RenderBlock (anonymous) at (0,0) size 5x14 161 161 RenderText at (0,-6) size 5x24 162 162 text run at (0,-6) width 5: "(" 163 RenderMathMLOperator {mo} at (13, 0) size 8x51163 RenderMathMLOperator {mo} at (13,15) size 8x62 164 164 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 165 165 RenderBlock (anonymous) at (0,0) size 5x14 166 166 RenderText at (0,-6) size 5x24 167 167 text run at (0,-6) width 5: ")" 168 RenderMathMLOperator {mo} at (26, 0) size 11x51168 RenderMathMLOperator {mo} at (26,15) size 11x62 169 169 RenderMathMLBlock (flex) {mo} at (0,0) size 10x14 170 170 RenderBlock (anonymous) at (0,0) size 8x14 171 171 RenderText at (0,-6) size 8x24 172 172 text run at (0,-6) width 8: "{" 173 RenderMathMLOperator {mo} at (43, 0) size 11x51173 RenderMathMLOperator {mo} at (43,15) size 11x62 174 174 RenderMathMLBlock (flex) {mo} at (0,0) size 10x14 175 175 RenderBlock (anonymous) at (0,0) size 8x14 176 176 RenderText at (0,-6) size 8x24 177 177 text run at (0,-6) width 8: "}" 178 RenderMathMLOperator {mo} at (59, 0) size 8x51178 RenderMathMLOperator {mo} at (59,15) size 8x62 179 179 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 180 180 RenderBlock (anonymous) at (0,0) size 5x14 181 181 RenderText at (0,-6) size 5x24 182 182 text run at (0,-6) width 5: "[" 183 RenderMathMLOperator {mo} at (72, 0) size 8x51183 RenderMathMLOperator {mo} at (72,15) size 8x62 184 184 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 185 185 RenderBlock (anonymous) at (0,0) size 5x14 186 186 RenderText at (0,-6) size 5x24 187 187 text run at (0,-6) width 5: "]" 188 RenderMathMLOperator {mo} at (86, 0) size 9x51188 RenderMathMLOperator {mo} at (86,15) size 9x62 189 189 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 190 190 RenderBlock (anonymous) at (0,0) size 8x16 191 191 RenderText at (0,-5) size 8x24 192 192 text run at (0,-5) width 8: "\x{2308}" 193 RenderMathMLOperator {mo} at (100, 0) size 9x51193 RenderMathMLOperator {mo} at (100,15) size 9x62 194 194 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 195 195 RenderBlock (anonymous) at (0,0) size 8x16 196 196 RenderText at (0,-5) size 8x24 197 197 text run at (0,-5) width 8: "\x{2309}" 198 RenderMathMLOperator {mo} at (115, 0) size 8x51198 RenderMathMLOperator {mo} at (115,15) size 8x62 199 199 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 200 200 RenderBlock (anonymous) at (0,0) size 8x16 201 201 RenderText at (0,-5) size 8x24 202 202 text run at (0,-5) width 8: "\x{230A}" 203 RenderMathMLOperator {mo} at (129, 0) size 9x51203 RenderMathMLOperator {mo} at (129,15) size 9x62 204 204 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 205 205 RenderBlock (anonymous) at (0,0) size 8x16 206 206 RenderText at (0,-5) size 8x24 207 207 text run at (0,-5) width 8: "\x{230B}" 208 RenderMathMLOperator {mo} at (143, 0) size 12x51208 RenderMathMLOperator {mo} at (143,15) size 12x62 209 209 RenderMathMLBlock (flex) {mo} at (0,0) size 11x20 210 210 RenderBlock (anonymous) at (0,0) size 7x20 211 211 RenderText at (0,-3) size 7x24 212 212 text run at (0,-3) width 7: "\x{222B}" 213 RenderMathMLOperator {mo} at (161, 0) size 4x51213 RenderMathMLOperator {mo} at (161,15) size 4x62 214 214 RenderMathMLBlock (flex) {mo} at (0,0) size 3x12 215 215 RenderBlock (anonymous) at (0,0) size 3x12 216 216 RenderText at (0,-6) size 3x24 217 217 text run at (0,-6) width 3: "|" 218 RenderMathMLOperator {mo} at (170, 0) size 9x51218 RenderMathMLOperator {mo} at (170,15) size 9x62 219 219 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 220 220 RenderBlock (anonymous) at (0,0) size 8x16 221 221 RenderText at (0,-5) size 8x24 222 222 text run at (0,-5) width 8: "\x{2016}" 223 RenderMathMLOperator {mo} at (184, 0) size 9x51223 RenderMathMLOperator {mo} at (184,15) size 9x62 224 224 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 225 225 RenderBlock (anonymous) at (0,0) size 8x16 … … 229 229 RenderText {#text} at (400,81) size 5x18 230 230 text run at (400,81) width 5: " " 231 RenderMathMLMath {math} at (404,75) size 199x 26[padding: 0 1 0 1]232 RenderMathMLRow {mrow} at (1,0) size 197x 26231 RenderMathMLMath {math} at (404,75) size 199x32 [padding: 0 1 0 1] 232 RenderMathMLRow {mrow} at (1,0) size 197x32 233 233 RenderMathMLOperator {mo} at (1,9) size 8x14 234 234 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 … … 286 286 RenderText at (0,-3) size 7x24 287 287 text run at (0,-3) width 7: "\x{222B}" 288 RenderMathMLOperator {mo} at (161, 9) size 4x12288 RenderMathMLOperator {mo} at (161,6) size 4x26 289 289 RenderMathMLBlock (flex) {mo} at (0,0) size 3x12 290 290 RenderBlock (anonymous) at (0,0) size 3x12 … … 305 305 text run at (602,81) width 5: " " 306 306 RenderBR {BR} at (0,0) size 0x0 307 RenderMathMLMath {math} at (0,1 01) size 211x49[padding: 0 1 0 1]308 RenderMathMLSquareRoot {msqrt} at (1,0) size 209x 49[intrinsic padding: 3 0 3 12]309 RenderMathMLRow (anonymous) at (12,3) size 197x 43310 RenderMathMLOperator {mo} at (1, 0) size 8x41307 RenderMathMLMath {math} at (0,133) size 211x68 [padding: 0 1 0 1] 308 RenderMathMLSquareRoot {msqrt} at (1,0) size 209x68 [intrinsic padding: 3 0 3 12] 309 RenderMathMLRow (anonymous) at (12,3) size 197x62 310 RenderMathMLOperator {mo} at (1,12) size 8x50 311 311 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 312 312 RenderBlock (anonymous) at (0,0) size 5x14 313 313 RenderText at (0,-6) size 5x24 314 314 text run at (0,-6) width 5: "(" 315 RenderMathMLOperator {mo} at (13, 0) size 8x41315 RenderMathMLOperator {mo} at (13,12) size 8x50 316 316 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 317 317 RenderBlock (anonymous) at (0,0) size 5x14 318 318 RenderText at (0,-6) size 5x24 319 319 text run at (0,-6) width 5: ")" 320 RenderMathMLOperator {mo} at (26, 29) size 11x14320 RenderMathMLOperator {mo} at (26,12) size 11x50 321 321 RenderMathMLBlock (flex) {mo} at (0,0) size 10x14 322 322 RenderBlock (anonymous) at (0,0) size 8x14 323 323 RenderText at (0,-6) size 8x24 324 324 text run at (0,-6) width 8: "{" 325 RenderMathMLOperator {mo} at (43, 29) size 11x14325 RenderMathMLOperator {mo} at (43,12) size 11x50 326 326 RenderMathMLBlock (flex) {mo} at (0,0) size 10x14 327 327 RenderBlock (anonymous) at (0,0) size 8x14 328 328 RenderText at (0,-6) size 8x24 329 329 text run at (0,-6) width 8: "}" 330 RenderMathMLOperator {mo} at (59, 0) size 8x41330 RenderMathMLOperator {mo} at (59,12) size 8x50 331 331 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 332 332 RenderBlock (anonymous) at (0,0) size 5x14 333 333 RenderText at (0,-6) size 5x24 334 334 text run at (0,-6) width 5: "[" 335 RenderMathMLOperator {mo} at (72, 0) size 8x41335 RenderMathMLOperator {mo} at (72,12) size 8x50 336 336 RenderMathMLBlock (flex) {mo} at (0,0) size 7x14 337 337 RenderBlock (anonymous) at (0,0) size 5x14 338 338 RenderText at (0,-6) size 5x24 339 339 text run at (0,-6) width 5: "]" 340 RenderMathMLOperator {mo} at (86, 0) size 9x41340 RenderMathMLOperator {mo} at (86,12) size 9x50 341 341 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 342 342 RenderBlock (anonymous) at (0,0) size 8x16 343 343 RenderText at (0,-5) size 8x24 344 344 text run at (0,-5) width 8: "\x{2308}" 345 RenderMathMLOperator {mo} at (100, 0) size 9x41345 RenderMathMLOperator {mo} at (100,12) size 9x50 346 346 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 347 347 RenderBlock (anonymous) at (0,0) size 8x16 348 348 RenderText at (0,-5) size 8x24 349 349 text run at (0,-5) width 8: "\x{2309}" 350 RenderMathMLOperator {mo} at (115, 0) size 8x41350 RenderMathMLOperator {mo} at (115,12) size 8x50 351 351 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 352 352 RenderBlock (anonymous) at (0,0) size 8x16 353 353 RenderText at (0,-5) size 8x24 354 354 text run at (0,-5) width 8: "\x{230A}" 355 RenderMathMLOperator {mo} at (129, 0) size 9x41355 RenderMathMLOperator {mo} at (129,12) size 9x50 356 356 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 357 357 RenderBlock (anonymous) at (0,0) size 8x16 358 358 RenderText at (0,-5) size 8x24 359 359 text run at (0,-5) width 8: "\x{230B}" 360 RenderMathMLOperator {mo} at (143, 0) size 12x41360 RenderMathMLOperator {mo} at (143,12) size 12x50 361 361 RenderMathMLBlock (flex) {mo} at (0,0) size 11x20 362 362 RenderBlock (anonymous) at (0,0) size 7x20 363 363 RenderText at (0,-3) size 7x24 364 364 text run at (0,-3) width 7: "\x{222B}" 365 RenderMathMLOperator {mo} at (161, 0) size 4x41365 RenderMathMLOperator {mo} at (161,12) size 4x50 366 366 RenderMathMLBlock (flex) {mo} at (0,0) size 3x12 367 367 RenderBlock (anonymous) at (0,0) size 3x12 368 368 RenderText at (0,-6) size 3x24 369 369 text run at (0,-6) width 3: "|" 370 RenderMathMLOperator {mo} at (170, 0) size 9x41370 RenderMathMLOperator {mo} at (170,12) size 9x50 371 371 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 372 372 RenderBlock (anonymous) at (0,0) size 8x16 373 373 RenderText at (0,-5) size 8x24 374 374 text run at (0,-5) width 8: "\x{2016}" 375 RenderMathMLOperator {mo} at (184, 0) size 9x41375 RenderMathMLOperator {mo} at (184,12) size 9x50 376 376 RenderMathMLBlock (flex) {mo} at (0,0) size 8x16 377 377 RenderBlock (anonymous) at (0,0) size 8x16 -
trunk/Source/WebCore/ChangeLog
r164534 r164535 1 2014-02-22 Frédéric Wang <fred.wang@free.fr> 2 3 Unreviewed, rolling out r164534. 4 http://trac.webkit.org/changeset/164534 5 https://bugs.webkit.org/show_bug.cgi?id=119043 6 7 missing tests 8 9 * rendering/RenderObject.h: 10 * rendering/mathml/RenderMathMLBlock.h: 11 * rendering/mathml/RenderMathMLOperator.cpp: 12 (WebCore::RenderMathMLOperator::RenderMathMLOperator): 13 (WebCore::RenderMathMLOperator::expandedStretchHeight): 14 (WebCore::RenderMathMLOperator::stretchToHeight): 15 (WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter): 16 (WebCore::RenderMathMLOperator::updateStyle): 17 (WebCore::RenderMathMLOperator::firstLineBaseline): 18 (WebCore::RenderMathMLOperator::computeLogicalHeight): 19 * rendering/mathml/RenderMathMLOperator.h: 20 * rendering/mathml/RenderMathMLRow.cpp: 21 (WebCore::RenderMathMLRow::layout): 22 1 23 2014-02-22 Frédéric Wang <fred.wang@free.fr> 2 24 -
trunk/Source/WebCore/rendering/RenderObject.h
r164534 r164535 404 404 #if ENABLE(MATHML) 405 405 virtual bool isRenderMathMLBlock() const { return false; } 406 virtual bool isRenderMathMLTable() const { return false; }407 406 virtual bool isRenderMathMLOperator() const { return false; } 408 407 virtual bool isRenderMathMLRow() const { return false; } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h
r164534 r164535 87 87 88 88 private: 89 virtual bool isRenderMathMLTable() const override final { return true; }90 89 virtual const char* renderName() const override { return "RenderMathMLTable"; } 91 90 }; 92 93 RENDER_OBJECT_TYPE_CASTS(RenderMathMLTable, isRenderMathMLTable())94 91 95 92 // Parsing functions for MathML Length values -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r164534 r164535 1121 1121 RenderMathMLOperator::RenderMathMLOperator(MathMLElement& element, PassRef<RenderStyle> style) 1122 1122 : RenderMathMLBlock(element, std::move(style)) 1123 , m_stretchHeightAboveBaseline(0) 1124 , m_stretchDepthBelowBaseline(0) 1123 , m_stretchHeight(0) 1125 1124 , m_operator(0) 1126 1125 , m_stretchyCharacter(nullptr) … … 1132 1131 RenderMathMLOperator::RenderMathMLOperator(MathMLElement& element, PassRef<RenderStyle> style, UChar operatorChar, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag) 1133 1132 : RenderMathMLBlock(element, std::move(style)) 1134 , m_stretchHeightAboveBaseline(0) 1135 , m_stretchDepthBelowBaseline(0) 1133 , m_stretchHeight(0) 1136 1134 , m_operator(operatorChar == hyphenMinus ? minusSign : operatorChar) 1137 1135 , m_stretchyCharacter(nullptr) … … 1253 1251 } 1254 1252 1255 void RenderMathMLOperator::stretchTo(int heightAboveBaseline, int depthBelowBaseline) 1256 { 1257 if (heightAboveBaseline <= m_stretchHeightAboveBaseline && depthBelowBaseline <= m_stretchDepthBelowBaseline) 1253 static const float gOperatorExpansion = 1.2f; 1254 1255 float RenderMathMLOperator::expandedStretchHeight() const 1256 { 1257 return m_stretchHeight * gOperatorExpansion; 1258 } 1259 1260 void RenderMathMLOperator::stretchToHeight(int height) 1261 { 1262 if (m_stretchHeight == height) 1258 1263 return; 1259 1264 1260 m_stretchHeightAboveBaseline = heightAboveBaseline; 1261 m_stretchDepthBelowBaseline = depthBelowBaseline; 1265 m_stretchHeight = height; 1262 1266 updateStyle(); 1263 1267 } … … 1381 1385 height += glyphHeightForCharacter(stretchyCharacter->middleGlyph); 1382 1386 1383 if (height > stretchSize())1387 if (height > expandedStretchHeight()) 1384 1388 return 0; 1385 1389 … … 1398 1402 1399 1403 float stretchedCharacterHeight = style().fontMetrics().floatHeight(); 1400 m_isStretched = allowStretching && stretchSize() > stretchedCharacterHeight;1404 m_isStretched = allowStretching && expandedStretchHeight() > stretchedCharacterHeight; 1401 1405 1402 1406 // Sometimes we cannot stretch an operator properly, so in that case, we should just use the original size. … … 1409 1413 { 1410 1414 if (m_isStretched) 1411 return m_stretchHeightAboveBaseline;1415 return expandedStretchHeight() * 2 / 3 - (expandedStretchHeight() - m_stretchHeight) / 2; 1412 1416 return RenderMathMLBlock::firstLineBaseline(); 1413 1417 } … … 1416 1420 { 1417 1421 if (m_isStretched) 1418 logicalHeight = stretchSize();1422 logicalHeight = expandedStretchHeight(); 1419 1423 RenderBox::computeLogicalHeight(logicalHeight, logicalTop, computedValues); 1420 1424 } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h
r164534 r164535 65 65 MathMLElement& element() { return toMathMLElement(nodeForNonAnonymous()); } 66 66 67 void stretchTo(int heightAboveBaseline, int depthBelowBaseline); 68 int stretchSize() const { return m_stretchHeightAboveBaseline + m_stretchDepthBelowBaseline; } 67 void stretchToHeight(int pixelHeight); 68 int stretchHeight() { return m_stretchHeight; } 69 float expandedStretchHeight() const; 69 70 70 71 bool hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const { return m_operatorFlags & flag; } … … 111 112 void fillWithExtensionGlyph(PaintInfo&, const LayoutPoint& from, const LayoutPoint& to); 112 113 113 int m_stretchHeightAboveBaseline; 114 int m_stretchDepthBelowBaseline; 114 int m_stretchHeight; 115 115 bool m_isStretched; 116 116 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
r164534 r164535 58 58 void RenderMathMLRow::layout() 59 59 { 60 int stretch HeightAboveBaseline = 0, stretchDepthBelowBaseline= 0;60 int stretchLogicalHeight = 0; 61 61 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 62 62 if (child->needsLayout()) … … 65 65 if (child->isRenderMathMLBlock() && toRenderMathMLBlock(child)->unembellishedOperator()) 66 66 continue; 67 int childHeightAboveBaseline = 0, childDepthBelowBaseline = 0; 68 if (child->isRenderMathMLBlock()) { 69 RenderMathMLBlock* mathmlChild = toRenderMathMLBlock(child); 70 childHeightAboveBaseline = mathmlChild->firstLineBaseline(); 71 if (childHeightAboveBaseline == -1) 72 childHeightAboveBaseline = mathmlChild->logicalHeight(); 73 childDepthBelowBaseline = mathmlChild->logicalHeight() - childHeightAboveBaseline; 74 } else if (child->isRenderMathMLTable()) { 75 RenderMathMLTable* tableChild = toRenderMathMLTable(child); 76 childHeightAboveBaseline = tableChild->firstLineBaseline(); 77 childDepthBelowBaseline = tableChild->logicalHeight() - childHeightAboveBaseline; 78 } else if (child->isBox()) { 79 childHeightAboveBaseline = toRenderBox(child)->logicalHeight(); 80 childDepthBelowBaseline = 0; 81 } 82 stretchHeightAboveBaseline = std::max<int>(stretchHeightAboveBaseline, roundToInt(childHeightAboveBaseline)); 83 stretchDepthBelowBaseline = std::max<int>(stretchDepthBelowBaseline, roundToInt(childDepthBelowBaseline)); 67 if (child->isBox()) 68 stretchLogicalHeight = std::max<int>(stretchLogicalHeight, roundToInt(toRenderBox(child)->logicalHeight())); 84 69 } 85 if ( stretchHeightAboveBaseline + stretchDepthBelowBaseline <= 0)86 stretch HeightAboveBaseline= style().fontSize();70 if (!stretchLogicalHeight) 71 stretchLogicalHeight = style().fontSize(); 87 72 88 73 // Set the sizes of (possibly embellished) stretchy operator children. 89 74 for (auto& child : childrenOfType<RenderMathMLBlock>(*this)) { 90 if (auto renderOperator = child.unembellishedOperator()) 91 renderOperator->stretchTo(stretchHeightAboveBaseline, stretchDepthBelowBaseline); 75 if (auto renderMo = child.unembellishedOperator()) { 76 if (renderMo->stretchHeight() != stretchLogicalHeight) 77 renderMo->stretchToHeight(stretchLogicalHeight); 78 } 92 79 } 93 80
Note: See TracChangeset
for help on using the changeset viewer.