| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |