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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 DocumentStyleSheetCollection::DocumentStyleSheetCollection( | 42 DocumentStyleSheetCollection::DocumentStyleSheetCollection( |
43 TreeScope& tree_scope) | 43 TreeScope& tree_scope) |
44 : TreeScopeStyleSheetCollection(tree_scope) { | 44 : TreeScopeStyleSheetCollection(tree_scope) { |
45 DCHECK_EQ(tree_scope.RootNode(), tree_scope.RootNode().GetDocument()); | 45 DCHECK_EQ(tree_scope.RootNode(), tree_scope.RootNode().GetDocument()); |
46 } | 46 } |
47 | 47 |
48 void DocumentStyleSheetCollection::CollectStyleSheetsFromCandidates( | 48 void DocumentStyleSheetCollection::CollectStyleSheetsFromCandidates( |
49 StyleEngine& master_engine, | 49 StyleEngine& master_engine, |
50 DocumentStyleSheetCollector& collector) { | 50 DocumentStyleSheetCollector& collector) { |
51 DocumentOrderedList::MutationForbiddenScope mutation_forbidden_( | |
52 &style_sheet_candidate_nodes_); | |
53 // TODO(keishi) Check added for crbug.com/699269 diagnosis. Remove once done. | 51 // TODO(keishi) Check added for crbug.com/699269 diagnosis. Remove once done. |
54 CHECK(HeapObjectHeader::FromPayload(this)->IsValid()); | 52 CHECK(HeapObjectHeader::FromPayload(this)->IsValid()); |
55 CHECK(ThreadState::Current()->IsOnThreadHeap(this)); | 53 CHECK(ThreadState::Current()->IsOnThreadHeap(this)); |
56 for (Node* n : style_sheet_candidate_nodes_) { | 54 for (Node* n : style_sheet_candidate_nodes_) { |
57 CHECK(HeapObjectHeader::FromPayload(n)->IsValid()); | 55 CHECK(HeapObjectHeader::FromPayload(n)->IsValid()); |
58 CHECK(ThreadState::Current()->IsOnThreadHeap(n)); | 56 CHECK(ThreadState::Current()->IsOnThreadHeap(n)); |
59 StyleSheetCandidate candidate(*n); | 57 StyleSheetCandidate candidate(*n); |
60 | 58 |
61 DCHECK(!candidate.IsXSL()); | 59 DCHECK(!candidate.IsXSL()); |
62 if (candidate.IsImport()) { | 60 if (candidate.IsImport()) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 continue; | 126 continue; |
129 if (!candidate.CanBeActivated( | 127 if (!candidate.CanBeActivated( |
130 GetDocument().GetStyleEngine().PreferredStylesheetSetName())) | 128 GetDocument().GetStyleEngine().PreferredStylesheetSetName())) |
131 continue; | 129 continue; |
132 viewport_resolver.CollectViewportRulesFromAuthorSheet( | 130 viewport_resolver.CollectViewportRulesFromAuthorSheet( |
133 *ToCSSStyleSheet(sheet)); | 131 *ToCSSStyleSheet(sheet)); |
134 } | 132 } |
135 } | 133 } |
136 | 134 |
137 } // namespace blink | 135 } // namespace blink |
OLD | NEW |