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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
489 m_lifecyle.advanceTo(DocumentLifecycle::Inactive); | 489 m_lifecyle.advanceTo(DocumentLifecycle::Inactive); |
490 } | 490 } |
491 | 491 |
492 Document::~Document() | 492 Document::~Document() |
493 { | 493 { |
494 ASSERT(!renderView()); | 494 ASSERT(!renderView()); |
495 ASSERT(m_ranges.isEmpty()); | 495 ASSERT(m_ranges.isEmpty()); |
496 ASSERT(!m_parentTreeScope); | 496 ASSERT(!m_parentTreeScope); |
497 ASSERT(!hasGuardRefCount()); | 497 ASSERT(!hasGuardRefCount()); |
498 | 498 |
499 StyleEngine::clearSheetCache(); | |
esprehn
2013/11/15 10:27:37
You shouldn't need to clear the sheet cache like t
tasak
2014/01/09 09:24:50
Done.
| |
500 | |
499 if (m_templateDocument) | 501 if (m_templateDocument) |
500 m_templateDocument->setTemplateDocumentHost(0); // balanced in templateD ocument(). | 502 m_templateDocument->setTemplateDocumentHost(0); // balanced in templateD ocument(). |
501 | 503 |
502 if (Document* ownerDocument = this->ownerDocument()) | 504 if (Document* ownerDocument = this->ownerDocument()) |
503 ownerDocument->didRemoveEventTargetNode(this); | 505 ownerDocument->didRemoveEventTargetNode(this); |
504 | 506 |
505 m_scriptRunner.clear(); | 507 m_scriptRunner.clear(); |
506 | 508 |
507 removeAllEventListeners(); | 509 removeAllEventListeners(); |
508 | 510 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
620 | 622 |
621 void Document::setCompatibilityMode(CompatibilityMode mode) | 623 void Document::setCompatibilityMode(CompatibilityMode mode) |
622 { | 624 { |
623 if (m_compatibilityModeLocked || mode == m_compatibilityMode) | 625 if (m_compatibilityModeLocked || mode == m_compatibilityMode) |
624 return; | 626 return; |
625 bool wasInQuirksMode = inQuirksMode(); | 627 bool wasInQuirksMode = inQuirksMode(); |
626 m_compatibilityMode = mode; | 628 m_compatibilityMode = mode; |
627 selectorQueryCache().invalidate(); | 629 selectorQueryCache().invalidate(); |
628 if (inQuirksMode() != wasInQuirksMode) { | 630 if (inQuirksMode() != wasInQuirksMode) { |
629 // All injected stylesheets have to reparse using the different mode. | 631 // All injected stylesheets have to reparse using the different mode. |
632 StyleEngine::clearSheetCache(); | |
esprehn
2013/11/15 10:27:37
Ditto.
tasak
2014/01/09 09:24:50
I think, quirks document cannot share stylesheets
| |
630 m_styleEngine->invalidateInjectedStyleSheetCache(); | 633 m_styleEngine->invalidateInjectedStyleSheetCache(); |
631 } | 634 } |
632 } | 635 } |
633 | 636 |
634 String Document::compatMode() const | 637 String Document::compatMode() const |
635 { | 638 { |
636 return inQuirksMode() ? "BackCompat" : "CSS1Compat"; | 639 return inQuirksMode() ? "BackCompat" : "CSS1Compat"; |
637 } | 640 } |
638 | 641 |
639 void Document::setDoctype(PassRefPtr<DocumentType> docType) | 642 void Document::setDoctype(PassRefPtr<DocumentType> docType) |
(...skipping 4548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5188 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode) | 5191 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode) |
5189 { | 5192 { |
5190 if (!isActive()) | 5193 if (!isActive()) |
5191 return; | 5194 return; |
5192 | 5195 |
5193 styleEngine()->modifiedStyleSheet(sheet); | 5196 styleEngine()->modifiedStyleSheet(sheet); |
5194 styleResolverChanged(when, updateMode); | 5197 styleResolverChanged(when, updateMode); |
5195 } | 5198 } |
5196 | 5199 |
5197 } // namespace WebCore | 5200 } // namespace WebCore |
OLD | NEW |