| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 Document* document = candidate.importedDocument(); | 53 Document* document = candidate.importedDocument(); |
| 54 if (!document) | 54 if (!document) |
| 55 continue; | 55 continue; |
| 56 if (collector.hasVisited(document)) | 56 if (collector.hasVisited(document)) |
| 57 continue; | 57 continue; |
| 58 collector.willVisit(document); | 58 collector.willVisit(document); |
| 59 document->styleEngine().updateStyleSheetsInImport(collector); | 59 document->styleEngine().updateStyleSheetsInImport(collector); |
| 60 continue; | 60 continue; |
| 61 } | 61 } |
| 62 | 62 |
| 63 if (candidate.isEnabledAndLoading()) { | 63 if (candidate.isEnabledAndLoading()) |
| 64 // it is loading but we should still decide which style sheet set to
use | |
| 65 if (candidate.hasPreferrableName()) | |
| 66 engine.setPreferredStylesheetSetNameIfNotSet(candidate.title()); | |
| 67 continue; | 64 continue; |
| 68 } | |
| 69 | 65 |
| 70 StyleSheet* sheet = candidate.sheet(); | 66 StyleSheet* sheet = candidate.sheet(); |
| 71 if (!sheet) | 67 if (!sheet) |
| 72 continue; | 68 continue; |
| 73 | 69 |
| 74 if (candidate.hasPreferrableName()) | |
| 75 engine.setPreferredStylesheetSetNameIfNotSet(candidate.title()); | |
| 76 collector.appendSheetForList(sheet); | 70 collector.appendSheetForList(sheet); |
| 77 if (candidate.canBeActivated(engine.preferredStylesheetSetName())) | 71 if (candidate.canBeActivated(engine.preferredStylesheetSetName())) |
| 78 collector.appendActiveStyleSheet(toCSSStyleSheet(sheet)); | 72 collector.appendActiveStyleSheet(toCSSStyleSheet(sheet)); |
| 79 } | 73 } |
| 80 } | 74 } |
| 81 | 75 |
| 82 void DocumentStyleSheetCollection::collectStyleSheets(StyleEngine& engine, Docum
entStyleSheetCollector& collector) | 76 void DocumentStyleSheetCollection::collectStyleSheets(StyleEngine& engine, Docum
entStyleSheetCollector& collector) |
| 83 { | 77 { |
| 84 DCHECK_EQ(&document().styleEngine(), &engine); | 78 DCHECK_EQ(&document().styleEngine(), &engine); |
| 85 collector.appendActiveStyleSheets(engine.injectedAuthorStyleSheets()); | 79 collector.appendActiveStyleSheets(engine.injectedAuthorStyleSheets()); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 collection.swap(*this); | 114 collection.swap(*this); |
| 121 } | 115 } |
| 122 | 116 |
| 123 DEFINE_TRACE_WRAPPERS(DocumentStyleSheetCollection) | 117 DEFINE_TRACE_WRAPPERS(DocumentStyleSheetCollection) |
| 124 { | 118 { |
| 125 for (auto sheet : m_styleSheetsForStyleSheetList) { | 119 for (auto sheet : m_styleSheetsForStyleSheetList) { |
| 126 visitor->traceWrappers(sheet); | 120 visitor->traceWrappers(sheet); |
| 127 } | 121 } |
| 128 } | 122 } |
| 129 } // namespace blink | 123 } // namespace blink |
| OLD | NEW |