Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: Source/core/css/StyleSheetContents.cpp

Issue 1032033002: Fire error events for a variety of script and style failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test failures Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> loadingClients; 372 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> loadingClients;
373 copyToVector(m_loadingClients, loadingClients); 373 copyToVector(m_loadingClients, loadingClients);
374 374
375 for (unsigned i = 0; i < loadingClients.size(); ++i) { 375 for (unsigned i = 0; i < loadingClients.size(); ++i) {
376 if (loadingClients[i]->loadCompleted()) 376 if (loadingClients[i]->loadCompleted())
377 continue; 377 continue;
378 378
379 // sheetLoaded might be invoked after its owner node is removed from doc ument. 379 // sheetLoaded might be invoked after its owner node is removed from doc ument.
380 if (RefPtrWillBeRawPtr<Node> ownerNode = loadingClients[i]->ownerNode()) { 380 if (RefPtrWillBeRawPtr<Node> ownerNode = loadingClients[i]->ownerNode()) {
381 if (loadingClients[i]->sheetLoaded()) 381 if (loadingClients[i]->sheetLoaded())
382 ownerNode->notifyLoadedSheetAndAllCriticalSubresources(m_didLoad ErrorOccur); 382 ownerNode->notifyLoadedSheetAndAllCriticalSubresources(m_didLoad ErrorOccur ? Node::ErrorOccurredLoadingSubresource : Node::NoErrorLoadingSubreso urce);
383 } 383 }
384 } 384 }
385 } 385 }
386 386
387 void StyleSheetContents::notifyLoadedSheet(const CSSStyleSheetResource* sheet) 387 void StyleSheetContents::notifyLoadedSheet(const CSSStyleSheetResource* sheet)
388 { 388 {
389 ASSERT(sheet); 389 ASSERT(sheet);
390 m_didLoadErrorOccur |= sheet->errorOccurred(); 390 m_didLoadErrorOccur |= sheet->errorOccurred();
391 // updateLayoutIgnorePendingStyleSheets can cause us to create the RuleSet o n this 391 // updateLayoutIgnorePendingStyleSheets can cause us to create the RuleSet o n this
392 // sheet before its imports have loaded. So clear the RuleSet when the impor ts 392 // sheet before its imports have loaded. So clear the RuleSet when the impor ts
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 visitor->trace(m_ownerRule); 655 visitor->trace(m_ownerRule);
656 visitor->trace(m_importRules); 656 visitor->trace(m_importRules);
657 visitor->trace(m_childRules); 657 visitor->trace(m_childRules);
658 visitor->trace(m_loadingClients); 658 visitor->trace(m_loadingClients);
659 visitor->trace(m_completedClients); 659 visitor->trace(m_completedClients);
660 visitor->trace(m_ruleSet); 660 visitor->trace(m_ruleSet);
661 #endif 661 #endif
662 } 662 }
663 663
664 } 664 }
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/contentTypeOptions/nosniff-script-blocked-with-error.html ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698