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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLMeterElement.cpp » ('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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void HTMLMetaElement::process() 70 void HTMLMetaElement::process()
71 { 71 {
72 if (!inDocument()) 72 if (!inDocument())
73 return; 73 return;
74 74
75 const AtomicString& contentValue = fastGetAttribute(contentAttr); 75 const AtomicString& contentValue = fastGetAttribute(contentAttr);
76 if (contentValue.isNull()) 76 if (contentValue.isNull())
77 return; 77 return;
78 78
79 if (equalIgnoringCase(name(), "viewport")) 79 if (equalIgnoringCase(name(), "viewport"))
80 document()->processViewport(contentValue, ViewportArguments::ViewportMet a); 80 document().processViewport(contentValue, ViewportArguments::ViewportMeta );
81 else if (equalIgnoringCase(name(), "referrer")) 81 else if (equalIgnoringCase(name(), "referrer"))
82 document()->processReferrerPolicy(contentValue); 82 document().processReferrerPolicy(contentValue);
83 else if (equalIgnoringCase(name(), "handheldfriendly") && equalIgnoringCase( contentValue, "true")) 83 else if (equalIgnoringCase(name(), "handheldfriendly") && equalIgnoringCase( contentValue, "true"))
84 document()->processViewport("width=device-width", ViewportArguments::Han dheldFriendlyMeta); 84 document().processViewport("width=device-width", ViewportArguments::Hand heldFriendlyMeta);
85 else if (equalIgnoringCase(name(), "mobileoptimized")) 85 else if (equalIgnoringCase(name(), "mobileoptimized"))
86 document()->processViewport("width=device-width, initial-scale=1", Viewp ortArguments::MobileOptimizedMeta); 86 document().processViewport("width=device-width, initial-scale=1", Viewpo rtArguments::MobileOptimizedMeta);
87 87
88 // Get the document to process the tag, but only if we're actually part of D OM tree (changing a meta tag while 88 // Get the document to process the tag, but only if we're actually part of D OM tree (changing a meta tag while
89 // it's not in the tree shouldn't have any effect on the document) 89 // it's not in the tree shouldn't have any effect on the document)
90 const AtomicString& httpEquivValue = fastGetAttribute(http_equivAttr); 90 const AtomicString& httpEquivValue = fastGetAttribute(http_equivAttr);
91 if (!httpEquivValue.isNull()) 91 if (!httpEquivValue.isNull())
92 document()->processHttpEquiv(httpEquivValue, contentValue); 92 document().processHttpEquiv(httpEquivValue, contentValue);
93 } 93 }
94 94
95 String HTMLMetaElement::content() const 95 String HTMLMetaElement::content() const
96 { 96 {
97 return getAttribute(contentAttr); 97 return getAttribute(contentAttr);
98 } 98 }
99 99
100 String HTMLMetaElement::httpEquiv() const 100 String HTMLMetaElement::httpEquiv() const
101 { 101 {
102 return getAttribute(http_equivAttr); 102 return getAttribute(http_equivAttr);
103 } 103 }
104 104
105 String HTMLMetaElement::name() const 105 String HTMLMetaElement::name() const
106 { 106 {
107 return getNameAttribute(); 107 return getNameAttribute();
108 } 108 }
109 109
110 } 110 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLMeterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698