Changeset 161501 in webkit
- Timestamp:
- Jan 8, 2014 7:43:52 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r161500 r161501 1 2014-01-08 Andreas Kling <akling@apple.com> 2 3 Deploy RenderPtr in RenderMathMLOperator::updateFromElement(). 4 <https://webkit.org/b/126628> 5 6 Reviewed by Antti Koivisto. 7 8 * rendering/mathml/RenderMathMLOperator.cpp: 9 (WebCore::RenderMathMLOperator::updateFromElement): 10 11 Use RenderPtr/createRenderer for renderer creation. 12 Removed an unnecessary null check (text is always created.) 13 Also use RenderStyle::createAnonymousStyleWithDisplay() 14 helper to shorten down the code a bit. 15 1 16 2014-01-08 Alberto Garcia <berto@igalia.com> 2 17 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r160711 r161501 173 173 // renderer to 0, so we need to restore it. 174 174 element().setRenderer(savedRenderer); 175 176 auto newStyle = RenderStyle::create(); 177 newStyle.get().inheritFrom(&style()); 178 newStyle.get().setDisplay(FLEX); 179 180 RenderMathMLBlock* container = new RenderMathMLBlock(element(), std::move(newStyle)); 175 176 RenderPtr<RenderMathMLBlock> container = createRenderer<RenderMathMLBlock>(element(), RenderStyle::createAnonymousStyleWithDisplay(&style(), FLEX)); 181 177 // This container doesn't offer any useful information to accessibility. 182 178 container->setIgnoreInAccessibilityTree(true); 183 179 container->initializeStyle(); 184 180 185 addChild(container); 186 RenderText* text; 181 RenderPtr<RenderText> text; 187 182 if (m_operator) 188 text = new RenderText(document(), String(&m_operator, 1));183 text = createRenderer<RenderText>(document(), String(&m_operator, 1)); 189 184 else 190 text = new RenderText(document(), element().textContent().replace(hyphenMinus, minusSign).impl()); 191 192 // If we can't figure out the text, leave it blank. 193 if (text) 194 container->addChild(text); 185 text = createRenderer<RenderText>(document(), element().textContent().replace(hyphenMinus, minusSign).impl()); 186 187 container->addChild(text.leakPtr()); 188 addChild(container.leakPtr()); 195 189 196 190 updateStyle();
Note: See TracChangeset
for help on using the changeset viewer.