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

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

Issue 133993004: Fix mac bot specific performance regression by reverting set of patches (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 | « Source/core/dom/NodeTraversal.cpp ('k') | Source/core/html/HTMLImport.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 20 matching lines...) Expand all
31 #include "HTMLNames.h" 31 #include "HTMLNames.h"
32 #include "SVGNames.h" 32 #include "SVGNames.h"
33 #include "core/css/CSSFontSelector.h" 33 #include "core/css/CSSFontSelector.h"
34 #include "core/css/CSSStyleSheet.h" 34 #include "core/css/CSSStyleSheet.h"
35 #include "core/css/StyleInvalidationAnalysis.h" 35 #include "core/css/StyleInvalidationAnalysis.h"
36 #include "core/css/StyleSheetContents.h" 36 #include "core/css/StyleSheetContents.h"
37 #include "core/dom/Element.h" 37 #include "core/dom/Element.h"
38 #include "core/dom/ProcessingInstruction.h" 38 #include "core/dom/ProcessingInstruction.h"
39 #include "core/dom/ShadowTreeStyleSheetCollection.h" 39 #include "core/dom/ShadowTreeStyleSheetCollection.h"
40 #include "core/dom/shadow/ShadowRoot.h" 40 #include "core/dom/shadow/ShadowRoot.h"
41 #include "core/frame/Settings.h"
42 #include "core/html/HTMLIFrameElement.h" 41 #include "core/html/HTMLIFrameElement.h"
43 #include "core/html/HTMLImport.h" 42 #include "core/html/HTMLImport.h"
44 #include "core/html/HTMLLinkElement.h" 43 #include "core/html/HTMLLinkElement.h"
45 #include "core/inspector/InspectorInstrumentation.h" 44 #include "core/inspector/InspectorInstrumentation.h"
46 #include "core/page/Page.h" 45 #include "core/page/Page.h"
47 #include "core/page/PageGroup.h" 46 #include "core/page/PageGroup.h"
47 #include "core/frame/Settings.h"
48 #include "core/svg/SVGStyleElement.h" 48 #include "core/svg/SVGStyleElement.h"
49 #include "platform/URLPatternMatcher.h" 49 #include "platform/URLPatternMatcher.h"
50 50
51 namespace WebCore { 51 namespace WebCore {
52 52
53 using namespace HTMLNames; 53 using namespace HTMLNames;
54 54
55 StyleEngine::StyleEngine(Document& document) 55 StyleEngine::StyleEngine(Document& document)
56 : m_document(document) 56 : m_document(document)
57 , m_isMaster(HTMLImport::isMaster(&document)) 57 , m_isMaster(HTMLImport::isMaster(&document))
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 m_documentStyleSheetCollection.clearMediaQueryRuleSetStyleSheets(); 333 m_documentStyleSheetCollection.clearMediaQueryRuleSetStyleSheets();
334 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes); 334 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes);
335 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes); 335 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes);
336 } 336 }
337 337
338 void StyleEngine::collectDocumentActiveStyleSheets(StyleSheetCollectionBase& col lection) 338 void StyleEngine::collectDocumentActiveStyleSheets(StyleSheetCollectionBase& col lection)
339 { 339 {
340 ASSERT(isMaster()); 340 ASSERT(isMaster());
341 341
342 if (HTMLImport* rootImport = m_document.import()) { 342 if (HTMLImport* rootImport = m_document.import()) {
343 for (HTMLImport* import = traverseFirstPostOrder<HTMLImport>(*rootImport ); import; import = traverseNextPostOrder<HTMLImport>(*import)) { 343 for (HTMLImport* import = traverseFirstPostOrder(rootImport); import; im port = traverseNextPostOrder(import)) {
344 Document* document = import->document(); 344 Document* document = import->document();
345 if (!document) 345 if (!document)
346 continue; 346 continue;
347 StyleEngine* engine = document->styleEngine(); 347 StyleEngine* engine = document->styleEngine();
348 DocumentStyleSheetCollection::CollectFor collectFor = document == &m _document ? 348 DocumentStyleSheetCollection::CollectFor collectFor = document == &m _document ?
349 DocumentStyleSheetCollection::CollectForList : DocumentStyleShee tCollection::DontCollectForList; 349 DocumentStyleSheetCollection::CollectForList : DocumentStyleShee tCollection::DontCollectForList;
350 engine->m_documentStyleSheetCollection.collectStyleSheets(engine, co llection, collectFor); 350 engine->m_documentStyleSheetCollection.collectStyleSheets(engine, co llection, collectFor);
351 } 351 }
352 } else { 352 } else {
353 m_documentStyleSheetCollection.collectStyleSheets(this, collection, Docu mentStyleSheetCollection::CollectForList); 353 m_documentStyleSheetCollection.collectStyleSheets(this, collection, Docu mentStyleSheetCollection::CollectForList);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 } 568 }
569 569
570 void StyleEngine::markDocumentDirty() 570 void StyleEngine::markDocumentDirty()
571 { 571 {
572 m_documentScopeDirty = true; 572 m_documentScopeDirty = true;
573 if (!HTMLImport::isMaster(&m_document)) 573 if (!HTMLImport::isMaster(&m_document))
574 m_document.import()->master()->styleEngine()->markDocumentDirty(); 574 m_document.import()->master()->styleEngine()->markDocumentDirty();
575 } 575 }
576 576
577 } 577 }
OLDNEW
« no previous file with comments | « Source/core/dom/NodeTraversal.cpp ('k') | Source/core/html/HTMLImport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698