| 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 } | 522 } |
| 523 } else { | 523 } else { |
| 524 DCHECK(contents); | 524 DCHECK(contents); |
| 525 DCHECK(contents->isCacheableForStyleElement()); | 525 DCHECK(contents->isCacheableForStyleElement()); |
| 526 DCHECK(contents->hasSingleOwnerDocument()); | 526 DCHECK(contents->hasSingleOwnerDocument()); |
| 527 contents->setIsUsedFromTextCache(); | 527 contents->setIsUsedFromTextCache(); |
| 528 styleSheet = CSSStyleSheet::createInline(contents, e, startPosition); | 528 styleSheet = CSSStyleSheet::createInline(contents, e, startPosition); |
| 529 } | 529 } |
| 530 | 530 |
| 531 DCHECK(styleSheet); | 531 DCHECK(styleSheet); |
| 532 styleSheet->setTitle(e->title()); | 532 if (!e->isInShadowTree()) { |
| 533 if (!e->isInShadowTree()) | 533 styleSheet->setTitle(e->title()); |
| 534 setPreferredStylesheetSetNameIfNotSet(e->title()); | 534 setPreferredStylesheetSetNameIfNotSet(e->title()); |
| 535 } |
| 535 return styleSheet; | 536 return styleSheet; |
| 536 } | 537 } |
| 537 | 538 |
| 538 CSSStyleSheet* StyleEngine::parseSheet(Element* e, const String& text, TextPosit
ion startPosition) | 539 CSSStyleSheet* StyleEngine::parseSheet(Element* e, const String& text, TextPosit
ion startPosition) |
| 539 { | 540 { |
| 540 CSSStyleSheet* styleSheet = nullptr; | 541 CSSStyleSheet* styleSheet = nullptr; |
| 541 styleSheet = CSSStyleSheet::createInline(e, KURL(), startPosition, e->docume
nt().characterSet()); | 542 styleSheet = CSSStyleSheet::createInline(e, KURL(), startPosition, e->docume
nt().characterSet()); |
| 542 styleSheet->contents()->parseStringAtPosition(text, startPosition); | 543 styleSheet->contents()->parseStringAtPosition(text, startPosition); |
| 543 return styleSheet; | 544 return styleSheet; |
| 544 } | 545 } |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 | 822 |
| 822 DEFINE_TRACE_WRAPPERS(StyleEngine) | 823 DEFINE_TRACE_WRAPPERS(StyleEngine) |
| 823 { | 824 { |
| 824 for (auto sheet : m_injectedAuthorStyleSheets) { | 825 for (auto sheet : m_injectedAuthorStyleSheets) { |
| 825 visitor->traceWrappers(sheet); | 826 visitor->traceWrappers(sheet); |
| 826 } | 827 } |
| 827 visitor->traceWrappers(m_documentStyleSheetCollection); | 828 visitor->traceWrappers(m_documentStyleSheetCollection); |
| 828 } | 829 } |
| 829 | 830 |
| 830 } // namespace blink | 831 } // namespace blink |
| OLD | NEW |