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

Side by Side Diff: Source/core/html/shadow/HTMLShadowElement.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) 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
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(Document& document)
42 : InsertionPoint(tagName, document) 42 : InsertionPoint(HTMLNames::shadowTag, document)
43 { 43 {
44 ASSERT(hasTagName(HTMLNames::shadowTag));
45 ScriptWrappable::init(this); 44 ScriptWrappable::init(this);
46 } 45 }
47 46
48 PassRefPtr<HTMLShadowElement> HTMLShadowElement::create(const QualifiedName& tag Name, Document& document) 47 PassRefPtr<HTMLShadowElement> HTMLShadowElement::create(Document& document)
49 { 48 {
50 return adoptRef(new HTMLShadowElement(tagName, document)); 49 return adoptRef(new HTMLShadowElement(document));
51 } 50 }
52 51
53 HTMLShadowElement::~HTMLShadowElement() 52 HTMLShadowElement::~HTMLShadowElement()
54 { 53 {
55 } 54 }
56 55
57 ShadowRoot* HTMLShadowElement::olderShadowRoot() 56 ShadowRoot* HTMLShadowElement::olderShadowRoot()
58 { 57 {
59 ShadowRoot* containingRoot = containingShadowRoot(); 58 ShadowRoot* containingRoot = containingShadowRoot();
60 if (!containingRoot) 59 if (!containingRoot)
(...skipping 17 matching lines...) Expand all
78 if (root && root->olderShadowRoot() && root->type() != root->olderShadow Root()->type()) { 77 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()); 78 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); 79 document().addConsoleMessage(RenderingMessageSource, WarningMessageL evel, message);
81 } 80 }
82 } 81 }
83 return InsertionPoint::insertedInto(insertionPoint); 82 return InsertionPoint::insertedInto(insertionPoint);
84 } 83 }
85 84
86 } // namespace WebCore 85 } // namespace WebCore
87 86
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698