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

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

Issue 198553002: Use new is*Element() helper functions even more in HTML code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLElement.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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 else if (equalIgnoringCase(value, "off")) 107 else if (equalIgnoringCase(value, "off"))
108 mode = off; 108 mode = off;
109 else 109 else
110 mode = inherit; 110 mode = inherit;
111 Document::setDesignMode(mode); 111 Document::setDesignMode(mode);
112 } 112 }
113 113
114 HTMLBodyElement* HTMLDocument::htmlBodyElement() const 114 HTMLBodyElement* HTMLDocument::htmlBodyElement() const
115 { 115 {
116 HTMLElement* body = this->body(); 116 HTMLElement* body = this->body();
117 return (body && body->hasTagName(bodyTag)) ? toHTMLBodyElement(body) : 0; 117 return isHTMLBodyElement(body) ? toHTMLBodyElement(body) : 0;
118 } 118 }
119 119
120 const AtomicString& HTMLDocument::bodyAttributeValue(const QualifiedName& name) const 120 const AtomicString& HTMLDocument::bodyAttributeValue(const QualifiedName& name) const
121 { 121 {
122 if (HTMLBodyElement* body = htmlBodyElement()) 122 if (HTMLBodyElement* body = htmlBodyElement())
123 return body->fastGetAttribute(name); 123 return body->fastGetAttribute(name);
124 return nullAtom; 124 return nullAtom;
125 } 125 }
126 126
127 void HTMLDocument::setBodyAttribute(const QualifiedName& name, const AtomicStrin g& value) 127 void HTMLDocument::setBodyAttribute(const QualifiedName& name, const AtomicStrin g& value)
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 void HTMLDocument::writeln(DOMWindow* callingWindow, const Vector<String>& text) 312 void HTMLDocument::writeln(DOMWindow* callingWindow, const Vector<String>& text)
313 { 313 {
314 ASSERT(callingWindow); 314 ASSERT(callingWindow);
315 StringBuilder builder; 315 StringBuilder builder;
316 for (size_t i = 0; i < text.size(); ++i) 316 for (size_t i = 0; i < text.size(); ++i)
317 builder.append(text[i]); 317 builder.append(text[i]);
318 writeln(builder.toString(), callingWindow->document()); 318 writeln(builder.toString(), callingWindow->document());
319 } 319 }
320 320
321 } 321 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698