| 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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // Although the Document may be replaced synchronously, DocumentParsers | 324 // Although the Document may be replaced synchronously, DocumentParsers |
| 325 // generally keep at least one reference to an Element which would in turn | 325 // generally keep at least one reference to an Element which would in turn |
| 326 // has a reference to the Document. If you hit this ASSERT, then that | 326 // has a reference to the Document. If you hit this ASSERT, then that |
| 327 // assumption is wrong. DocumentParser::detach() should ensure that even | 327 // assumption is wrong. DocumentParser::detach() should ensure that even |
| 328 // if the DocumentParser outlives the Document it won't cause badness. | 328 // if the DocumentParser outlives the Document it won't cause badness. |
| 329 ASSERT(!m_parser || m_parser->refCount() == 1); | 329 ASSERT(!m_parser || m_parser->refCount() == 1); |
| 330 detachParser(); | 330 detachParser(); |
| 331 #endif | 331 #endif |
| 332 | 332 |
| 333 #if !ENABLE(OILPAN) | 333 #if !ENABLE(OILPAN) |
| 334 if (m_styleSheetList) | |
| 335 m_styleSheetList->detachFromDocument(); | |
| 336 | 334 |
| 337 if (m_importsController) | 335 if (m_importsController) |
| 338 HTMLImportsController::removeFrom(*this); | 336 HTMLImportsController::removeFrom(*this); |
| 339 | 337 |
| 340 m_timeline->detachFromDocument(); | 338 m_timeline->detachFromDocument(); |
| 341 | 339 |
| 342 // We need to destroy CSSFontSelector before destroying m_fetcher. | 340 // We need to destroy CSSFontSelector before destroying m_fetcher. |
| 343 if (m_styleEngine) | 341 if (m_styleEngine) |
| 344 m_styleEngine->detachFromDocument(); | 342 m_styleEngine->detachFromDocument(); |
| 345 | 343 |
| (...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 if (deep) | 1668 if (deep) |
| 1671 cloneChildNodes(clone.get()); | 1669 cloneChildNodes(clone.get()); |
| 1672 return clone.release(); | 1670 return clone.release(); |
| 1673 } | 1671 } |
| 1674 | 1672 |
| 1675 PassRefPtr<Document> Document::cloneDocumentWithoutChildren() | 1673 PassRefPtr<Document> Document::cloneDocumentWithoutChildren() |
| 1676 { | 1674 { |
| 1677 return create(DocumentInit(url()).withRegistrationContext(registrationContex
t())); | 1675 return create(DocumentInit(url()).withRegistrationContext(registrationContex
t())); |
| 1678 } | 1676 } |
| 1679 | 1677 |
| 1680 StyleSheetList* Document::styleSheets() | |
| 1681 { | |
| 1682 if (!m_styleSheetList) | |
| 1683 m_styleSheetList = StyleSheetList::create(this); | |
| 1684 return m_styleSheetList.get(); | |
| 1685 } | |
| 1686 | |
| 1687 void Document::evaluateMediaQueryListIfNeeded() | 1678 void Document::evaluateMediaQueryListIfNeeded() |
| 1688 { | 1679 { |
| 1689 if (!m_evaluateMediaQueriesOnStyleRecalc) | 1680 if (!m_evaluateMediaQueriesOnStyleRecalc) |
| 1690 return; | 1681 return; |
| 1691 evaluateMediaQueryList(); | 1682 evaluateMediaQueryList(); |
| 1692 m_evaluateMediaQueriesOnStyleRecalc = false; | 1683 m_evaluateMediaQueriesOnStyleRecalc = false; |
| 1693 } | 1684 } |
| 1694 | 1685 |
| 1695 void Document::evaluateMediaQueryList() | 1686 void Document::evaluateMediaQueryList() |
| 1696 { | 1687 { |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2789 using namespace blink; | 2780 using namespace blink; |
| 2790 void showLiveDocumentInstances() | 2781 void showLiveDocumentInstances() |
| 2791 { | 2782 { |
| 2792 WeakDocumentSet& set = liveDocumentSet(); | 2783 WeakDocumentSet& set = liveDocumentSet(); |
| 2793 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 2784 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 2794 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 2785 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 2795 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 2786 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 2796 } | 2787 } |
| 2797 } | 2788 } |
| 2798 #endif | 2789 #endif |
| OLD | NEW |