OLD | NEW |
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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 | 581 |
582 void StyleSheetContents::clientLoadStarted(CSSStyleSheet* sheet) | 582 void StyleSheetContents::clientLoadStarted(CSSStyleSheet* sheet) |
583 { | 583 { |
584 ASSERT(m_completedClients.contains(sheet)); | 584 ASSERT(m_completedClients.contains(sheet)); |
585 m_completedClients.remove(sheet); | 585 m_completedClients.remove(sheet); |
586 m_loadingClients.add(sheet); | 586 m_loadingClients.add(sheet); |
587 } | 587 } |
588 | 588 |
589 void StyleSheetContents::removeSheetFromCache(Document* document) | 589 void StyleSheetContents::removeSheetFromCache(Document* document) |
590 { | 590 { |
| 591 ASSERT(document); |
591 if (!maybeCacheable()) | 592 if (!maybeCacheable()) |
592 return; | 593 return; |
593 if (!document || !document->isActive()) | |
594 return; | |
595 document->styleEngine()->removeSheet(this); | 594 document->styleEngine()->removeSheet(this); |
596 } | 595 } |
597 | 596 |
598 void StyleSheetContents::addedToMemoryCache() | 597 void StyleSheetContents::addedToMemoryCache() |
599 { | 598 { |
600 ASSERT(!m_isInMemoryCache); | 599 ASSERT(!m_isInMemoryCache); |
601 ASSERT(isCacheable()); | 600 ASSERT(isCacheable()); |
602 m_isInMemoryCache = true; | 601 m_isInMemoryCache = true; |
603 } | 602 } |
604 | 603 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 { | 695 { |
697 visitor->trace(m_ownerRule); | 696 visitor->trace(m_ownerRule); |
698 visitor->trace(m_importRules); | 697 visitor->trace(m_importRules); |
699 visitor->trace(m_childRules); | 698 visitor->trace(m_childRules); |
700 visitor->trace(m_loadingClients); | 699 visitor->trace(m_loadingClients); |
701 visitor->trace(m_completedClients); | 700 visitor->trace(m_completedClients); |
702 visitor->trace(m_ruleSet); | 701 visitor->trace(m_ruleSet); |
703 } | 702 } |
704 | 703 |
705 } | 704 } |
OLD | NEW |