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 "QualifiedName.h" | 33 #include "QualifiedName.h" |
34 #include "ShadowRoot.h" | 34 #include "ShadowRoot.h" |
35 #include <wtf/StdLibExtras.h> | 35 #include <wtf/StdLibExtras.h> |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 using HTMLNames::selectAttr; | 39 using HTMLNames::selectAttr; |
40 | 40 |
41 static const QualifiedName& contentTagName() | 41 static const QualifiedName& contentTagName() |
42 { | 42 { |
43 #if ENABLE(SHADOW_DOM) | |
44 return HTMLNames::contentTag; | |
45 #else | |
46 DEFINE_STATIC_LOCAL(QualifiedName, tagName, (nullAtom, "webkitShadowContent"
, HTMLNames::divTag.namespaceURI())); | 43 DEFINE_STATIC_LOCAL(QualifiedName, tagName, (nullAtom, "webkitShadowContent"
, HTMLNames::divTag.namespaceURI())); |
47 return tagName; | 44 return tagName; |
48 #endif | |
49 } | 45 } |
50 | 46 |
51 PassRefPtr<HTMLContentElement> HTMLContentElement::create(Document* document) | 47 PassRefPtr<HTMLContentElement> HTMLContentElement::create(Document* document) |
52 { | 48 { |
53 return adoptRef(new HTMLContentElement(contentTagName(), document)); | 49 return adoptRef(new HTMLContentElement(contentTagName(), document)); |
54 } | 50 } |
55 | 51 |
56 PassRefPtr<HTMLContentElement> HTMLContentElement::create(const QualifiedName& t
agName, Document* document) | 52 PassRefPtr<HTMLContentElement> HTMLContentElement::create(const QualifiedName& t
agName, Document* document) |
57 { | 53 { |
58 return adoptRef(new HTMLContentElement(tagName, document)); | 54 return adoptRef(new HTMLContentElement(tagName, document)); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ContentSelectorQuery query(this); | 106 ContentSelectorQuery query(this); |
111 return query.isValidSelector(); | 107 return query.isValidSelector(); |
112 } | 108 } |
113 | 109 |
114 void HTMLContentElement::setSelect(const AtomicString& selectValue) | 110 void HTMLContentElement::setSelect(const AtomicString& selectValue) |
115 { | 111 { |
116 setAttribute(selectAttr, selectValue); | 112 setAttribute(selectAttr, selectValue); |
117 } | 113 } |
118 | 114 |
119 } | 115 } |
OLD | NEW |