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

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

Issue 456673002: Go through root to get loading clients in StyleSheetContents::checkLoaded. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // ScriptableDocumentParser::executeScriptsWaitingForResources(). 384 // ScriptableDocumentParser::executeScriptsWaitingForResources().
385 // See https://bugs.webkit.org/show_bug.cgi?id=95106 385 // See https://bugs.webkit.org/show_bug.cgi?id=95106
386 RefPtrWillBeRawPtr<StyleSheetContents> protect(this); 386 RefPtrWillBeRawPtr<StyleSheetContents> protect(this);
387 387
388 StyleSheetContents* parentSheet = parentStyleSheet(); 388 StyleSheetContents* parentSheet = parentStyleSheet();
389 if (parentSheet) { 389 if (parentSheet) {
390 parentSheet->checkLoaded(); 390 parentSheet->checkLoaded();
391 return; 391 return;
392 } 392 }
393 393
394 StyleSheetContents* root = rootStyleSheet(); 394 ASSERT(this == rootStyleSheet());
395 if (root->m_loadingClients.isEmpty()) 395 if (m_loadingClients.isEmpty())
396 return; 396 return;
397 397
398 // Avoid |CSSSStyleSheet| and |ownerNode| being deleted by scripts that run via 398 // Avoid |CSSSStyleSheet| and |ownerNode| being deleted by scripts that run via
399 // ScriptableDocumentParser::executeScriptsWaitingForResources(). Also prote ct 399 // ScriptableDocumentParser::executeScriptsWaitingForResources(). Also prote ct
400 // the |CSSStyleSheet| from being deleted during iteration via the |sheetLoa ded| 400 // the |CSSStyleSheet| from being deleted during iteration via the |sheetLoa ded|
401 // method. 401 // method.
402 // 402 //
403 // When a sheet is loaded it is moved from the set of loading clients 403 // When a sheet is loaded it is moved from the set of loading clients
404 // to the set of completed clients. We therefore need the copy in order to 404 // to the set of completed clients. We therefore need the copy in order to
405 // not modify the set while iterating it. 405 // not modify the set while iterating it.
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 visitor->trace(m_ownerRule); 689 visitor->trace(m_ownerRule);
690 visitor->trace(m_importRules); 690 visitor->trace(m_importRules);
691 visitor->trace(m_childRules); 691 visitor->trace(m_childRules);
692 visitor->trace(m_loadingClients); 692 visitor->trace(m_loadingClients);
693 visitor->trace(m_completedClients); 693 visitor->trace(m_completedClients);
694 visitor->trace(m_ruleSet); 694 visitor->trace(m_ruleSet);
695 #endif 695 #endif
696 } 696 }
697 697
698 } 698 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698