| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 , m_scopedStyleRegistrationState(NotRegistered) | 52 , m_scopedStyleRegistrationState(NotRegistered) |
| 53 { | 53 { |
| 54 ASSERT(hasTagName(styleTag)); | 54 ASSERT(hasTagName(styleTag)); |
| 55 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
| 56 } | 56 } |
| 57 | 57 |
| 58 HTMLStyleElement::~HTMLStyleElement() | 58 HTMLStyleElement::~HTMLStyleElement() |
| 59 { | 59 { |
| 60 // During tear-down, willRemove isn't called, so m_scopedStyleRegistrationSt
ate may still be RegisteredAsScoped or RegisteredInShadowRoot here. | 60 // During tear-down, willRemove isn't called, so m_scopedStyleRegistrationSt
ate may still be RegisteredAsScoped or RegisteredInShadowRoot here. |
| 61 // Therefore we can't ASSERT(m_scopedStyleRegistrationState == NotRegistered
). | 61 // Therefore we can't ASSERT(m_scopedStyleRegistrationState == NotRegistered
). |
| 62 StyleElement::clearDocumentData(&document(), this); | 62 StyleElement::clearDocumentData(document(), this); |
| 63 | 63 |
| 64 styleLoadEventSender().cancelEvent(this); | 64 styleLoadEventSender().cancelEvent(this); |
| 65 } | 65 } |
| 66 | 66 |
| 67 PassRefPtr<HTMLStyleElement> HTMLStyleElement::create(const QualifiedName& tagNa
me, Document* document, bool createdByParser) | 67 PassRefPtr<HTMLStyleElement> HTMLStyleElement::create(const QualifiedName& tagNa
me, Document* document, bool createdByParser) |
| 68 { | 68 { |
| 69 return adoptRef(new HTMLStyleElement(tagName, document, createdByParser)); | 69 return adoptRef(new HTMLStyleElement(tagName, document, createdByParser)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) | 72 void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 if (m_scopedStyleRegistrationState == RegisteredInShadowRoot) { | 195 if (m_scopedStyleRegistrationState == RegisteredInShadowRoot) { |
| 196 scope = containingShadowRoot(); | 196 scope = containingShadowRoot(); |
| 197 if (!scope) | 197 if (!scope) |
| 198 scope = insertionPoint->containingShadowRoot(); | 198 scope = insertionPoint->containingShadowRoot(); |
| 199 } else | 199 } else |
| 200 scope = parentNode() ? parentNode() : insertionPoint; | 200 scope = parentNode() ? parentNode() : insertionPoint; |
| 201 unregisterWithScopingNode(scope); | 201 unregisterWithScopingNode(scope); |
| 202 } | 202 } |
| 203 | 203 |
| 204 if (insertionPoint->inDocument()) | 204 if (insertionPoint->inDocument()) |
| 205 StyleElement::removedFromDocument(&document(), this, scope); | 205 StyleElement::removedFromDocument(document(), this, scope); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void HTMLStyleElement::didNotifySubtreeInsertions(ContainerNode* insertionPoint) | 208 void HTMLStyleElement::didNotifySubtreeInsertions(ContainerNode* insertionPoint) |
| 209 { | 209 { |
| 210 StyleElement::processStyleSheet(&document(), this); | 210 StyleElement::processStyleSheet(document(), this); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void HTMLStyleElement::childrenChanged(bool changedByParser, Node* beforeChange,
Node* afterChange, int childCountDelta) | 213 void HTMLStyleElement::childrenChanged(bool changedByParser, Node* beforeChange,
Node* afterChange, int childCountDelta) |
| 214 { | 214 { |
| 215 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi
ldCountDelta); | 215 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi
ldCountDelta); |
| 216 StyleElement::childrenChanged(this); | 216 StyleElement::childrenChanged(this); |
| 217 } | 217 } |
| 218 | 218 |
| 219 const AtomicString& HTMLStyleElement::media() const | 219 const AtomicString& HTMLStyleElement::media() const |
| 220 { | 220 { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 return m_sheet->disabled(); | 286 return m_sheet->disabled(); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void HTMLStyleElement::setDisabled(bool setDisabled) | 289 void HTMLStyleElement::setDisabled(bool setDisabled) |
| 290 { | 290 { |
| 291 if (CSSStyleSheet* styleSheet = sheet()) | 291 if (CSSStyleSheet* styleSheet = sheet()) |
| 292 styleSheet->setDisabled(setDisabled); | 292 styleSheet->setDisabled(setDisabled); |
| 293 } | 293 } |
| 294 | 294 |
| 295 } | 295 } |
| OLD | NEW |