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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2174693002: Remove the unnecessary DCHECK(..), which is guranteed to be true by the previous line (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 resolverChanged(updateMode); 186 resolverChanged(updateMode);
187 } 187 }
188 188
189 void StyleEngine::addStyleSheetCandidateNode(Node* node) 189 void StyleEngine::addStyleSheetCandidateNode(Node* node)
190 { 190 {
191 if (!node->isConnected() || document().isDetached()) 191 if (!node->isConnected() || document().isDetached())
192 return; 192 return;
193 193
194 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume nt; 194 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume nt;
195 DCHECK(isStyleElement(*node) || treeScope == m_document);
196 DCHECK(!isXSLStyleSheet(*node)); 195 DCHECK(!isXSLStyleSheet(*node));
197 TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(tr eeScope); 196 TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(tr eeScope);
198 DCHECK(collection); 197 DCHECK(collection);
199 collection->addStyleSheetCandidateNode(node); 198 collection->addStyleSheetCandidateNode(node);
200 199
201 markTreeScopeDirty(treeScope); 200 markTreeScopeDirty(treeScope);
202 if (treeScope != m_document) 201 if (treeScope != m_document)
203 m_activeTreeScopes.add(&treeScope); 202 m_activeTreeScopes.add(&treeScope);
204 } 203 }
205 204
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 828
830 DEFINE_TRACE_WRAPPERS(StyleEngine) 829 DEFINE_TRACE_WRAPPERS(StyleEngine)
831 { 830 {
832 for (auto sheet : m_injectedAuthorStyleSheets) { 831 for (auto sheet : m_injectedAuthorStyleSheets) {
833 visitor->traceWrappers(sheet); 832 visitor->traceWrappers(sheet);
834 } 833 }
835 visitor->traceWrappers(m_documentStyleSheetCollection); 834 visitor->traceWrappers(m_documentStyleSheetCollection);
836 } 835 }
837 836
838 } // namespace blink 837 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698