Changeset 110640 in webkit
- Timestamp:
- Mar 13, 2012, 4:45:53 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/mathml/msub-anonymous-child-render-crash-expected.txt (added)
-
LayoutTests/mathml/msub-anonymous-child-render-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r110639 r110640 1 2012-03-13 Jacky Jiang <zhajiang@rim.com> 2 3 MathML crash in WebCore::Node::previousSibling() 4 https://bugs.webkit.org/show_bug.cgi?id=80773 5 6 Reviewed by Julien Chaffraix. 7 8 * mathml/msub-anonymous-child-render-crash-expected.txt: Added. 9 * mathml/msub-anonymous-child-render-crash.html: Added. 10 1 11 2012-03-13 Mihnea Ovidenie <mihnea@adobe.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r110639 r110640 1 2012-03-13 Jacky Jiang <zhajiang@rim.com> 2 3 MathML crash in WebCore::Node::previousSibling() 4 https://bugs.webkit.org/show_bug.cgi?id=80773 5 6 Reviewed by Julien Chaffraix. 7 8 When adding child for msub render, if the child is mtr or mtd render, 9 we will creat an anonymous render as the container. As the anonymous 10 render's node is 0, accessing it directly can cause crash. 11 We should do a valid check of the node before using. In addition to 12 that, for msub, attach the anonymous render and it's children to render 13 tree. For msubsup, such kind of situation should never happen based on 14 the current codebase. 15 16 Test: mathml/msub-anonymous-child-render-crash.html 17 18 * rendering/mathml/RenderMathMLSubSup.cpp: 19 (WebCore::RenderMathMLSubSup::addChild): 20 1 21 2012-03-13 Mihnea Ovidenie <mihnea@adobe.com> 2 22 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp
r109286 r110640 69 69 Element* childElement = toElement(child->node()); 70 70 71 if ( !childElement->previousElementSibling()) {71 if (childElement && !childElement->previousElementSibling()) { 72 72 // Position 1 is always the base of the msub/msup/msubsup. 73 73 RenderMathMLBlock* wrapper = new (renderArena()) RenderMathMLBlock(node()); … … 96 96 } else { 97 97 if (m_kind == SubSup) { 98 ASSERT(childElement); 99 if (!childElement) 100 return; 101 98 102 RenderBlock* script = new (renderArena()) RenderMathMLBlock(node()); 99 103 RefPtr<RenderStyle> scriptStyle = RenderStyle::create();
Note:
See TracChangeset
for help on using the changeset viewer.