| OLD | NEW |
| 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 22 matching lines...) Expand all Loading... |
| 33 #include "core/css/SelectorChecker.h" | 33 #include "core/css/SelectorChecker.h" |
| 34 #include "core/css/SiblingTraversalStrategies.h" | 34 #include "core/css/SiblingTraversalStrategies.h" |
| 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(contentTag, document)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 PassRefPtr<HTMLContentElement> HTMLContentElement::create(const QualifiedName& t
agName, Document* document) | 48 PassRefPtr<HTMLContentElement> HTMLContentElement::create(const QualifiedName& t
agName, Document& document) |
| 49 { | 49 { |
| 50 return adoptRef(new HTMLContentElement(tagName, document)); | 50 return adoptRef(new HTMLContentElement(tagName, document)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 HTMLContentElement::HTMLContentElement(const QualifiedName& name, Document* docu
ment) | 53 HTMLContentElement::HTMLContentElement(const QualifiedName& name, Document& docu
ment) |
| 54 : InsertionPoint(name, document) | 54 : InsertionPoint(name, document) |
| 55 , m_shouldParseSelect(false) | 55 , m_shouldParseSelect(false) |
| 56 , m_isValidSelector(true) | 56 , m_isValidSelector(true) |
| 57 { | 57 { |
| 58 ASSERT(hasTagName(contentTag)); | 58 ASSERT(hasTagName(contentTag)); |
| 59 ScriptWrappable::init(this); | 59 ScriptWrappable::init(this); |
| 60 } | 60 } |
| 61 | 61 |
| 62 HTMLContentElement::~HTMLContentElement() | 62 HTMLContentElement::~HTMLContentElement() |
| 63 { | 63 { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 bool HTMLContentElement::matchSelector(const Vector<Node*>& siblings, int nth) c
onst | 119 bool HTMLContentElement::matchSelector(const Vector<Node*>& siblings, int nth) c
onst |
| 120 { | 120 { |
| 121 for (const CSSSelector* selector = selectorList().first(); selector; selecto
r = CSSSelectorList::next(selector)) { | 121 for (const CSSSelector* selector = selectorList().first(); selector; selecto
r = CSSSelectorList::next(selector)) { |
| 122 if (checkOneSelector(selector, siblings, nth)) | 122 if (checkOneSelector(selector, siblings, nth)) |
| 123 return true; | 123 return true; |
| 124 } | 124 } |
| 125 return false; | 125 return false; |
| 126 } | 126 } |
| 127 | 127 |
| 128 } | 128 } |
| OLD | NEW |