| Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| index b225c0941afb20b79e1157522a89e75d7fd1788c..c49d4981e4bd7b0ef0554f31ab0aaaf8d0727be8 100644
|
| --- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| @@ -161,8 +161,12 @@ void StyleEngine::addPendingSheet(StyleEngineContext& context) {
|
| m_pendingScriptBlockingStylesheets++;
|
|
|
| context.addingPendingSheet(document());
|
| - if (context.addedPendingSheetBeforeBody())
|
| + if (context.addedPendingSheetBeforeBody()) {
|
| m_pendingRenderBlockingStylesheets++;
|
| + } else {
|
| + m_pendingBodyStylesheets++;
|
| + document().didAddPendingStylesheetInBody();
|
| + }
|
| }
|
|
|
| // This method is called whenever a top-level stylesheet has finished loading.
|
| @@ -174,6 +178,11 @@ void StyleEngine::removePendingSheet(Node& styleSheetCandidateNode,
|
| if (context.addedPendingSheetBeforeBody()) {
|
| DCHECK_GT(m_pendingRenderBlockingStylesheets, 0);
|
| m_pendingRenderBlockingStylesheets--;
|
| + } else {
|
| + DCHECK_GT(m_pendingBodyStylesheets, 0);
|
| + m_pendingBodyStylesheets--;
|
| + if (!m_pendingBodyStylesheets)
|
| + document().didRemoveAllPendingBodyStylesheets();
|
| }
|
|
|
| // Make sure we knew this sheet was pending, and that our count isn't out of
|
|
|