| Index: Source/core/dom/LayoutTreeBuilder.cpp
|
| diff --git a/Source/core/dom/LayoutTreeBuilder.cpp b/Source/core/dom/LayoutTreeBuilder.cpp
|
| index bbd8b190102dee95fe5b8dca49eb9a134da2b8bc..0d58447e9c0e686324ea3e71517769de6dbefba9 100644
|
| --- a/Source/core/dom/LayoutTreeBuilder.cpp
|
| +++ b/Source/core/dom/LayoutTreeBuilder.cpp
|
| @@ -148,12 +148,13 @@ void LayoutTreeBuilderForElement::createLayoutObject()
|
|
|
| void LayoutTreeBuilderForText::createLayoutObject()
|
| {
|
| - ComputedStyle& style = m_layoutObjectParent->mutableStyleRef();
|
| + const ComputedStyle& parentStyle = m_layoutObjectParent->styleRef();
|
| + RefPtr<ComputedStyle> style = ComputedStyle::createWithInheritableProperties(parentStyle);
|
|
|
| - ASSERT(m_node->textLayoutObjectIsNeeded(style, *m_layoutObjectParent));
|
| + ASSERT(m_node->textLayoutObjectIsNeeded(*style, *m_layoutObjectParent));
|
|
|
| - LayoutText* newLayoutObject = m_node->createTextLayoutObject(style);
|
| - if (!m_layoutObjectParent->isChildAllowed(newLayoutObject, style)) {
|
| + LayoutText* newLayoutObject = m_node->createTextLayoutObject(parentStyle);
|
| + if (!m_layoutObjectParent->isChildAllowed(newLayoutObject, *style)) {
|
| newLayoutObject->destroy();
|
| return;
|
| }
|
| @@ -164,8 +165,7 @@ void LayoutTreeBuilderForText::createLayoutObject()
|
|
|
| LayoutObject* nextLayoutObject = this->nextLayoutObject();
|
| m_node->setLayoutObject(newLayoutObject);
|
| - // Parent takes care of the animations, no need to call setAnimatableStyle.
|
| - newLayoutObject->setStyle(&style);
|
| + newLayoutObject->setStyle(style);
|
| m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject);
|
| }
|
|
|
|
|