| 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 * (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 * (C) 2007 Rob Buis (buis@kde.org) | 6 * (C) 2007 Rob Buis (buis@kde.org) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 inline HTMLStyleElement::HTMLStyleElement(const QualifiedName& tagName, Document
* document, bool createdByParser) | 38 inline HTMLStyleElement::HTMLStyleElement(const QualifiedName& tagName, Document
* document, bool createdByParser) |
| 39 : HTMLElement(tagName, document) | 39 : HTMLElement(tagName, document) |
| 40 , StyleElement(document, createdByParser) | 40 , StyleElement(document, createdByParser) |
| 41 { | 41 { |
| 42 ASSERT(hasTagName(styleTag)); | 42 ASSERT(hasTagName(styleTag)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 HTMLStyleElement::~HTMLStyleElement() | 45 HTMLStyleElement::~HTMLStyleElement() |
| 46 { | 46 { |
| 47 if (m_sheet) | 47 StyleElement::clearDocumentData(document(), this); |
| 48 m_sheet->clearOwnerNode(); | |
| 49 } | 48 } |
| 50 | 49 |
| 51 PassRefPtr<HTMLStyleElement> HTMLStyleElement::create(const QualifiedName& tagNa
me, Document* document, bool createdByParser) | 50 PassRefPtr<HTMLStyleElement> HTMLStyleElement::create(const QualifiedName& tagNa
me, Document* document, bool createdByParser) |
| 52 { | 51 { |
| 53 return adoptRef(new HTMLStyleElement(tagName, document, createdByParser)); | 52 return adoptRef(new HTMLStyleElement(tagName, document, createdByParser)); |
| 54 } | 53 } |
| 55 | 54 |
| 56 void HTMLStyleElement::parseMappedAttribute(Attribute* attr) | 55 void HTMLStyleElement::parseMappedAttribute(Attribute* attr) |
| 57 { | 56 { |
| 58 if (attr->name() == titleAttr && m_sheet) | 57 if (attr->name() == titleAttr && m_sheet) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 return styleSheet->disabled(); | 113 return styleSheet->disabled(); |
| 115 } | 114 } |
| 116 | 115 |
| 117 void HTMLStyleElement::setDisabled(bool setDisabled) | 116 void HTMLStyleElement::setDisabled(bool setDisabled) |
| 118 { | 117 { |
| 119 if (StyleSheet* styleSheet = sheet()) | 118 if (StyleSheet* styleSheet = sheet()) |
| 120 styleSheet->setDisabled(setDisabled); | 119 styleSheet->setDisabled(setDisabled); |
| 121 } | 120 } |
| 122 | 121 |
| 123 } | 122 } |
| OLD | NEW |