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

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

Issue 1313733007: Trace StyleEngine::createResolver (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « 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 28 matching lines...) Expand all
39 #include "core/dom/ProcessingInstruction.h" 39 #include "core/dom/ProcessingInstruction.h"
40 #include "core/dom/ShadowTreeStyleSheetCollection.h" 40 #include "core/dom/ShadowTreeStyleSheetCollection.h"
41 #include "core/dom/shadow/ShadowRoot.h" 41 #include "core/dom/shadow/ShadowRoot.h"
42 #include "core/frame/Settings.h" 42 #include "core/frame/Settings.h"
43 #include "core/html/HTMLIFrameElement.h" 43 #include "core/html/HTMLIFrameElement.h"
44 #include "core/html/HTMLLinkElement.h" 44 #include "core/html/HTMLLinkElement.h"
45 #include "core/html/imports/HTMLImportsController.h" 45 #include "core/html/imports/HTMLImportsController.h"
46 #include "core/inspector/InspectorInstrumentation.h" 46 #include "core/inspector/InspectorInstrumentation.h"
47 #include "core/page/Page.h" 47 #include "core/page/Page.h"
48 #include "core/svg/SVGStyleElement.h" 48 #include "core/svg/SVGStyleElement.h"
49 #include "platform/TraceEvent.h"
49 50
50 namespace blink { 51 namespace blink {
51 52
52 using namespace HTMLNames; 53 using namespace HTMLNames;
53 54
54 StyleEngine::StyleEngine(Document& document) 55 StyleEngine::StyleEngine(Document& document)
55 : m_document(&document) 56 : m_document(&document)
56 , m_isMaster(!document.importsController() || document.importsController()-> master() == &document) 57 , m_isMaster(!document.importsController() || document.importsController()-> master() == &document)
57 , m_pendingStylesheets(0) 58 , m_pendingStylesheets(0)
58 , m_documentStyleSheetCollection(DocumentStyleSheetCollection::create(docume nt)) 59 , m_documentStyleSheetCollection(DocumentStyleSheetCollection::create(docume nt))
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 m_resolver->appendAuthorStyleSheets(documentStyleSheetCollection()->activeAu thorStyleSheets()); 387 m_resolver->appendAuthorStyleSheets(documentStyleSheetCollection()->activeAu thorStyleSheets());
387 for (TreeScope* treeScope : m_activeTreeScopes) { 388 for (TreeScope* treeScope : m_activeTreeScopes) {
388 if (TreeScopeStyleSheetCollection* collection = m_styleSheetCollectionMa p.get(treeScope)) 389 if (TreeScopeStyleSheetCollection* collection = m_styleSheetCollectionMa p.get(treeScope))
389 m_resolver->appendAuthorStyleSheets(collection->activeAuthorStyleShe ets()); 390 m_resolver->appendAuthorStyleSheets(collection->activeAuthorStyleShe ets());
390 } 391 }
391 m_resolver->finishAppendAuthorStyleSheets(); 392 m_resolver->finishAppendAuthorStyleSheets();
392 } 393 }
393 394
394 void StyleEngine::createResolver() 395 void StyleEngine::createResolver()
395 { 396 {
397 TRACE_EVENT0("blink", "StyleEngine::createResolver");
396 // It is a programming error to attempt to resolve style on a Document 398 // It is a programming error to attempt to resolve style on a Document
397 // which is not in a frame. Code which hits this should have checked 399 // which is not in a frame. Code which hits this should have checked
398 // Document::isActive() before calling into code which could get here. 400 // Document::isActive() before calling into code which could get here.
399 401
400 ASSERT(document().frame()); 402 ASSERT(document().frame());
401 403
402 m_resolver = adoptPtrWillBeNoop(new StyleResolver(*m_document)); 404 m_resolver = adoptPtrWillBeNoop(new StyleResolver(*m_document));
403 405
404 // A scoped style resolver for document will be created during 406 // A scoped style resolver for document will be created during
405 // appendActiveAuthorStyleSheets if needed. 407 // appendActiveAuthorStyleSheets if needed.
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 visitor->trace(m_dirtyTreeScopes); 723 visitor->trace(m_dirtyTreeScopes);
722 visitor->trace(m_activeTreeScopes); 724 visitor->trace(m_activeTreeScopes);
723 visitor->trace(m_fontSelector); 725 visitor->trace(m_fontSelector);
724 visitor->trace(m_textToSheetCache); 726 visitor->trace(m_textToSheetCache);
725 visitor->trace(m_sheetToTextCache); 727 visitor->trace(m_sheetToTextCache);
726 #endif 728 #endif
727 CSSFontSelectorClient::trace(visitor); 729 CSSFontSelectorClient::trace(visitor);
728 } 730 }
729 731
730 } 732 }
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