OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class Document; | 39 class Document; |
40 | 40 |
41 inline HTMLShadowElement::HTMLShadowElement(Document& document) | 41 inline HTMLShadowElement::HTMLShadowElement(Document& document) |
42 : InsertionPoint(HTMLNames::shadowTag, document) | 42 : InsertionPoint(HTMLNames::shadowTag, document) |
43 { | 43 { |
44 ScriptWrappable::init(this); | 44 ScriptWrappable::init(this); |
45 } | 45 } |
46 | 46 |
47 PassRefPtrWillBeRawPtr<HTMLShadowElement> HTMLShadowElement::create(Document& do
cument) | 47 DEFINE_NODE_FACTORY(HTMLShadowElement) |
48 { | |
49 return adoptRefWillBeRefCountedGarbageCollected(new HTMLShadowElement(docume
nt)); | |
50 } | |
51 | 48 |
52 HTMLShadowElement::~HTMLShadowElement() | 49 HTMLShadowElement::~HTMLShadowElement() |
53 { | 50 { |
54 } | 51 } |
55 | 52 |
56 ShadowRoot* HTMLShadowElement::olderShadowRoot() | 53 ShadowRoot* HTMLShadowElement::olderShadowRoot() |
57 { | 54 { |
58 ShadowRoot* containingRoot = containingShadowRoot(); | 55 ShadowRoot* containingRoot = containingShadowRoot(); |
59 if (!containingRoot) | 56 if (!containingRoot) |
60 return 0; | 57 return 0; |
(...skipping 16 matching lines...) Expand all Loading... |
77 if (root && root->olderShadowRoot() && root->type() != root->olderShadow
Root()->type()) { | 74 if (root && root->olderShadowRoot() && root->type() != root->olderShadow
Root()->type()) { |
78 String message = String::format("<shadow> doesn't work for %s elemen
t host.", root->host()->tagName().utf8().data()); | 75 String message = String::format("<shadow> doesn't work for %s elemen
t host.", root->host()->tagName().utf8().data()); |
79 document().addConsoleMessage(RenderingMessageSource, WarningMessageL
evel, message); | 76 document().addConsoleMessage(RenderingMessageSource, WarningMessageL
evel, message); |
80 } | 77 } |
81 } | 78 } |
82 return InsertionPoint::insertedInto(insertionPoint); | 79 return InsertionPoint::insertedInto(insertionPoint); |
83 } | 80 } |
84 | 81 |
85 } // namespace WebCore | 82 } // namespace WebCore |
86 | 83 |
OLD | NEW |