| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 566 } |
| 567 | 567 |
| 568 void StyleEngine::markTreeScopeDirty(TreeScope& scope) { | 568 void StyleEngine::markTreeScopeDirty(TreeScope& scope) { |
| 569 if (scope == m_document) { | 569 if (scope == m_document) { |
| 570 markDocumentDirty(); | 570 markDocumentDirty(); |
| 571 return; | 571 return; |
| 572 } | 572 } |
| 573 | 573 |
| 574 DCHECK(m_styleSheetCollectionMap.contains(&scope)); | 574 DCHECK(m_styleSheetCollectionMap.contains(&scope)); |
| 575 m_dirtyTreeScopes.add(&scope); | 575 m_dirtyTreeScopes.add(&scope); |
| 576 document().scheduleLayoutTreeUpdateIfNeeded(); |
| 576 } | 577 } |
| 577 | 578 |
| 578 void StyleEngine::markDocumentDirty() { | 579 void StyleEngine::markDocumentDirty() { |
| 579 m_documentScopeDirty = true; | 580 m_documentScopeDirty = true; |
| 580 if (RuntimeEnabledFeatures::cssViewportEnabled()) | 581 if (RuntimeEnabledFeatures::cssViewportEnabled()) |
| 581 viewportRulesChanged(); | 582 viewportRulesChanged(); |
| 582 if (document().importLoader()) | 583 if (document().importLoader()) |
| 583 document().importsController()->master()->styleEngine().markDocumentDirty(); | 584 document().importsController()->master()->styleEngine().markDocumentDirty(); |
| 585 else |
| 586 document().scheduleLayoutTreeUpdateIfNeeded(); |
| 584 } | 587 } |
| 585 | 588 |
| 586 CSSStyleSheet* StyleEngine::createSheet(Element& element, | 589 CSSStyleSheet* StyleEngine::createSheet(Element& element, |
| 587 const String& text, | 590 const String& text, |
| 588 TextPosition startPosition, | 591 TextPosition startPosition, |
| 589 StyleEngineContext& context) { | 592 StyleEngineContext& context) { |
| 590 DCHECK(element.document() == document()); | 593 DCHECK(element.document() == document()); |
| 591 CSSStyleSheet* styleSheet = nullptr; | 594 CSSStyleSheet* styleSheet = nullptr; |
| 592 | 595 |
| 593 addPendingSheet(context); | 596 addPendingSheet(context); |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 } | 1241 } |
| 1239 | 1242 |
| 1240 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 1243 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
| 1241 for (auto sheet : m_injectedAuthorStyleSheets) { | 1244 for (auto sheet : m_injectedAuthorStyleSheets) { |
| 1242 visitor->traceWrappers(sheet); | 1245 visitor->traceWrappers(sheet); |
| 1243 } | 1246 } |
| 1244 visitor->traceWrappers(m_documentStyleSheetCollection); | 1247 visitor->traceWrappers(m_documentStyleSheetCollection); |
| 1245 } | 1248 } |
| 1246 | 1249 |
| 1247 } // namespace blink | 1250 } // namespace blink |
| OLD | NEW |