| 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 const AtomicString& HTMLDocument::dir() | |
| 83 { | |
| 84 HTMLElement* b = body(); | |
| 85 if (!b) | |
| 86 return nullAtom; | |
| 87 return b->getAttribute(dirAttr); | |
| 88 } | |
| 89 | |
| 90 void HTMLDocument::setDir(const AtomicString& value) | |
| 91 { | |
| 92 HTMLElement* b = body(); | |
| 93 if (b) | |
| 94 b->setAttribute(dirAttr, value); | |
| 95 } | |
| 96 | |
| 97 String HTMLDocument::designMode() const | 82 String HTMLDocument::designMode() const |
| 98 { | 83 { |
| 99 return inDesignMode() ? "on" : "off"; | 84 return inDesignMode() ? "on" : "off"; |
| 100 } | 85 } |
| 101 | 86 |
| 102 void HTMLDocument::setDesignMode(const String& value) | 87 void HTMLDocument::setDesignMode(const String& value) |
| 103 { | 88 { |
| 104 InheritedBool mode; | 89 InheritedBool mode; |
| 105 if (equalIgnoringCase(value, "on")) | 90 if (equalIgnoringCase(value, "on")) |
| 106 mode = on; | 91 mode = on; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 void HTMLDocument::writeln(DOMWindow* callingWindow, const Vector<String>& text) | 297 void HTMLDocument::writeln(DOMWindow* callingWindow, const Vector<String>& text) |
| 313 { | 298 { |
| 314 ASSERT(callingWindow); | 299 ASSERT(callingWindow); |
| 315 StringBuilder builder; | 300 StringBuilder builder; |
| 316 for (size_t i = 0; i < text.size(); ++i) | 301 for (size_t i = 0; i < text.size(); ++i) |
| 317 builder.append(text[i]); | 302 builder.append(text[i]); |
| 318 writeln(builder.toString(), callingWindow->document()); | 303 writeln(builder.toString(), callingWindow->document()); |
| 319 } | 304 } |
| 320 | 305 |
| 321 } | 306 } |
| OLD | NEW |