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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
535 #ifndef NDEBUG | 535 #ifndef NDEBUG |
536 bool inDetach() const; | 536 bool inDetach() const; |
537 #endif | 537 #endif |
538 | 538 |
539 void reattach(const AttachContext& = AttachContext()); | 539 void reattach(const AttachContext& = AttachContext()); |
540 void lazyReattachIfAttached(); | 540 void lazyReattachIfAttached(); |
541 | 541 |
542 // Returns true if recalcStyle should be called on the object, if there is s uch a method (on Document and Element). | 542 // Returns true if recalcStyle should be called on the object, if there is s uch a method (on Document and Element). |
543 bool shouldCallRecalcStyle(StyleRecalcChange); | 543 bool shouldCallRecalcStyle(StyleRecalcChange); |
544 | 544 |
545 // Returns true if updatePseudoElement should be called on the object. | |
546 bool shouldUpdatePseudoElements(StyleRecalcChange) const; | |
547 | |
545 // Wrapper for nodes that don't have a renderer, but still cache the style ( like HTMLOptionElement). | 548 // Wrapper for nodes that don't have a renderer, but still cache the style ( like HTMLOptionElement). |
546 RenderStyle* renderStyle() const; | 549 RenderStyle* renderStyle() const; |
547 RenderStyle* parentRenderStyle() const; | 550 RenderStyle* parentRenderStyle() const; |
548 | 551 |
549 RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { ret urn virtualComputedStyle(pseudoElementSpecifier); } | 552 RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { ret urn virtualComputedStyle(pseudoElementSpecifier); } |
550 | 553 |
551 // ------------------------------------------------------------------------- ---- | 554 // ------------------------------------------------------------------------- ---- |
552 // Notification of document structure changes (see ContainerNode.h for more notification methods) | 555 // Notification of document structure changes (see ContainerNode.h for more notification methods) |
553 // | 556 // |
554 // At first, WebKit notifies the node that it has been inserted into the doc ument. This is called during document parsing, and also | 557 // At first, WebKit notifies the node that it has been inserted into the doc ument. This is called during document parsing, and also |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
861 | 864 |
862 detach(context); | 865 detach(context); |
863 markAncestorsWithChildNeedsStyleRecalc(); | 866 markAncestorsWithChildNeedsStyleRecalc(); |
864 } | 867 } |
865 | 868 |
866 inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change) | 869 inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change) |
867 { | 870 { |
868 return change >= Inherit || needsStyleRecalc() || childNeedsStyleRecalc(); | 871 return change >= Inherit || needsStyleRecalc() || childNeedsStyleRecalc(); |
869 } | 872 } |
870 | 873 |
874 inline bool Node::shouldUpdatePseudoElements(StyleRecalcChange change) const | |
esprehn
2014/01/28 18:08:05
You only have this check in two places, I'd just i
| |
875 { | |
876 return change >= UpdatePseudoElements || childNeedsStyleRecalc(); | |
877 } | |
878 | |
871 inline bool isTreeScopeRoot(const Node* node) | 879 inline bool isTreeScopeRoot(const Node* node) |
872 { | 880 { |
873 return !node || node->isDocumentNode() || node->isShadowRoot(); | 881 return !node || node->isDocumentNode() || node->isShadowRoot(); |
874 } | 882 } |
875 | 883 |
876 inline bool isTreeScopeRoot(const Node& node) | 884 inline bool isTreeScopeRoot(const Node& node) |
877 { | 885 { |
878 return node.isDocumentNode() || node.isShadowRoot(); | 886 return node.isDocumentNode() || node.isShadowRoot(); |
879 } | 887 } |
880 | 888 |
(...skipping 21 matching lines...) Expand all Loading... | |
902 | 910 |
903 } // namespace WebCore | 911 } // namespace WebCore |
904 | 912 |
905 #ifndef NDEBUG | 913 #ifndef NDEBUG |
906 // Outside the WebCore namespace for ease of invocation from gdb. | 914 // Outside the WebCore namespace for ease of invocation from gdb. |
907 void showTree(const WebCore::Node*); | 915 void showTree(const WebCore::Node*); |
908 void showNodePath(const WebCore::Node*); | 916 void showNodePath(const WebCore::Node*); |
909 #endif | 917 #endif |
910 | 918 |
911 #endif | 919 #endif |
OLD | NEW |