| 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, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 StyleSheetCandidate candidate(*n); | 50 StyleSheetCandidate candidate(*n); |
| 51 ASSERT(!candidate.isXSL()); | 51 ASSERT(!candidate.isXSL()); |
| 52 | 52 |
| 53 if (!candidate.isCSSStyle()) | 53 if (!candidate.isCSSStyle()) |
| 54 continue; | 54 continue; |
| 55 | 55 |
| 56 StyleSheet* sheet = candidate.sheet(); | 56 StyleSheet* sheet = candidate.sheet(); |
| 57 if (!sheet) | 57 if (!sheet) |
| 58 continue; | 58 continue; |
| 59 | 59 |
| 60 // FIXME: clarify how PREFERRED or ALTERNATE works in shadow trees. | |
| 61 // Should we set preferred/selected stylesheets name in shadow trees and | |
| 62 // use the name in document? | |
| 63 if (candidate.hasPreferrableName(engine.preferredStylesheetSetName())) | |
| 64 engine.selectStylesheetSetName(candidate.title()); | |
| 65 | |
| 66 collection.appendSheetForList(sheet); | 60 collection.appendSheetForList(sheet); |
| 67 if (candidate.canBeActivated(engine.preferredStylesheetSetName())) | 61 if (candidate.canBeActivated(nullAtom)) |
| 68 collection.appendActiveStyleSheet(toCSSStyleSheet(sheet)); | 62 collection.appendActiveStyleSheet(toCSSStyleSheet(sheet)); |
| 69 } | 63 } |
| 70 } | 64 } |
| 71 | 65 |
| 72 void ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine& engine
, StyleResolverUpdateMode updateMode) | 66 void ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine& engine
, StyleResolverUpdateMode updateMode) |
| 73 { | 67 { |
| 74 StyleSheetCollection collection; | 68 StyleSheetCollection collection; |
| 75 collectStyleSheets(engine, collection); | 69 collectStyleSheets(engine, collection); |
| 76 | 70 |
| 77 StyleSheetChange change; | 71 StyleSheetChange change; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 88 styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets
.size(), collection.activeAuthorStyleSheets()); | 82 styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets
.size(), collection.activeAuthorStyleSheets()); |
| 89 } | 83 } |
| 90 } | 84 } |
| 91 if (change.requiresFullStyleRecalc) | 85 if (change.requiresFullStyleRecalc) |
| 92 toShadowRoot(treeScope().rootNode()).host()->setNeedsStyleRecalc(Subtree
StyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::ActiveStyles
heetsUpdate)); | 86 toShadowRoot(treeScope().rootNode()).host()->setNeedsStyleRecalc(Subtree
StyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::ActiveStyles
heetsUpdate)); |
| 93 | 87 |
| 94 collection.swap(*this); | 88 collection.swap(*this); |
| 95 } | 89 } |
| 96 | 90 |
| 97 } // namespace blink | 91 } // namespace blink |
| OLD | NEW |