| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 class LayoutTreeBuilderForElement : public LayoutTreeBuilder<Element> { | 71 class LayoutTreeBuilderForElement : public LayoutTreeBuilder<Element> { |
| 72 public: | 72 public: |
| 73 LayoutTreeBuilderForElement(Element&, ComputedStyle*); | 73 LayoutTreeBuilderForElement(Element&, ComputedStyle*); |
| 74 | 74 |
| 75 void createLayoutObjectIfNeeded() { | 75 void createLayoutObjectIfNeeded() { |
| 76 if (shouldCreateLayoutObject()) | 76 if (shouldCreateLayoutObject()) |
| 77 createLayoutObject(); | 77 createLayoutObject(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 ComputedStyle* resolvedStyle() const { return m_style.get(); } |
| 81 |
| 80 private: | 82 private: |
| 81 LayoutObject* parentLayoutObject() const; | 83 LayoutObject* parentLayoutObject() const; |
| 82 LayoutObject* nextLayoutObject() const; | 84 LayoutObject* nextLayoutObject() const; |
| 83 bool shouldCreateLayoutObject() const; | 85 bool shouldCreateLayoutObject() const; |
| 84 ComputedStyle& style() const; | 86 ComputedStyle& style() const; |
| 85 void createLayoutObject(); | 87 void createLayoutObject(); |
| 86 | 88 |
| 87 mutable RefPtr<ComputedStyle> m_style; | 89 mutable RefPtr<ComputedStyle> m_style; |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 class LayoutTreeBuilderForText : public LayoutTreeBuilder<Text> { | 92 class LayoutTreeBuilderForText : public LayoutTreeBuilder<Text> { |
| 91 public: | 93 public: |
| 92 LayoutTreeBuilderForText(Text& text, LayoutObject* layoutParent) | 94 LayoutTreeBuilderForText(Text& text, |
| 93 : LayoutTreeBuilder(text, layoutParent) {} | 95 LayoutObject* layoutParent, |
| 96 ComputedStyle* styleFromParent) |
| 97 : LayoutTreeBuilder(text, layoutParent), m_style(styleFromParent) {} |
| 94 | 98 |
| 99 RefPtr<ComputedStyle> m_style; |
| 95 void createLayoutObject(); | 100 void createLayoutObject(); |
| 96 }; | 101 }; |
| 97 | 102 |
| 98 } // namespace blink | 103 } // namespace blink |
| 99 | 104 |
| 100 #endif | 105 #endif |
| OLD | NEW |