| 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 r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * rights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 8 * (http://www.torchmobile.com/) |
| 7 * Copyright (C) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 8 * | 10 * |
| 9 * This library is free software; you can redistribute it and/or | 11 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 12 * modify it under the terms of the GNU Library General Public |
| 11 * License as published by the Free Software Foundation; either | 13 * License as published by the Free Software Foundation; either |
| 12 * version 2 of the License, or (at your option) any later version. | 14 * version 2 of the License, or (at your option) any later version. |
| 13 * | 15 * |
| 14 * This library is distributed in the hope that it will be useful, | 16 * This library is distributed in the hope that it will be useful, |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 29 matching lines...) Expand all Loading... |
| 46 : m_node(node), m_layoutObjectParent(layoutObjectParent) { | 48 : m_node(node), m_layoutObjectParent(layoutObjectParent) { |
| 47 DCHECK(!node.layoutObject()); | 49 DCHECK(!node.layoutObject()); |
| 48 DCHECK(node.needsAttach()); | 50 DCHECK(node.needsAttach()); |
| 49 DCHECK(node.document().inStyleRecalc()); | 51 DCHECK(node.document().inStyleRecalc()); |
| 50 DCHECK(node.inActiveDocument()); | 52 DCHECK(node.inActiveDocument()); |
| 51 } | 53 } |
| 52 | 54 |
| 53 LayoutObject* nextLayoutObject() const { | 55 LayoutObject* nextLayoutObject() const { |
| 54 DCHECK(m_layoutObjectParent); | 56 DCHECK(m_layoutObjectParent); |
| 55 | 57 |
| 56 // Avoid an O(N^2) walk over the children when reattaching all children of a
node. | 58 // Avoid an O(N^2) walk over the children when reattaching all children of a |
| 59 // node. |
| 57 if (m_layoutObjectParent->node() && | 60 if (m_layoutObjectParent->node() && |
| 58 m_layoutObjectParent->node()->needsAttach()) | 61 m_layoutObjectParent->node()->needsAttach()) |
| 59 return 0; | 62 return 0; |
| 60 | 63 |
| 61 return LayoutTreeBuilderTraversal::nextSiblingLayoutObject(*m_node); | 64 return LayoutTreeBuilderTraversal::nextSiblingLayoutObject(*m_node); |
| 62 } | 65 } |
| 63 | 66 |
| 64 Member<NodeType> m_node; | 67 Member<NodeType> m_node; |
| 65 LayoutObject* m_layoutObjectParent; | 68 LayoutObject* m_layoutObjectParent; |
| 66 }; | 69 }; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 88 public: | 91 public: |
| 89 LayoutTreeBuilderForText(Text& text, LayoutObject* layoutParent) | 92 LayoutTreeBuilderForText(Text& text, LayoutObject* layoutParent) |
| 90 : LayoutTreeBuilder(text, layoutParent) {} | 93 : LayoutTreeBuilder(text, layoutParent) {} |
| 91 | 94 |
| 92 void createLayoutObject(); | 95 void createLayoutObject(); |
| 93 }; | 96 }; |
| 94 | 97 |
| 95 } // namespace blink | 98 } // namespace blink |
| 96 | 99 |
| 97 #endif | 100 #endif |
| OLD | NEW |