| OLD | NEW | 
|---|
| 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  Loading... | 
| 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" | 
| 41 #include "core/html/HTMLIFrameElement.h" | 42 #include "core/html/HTMLIFrameElement.h" | 
| 42 #include "core/html/HTMLImport.h" | 43 #include "core/html/HTMLImport.h" | 
| 43 #include "core/html/HTMLLinkElement.h" | 44 #include "core/html/HTMLLinkElement.h" | 
| 44 #include "core/inspector/InspectorInstrumentation.h" | 45 #include "core/inspector/InspectorInstrumentation.h" | 
| 45 #include "core/page/Page.h" | 46 #include "core/page/Page.h" | 
| 46 #include "core/page/PageGroup.h" | 47 #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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 346     m_documentStyleSheetCollection.clearMediaQueryRuleSetStyleSheets(); | 346     m_documentStyleSheetCollection.clearMediaQueryRuleSetStyleSheets(); | 
| 347     clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes); | 347     clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes); | 
| 348     clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes); | 348     clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes); | 
| 349 } | 349 } | 
| 350 | 350 | 
| 351 void StyleEngine::collectDocumentActiveStyleSheets(StyleSheetCollectionBase& col
     lection) | 351 void StyleEngine::collectDocumentActiveStyleSheets(StyleSheetCollectionBase& col
     lection) | 
| 352 { | 352 { | 
| 353     ASSERT(isMaster()); | 353     ASSERT(isMaster()); | 
| 354 | 354 | 
| 355     if (HTMLImport* rootImport = m_document.import()) { | 355     if (HTMLImport* rootImport = m_document.import()) { | 
| 356         for (HTMLImport* import = traverseFirstPostOrder(rootImport); import; im
     port = traverseNextPostOrder(import)) { | 356         for (HTMLImport* import = traverseFirstPostOrder(*rootImport); import; i
     mport = traverseNextPostOrder(*import)) { | 
| 357             Document* document = import->document(); | 357             Document* document = import->document(); | 
| 358             if (!document) | 358             if (!document) | 
| 359                 continue; | 359                 continue; | 
| 360             StyleEngine* engine = document->styleEngine(); | 360             StyleEngine* engine = document->styleEngine(); | 
| 361             DocumentStyleSheetCollection::CollectFor collectFor = document == &m
     _document ? | 361             DocumentStyleSheetCollection::CollectFor collectFor = document == &m
     _document ? | 
| 362                 DocumentStyleSheetCollection::CollectForList : DocumentStyleShee
     tCollection::DontCollectForList; | 362                 DocumentStyleSheetCollection::CollectForList : DocumentStyleShee
     tCollection::DontCollectForList; | 
| 363             engine->m_documentStyleSheetCollection.collectStyleSheets(engine, co
     llection, collectFor); | 363             engine->m_documentStyleSheetCollection.collectStyleSheets(engine, co
     llection, collectFor); | 
| 364         } | 364         } | 
| 365     } else { | 365     } else { | 
| 366         m_documentStyleSheetCollection.collectStyleSheets(this, collection, Docu
     mentStyleSheetCollection::CollectForList); | 366         m_documentStyleSheetCollection.collectStyleSheets(this, collection, Docu
     mentStyleSheetCollection::CollectForList); | 
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 581 } | 581 } | 
| 582 | 582 | 
| 583 void StyleEngine::markDocumentDirty() | 583 void StyleEngine::markDocumentDirty() | 
| 584 { | 584 { | 
| 585     m_documentScopeDirty = true; | 585     m_documentScopeDirty = true; | 
| 586     if (!HTMLImport::isMaster(&m_document)) | 586     if (!HTMLImport::isMaster(&m_document)) | 
| 587         m_document.import()->master()->styleEngine()->markDocumentDirty(); | 587         m_document.import()->master()->styleEngine()->markDocumentDirty(); | 
| 588 } | 588 } | 
| 589 | 589 | 
| 590 } | 590 } | 
| OLD | NEW | 
|---|