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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 document().styleEngine()->removeStyleSheetCandidateNode(this, parentNode()); | 118 document().styleEngine()->removeStyleSheetCandidateNode(this, parentNode()); |
119 unregisterWithScopingNode(parentNode()); | 119 unregisterWithScopingNode(parentNode()); |
120 | 120 |
121 // As any <style> in a shadow tree is treated as "scoped", | 121 // As any <style> in a shadow tree is treated as "scoped", |
122 // need to add the <style> to its shadow root. | 122 // need to add the <style> to its shadow root. |
123 if (isInShadowTree()) | 123 if (isInShadowTree()) |
124 registerWithScopingNode(false); | 124 registerWithScopingNode(false); |
125 | 125 |
126 document().styleEngine()->addStyleSheetCandidateNode(this, false); | 126 document().styleEngine()->addStyleSheetCandidateNode(this, false); |
| 127 // FIXME: currently need to use FullStyleUpdate here. |
| 128 // Because ShadowTreeStyleSheetCollection doesn't know old scoping node. |
| 129 // So setNeedsStyleRecalc for old scoping node is not invoked. |
127 document().modifiedStyleSheet(sheet()); | 130 document().modifiedStyleSheet(sheet()); |
128 } | 131 } |
129 | 132 |
130 void HTMLStyleElement::finishParsingChildren() | 133 void HTMLStyleElement::finishParsingChildren() |
131 { | 134 { |
132 StyleElement::finishParsingChildren(this); | 135 StyleElement::finishParsingChildren(this); |
133 HTMLElement::finishParsingChildren(); | 136 HTMLElement::finishParsingChildren(); |
134 } | 137 } |
135 | 138 |
136 void HTMLStyleElement::registerWithScopingNode(bool scoped) | 139 void HTMLStyleElement::registerWithScopingNode(bool scoped) |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 return m_sheet->disabled(); | 287 return m_sheet->disabled(); |
285 } | 288 } |
286 | 289 |
287 void HTMLStyleElement::setDisabled(bool setDisabled) | 290 void HTMLStyleElement::setDisabled(bool setDisabled) |
288 { | 291 { |
289 if (CSSStyleSheet* styleSheet = sheet()) | 292 if (CSSStyleSheet* styleSheet = sheet()) |
290 styleSheet->setDisabled(setDisabled); | 293 styleSheet->setDisabled(setDisabled); |
291 } | 294 } |
292 | 295 |
293 } | 296 } |
OLD | NEW |