| 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 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2629 | 2629 |
| 2630 void Node::setCustomElementState(CustomElementState newState) | 2630 void Node::setCustomElementState(CustomElementState newState) |
| 2631 { | 2631 { |
| 2632 CustomElementState oldState = customElementState(); | 2632 CustomElementState oldState = customElementState(); |
| 2633 | 2633 |
| 2634 switch (newState) { | 2634 switch (newState) { |
| 2635 case NotCustomElement: | 2635 case NotCustomElement: |
| 2636 ASSERT_NOT_REACHED(); // Everything starts in this state | 2636 ASSERT_NOT_REACHED(); // Everything starts in this state |
| 2637 return; | 2637 return; |
| 2638 | 2638 |
| 2639 case WaitingForParser: | 2639 case WaitingForUpgrade: |
| 2640 ASSERT(NotCustomElement == oldState); | 2640 ASSERT(NotCustomElement == oldState); |
| 2641 break; | 2641 break; |
| 2642 | 2642 |
| 2643 case WaitingForUpgrade: | |
| 2644 ASSERT(NotCustomElement == oldState || WaitingForParser == oldState); | |
| 2645 break; | |
| 2646 | |
| 2647 case Upgraded: | 2643 case Upgraded: |
| 2648 ASSERT(WaitingForParser == oldState || WaitingForUpgrade == oldState); | 2644 ASSERT(WaitingForUpgrade == oldState); |
| 2649 break; | 2645 break; |
| 2650 } | 2646 } |
| 2651 | 2647 |
| 2652 ASSERT(isHTMLElement() || isSVGElement()); | 2648 ASSERT(isHTMLElement() || isSVGElement()); |
| 2653 setFlag(newState & 1, CustomElementWaitingForParserOrIsUpgraded); | 2649 setFlag(CustomElement); |
| 2654 setFlag(newState & 2, CustomElementWaitingForUpgradeOrIsUpgraded); | 2650 setFlag(newState == Upgraded, CustomElementUpgraded); |
| 2655 | 2651 |
| 2656 if (oldState == NotCustomElement || newState == Upgraded) | 2652 if (oldState == NotCustomElement || newState == Upgraded) |
| 2657 setNeedsStyleRecalc(); // :unresolved has changed | 2653 setNeedsStyleRecalc(); // :unresolved has changed |
| 2658 } | 2654 } |
| 2659 | 2655 |
| 2660 } // namespace WebCore | 2656 } // namespace WebCore |
| 2661 | 2657 |
| 2662 #ifndef NDEBUG | 2658 #ifndef NDEBUG |
| 2663 | 2659 |
| 2664 void showTree(const WebCore::Node* node) | 2660 void showTree(const WebCore::Node* node) |
| 2665 { | 2661 { |
| 2666 if (node) | 2662 if (node) |
| 2667 node->showTreeForThis(); | 2663 node->showTreeForThis(); |
| 2668 } | 2664 } |
| 2669 | 2665 |
| 2670 void showNodePath(const WebCore::Node* node) | 2666 void showNodePath(const WebCore::Node* node) |
| 2671 { | 2667 { |
| 2672 if (node) | 2668 if (node) |
| 2673 node->showNodePathForThis(); | 2669 node->showNodePathForThis(); |
| 2674 } | 2670 } |
| 2675 | 2671 |
| 2676 #endif | 2672 #endif |
| OLD | NEW |