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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
631 } | 631 } |
632 | 632 |
633 clearChildNeedsDistributionRecalc(); | 633 clearChildNeedsDistributionRecalc(); |
634 } | 634 } |
635 | 635 |
636 void Node::setIsLink(bool isLink) | 636 void Node::setIsLink(bool isLink) |
637 { | 637 { |
638 setFlag(isLink && !SVGImage::isInSVGImage(toElement(this)), IsLinkFlag); | 638 setFlag(isLink && !SVGImage::isInSVGImage(toElement(this)), IsLinkFlag); |
639 } | 639 } |
640 | 640 |
641 void Node::setNeedsStyleInvalidation() | |
642 { | |
643 setFlag(NeedsStyleInvalidation); | |
644 markAncestorsWithChildNeedsStyleInvalidation(); | |
645 } | |
646 | |
ojan
2014/01/30 19:08:39
extra line break
chrishtr
2014/01/30 19:25:48
Done.
| |
647 | |
648 void Node::markAncestorsWithChildNeedsStyleInvalidation() | |
649 { | |
650 for (Node* node = this; node && !node->childNeedsStyleInvalidation(); node = node->parentOrShadowHostNode()) | |
651 node->setChildNeedsStyleInvalidation(); | |
652 if (document().childNeedsStyleInvalidation()) | |
653 document().scheduleStyleRecalc(); | |
654 } | |
655 | |
641 void Node::markAncestorsWithChildNeedsDistributionRecalc() | 656 void Node::markAncestorsWithChildNeedsDistributionRecalc() |
642 { | 657 { |
643 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode()) | 658 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode()) |
644 node->setChildNeedsDistributionRecalc(); | 659 node->setChildNeedsDistributionRecalc(); |
645 if (document().childNeedsDistributionRecalc()) | 660 if (document().childNeedsDistributionRecalc()) |
646 document().scheduleStyleRecalc(); | 661 document().scheduleStyleRecalc(); |
647 } | 662 } |
648 | 663 |
649 namespace { | 664 namespace { |
650 | 665 |
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2560 node->showTreeForThis(); | 2575 node->showTreeForThis(); |
2561 } | 2576 } |
2562 | 2577 |
2563 void showNodePath(const WebCore::Node* node) | 2578 void showNodePath(const WebCore::Node* node) |
2564 { | 2579 { |
2565 if (node) | 2580 if (node) |
2566 node->showNodePathForThis(); | 2581 node->showNodePathForThis(); |
2567 } | 2582 } |
2568 | 2583 |
2569 #endif | 2584 #endif |
OLD | NEW |