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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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/HTMLEmbedElement.h ('k') | Source/core/html/HTMLFieldSetElement.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 22 matching lines...) Expand all
33 #include "core/html/parser/HTMLParserIdioms.h" 33 #include "core/html/parser/HTMLParserIdioms.h"
34 #include "core/loader/FrameLoader.h" 34 #include "core/loader/FrameLoader.h"
35 #include "core/page/Frame.h" 35 #include "core/page/Frame.h"
36 #include "core/rendering/RenderEmbeddedObject.h" 36 #include "core/rendering/RenderEmbeddedObject.h"
37 #include "core/rendering/RenderWidget.h" 37 #include "core/rendering/RenderWidget.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 using namespace HTMLNames; 41 using namespace HTMLNames;
42 42
43 inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document * document, bool createdByParser) 43 inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document & document, bool createdByParser)
44 : HTMLPlugInImageElement(tagName, document, createdByParser, ShouldPreferPlu gInsForImages) 44 : HTMLPlugInImageElement(tagName, document, createdByParser, ShouldPreferPlu gInsForImages)
45 { 45 {
46 ASSERT(hasTagName(embedTag)); 46 ASSERT(hasTagName(embedTag));
47 ScriptWrappable::init(this); 47 ScriptWrappable::init(this);
48 } 48 }
49 49
50 PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(const QualifiedName& tagNa me, Document* document, bool createdByParser) 50 PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(const QualifiedName& tagNa me, Document& document, bool createdByParser)
51 { 51 {
52 return adoptRef(new HTMLEmbedElement(tagName, document, createdByParser)); 52 return adoptRef(new HTMLEmbedElement(tagName, document, createdByParser));
53 } 53 }
54 54
55 PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(Document* document) 55 PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(Document& document)
56 { 56 {
57 return create(embedTag, document, false); 57 return create(embedTag, document, false);
58 } 58 }
59 59
60 static inline RenderWidget* findWidgetRenderer(const Node* n) 60 static inline RenderWidget* findWidgetRenderer(const Node* n)
61 { 61 {
62 if (!n->renderer()) 62 if (!n->renderer())
63 do 63 do
64 n = n->parentNode(); 64 n = n->parentNode();
65 while (n && !n->hasTagName(objectTag)); 65 while (n && !n->hasTagName(objectTag));
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 207
208 void HTMLEmbedElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons t 208 void HTMLEmbedElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons t
209 { 209 {
210 HTMLPlugInImageElement::addSubresourceAttributeURLs(urls); 210 HTMLPlugInImageElement::addSubresourceAttributeURLs(urls);
211 211
212 addSubresourceURL(urls, document().completeURL(getAttribute(srcAttr))); 212 addSubresourceURL(urls, document().completeURL(getAttribute(srcAttr)));
213 } 213 }
214 214
215 } 215 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLEmbedElement.h ('k') | Source/core/html/HTMLFieldSetElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698