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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 void HTMLStyleElement::parseAttribute(const QualifiedName& name, | 52 void HTMLStyleElement::parseAttribute(const QualifiedName& name, |
53 const AtomicString& oldValue, | 53 const AtomicString& oldValue, |
54 const AtomicString& value) { | 54 const AtomicString& value) { |
55 if (name == titleAttr && m_sheet && isInDocumentTree()) { | 55 if (name == titleAttr && m_sheet && isInDocumentTree()) { |
56 m_sheet->setTitle(value); | 56 m_sheet->setTitle(value); |
57 } else if (name == mediaAttr && isConnected() && document().isActive() && | 57 } else if (name == mediaAttr && isConnected() && document().isActive() && |
58 m_sheet) { | 58 m_sheet) { |
59 m_sheet->setMediaQueries(MediaQuerySet::create(value)); | 59 m_sheet->setMediaQueries(MediaQuerySet::create(value)); |
60 document().styleEngine().setNeedsActiveStyleUpdate(m_sheet.get(), | 60 document().styleEngine().setNeedsActiveStyleUpdate(treeScope()); |
61 FullStyleUpdate); | 61 // TODO(rune@opera.com): resolverChanged() can be removed once stylesheet |
| 62 // updates are async. https://crbug.com/567021 |
| 63 document().styleEngine().resolverChanged(FullStyleUpdate); |
62 } else { | 64 } else { |
63 HTMLElement::parseAttribute(name, oldValue, value); | 65 HTMLElement::parseAttribute(name, oldValue, value); |
64 } | 66 } |
65 } | 67 } |
66 | 68 |
67 void HTMLStyleElement::finishParsingChildren() { | 69 void HTMLStyleElement::finishParsingChildren() { |
68 StyleElement::ProcessingResult result = | 70 StyleElement::ProcessingResult result = |
69 StyleElement::finishParsingChildren(*this); | 71 StyleElement::finishParsingChildren(*this); |
70 HTMLElement::finishParsingChildren(); | 72 HTMLElement::finishParsingChildren(); |
71 if (result == StyleElement::ProcessingFatalError) | 73 if (result == StyleElement::ProcessingFatalError) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 if (CSSStyleSheet* styleSheet = sheet()) | 141 if (CSSStyleSheet* styleSheet = sheet()) |
140 styleSheet->setDisabled(setDisabled); | 142 styleSheet->setDisabled(setDisabled); |
141 } | 143 } |
142 | 144 |
143 DEFINE_TRACE(HTMLStyleElement) { | 145 DEFINE_TRACE(HTMLStyleElement) { |
144 StyleElement::trace(visitor); | 146 StyleElement::trace(visitor); |
145 HTMLElement::trace(visitor); | 147 HTMLElement::trace(visitor); |
146 } | 148 } |
147 | 149 |
148 } // namespace blink | 150 } // namespace blink |
OLD | NEW |