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

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

Issue 214693002: Remove most of scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really remove it 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 | « Source/core/dom/Node.h ('k') | Source/core/dom/StyleSheetScopingNodeList.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 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 Vector<RefPtr<Node> > filteredInsertionPoints; 2414 Vector<RefPtr<Node> > filteredInsertionPoints;
2415 for (size_t i = 0; i < insertionPoints.size(); ++i) { 2415 for (size_t i = 0; i < insertionPoints.size(); ++i) {
2416 InsertionPoint* insertionPoint = insertionPoints[i]; 2416 InsertionPoint* insertionPoint = insertionPoints[i];
2417 ASSERT(insertionPoint->containingShadowRoot()); 2417 ASSERT(insertionPoint->containingShadowRoot());
2418 if (insertionPoint->containingShadowRoot()->type() != ShadowRoot::UserAg entShadowRoot) 2418 if (insertionPoint->containingShadowRoot()->type() != ShadowRoot::UserAg entShadowRoot)
2419 filteredInsertionPoints.append(insertionPoint); 2419 filteredInsertionPoints.append(insertionPoint);
2420 } 2420 }
2421 return StaticNodeList::adopt(filteredInsertionPoints); 2421 return StaticNodeList::adopt(filteredInsertionPoints);
2422 } 2422 }
2423 2423
2424 void Node::registerScopedHTMLStyleChild()
2425 {
2426 setHasScopedHTMLStyleChild(true);
2427 }
2428
2429 void Node::unregisterScopedHTMLStyleChild()
2430 {
2431 ASSERT(hasScopedHTMLStyleChild());
2432 setHasScopedHTMLStyleChild(numberOfScopedHTMLStyleChildren());
2433 }
2434
2435 size_t Node::numberOfScopedHTMLStyleChildren() const
2436 {
2437 size_t count = 0;
2438 for (HTMLStyleElement* style = Traversal<HTMLStyleElement>::firstChild(*this ); style; style = Traversal<HTMLStyleElement>::nextSibling(*style)) {
2439 if (style->isRegisteredAsScoped())
2440 ++count;
2441 }
2442
2443 return count;
2444 }
2445
2446 void Node::setFocus(bool flag) 2424 void Node::setFocus(bool flag)
2447 { 2425 {
2448 document().userActionElements().setFocused(this, flag); 2426 document().userActionElements().setFocused(this, flag);
2449 } 2427 }
2450 2428
2451 void Node::setActive(bool flag) 2429 void Node::setActive(bool flag)
2452 { 2430 {
2453 document().userActionElements().setActive(this, flag); 2431 document().userActionElements().setActive(this, flag);
2454 } 2432 }
2455 2433
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2524 node->showTreeForThis(); 2502 node->showTreeForThis();
2525 } 2503 }
2526 2504
2527 void showNodePath(const WebCore::Node* node) 2505 void showNodePath(const WebCore::Node* node)
2528 { 2506 {
2529 if (node) 2507 if (node)
2530 node->showNodePathForThis(); 2508 node->showNodePathForThis();
2531 } 2509 }
2532 2510
2533 #endif 2511 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/StyleSheetScopingNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698