| 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 r
ights reserved. |
| 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 } | 907 } |
| 908 | 908 |
| 909 inline void Node::lazyReattachIfAttached() | 909 inline void Node::lazyReattachIfAttached() |
| 910 { | 910 { |
| 911 if (attached()) | 911 if (attached()) |
| 912 lazyReattach(); | 912 lazyReattach(); |
| 913 } | 913 } |
| 914 | 914 |
| 915 inline void Node::lazyReattach(ShouldSetAttached shouldSetAttached) | 915 inline void Node::lazyReattach(ShouldSetAttached shouldSetAttached) |
| 916 { | 916 { |
| 917 AttachContext context; |
| 918 context.performingReattach = true; |
| 919 |
| 917 if (attached()) | 920 if (attached()) |
| 918 detach(); | 921 detach(context); |
| 919 lazyAttach(shouldSetAttached); | 922 lazyAttach(shouldSetAttached); |
| 920 } | 923 } |
| 921 | 924 |
| 922 // Need a template since ElementShadow is not a Node, but has the style recalc m
ethods. | 925 // Need a template since ElementShadow is not a Node, but has the style recalc m
ethods. |
| 923 template<class T> | 926 template<class T> |
| 924 inline bool shouldRecalcStyle(Node::StyleChange change, const T* node) | 927 inline bool shouldRecalcStyle(Node::StyleChange change, const T* node) |
| 925 { | 928 { |
| 926 return change >= Node::Inherit || node->childNeedsStyleRecalc() || node->nee
dsStyleRecalc(); | 929 return change >= Node::Inherit || node->childNeedsStyleRecalc() || node->nee
dsStyleRecalc(); |
| 927 } | 930 } |
| 928 | 931 |
| 929 } //namespace | 932 } //namespace |
| 930 | 933 |
| 931 #ifndef NDEBUG | 934 #ifndef NDEBUG |
| 932 // Outside the WebCore namespace for ease of invocation from gdb. | 935 // Outside the WebCore namespace for ease of invocation from gdb. |
| 933 void showTree(const WebCore::Node*); | 936 void showTree(const WebCore::Node*); |
| 934 void showNodePath(const WebCore::Node*); | 937 void showNodePath(const WebCore::Node*); |
| 935 #endif | 938 #endif |
| 936 | 939 |
| 937 #endif | 940 #endif |
| OLD | NEW |