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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 1050783003: Remove stylesheet injection from Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert devtool removals Created 5 years, 8 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 | « Source/core/core.gypi ('k') | Source/core/dom/DocumentStyleSheetCollection.cpp » ('j') | 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 * 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
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
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
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/DocumentStyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698