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

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

Issue 85693009: Get rid of Reset and ResetStyleResolverAndFontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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
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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 if (shouldUpdateShadowTreeStyleSheetCollection(updateMode)) { 341 if (shouldUpdateShadowTreeStyleSheetCollection(updateMode)) {
342 TreeScopeSet treeScopes = updateMode == FullStyleUpdate ? m_activeTreeSc opes : m_dirtyTreeScopes.subscope(); 342 TreeScopeSet treeScopes = updateMode == FullStyleUpdate ? m_activeTreeSc opes : m_dirtyTreeScopes.subscope();
343 HashSet<TreeScope*> treeScopesRemoved; 343 HashSet<TreeScope*> treeScopesRemoved;
344 344
345 for (TreeScopeSet::iterator it = treeScopes.begin(); it != treeScopes.en d(); ++it) { 345 for (TreeScopeSet::iterator it = treeScopes.begin(); it != treeScopes.en d(); ++it) {
346 TreeScope* treeScope = *it; 346 TreeScope* treeScope = *it;
347 ASSERT(treeScope != m_document); 347 ASSERT(treeScope != m_document);
348 ShadowTreeStyleSheetCollection* collection = static_cast<ShadowTreeS tyleSheetCollection*>(styleSheetCollectionFor(*treeScope)); 348 ShadowTreeStyleSheetCollection* collection = static_cast<ShadowTreeS tyleSheetCollection*>(styleSheetCollectionFor(*treeScope));
349 ASSERT(collection); 349 ASSERT(collection);
350 collection->updateActiveStyleSheets(this, updateMode); 350 if (collection->updateActiveStyleSheets(this, updateMode))
351 toShadowRoot(treeScope->rootNode())->host()->setNeedsStyleRecalc ();
351 if (!collection->hasStyleSheetCandidateNodes()) 352 if (!collection->hasStyleSheetCandidateNodes())
352 treeScopesRemoved.add(treeScope); 353 treeScopesRemoved.add(treeScope);
353 } 354 }
354 if (!treeScopesRemoved.isEmpty()) 355 if (!treeScopesRemoved.isEmpty())
355 for (HashSet<TreeScope*>::iterator it = treeScopesRemoved.begin(); i t != treeScopesRemoved.end(); ++it) 356 for (HashSet<TreeScope*>::iterator it = treeScopesRemoved.begin(); i t != treeScopesRemoved.end(); ++it)
356 m_activeTreeScopes.remove(*it); 357 m_activeTreeScopes.remove(*it);
357 } 358 }
358 m_needsUpdateActiveStylesheetsOnStyleRecalc = false; 359 m_needsUpdateActiveStylesheetsOnStyleRecalc = false;
359 activeStyleSheetsUpdatedForInspector(); 360 activeStyleSheetsUpdatedForInspector();
360 m_usesRemUnits = m_documentStyleSheetCollection.usesRemUnits(); 361 m_usesRemUnits = m_documentStyleSheetCollection.usesRemUnits();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 if (m_document.didLayoutWithPendingStylesheets() && !hasPendingSheets()) 481 if (m_document.didLayoutWithPendingStylesheets() && !hasPendingSheets())
481 change.setNeedsRepaint(); 482 change.setNeedsRepaint();
482 483
483 if (updateActiveStyleSheets(mode)) 484 if (updateActiveStyleSheets(mode))
484 change.setNeedsStyleRecalc(); 485 change.setNeedsStyleRecalc();
485 486
486 return change; 487 return change;
487 } 488 }
488 489
489 } 490 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698