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

Side by Side Diff: Source/core/dom/Element.h

Issue 23567016: Have ScopedStyleResolver deal with ContainerNode references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/shadow/ShadowRoot.h » ('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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isElementNode()); 794 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isElementNode());
795 return static_cast<Element*>(node); 795 return static_cast<Element*>(node);
796 } 796 }
797 797
798 inline const Element* toElement(const Node* node) 798 inline const Element* toElement(const Node* node)
799 { 799 {
800 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isElementNode()); 800 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isElementNode());
801 return static_cast<const Element*>(node); 801 return static_cast<const Element*>(node);
802 } 802 }
803 803
804 inline const Element& toElement(const Node& node)
805 {
806 ASSERT_WITH_SECURITY_IMPLICATION(node.isElementNode());
807 return static_cast<const Element&>(node);
808 }
809
804 // This will catch anyone doing an unnecessary cast. 810 // This will catch anyone doing an unnecessary cast.
805 void toElement(const Element*); 811 void toElement(const Element*);
806 812
807 inline bool isDisabledFormControl(const Node* node) 813 inline bool isDisabledFormControl(const Node* node)
808 { 814 {
809 return node->isElementNode() && toElement(node)->isDisabledFormControl(); 815 return node->isElementNode() && toElement(node)->isDisabledFormControl();
810 } 816 }
811 817
812 inline bool Node::hasTagName(const QualifiedName& name) const 818 inline bool Node::hasTagName(const QualifiedName& name) const
813 { 819 {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1092
1087 inline const Attribute* ElementData::attributeItem(unsigned index) const 1093 inline const Attribute* ElementData::attributeItem(unsigned index) const
1088 { 1094 {
1089 RELEASE_ASSERT(index < length()); 1095 RELEASE_ASSERT(index < length());
1090 return attributeBase() + index; 1096 return attributeBase() + index;
1091 } 1097 }
1092 1098
1093 } // namespace 1099 } // namespace
1094 1100
1095 #endif 1101 #endif
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698