| 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 { | 668 { |
| 669 m_evaluateMediaQueriesOnStyleRecalc = true; | 669 m_evaluateMediaQueriesOnStyleRecalc = true; |
| 670 styleEngine().clearMediaQueryRuleSetStyleSheets(); | 670 styleEngine().clearMediaQueryRuleSetStyleSheets(); |
| 671 InspectorInstrumentation::mediaQueryResultChanged(this); | 671 InspectorInstrumentation::mediaQueryResultChanged(this); |
| 672 } | 672 } |
| 673 | 673 |
| 674 void Document::setCompatibilityMode(CompatibilityMode mode) | 674 void Document::setCompatibilityMode(CompatibilityMode mode) |
| 675 { | 675 { |
| 676 if (m_compatibilityModeLocked || mode == m_compatibilityMode) | 676 if (m_compatibilityModeLocked || mode == m_compatibilityMode) |
| 677 return; | 677 return; |
| 678 bool wasInQuirksMode = inQuirksMode(); | |
| 679 m_compatibilityMode = mode; | 678 m_compatibilityMode = mode; |
| 680 selectorQueryCache().invalidate(); | 679 selectorQueryCache().invalidate(); |
| 681 if (inQuirksMode() != wasInQuirksMode) { | |
| 682 // All injected stylesheets have to reparse using the different mode. | |
| 683 m_styleEngine->compatibilityModeChanged(); | |
| 684 } | |
| 685 } | 680 } |
| 686 | 681 |
| 687 String Document::compatMode() const | 682 String Document::compatMode() const |
| 688 { | 683 { |
| 689 return inQuirksMode() ? "BackCompat" : "CSS1Compat"; | 684 return inQuirksMode() ? "BackCompat" : "CSS1Compat"; |
| 690 } | 685 } |
| 691 | 686 |
| 692 void Document::setDoctype(PassRefPtrWillBeRawPtr<DocumentType> docType) | 687 void Document::setDoctype(PassRefPtrWillBeRawPtr<DocumentType> docType) |
| 693 { | 688 { |
| 694 // This should never be called more than once. | 689 // This should never be called more than once. |
| (...skipping 5002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5697 #ifndef NDEBUG | 5692 #ifndef NDEBUG |
| 5698 using namespace blink; | 5693 using namespace blink; |
| 5699 void showLiveDocumentInstances() | 5694 void showLiveDocumentInstances() |
| 5700 { | 5695 { |
| 5701 WeakDocumentSet& set = liveDocumentSet(); | 5696 WeakDocumentSet& set = liveDocumentSet(); |
| 5702 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5697 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5703 for (Document* document : set) | 5698 for (Document* document : set) |
| 5704 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5699 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5705 } | 5700 } |
| 5706 #endif | 5701 #endif |
| OLD | NEW |