Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/core/dom/Node.cpp

Issue 23009004: Process Custom Elements in post-order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 2725
2726 void Node::setCustomElementState(CustomElementState newState) 2726 void Node::setCustomElementState(CustomElementState newState)
2727 { 2727 {
2728 CustomElementState oldState = customElementState(); 2728 CustomElementState oldState = customElementState();
2729 2729
2730 switch (newState) { 2730 switch (newState) {
2731 case NotCustomElement: 2731 case NotCustomElement:
2732 ASSERT_NOT_REACHED(); // Everything starts in this state 2732 ASSERT_NOT_REACHED(); // Everything starts in this state
2733 return; 2733 return;
2734 2734
2735 case WaitingForUpgrade: 2735 case WaitingForParser:
2736 ASSERT(NotCustomElement == oldState); 2736 ASSERT(NotCustomElement == oldState);
2737 break; 2737 break;
2738 2738
2739 case WaitingForUpgrade:
2740 ASSERT(NotCustomElement == oldState || WaitingForParser == oldState);
2741 break;
2742
2739 case Upgraded: 2743 case Upgraded:
2740 ASSERT(WaitingForUpgrade == oldState); 2744 ASSERT(WaitingForParser == oldState || WaitingForUpgrade == oldState);
2741 break; 2745 break;
2742 } 2746 }
2743 2747
2744 ASSERT(isHTMLElement() || isSVGElement()); 2748 ASSERT(isHTMLElement() || isSVGElement());
2745 setFlag(newState & 1, CustomElementWaitingForUpgrade); 2749 setFlag(newState & 1, CustomElementWaitingForParserOrIsUpgraded);
2746 setFlag(newState & 2, CustomElementIsUpgraded); 2750 setFlag(newState & 2, CustomElementWaitingForUpgradeOrIsUpgraded);
2747 2751
2748 if (oldState == NotCustomElement || newState == Upgraded) 2752 if (oldState == NotCustomElement || newState == Upgraded)
2749 setNeedsStyleRecalc(); // :unresolved has changed 2753 setNeedsStyleRecalc(); // :unresolved has changed
2750 } 2754 }
2751 2755
2752 } // namespace WebCore 2756 } // namespace WebCore
2753 2757
2754 #ifndef NDEBUG 2758 #ifndef NDEBUG
2755 2759
2756 void showTree(const WebCore::Node* node) 2760 void showTree(const WebCore::Node* node)
2757 { 2761 {
2758 if (node) 2762 if (node)
2759 node->showTreeForThis(); 2763 node->showTreeForThis();
2760 } 2764 }
2761 2765
2762 void showNodePath(const WebCore::Node* node) 2766 void showNodePath(const WebCore::Node* node)
2763 { 2767 {
2764 if (node) 2768 if (node)
2765 node->showNodePathForThis(); 2769 node->showNodePathForThis();
2766 } 2770 }
2767 2771
2768 #endif 2772 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698