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

Side by Side Diff: Source/core/html/HTMLShadowElement.cpp

Issue 327633004: Apply DEFINE/DECLARE_NODE_FACTORY(T) macro to element factories with single Document& argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « Source/core/html/HTMLShadowElement.h ('k') | Source/core/html/HTMLSourceElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLShadowElement.h ('k') | Source/core/html/HTMLSourceElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698