| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 8 * (http://www.torchmobile.com/) | 8 * (http://www.torchmobile.com/) |
| 9 * Copyright (C) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 LayoutObject* parentLayoutObject = this->parentLayoutObject(); | 94 LayoutObject* parentLayoutObject = this->parentLayoutObject(); |
| 95 if (!parentLayoutObject) | 95 if (!parentLayoutObject) |
| 96 return false; | 96 return false; |
| 97 if (!parentLayoutObject->canHaveChildren()) | 97 if (!parentLayoutObject->canHaveChildren()) |
| 98 return false; | 98 return false; |
| 99 return m_node->layoutObjectIsNeeded(style()); | 99 return m_node->layoutObjectIsNeeded(style()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 ComputedStyle& LayoutTreeBuilderForElement::style() const { | 102 ComputedStyle& LayoutTreeBuilderForElement::style() const { |
| 103 if (!m_style) | 103 m_style = |
| 104 m_node->document().getStyleReattachData(*m_node).computedStyle.get(); |
| 105 if (!m_style) { |
| 104 m_style = m_node->styleForLayoutObject(); | 106 m_style = m_node->styleForLayoutObject(); |
| 107 } |
| 105 return *m_style; | 108 return *m_style; |
| 106 } | 109 } |
| 107 | 110 |
| 108 DISABLE_CFI_PERF | 111 DISABLE_CFI_PERF |
| 109 void LayoutTreeBuilderForElement::createLayoutObject() { | 112 void LayoutTreeBuilderForElement::createLayoutObject() { |
| 110 ComputedStyle& style = this->style(); | 113 ComputedStyle& style = this->style(); |
| 111 | 114 |
| 112 LayoutObject* newLayoutObject = m_node->createLayoutObject(style); | 115 LayoutObject* newLayoutObject = m_node->createLayoutObject(style); |
| 113 if (!newLayoutObject) | 116 if (!newLayoutObject) |
| 114 return; | 117 return; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 m_layoutObjectParent->isInsideFlowThread()); | 170 m_layoutObjectParent->isInsideFlowThread()); |
| 168 | 171 |
| 169 LayoutObject* nextLayoutObject = this->nextLayoutObject(); | 172 LayoutObject* nextLayoutObject = this->nextLayoutObject(); |
| 170 m_node->setLayoutObject(newLayoutObject); | 173 m_node->setLayoutObject(newLayoutObject); |
| 171 // Parent takes care of the animations, no need to call setAnimatableStyle. | 174 // Parent takes care of the animations, no need to call setAnimatableStyle. |
| 172 newLayoutObject->setStyle(&style); | 175 newLayoutObject->setStyle(&style); |
| 173 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject); | 176 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject); |
| 174 } | 177 } |
| 175 | 178 |
| 176 } // namespace blink | 179 } // namespace blink |
| OLD | NEW |