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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 // Until the <body> exists, we have no choice but to compare document positi
ons, | 53 // Until the <body> exists, we have no choice but to compare document positi
ons, |
54 // since styles outside of the body and head continue to be shunted into the
head | 54 // since styles outside of the body and head continue to be shunted into the
head |
55 // (and thus can shift to end up before dynamically added DOM content that i
s also | 55 // (and thus can shift to end up before dynamically added DOM content that i
s also |
56 // outside the body). | 56 // outside the body). |
57 if (createdByParser && document().body()) | 57 if (createdByParser && document().body()) |
58 m_styleSheetCandidateNodes.parserAdd(node); | 58 m_styleSheetCandidateNodes.parserAdd(node); |
59 else | 59 else |
60 m_styleSheetCandidateNodes.add(node); | 60 m_styleSheetCandidateNodes.add(node); |
61 | 61 |
62 if (!node->hasTagName(HTMLNames::styleTag)) | 62 if (!isHTMLStyleElement(*node)) |
63 return; | 63 return; |
64 | 64 |
65 ContainerNode* scopingNode = toHTMLStyleElement(node)->scopingNode(); | 65 ContainerNode* scopingNode = toHTMLStyleElement(*node).scopingNode(); |
66 if (!isTreeScopeRoot(scopingNode)) | 66 if (!isTreeScopeRoot(scopingNode)) |
67 m_scopingNodesForStyleScoped.add(scopingNode); | 67 m_scopingNodesForStyleScoped.add(scopingNode); |
68 } | 68 } |
69 | 69 |
70 void TreeScopeStyleSheetCollection::removeStyleSheetCandidateNode(Node* node, Co
ntainerNode* scopingNode) | 70 void TreeScopeStyleSheetCollection::removeStyleSheetCandidateNode(Node* node, Co
ntainerNode* scopingNode) |
71 { | 71 { |
72 m_styleSheetCandidateNodes.remove(node); | 72 m_styleSheetCandidateNodes.remove(node); |
73 | 73 |
74 if (!isTreeScopeRoot(scopingNode)) | 74 if (!isTreeScopeRoot(scopingNode)) |
75 m_scopingNodesForStyleScoped.remove(scopingNode); | 75 m_scopingNodesForStyleScoped.remove(scopingNode); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 return false; | 213 return false; |
214 } | 214 } |
215 | 215 |
216 void TreeScopeStyleSheetCollection::updateUsesRemUnits() | 216 void TreeScopeStyleSheetCollection::updateUsesRemUnits() |
217 { | 217 { |
218 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); | 218 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); |
219 } | 219 } |
220 | 220 |
221 } | 221 } |
OLD | NEW |