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

Side by Side Diff: sky/engine/core/dom/StyleEngine.cpp

Issue 758573005: Remove CSSOM mutability in StyleRule. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/css/parser/BisonCSSParser-in.cpp ('k') | 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 void StyleEngine::markDocumentDirty() 372 void StyleEngine::markDocumentDirty()
373 { 373 {
374 m_documentScopeDirty = true; 374 m_documentScopeDirty = true;
375 if (document().importLoader()) 375 if (document().importLoader())
376 document().importsController()->master()->styleEngine()->markDocumentDir ty(); 376 document().importsController()->master()->styleEngine()->markDocumentDir ty();
377 } 377 }
378 378
379 static bool isCacheableForStyleElement(const StyleSheetContents& contents) 379 static bool isCacheableForStyleElement(const StyleSheetContents& contents)
380 { 380 {
381 // Until import rules are supported in cached sheets it's not possible for l oading to fail.
382 ASSERT(!contents.didLoadErrorOccur());
383 // It is not the original sheet anymore.
384 if (contents.isMutable())
385 return false;
386 if (!contents.hasSyntacticallyValidCSSHeader()) 381 if (!contents.hasSyntacticallyValidCSSHeader())
387 return false; 382 return false;
388 return true; 383 return true;
389 } 384 }
390 385
391 PassRefPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& tex t, TextPosition startPosition, bool createdByParser) 386 PassRefPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& tex t, TextPosition startPosition, bool createdByParser)
392 { 387 {
393 RefPtr<CSSStyleSheet> styleSheet = nullptr; 388 RefPtr<CSSStyleSheet> styleSheet = nullptr;
394 389
395 AtomicString textContent(text); 390 AtomicString textContent(text);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 { 437 {
443 if (!document().isActive()) 438 if (!document().isActive())
444 return; 439 return;
445 440
446 if (m_resolver) 441 if (m_resolver)
447 m_resolver->invalidateMatchedPropertiesCache(); 442 m_resolver->invalidateMatchedPropertiesCache();
448 document().setNeedsStyleRecalc(SubtreeStyleChange); 443 document().setNeedsStyleRecalc(SubtreeStyleChange);
449 } 444 }
450 445
451 } 446 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/parser/BisonCSSParser-in.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698