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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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_( | 51 DocumentOrderedList::MutationForbiddenScope mutation_forbidden_( |
52 &style_sheet_candidate_nodes_); | 52 &style_sheet_candidate_nodes_); |
53 CHECK(HeapObjectHeader::FromPayload(this)->IsValid()); | |
haraken
2017/04/21 10:51:54
Add a TODO to remove the checks once the investiga
| |
54 CHECK(ThreadState::Current()->IsOnThreadHeap(this)); | |
53 for (Node* n : style_sheet_candidate_nodes_) { | 55 for (Node* n : style_sheet_candidate_nodes_) { |
56 CHECK(HeapObjectHeader::FromPayload(n)->IsValid()); | |
57 CHECK(ThreadState::Current()->IsOnThreadHeap(n)); | |
54 StyleSheetCandidate candidate(*n); | 58 StyleSheetCandidate candidate(*n); |
55 | 59 |
56 DCHECK(!candidate.IsXSL()); | 60 DCHECK(!candidate.IsXSL()); |
57 if (candidate.IsImport()) { | 61 if (candidate.IsImport()) { |
58 Document* document = candidate.ImportedDocument(); | 62 Document* document = candidate.ImportedDocument(); |
59 if (!document) | 63 if (!document) |
60 continue; | 64 continue; |
61 if (collector.HasVisited(document)) | 65 if (collector.HasVisited(document)) |
62 continue; | 66 continue; |
63 collector.WillVisit(document); | 67 collector.WillVisit(document); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 continue; | 127 continue; |
124 if (!candidate.CanBeActivated( | 128 if (!candidate.CanBeActivated( |
125 GetDocument().GetStyleEngine().PreferredStylesheetSetName())) | 129 GetDocument().GetStyleEngine().PreferredStylesheetSetName())) |
126 continue; | 130 continue; |
127 viewport_resolver.CollectViewportRulesFromAuthorSheet( | 131 viewport_resolver.CollectViewportRulesFromAuthorSheet( |
128 *ToCSSStyleSheet(sheet)); | 132 *ToCSSStyleSheet(sheet)); |
129 } | 133 } |
130 } | 134 } |
131 | 135 |
132 } // namespace blink | 136 } // namespace blink |
OLD | NEW |