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

Side by Side Diff: Source/core/html/shadow/HTMLContentElement.cpp

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 24 matching lines...) Expand all
35 #include "core/dom/QualifiedName.h" 35 #include "core/dom/QualifiedName.h"
36 #include "core/dom/shadow/ElementShadow.h" 36 #include "core/dom/shadow/ElementShadow.h"
37 #include "core/dom/shadow/ShadowRoot.h" 37 #include "core/dom/shadow/ShadowRoot.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 using namespace HTMLNames; 41 using namespace HTMLNames;
42 42
43 PassRefPtr<HTMLContentElement> HTMLContentElement::create(Document& document) 43 PassRefPtr<HTMLContentElement> HTMLContentElement::create(Document& document)
44 { 44 {
45 return adoptRef(new HTMLContentElement(contentTag, document)); 45 return adoptRef(new HTMLContentElement(document));
46 } 46 }
47 47
48 PassRefPtr<HTMLContentElement> HTMLContentElement::create(const QualifiedName& t agName, Document& document) 48 HTMLContentElement::HTMLContentElement(Document& document)
49 { 49 : InsertionPoint(contentTag, document)
50 return adoptRef(new HTMLContentElement(tagName, document));
51 }
52
53 HTMLContentElement::HTMLContentElement(const QualifiedName& name, Document& docu ment)
54 : InsertionPoint(name, document)
55 , m_shouldParseSelect(false) 50 , m_shouldParseSelect(false)
56 , m_isValidSelector(true) 51 , m_isValidSelector(true)
57 { 52 {
58 ASSERT(hasTagName(contentTag));
59 ScriptWrappable::init(this); 53 ScriptWrappable::init(this);
60 } 54 }
61 55
62 HTMLContentElement::~HTMLContentElement() 56 HTMLContentElement::~HTMLContentElement()
63 { 57 {
64 } 58 }
65 59
66 void HTMLContentElement::parseSelect() 60 void HTMLContentElement::parseSelect()
67 { 61 {
68 ASSERT(m_shouldParseSelect); 62 ASSERT(m_shouldParseSelect);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool HTMLContentElement::matchSelector(const Vector<Node*, 32>& siblings, int nt h) const 113 bool HTMLContentElement::matchSelector(const Vector<Node*, 32>& siblings, int nt h) const
120 { 114 {
121 for (const CSSSelector* selector = selectorList().first(); selector; selecto r = CSSSelectorList::next(selector)) { 115 for (const CSSSelector* selector = selectorList().first(); selector; selecto r = CSSSelectorList::next(selector)) {
122 if (checkOneSelector(selector, siblings, nth)) 116 if (checkOneSelector(selector, siblings, nth))
123 return true; 117 return true;
124 } 118 }
125 return false; 119 return false;
126 } 120 }
127 121
128 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698