| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 RenderMathMLRow::addChild(separatorRenderer, beforeChild); | 144 RenderMathMLRow::addChild(separatorRenderer, beforeChild); |
| 145 } else { | 145 } else { |
| 146 // Adding |y| at the end of an existing element e.g. (x) - insert the se
parator first before the closing fence, then |y|, to get (x, y). | 146 // Adding |y| at the end of an existing element e.g. (x) - insert the se
parator first before the closing fence, then |y|, to get (x, y). |
| 147 if (separatorRenderer) | 147 if (separatorRenderer) |
| 148 RenderMathMLRow::addChild(separatorRenderer, m_closeFenceRenderer); | 148 RenderMathMLRow::addChild(separatorRenderer, m_closeFenceRenderer); |
| 149 RenderMathMLRow::addChild(child, m_closeFenceRenderer); | 149 RenderMathMLRow::addChild(child, m_closeFenceRenderer); |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 // FIXME: Change createMathMLOperator() above to create an isAnonymous() operato
r, and remove this styleDidChange() function. | 153 // FIXME: Change createMathMLOperator() above to create an isAnonymous() operato
r, and remove this styleDidChange() function. |
| 154 void RenderMathMLFenced::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle) | 154 void RenderMathMLFenced::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle, const StyleChangeState& state) |
| 155 { | 155 { |
| 156 RenderMathMLBlock::styleDidChange(diff, oldStyle); | 156 RenderMathMLBlock::styleDidChange(diff, oldStyle, state); |
| 157 | 157 |
| 158 for (RenderObject* child = firstChild(); child; child = child->nextSibling()
) { | 158 for (RenderObject* child = firstChild(); child; child = child->nextSibling()
) { |
| 159 if (child->node() == node()) { | 159 if (child->node() == node()) { |
| 160 ASSERT(child->style()->refCount() == 1); | 160 ASSERT(child->style()->refCount() == 1); |
| 161 child->style()->inheritFrom(style()); | 161 child->style()->inheritFrom(style()); |
| 162 bool isFence = child == firstChild() || child == lastChild(); | 162 bool isFence = child == firstChild() || child == lastChild(); |
| 163 child->style()->setMarginEnd(Length((isFence ? gFenceMarginEms : gSe
paratorMarginEndEms) * style()->fontSize(), Fixed)); | 163 child->style()->setMarginEnd(Length((isFence ? gFenceMarginEms : gSe
paratorMarginEndEms) * style()->fontSize(), Fixed)); |
| 164 if (isFence) | 164 if (isFence) |
| 165 child->style()->setMarginStart(Length(gFenceMarginEms * style()-
>fontSize(), Fixed)); | 165 child->style()->setMarginStart(Length(gFenceMarginEms * style()-
>fontSize(), Fixed)); |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 } | 170 } |
| 171 | 171 |
| 172 #endif | 172 #endif |
| OLD | NEW |