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

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

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « Source/core/html/HTMLDocument.h ('k') | Source/core/html/HTMLFormControlElement.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 * 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 : Document(initializer, HTMLDocumentClass | extendedDocumentClasses) 72 : Document(initializer, HTMLDocumentClass | extendedDocumentClasses)
73 { 73 {
74 ScriptWrappable::init(this); 74 ScriptWrappable::init(this);
75 clearXMLVersion(); 75 clearXMLVersion();
76 } 76 }
77 77
78 HTMLDocument::~HTMLDocument() 78 HTMLDocument::~HTMLDocument()
79 { 79 {
80 } 80 }
81 81
82 String HTMLDocument::dir() 82 const AtomicString& HTMLDocument::dir()
83 { 83 {
84 HTMLElement* b = body(); 84 HTMLElement* b = body();
85 if (!b) 85 if (!b)
86 return String(); 86 return nullAtom;
87 return b->getAttribute(dirAttr); 87 return b->getAttribute(dirAttr);
88 } 88 }
89 89
90 void HTMLDocument::setDir(const String& value) 90 void HTMLDocument::setDir(const AtomicString& value)
91 { 91 {
92 HTMLElement* b = body(); 92 HTMLElement* b = body();
93 if (b) 93 if (b)
94 b->setAttribute(dirAttr, value); 94 b->setAttribute(dirAttr, value);
95 } 95 }
96 96
97 String HTMLDocument::designMode() const 97 String HTMLDocument::designMode() const
98 { 98 {
99 return inDesignMode() ? "on" : "off"; 99 return inDesignMode() ? "on" : "off";
100 } 100 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 void HTMLDocument::writeln(DOMWindow* activeWindow, const Vector<String>& text) 340 void HTMLDocument::writeln(DOMWindow* activeWindow, const Vector<String>& text)
341 { 341 {
342 ASSERT(activeWindow); 342 ASSERT(activeWindow);
343 StringBuilder builder; 343 StringBuilder builder;
344 for (size_t i = 0; i < text.size(); ++i) 344 for (size_t i = 0; i < text.size(); ++i)
345 builder.append(text[i]); 345 builder.append(text[i]);
346 writeln(builder.toString(), activeWindow->document()); 346 writeln(builder.toString(), activeWindow->document());
347 } 347 }
348 348
349 } 349 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDocument.h ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698