| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Rob Buis | 2 * Copyright (C) 2006, 2007 Rob Buis |
| 3 * Copyright (C) 2008 Apple, Inc. All rights reserved. | 3 * Copyright (C) 2008 Apple, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 if (!insertionPoint->isConnected()) | 75 if (!insertionPoint->isConnected()) |
| 76 return; | 76 return; |
| 77 | 77 |
| 78 Document& document = element.document(); | 78 Document& document = element.document(); |
| 79 if (m_registeredAsCandidate) { | 79 if (m_registeredAsCandidate) { |
| 80 document.styleEngine().removeStyleSheetCandidateNode(element, | 80 document.styleEngine().removeStyleSheetCandidateNode(element, |
| 81 *insertionPoint); | 81 *insertionPoint); |
| 82 m_registeredAsCandidate = false; | 82 m_registeredAsCandidate = false; |
| 83 } | 83 } |
| 84 | 84 |
| 85 StyleSheet* removedSheet = m_sheet.get(); | 85 if (m_sheet) { |
| 86 | |
| 87 if (m_sheet) | |
| 88 clearSheet(element); | 86 clearSheet(element); |
| 89 if (removedSheet) | 87 if (element.isConnected()) { |
| 90 document.styleEngine().setNeedsActiveStyleUpdate(removedSheet, | 88 // TODO(rune@opera.com): resolverChanged() can be removed once stylesheet |
| 91 AnalyzedStyleUpdate); | 89 // updates are async. https://crbug.com/567021 |
| 90 document.styleEngine().resolverChanged(AnalyzedStyleUpdate); |
| 91 } |
| 92 } |
| 92 } | 93 } |
| 93 | 94 |
| 94 StyleElement::ProcessingResult StyleElement::childrenChanged(Element& element) { | 95 StyleElement::ProcessingResult StyleElement::childrenChanged(Element& element) { |
| 95 if (m_createdByParser) | 96 if (m_createdByParser) |
| 96 return ProcessingSuccessful; | 97 return ProcessingSuccessful; |
| 97 | 98 |
| 98 return process(element); | 99 return process(element); |
| 99 } | 100 } |
| 100 | 101 |
| 101 StyleElement::ProcessingResult StyleElement::finishParsingChildren( | 102 StyleElement::ProcessingResult StyleElement::finishParsingChildren( |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 201 |
| 201 void StyleElement::startLoadingDynamicSheet(Document& document) { | 202 void StyleElement::startLoadingDynamicSheet(Document& document) { |
| 202 document.styleEngine().addPendingSheet(m_styleEngineContext); | 203 document.styleEngine().addPendingSheet(m_styleEngineContext); |
| 203 } | 204 } |
| 204 | 205 |
| 205 DEFINE_TRACE(StyleElement) { | 206 DEFINE_TRACE(StyleElement) { |
| 206 visitor->trace(m_sheet); | 207 visitor->trace(m_sheet); |
| 207 } | 208 } |
| 208 | 209 |
| 209 } // namespace blink | 210 } // namespace blink |
| OLD | NEW |