| 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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 updateActiveStyle(); | 156 updateActiveStyle(); |
| 157 return *m_inspectorStyleSheet; | 157 return *m_inspectorStyleSheet; |
| 158 } | 158 } |
| 159 | 159 |
| 160 void StyleEngine::addPendingSheet(StyleEngineContext& context) { | 160 void StyleEngine::addPendingSheet(StyleEngineContext& context) { |
| 161 m_pendingScriptBlockingStylesheets++; | 161 m_pendingScriptBlockingStylesheets++; |
| 162 | 162 |
| 163 context.addingPendingSheet(document()); | 163 context.addingPendingSheet(document()); |
| 164 if (context.addedPendingSheetBeforeBody()) | 164 if (context.addedPendingSheetBeforeBody()) |
| 165 m_pendingRenderBlockingStylesheets++; | 165 m_pendingRenderBlockingStylesheets++; |
| 166 else |
| 167 document().didAddPendingStylesheetInBody(); |
| 166 } | 168 } |
| 167 | 169 |
| 168 // This method is called whenever a top-level stylesheet has finished loading. | 170 // This method is called whenever a top-level stylesheet has finished loading. |
| 169 void StyleEngine::removePendingSheet(Node& styleSheetCandidateNode, | 171 void StyleEngine::removePendingSheet(Node& styleSheetCandidateNode, |
| 170 const StyleEngineContext& context) { | 172 const StyleEngineContext& context) { |
| 171 if (styleSheetCandidateNode.isConnected()) | 173 if (styleSheetCandidateNode.isConnected()) |
| 172 markTreeScopeDirty(styleSheetCandidateNode.treeScope()); | 174 markTreeScopeDirty(styleSheetCandidateNode.treeScope()); |
| 173 | 175 |
| 174 if (context.addedPendingSheetBeforeBody()) { | 176 if (context.addedPendingSheetBeforeBody()) { |
| 175 DCHECK_GT(m_pendingRenderBlockingStylesheets, 0); | 177 DCHECK_GT(m_pendingRenderBlockingStylesheets, 0); |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 } | 1133 } |
| 1132 | 1134 |
| 1133 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 1135 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
| 1134 for (auto sheet : m_injectedAuthorStyleSheets) { | 1136 for (auto sheet : m_injectedAuthorStyleSheets) { |
| 1135 visitor->traceWrappers(sheet); | 1137 visitor->traceWrappers(sheet); |
| 1136 } | 1138 } |
| 1137 visitor->traceWrappers(m_documentStyleSheetCollection); | 1139 visitor->traceWrappers(m_documentStyleSheetCollection); |
| 1138 } | 1140 } |
| 1139 | 1141 |
| 1140 } // namespace blink | 1142 } // namespace blink |
| OLD | NEW |