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

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

Issue 189523003: Update DOM code to use the new Traversal<HTML*Element> API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | Source/core/dom/TreeScope.cpp » ('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 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 2433
2434 void Node::unregisterScopedHTMLStyleChild() 2434 void Node::unregisterScopedHTMLStyleChild()
2435 { 2435 {
2436 ASSERT(hasScopedHTMLStyleChild()); 2436 ASSERT(hasScopedHTMLStyleChild());
2437 setHasScopedHTMLStyleChild(numberOfScopedHTMLStyleChildren()); 2437 setHasScopedHTMLStyleChild(numberOfScopedHTMLStyleChildren());
2438 } 2438 }
2439 2439
2440 size_t Node::numberOfScopedHTMLStyleChildren() const 2440 size_t Node::numberOfScopedHTMLStyleChildren() const
2441 { 2441 {
2442 size_t count = 0; 2442 size_t count = 0;
2443 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSibling(*child)) { 2443 for (HTMLStyleElement* style = Traversal<HTMLStyleElement>::firstChild(*this ); style; style = Traversal<HTMLStyleElement>::nextSibling(*style)) {
2444 if (child->hasTagName(HTMLNames::styleTag) && toHTMLStyleElement(child)- >isRegisteredAsScoped()) 2444 if (style->isRegisteredAsScoped())
2445 ++count; 2445 ++count;
2446 } 2446 }
2447 2447
2448 return count; 2448 return count;
2449 } 2449 }
2450 2450
2451 void Node::setFocus(bool flag) 2451 void Node::setFocus(bool flag)
2452 { 2452 {
2453 document().userActionElements().setFocused(this, flag); 2453 document().userActionElements().setFocused(this, flag);
2454 } 2454 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 node->showTreeForThis(); 2523 node->showTreeForThis();
2524 } 2524 }
2525 2525
2526 void showNodePath(const WebCore::Node* node) 2526 void showNodePath(const WebCore::Node* node)
2527 { 2527 {
2528 if (node) 2528 if (node)
2529 node->showNodePathForThis(); 2529 node->showNodePathForThis();
2530 } 2530 }
2531 2531
2532 #endif 2532 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698