| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 if (result.isNewEntry || !result.storedValue->value) { | 383 if (result.isNewEntry || !result.storedValue->value) { |
| 384 styleSheet = CSSStyleSheet::create(e, KURL()); | 384 styleSheet = CSSStyleSheet::create(e, KURL()); |
| 385 styleSheet->contents()->parseString(text); | 385 styleSheet->contents()->parseString(text); |
| 386 if (result.isNewEntry) { | 386 if (result.isNewEntry) { |
| 387 result.storedValue->value = styleSheet->contents(); | 387 result.storedValue->value = styleSheet->contents(); |
| 388 m_sheetToTextCache.add(styleSheet->contents(), textContent); | 388 m_sheetToTextCache.add(styleSheet->contents(), textContent); |
| 389 } | 389 } |
| 390 } else { | 390 } else { |
| 391 StyleSheetContents* contents = result.storedValue->value; | 391 StyleSheetContents* contents = result.storedValue->value; |
| 392 ASSERT(contents); | 392 ASSERT(contents); |
| 393 ASSERT(contents->singleOwnerDocument() == e->document()); | |
| 394 styleSheet = CSSStyleSheet::create(contents, e); | 393 styleSheet = CSSStyleSheet::create(contents, e); |
| 395 } | 394 } |
| 396 | 395 |
| 397 ASSERT(styleSheet); | 396 ASSERT(styleSheet); |
| 398 return styleSheet; | 397 return styleSheet; |
| 399 } | 398 } |
| 400 | 399 |
| 401 void StyleEngine::removeSheet(StyleSheetContents* contents) | 400 void StyleEngine::removeSheet(StyleSheetContents* contents) |
| 402 { | 401 { |
| 403 HashMap<RawPtr<StyleSheetContents>, AtomicString>::iterator it = m_sheetToTe
xtCache.find(contents); | 402 HashMap<RawPtr<StyleSheetContents>, AtomicString>::iterator it = m_sheetToTe
xtCache.find(contents); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 419 { | 418 { |
| 420 if (!document().isActive()) | 419 if (!document().isActive()) |
| 421 return; | 420 return; |
| 422 | 421 |
| 423 if (m_resolver) | 422 if (m_resolver) |
| 424 m_resolver->invalidateMatchedPropertiesCache(); | 423 m_resolver->invalidateMatchedPropertiesCache(); |
| 425 document().setNeedsStyleRecalc(SubtreeStyleChange); | 424 document().setNeedsStyleRecalc(SubtreeStyleChange); |
| 426 } | 425 } |
| 427 | 426 |
| 428 } | 427 } |
| OLD | NEW |