| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } else if (name == mediaAttr && inDocument() && document().isActive() && m_s
heet) { | 70 } else if (name == mediaAttr && inDocument() && document().isActive() && m_s
heet) { |
| 71 m_sheet->setMediaQueries(MediaQuerySet::create(value)); | 71 m_sheet->setMediaQueries(MediaQuerySet::create(value)); |
| 72 document().modifiedStyleSheet(m_sheet.get()); | 72 document().modifiedStyleSheet(m_sheet.get()); |
| 73 } else { | 73 } else { |
| 74 HTMLElement::parseAttribute(name, value); | 74 HTMLElement::parseAttribute(name, value); |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 void HTMLStyleElement::finishParsingChildren() | 78 void HTMLStyleElement::finishParsingChildren() |
| 79 { | 79 { |
| 80 StyleElement::finishParsingChildren(this); | 80 StyleElement::ProcessingResult result = StyleElement::finishParsingChildren(
this); |
| 81 HTMLElement::finishParsingChildren(); | 81 HTMLElement::finishParsingChildren(); |
| 82 if (result == StyleElement::ProcessingFatalError) |
| 83 notifyLoadedSheetAndAllCriticalSubresources(true); |
| 82 } | 84 } |
| 83 | 85 |
| 84 Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode*
insertionPoint) | 86 Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode*
insertionPoint) |
| 85 { | 87 { |
| 86 HTMLElement::insertedInto(insertionPoint); | 88 HTMLElement::insertedInto(insertionPoint); |
| 87 StyleElement::insertedInto(this, insertionPoint); | 89 StyleElement::insertedInto(this, insertionPoint); |
| 88 return InsertionShouldCallDidNotifySubtreeInsertions; | 90 return InsertionShouldCallDidNotifySubtreeInsertions; |
| 89 } | 91 } |
| 90 | 92 |
| 91 void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint) | 93 void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint) |
| 92 { | 94 { |
| 93 HTMLElement::removedFrom(insertionPoint); | 95 HTMLElement::removedFrom(insertionPoint); |
| 94 StyleElement::removedFrom(this, insertionPoint); | 96 StyleElement::removedFrom(this, insertionPoint); |
| 95 } | 97 } |
| 96 | 98 |
| 97 void HTMLStyleElement::didNotifySubtreeInsertionsToDocument() | 99 void HTMLStyleElement::didNotifySubtreeInsertionsToDocument() |
| 98 { | 100 { |
| 99 StyleElement::processStyleSheet(document(), this); | 101 if (StyleElement::processStyleSheet(document(), this) == StyleElement::Proce
ssingFatalError) |
| 102 notifyLoadedSheetAndAllCriticalSubresources(true); |
| 100 } | 103 } |
| 101 | 104 |
| 102 void HTMLStyleElement::childrenChanged(const ChildrenChange& change) | 105 void HTMLStyleElement::childrenChanged(const ChildrenChange& change) |
| 103 { | 106 { |
| 104 HTMLElement::childrenChanged(change); | 107 HTMLElement::childrenChanged(change); |
| 105 StyleElement::childrenChanged(this); | 108 if (StyleElement::childrenChanged(this) == StyleElement::ProcessingFatalErro
r) |
| 109 notifyLoadedSheetAndAllCriticalSubresources(true); |
| 106 } | 110 } |
| 107 | 111 |
| 108 const AtomicString& HTMLStyleElement::media() const | 112 const AtomicString& HTMLStyleElement::media() const |
| 109 { | 113 { |
| 110 return getAttribute(mediaAttr); | 114 return getAttribute(mediaAttr); |
| 111 } | 115 } |
| 112 | 116 |
| 113 const AtomicString& HTMLStyleElement::type() const | 117 const AtomicString& HTMLStyleElement::type() const |
| 114 { | 118 { |
| 115 return getAttribute(typeAttr); | 119 return getAttribute(typeAttr); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 styleSheet->setDisabled(setDisabled); | 164 styleSheet->setDisabled(setDisabled); |
| 161 } | 165 } |
| 162 | 166 |
| 163 DEFINE_TRACE(HTMLStyleElement) | 167 DEFINE_TRACE(HTMLStyleElement) |
| 164 { | 168 { |
| 165 StyleElement::trace(visitor); | 169 StyleElement::trace(visitor); |
| 166 HTMLElement::trace(visitor); | 170 HTMLElement::trace(visitor); |
| 167 } | 171 } |
| 168 | 172 |
| 169 } | 173 } |
| OLD | NEW |