| 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 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/html/shadow/HTMLShadowElement.h" | 32 #include "core/html/shadow/HTMLShadowElement.h" |
| 33 | 33 |
| 34 #include "HTMLNames.h" | 34 #include "HTMLNames.h" |
| 35 #include "core/dom/shadow/ShadowRoot.h" | 35 #include "core/dom/shadow/ShadowRoot.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 class Document; | 39 class Document; |
| 40 | 40 |
| 41 inline HTMLShadowElement::HTMLShadowElement(const QualifiedName& tagName, Docume
nt* document) | 41 inline HTMLShadowElement::HTMLShadowElement(const QualifiedName& tagName, Docume
nt& document) |
| 42 : InsertionPoint(tagName, document) | 42 : InsertionPoint(tagName, document) |
| 43 { | 43 { |
| 44 ASSERT(hasTagName(HTMLNames::shadowTag)); | 44 ASSERT(hasTagName(HTMLNames::shadowTag)); |
| 45 ScriptWrappable::init(this); | 45 ScriptWrappable::init(this); |
| 46 } | 46 } |
| 47 | 47 |
| 48 PassRefPtr<HTMLShadowElement> HTMLShadowElement::create(const QualifiedName& tag
Name, Document* document) | 48 PassRefPtr<HTMLShadowElement> HTMLShadowElement::create(const QualifiedName& tag
Name, Document& document) |
| 49 { | 49 { |
| 50 return adoptRef(new HTMLShadowElement(tagName, document)); | 50 return adoptRef(new HTMLShadowElement(tagName, document)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 HTMLShadowElement::~HTMLShadowElement() | 53 HTMLShadowElement::~HTMLShadowElement() |
| 54 { | 54 { |
| 55 } | 55 } |
| 56 | 56 |
| 57 ShadowRoot* HTMLShadowElement::olderShadowRoot() | 57 ShadowRoot* HTMLShadowElement::olderShadowRoot() |
| 58 { | 58 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 78 if (root && root->olderShadowRoot() && root->type() != root->olderShadow
Root()->type()) { | 78 if (root && root->olderShadowRoot() && root->type() != root->olderShadow
Root()->type()) { |
| 79 String message = String::format("<shadow> doesn't work for %s elemen
t host.", root->host()->tagName().utf8().data()); | 79 String message = String::format("<shadow> doesn't work for %s elemen
t host.", root->host()->tagName().utf8().data()); |
| 80 document().addConsoleMessage(RenderingMessageSource, WarningMessageL
evel, message); | 80 document().addConsoleMessage(RenderingMessageSource, WarningMessageL
evel, message); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 return InsertionPoint::insertedInto(insertionPoint); | 83 return InsertionPoint::insertedInto(insertionPoint); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace WebCore | 86 } // namespace WebCore |
| 87 | 87 |
| OLD | NEW |