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

Side by Side Diff: Source/core/html/HTMLHtmlElement.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) 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 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2010 Apple Inc. All rights reserved.
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 18 matching lines...) Expand all
29 #include "core/dom/DocumentParser.h" 29 #include "core/dom/DocumentParser.h"
30 #include "core/loader/DocumentLoader.h" 30 #include "core/loader/DocumentLoader.h"
31 #include "core/loader/FrameLoader.h" 31 #include "core/loader/FrameLoader.h"
32 #include "core/loader/appcache/ApplicationCacheHost.h" 32 #include "core/loader/appcache/ApplicationCacheHost.h"
33 #include "core/frame/Frame.h" 33 #include "core/frame/Frame.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 using namespace HTMLNames; 37 using namespace HTMLNames;
38 38
39 HTMLHtmlElement::HTMLHtmlElement(const QualifiedName& tagName, Document& documen t) 39 HTMLHtmlElement::HTMLHtmlElement(Document& document)
40 : HTMLElement(tagName, document) 40 : HTMLElement(htmlTag, document)
41 { 41 {
42 ASSERT(hasTagName(htmlTag));
43 ScriptWrappable::init(this); 42 ScriptWrappable::init(this);
44 } 43 }
45 44
46 PassRefPtr<HTMLHtmlElement> HTMLHtmlElement::create(Document& document) 45 PassRefPtr<HTMLHtmlElement> HTMLHtmlElement::create(Document& document)
47 { 46 {
48 return adoptRef(new HTMLHtmlElement(htmlTag, document)); 47 return adoptRef(new HTMLHtmlElement(document));
49 }
50
51 PassRefPtr<HTMLHtmlElement> HTMLHtmlElement::create(const QualifiedName& tagName , Document& document)
52 {
53 return adoptRef(new HTMLHtmlElement(tagName, document));
54 } 48 }
55 49
56 bool HTMLHtmlElement::isURLAttribute(const Attribute& attribute) const 50 bool HTMLHtmlElement::isURLAttribute(const Attribute& attribute) const
57 { 51 {
58 return attribute.name() == manifestAttr || HTMLElement::isURLAttribute(attri bute); 52 return attribute.name() == manifestAttr || HTMLElement::isURLAttribute(attri bute);
59 } 53 }
60 54
61 void HTMLHtmlElement::insertedByParser() 55 void HTMLHtmlElement::insertedByParser()
62 { 56 {
63 // When parsing a fragment, its dummy document has a null parser. 57 // When parsing a fragment, its dummy document has a null parser.
64 if (!document().parser() || !document().parser()->documentWasLoadedAsPartOfN avigation()) 58 if (!document().parser() || !document().parser()->documentWasLoadedAsPartOfN avigation())
65 return; 59 return;
66 60
67 if (!document().frame()) 61 if (!document().frame())
68 return; 62 return;
69 63
70 DocumentLoader* documentLoader = document().frame()->loader().documentLoader (); 64 DocumentLoader* documentLoader = document().frame()->loader().documentLoader ();
71 if (!documentLoader) 65 if (!documentLoader)
72 return; 66 return;
73 67
74 const AtomicString& manifest = getAttribute(manifestAttr); 68 const AtomicString& manifest = getAttribute(manifestAttr);
75 if (manifest.isEmpty()) 69 if (manifest.isEmpty())
76 documentLoader->applicationCacheHost()->selectCacheWithoutManifest(); 70 documentLoader->applicationCacheHost()->selectCacheWithoutManifest();
77 else 71 else
78 documentLoader->applicationCacheHost()->selectCacheWithManifest(document ().completeURL(manifest)); 72 documentLoader->applicationCacheHost()->selectCacheWithManifest(document ().completeURL(manifest));
79 } 73 }
80 74
81 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698