| 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, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 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) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 106 } |
| 107 sheet = pi->sheet(); | 107 sheet = pi->sheet(); |
| 108 if (sheet && !sheet->disabled() && sheet->isCSSStyleSheet()) | 108 if (sheet && !sheet->disabled() && sheet->isCSSStyleSheet()) |
| 109 activeSheet = static_cast<CSSStyleSheet*>(sheet); | 109 activeSheet = static_cast<CSSStyleSheet*>(sheet); |
| 110 } else if ((n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagNa
me(styleTag))) || (n->isSVGElement() && n->hasTagName(SVGNames::styleTag))) { | 110 } else if ((n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagNa
me(styleTag))) || (n->isSVGElement() && n->hasTagName(SVGNames::styleTag))) { |
| 111 Element* e = toElement(n); | 111 Element* e = toElement(n); |
| 112 AtomicString title = e->getAttribute(titleAttr); | 112 AtomicString title = e->getAttribute(titleAttr); |
| 113 bool enabledViaScript = false; | 113 bool enabledViaScript = false; |
| 114 if (e->hasLocalName(linkTag)) { | 114 if (e->hasLocalName(linkTag)) { |
| 115 // <LINK> element | 115 // <LINK> element |
| 116 HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(n); | 116 HTMLLinkElement* linkElement = toHTMLLinkElement(n); |
| 117 enabledViaScript = linkElement->isEnabledViaScript(); | 117 enabledViaScript = linkElement->isEnabledViaScript(); |
| 118 if (!linkElement->isDisabled() && linkElement->styleSheetIsLoadi
ng()) { | 118 if (!linkElement->isDisabled() && linkElement->styleSheetIsLoadi
ng()) { |
| 119 // it is loading but we should still decide which style shee
t set to use | 119 // it is loading but we should still decide which style shee
t set to use |
| 120 if (!enabledViaScript && !title.isEmpty() && collections->pr
eferredStylesheetSetName().isEmpty()) { | 120 if (!enabledViaScript && !title.isEmpty() && collections->pr
eferredStylesheetSetName().isEmpty()) { |
| 121 const AtomicString& rel = e->getAttribute(relAttr); | 121 const AtomicString& rel = e->getAttribute(relAttr); |
| 122 if (!rel.contains("alternate")) { | 122 if (!rel.contains("alternate")) { |
| 123 collections->setPreferredStylesheetSetName(title); | 123 collections->setPreferredStylesheetSetName(title); |
| 124 collections->setSelectedStylesheetSetName(title); | 124 collections->setSelectedStylesheetSetName(title); |
| 125 } | 125 } |
| 126 } | 126 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 void StyleSheetCollection::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo)
const | 284 void StyleSheetCollection::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo)
const |
| 285 { | 285 { |
| 286 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 286 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
| 287 info.addMember(m_activeAuthorStyleSheets, "activeAuthorStyleSheets"); | 287 info.addMember(m_activeAuthorStyleSheets, "activeAuthorStyleSheets"); |
| 288 info.addMember(m_styleSheetsForStyleSheetList, "styleSheetsForStyleSheetList
"); | 288 info.addMember(m_styleSheetsForStyleSheetList, "styleSheetsForStyleSheetList
"); |
| 289 info.addMember(m_styleSheetCandidateNodes, "styleSheetCandidateNodes"); | 289 info.addMember(m_styleSheetCandidateNodes, "styleSheetCandidateNodes"); |
| 290 info.addMember(m_treeScope, "treeScope"); | 290 info.addMember(m_treeScope, "treeScope"); |
| 291 } | 291 } |
| 292 | 292 |
| 293 } | 293 } |
| OLD | NEW |