OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |