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

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

Issue 143463011: [import] support document.stylesheets in imported documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::collectDocumentStyleSheets(DocumentStyleSheetCollector& collec tor) 351 void StyleEngine::collectDocumentStyleSheets(DocumentStyleSheetCollector& collec tor)
352 { 352 {
353 m_documentStyleSheetCollection.collectStyleSheets(this, collector); 353 m_documentStyleSheetCollection.collectStyleSheets(this, collector);
354 } 354 }
355 355
356 void StyleEngine::setStyleSheetsForStyleSheetList(const Vector<RefPtr<StyleSheet > >& sheets)
357 {
358 m_documentStyleSheetCollection.setSheetsForSheetList(sheets);
359 }
360
356 bool StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode) 361 bool StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode)
357 { 362 {
358 ASSERT(isMaster()); 363 ASSERT(isMaster());
359 ASSERT(!m_document.inStyleRecalc()); 364 ASSERT(!m_document.inStyleRecalc());
360 365
361 if (!m_document.isActive()) 366 if (!m_document.isActive())
362 return false; 367 return false;
363 368
364 bool requiresFullStyleRecalc = false; 369 bool requiresFullStyleRecalc = false;
365 if (m_documentScopeDirty || updateMode == FullStyleUpdate) 370 if (m_documentScopeDirty || updateMode == FullStyleUpdate)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 { 613 {
609 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache() .find(contents); 614 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache() .find(contents);
610 if (it == sheetToTextCache().end()) 615 if (it == sheetToTextCache().end())
611 return; 616 return;
612 617
613 textToSheetCache().remove(it->value); 618 textToSheetCache().remove(it->value);
614 sheetToTextCache().remove(contents); 619 sheetToTextCache().remove(contents);
615 } 620 }
616 621
617 } 622 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698