Changeset 88730 in webkit
- Timestamp:
- Jun 13, 2011 4:20:47 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r88717 r88730 1 2011-06-13 Jeffrey Pfau <jpfau@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Crash in WebCore::RenderMathMLUnderOver::layout() 6 https://bugs.webkit.org/show_bug.cgi?id=57900 7 8 Added a test that tries to remove the children of munder, mover and munderover elements. 9 10 * mathml/munderover-remove-children-expected.txt: Added. 11 * mathml/munderover-remove-children.html: Added. 12 1 13 2011-06-13 Wyatt Carss <wcarss@google.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r88729 r88730 1 2011-06-13 Jeffrey Pfau <jpfau@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Crash in WebCore::RenderMathMLUnderOver::layout() 6 https://bugs.webkit.org/show_bug.cgi?id=57900 7 8 Add more null checks so that removing children in MathML elements does not cause crashes. 9 Note that this only half fixes the third repro in the Bugzilla bug, as another bug will 10 still crash that repro. 11 12 Test: mathml/munderover-remove-children.html 13 14 * rendering/mathml/RenderMathMLSubSup.cpp: 15 (WebCore::RenderMathMLSubSup::stretchToHeight): 16 * rendering/mathml/RenderMathMLUnderOver.cpp: 17 (WebCore::RenderMathMLUnderOver::layout): 18 (WebCore::RenderMathMLUnderOver::nonOperatorHeight): 19 1 20 2011-06-13 Dmitry Lomov <dslomov@google.com> 2 21 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp
r88104 r88730 110 110 return; 111 111 112 if (base->firstChild() ->isRenderMathMLBlock()) {112 if (base->firstChild() && base->firstChild()->isRenderMathMLBlock()) { 113 113 RenderMathMLBlock* block = toRenderMathMLBlock(base->firstChild()); 114 114 block->stretchToHeight(static_cast<int>(gSubSupStretch * height)); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp
r75353 r88730 156 156 // FIXME: descending glyphs intrude into base (e.g. lowercase y over base) 157 157 // FIXME: bases that ascend higher than the line box intrude into the over 158 if (!over->firstChild() ->isBoxModelObject())158 if (!over->firstChild() || !over->firstChild()->isBoxModelObject()) 159 159 break; 160 160 … … 184 184 // actual base 185 185 base = base->firstChild(); 186 if (!base ->isBoxModelObject())186 if (!base || !base->isBoxModelObject()) 187 187 break; 188 188 … … 208 208 // FIXME: descending glyphs intrude into base (e.g. lowercase y over base) 209 209 // FIXME: bases that ascend higher than the line box intrude into the over 210 if (!over->firstChild() ->isBoxModelObject())210 if (!over->firstChild() || !over->firstChild()->isBoxModelObject()) 211 211 break; 212 212 int overSpacing = static_cast<int>(gOverSpacingAdjustment * (getOffsetHeight(over) - toRenderBoxModelObject(over->firstChild())->baselinePosition(AlphabeticBaseline, true, HorizontalLine))); … … 225 225 // actual base 226 226 base = base->firstChild(); 227 if (!base ->isBoxModelObject())227 if (!base || !base->isBoxModelObject()) 228 228 break; 229 229 … … 233 233 234 234 RenderObject* under = lastChild(); 235 if (under && under->firstChild() ->isRenderInline() && underSpacing > 0)235 if (under && under->firstChild() && under->firstChild()->isRenderInline() && underSpacing > 0) 236 236 under->style()->setMarginTop(Length(-underSpacing, Fixed)); 237 237 … … 283 283 int nonOperators = 0; 284 284 for (RenderObject* current = firstChild(); current; current = current->nextSibling()) { 285 if (current->firstChild() ->isRenderMathMLBlock()) {285 if (current->firstChild() && current->firstChild()->isRenderMathMLBlock()) { 286 286 RenderMathMLBlock* block = toRenderMathMLBlock(current->firstChild()); 287 287 if (!block->isRenderMathMLOperator())
Note: See TracChangeset
for help on using the changeset viewer.