| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved. | 2 * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 bool RenderMathMLBlock::isChildAllowed(RenderObject* child, RenderStyle*) const | 47 bool RenderMathMLBlock::isChildAllowed(RenderObject* child, RenderStyle*) const |
| 48 { | 48 { |
| 49 return child->node() && child->node()->nodeType() == Node::ELEMENT_NODE; | 49 return child->node() && child->node()->nodeType() == Node::ELEMENT_NODE; |
| 50 } | 50 } |
| 51 | 51 |
| 52 RenderMathMLBlock* RenderMathMLBlock::createAlmostAnonymousBlock(EDisplay displa
y) | 52 RenderMathMLBlock* RenderMathMLBlock::createAlmostAnonymousBlock(EDisplay displa
y) |
| 53 { | 53 { |
| 54 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style()); | 54 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
style(), display); |
| 55 newStyle->setDisplay(display); | |
| 56 | |
| 57 RenderMathMLBlock* newBlock = new (renderArena()) RenderMathMLBlock(node() /
* "almost" anonymous block */); | 55 RenderMathMLBlock* newBlock = new (renderArena()) RenderMathMLBlock(node() /
* "almost" anonymous block */); |
| 58 newBlock->setStyle(newStyle.release()); | 56 newBlock->setStyle(newStyle.release()); |
| 59 return newBlock; | 57 return newBlock; |
| 60 } | 58 } |
| 61 | 59 |
| 62 void RenderMathMLBlock::stretchToHeight(int height) | 60 void RenderMathMLBlock::stretchToHeight(int height) |
| 63 { | 61 { |
| 64 for (RenderObject* current = firstChild(); current; current = current->nextS
ibling()) | 62 for (RenderObject* current = firstChild(); current; current = current->nextS
ibling()) |
| 65 if (current->isRenderMathMLBlock()) { | 63 if (current->isRenderMathMLBlock()) { |
| 66 RenderMathMLBlock* block = toRenderMathMLBlock(current); | 64 RenderMathMLBlock* block = toRenderMathMLBlock(current); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 97 |
| 100 info.context->setStrokeColor(Color(255, 0, 0), ColorSpaceSRGB); | 98 info.context->setStrokeColor(Color(255, 0, 0), ColorSpaceSRGB); |
| 101 | 99 |
| 102 info.context->drawLine(IntPoint(adjustedPaintOffset.x(), adjustedPaintOffset
.y() + baseline), IntPoint(adjustedPaintOffset.x() + pixelSnappedOffsetWidth(),
adjustedPaintOffset.y() + baseline)); | 100 info.context->drawLine(IntPoint(adjustedPaintOffset.x(), adjustedPaintOffset
.y() + baseline), IntPoint(adjustedPaintOffset.x() + pixelSnappedOffsetWidth(),
adjustedPaintOffset.y() + baseline)); |
| 103 } | 101 } |
| 104 #endif // ENABLE(DEBUG_MATH_LAYOUT) | 102 #endif // ENABLE(DEBUG_MATH_LAYOUT) |
| 105 | 103 |
| 106 } | 104 } |
| 107 | 105 |
| 108 #endif | 106 #endif |
| OLD | NEW |