| 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 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 return; | 857 return; |
| 858 | 858 |
| 859 StyleChangeType existingChangeType = styleChangeType(); | 859 StyleChangeType existingChangeType = styleChangeType(); |
| 860 if (changeType > existingChangeType) | 860 if (changeType > existingChangeType) |
| 861 setStyleChange(changeType); | 861 setStyleChange(changeType); |
| 862 | 862 |
| 863 if (existingChangeType == NoStyleChange) | 863 if (existingChangeType == NoStyleChange) |
| 864 markAncestorsWithChildNeedsStyleRecalc(); | 864 markAncestorsWithChildNeedsStyleRecalc(); |
| 865 } | 865 } |
| 866 | 866 |
| 867 void Node::lazyAttach() | 867 void Node::lazyAttach(ShouldSetAttached shouldSetAttached) |
| 868 { | 868 { |
| 869 // It's safe to synchronously attach here because we're in the middle of sty
le recalc | 869 for (Node* n = this; n; n = NodeTraversal::next(n, this)) { |
| 870 // while it's not safe to mark nodes as needing style recalc except in the l
oop in | 870 if (n->hasChildNodes()) |
| 871 // Element::recalcStyle because we may mark an ancestor as not needing recal
c and | 871 n->setChildNeedsStyleRecalc(); |
| 872 // then the node would never get updated. One place this currently happens i
s | 872 n->setStyleChange(FullStyleChange); |
| 873 // HTMLObjectElement::renderFallbackContent which may call lazyAttach from i
nside | 873 if (shouldSetAttached == SetAttached) |
| 874 // attach which was triggered by a recalcStyle. | 874 n->setAttached(); |
| 875 if (document()->inStyleRecalc()) { | |
| 876 attach(); | |
| 877 return; | |
| 878 } | 875 } |
| 879 setStyleChange(FullStyleChange); | |
| 880 markAncestorsWithChildNeedsStyleRecalc(); | 876 markAncestorsWithChildNeedsStyleRecalc(); |
| 881 } | 877 } |
| 882 | 878 |
| 883 bool Node::supportsFocus() const | 879 bool Node::supportsFocus() const |
| 884 { | 880 { |
| 885 return false; | 881 return false; |
| 886 } | 882 } |
| 887 | 883 |
| 888 bool Node::isFocusable() const | 884 bool Node::isFocusable() const |
| 889 { | 885 { |
| (...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2774 node->showTreeForThis(); | 2770 node->showTreeForThis(); |
| 2775 } | 2771 } |
| 2776 | 2772 |
| 2777 void showNodePath(const WebCore::Node* node) | 2773 void showNodePath(const WebCore::Node* node) |
| 2778 { | 2774 { |
| 2779 if (node) | 2775 if (node) |
| 2780 node->showNodePathForThis(); | 2776 node->showNodePathForThis(); |
| 2781 } | 2777 } |
| 2782 | 2778 |
| 2783 #endif | 2779 #endif |
| OLD | NEW |