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

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

Issue 1397713004: Don't bother layout until first navigation is done. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another attempt to fix tests Created 4 years, 9 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
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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 markDocumentDirty(); 494 markDocumentDirty();
495 return; 495 return;
496 } 496 }
497 497
498 ASSERT(m_styleSheetCollectionMap.contains(&scope)); 498 ASSERT(m_styleSheetCollectionMap.contains(&scope));
499 m_dirtyTreeScopes.add(&scope); 499 m_dirtyTreeScopes.add(&scope);
500 } 500 }
501 501
502 void StyleEngine::markDocumentDirty() 502 void StyleEngine::markDocumentDirty()
503 { 503 {
504 // Extension may inject CSS into about:blank document.
505 // Unblock layout in such case.
506 document().markNonInitialEmptyDocument();
507
504 m_documentScopeDirty = true; 508 m_documentScopeDirty = true;
505 if (document().importLoader()) 509 if (document().importLoader())
506 document().importsController()->master()->styleEngine().markDocumentDirt y(); 510 document().importsController()->master()->styleEngine().markDocumentDirt y();
507 } 511 }
508 512
509 static bool isCacheableForStyleElement(const StyleSheetContents& contents) 513 static bool isCacheableForStyleElement(const StyleSheetContents& contents)
510 { 514 {
511 // FIXME: Support copying import rules. 515 // FIXME: Support copying import rules.
512 if (!contents.importRules().isEmpty()) 516 if (!contents.importRules().isEmpty())
513 return false; 517 return false;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 visitor->trace(m_dirtyTreeScopes); 739 visitor->trace(m_dirtyTreeScopes);
736 visitor->trace(m_activeTreeScopes); 740 visitor->trace(m_activeTreeScopes);
737 visitor->trace(m_fontSelector); 741 visitor->trace(m_fontSelector);
738 visitor->trace(m_textToSheetCache); 742 visitor->trace(m_textToSheetCache);
739 visitor->trace(m_sheetToTextCache); 743 visitor->trace(m_sheetToTextCache);
740 #endif 744 #endif
741 CSSFontSelectorClient::trace(visitor); 745 CSSFontSelectorClient::trace(visitor);
742 } 746 }
743 747
744 } // namespace blink 748 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698