| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 void DocumentStyleSheetCollection::collectActiveStyleSheets(Vector<RefPtr<StyleS
heet> >& sheets) | 263 void DocumentStyleSheetCollection::collectActiveStyleSheets(Vector<RefPtr<StyleS
heet> >& sheets) |
| 264 { | 264 { |
| 265 if (m_document->settings() && !m_document->settings()->authorAndUserStylesEn
abled()) | 265 if (m_document->settings() && !m_document->settings()->authorAndUserStylesEn
abled()) |
| 266 return; | 266 return; |
| 267 | 267 |
| 268 StyleSheetCandidateListHashSet::iterator begin = m_styleSheetCandidateNodes.
begin(); | 268 StyleSheetCandidateListHashSet::iterator begin = m_styleSheetCandidateNodes.
begin(); |
| 269 StyleSheetCandidateListHashSet::iterator end = m_styleSheetCandidateNodes.en
d(); | 269 StyleSheetCandidateListHashSet::iterator end = m_styleSheetCandidateNodes.en
d(); |
| 270 for (StyleSheetCandidateListHashSet::iterator it = begin; it != end; ++it) { | 270 for (StyleSheetCandidateListHashSet::iterator it = begin; it != end; ++it) { |
| 271 Node* n = *it; | 271 Node* n = *it; |
| 272 StyleSheet* sheet = 0; | 272 StyleSheet* sheet = 0; |
| 273 if (n->nodeType() == Node::PROCESSING_INSTRUCTION_NODE) { | 273 if (n->nodeType() == Node::PROCESSING_INSTRUCTION_NODE && !m_document->i
sHTMLDocument()) { |
| 274 // Processing instruction (XML documents only). | 274 // Processing instruction (XML documents only). |
| 275 // We don't support linking to embedded CSS stylesheets, see <https:
//bugs.webkit.org/show_bug.cgi?id=49281> for discussion. | 275 // We don't support linking to embedded CSS stylesheets, see <https:
//bugs.webkit.org/show_bug.cgi?id=49281> for discussion. |
| 276 ProcessingInstruction* pi = static_cast<ProcessingInstruction*>(n); | 276 ProcessingInstruction* pi = static_cast<ProcessingInstruction*>(n); |
| 277 sheet = pi->sheet(); | 277 sheet = pi->sheet(); |
| 278 // Don't apply XSL transforms to already transformed documents -- <r
dar://problem/4132806> | 278 // Don't apply XSL transforms to already transformed documents -- <r
dar://problem/4132806> |
| 279 if (pi->isXSL() && !m_document->transformSourceDocument()) { | 279 if (pi->isXSL() && !m_document->transformSourceDocument()) { |
| 280 // Don't apply XSL transforms until loading is finished. | 280 // Don't apply XSL transforms until loading is finished. |
| 281 if (!m_document->parsing()) | 281 if (!m_document->parsing() && !pi->isLoading()) |
| 282 m_document->applyXSLTransform(pi); | 282 m_document->applyXSLTransform(pi); |
| 283 return; | 283 return; |
| 284 } | 284 } |
| 285 } else if ((n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagNa
me(styleTag))) || (n->isSVGElement() && n->hasTagName(SVGNames::styleTag))) { | 285 } else if ((n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagNa
me(styleTag))) || (n->isSVGElement() && n->hasTagName(SVGNames::styleTag))) { |
| 286 Element* e = toElement(n); | 286 Element* e = toElement(n); |
| 287 AtomicString title = e->getAttribute(titleAttr); | 287 AtomicString title = e->getAttribute(titleAttr); |
| 288 bool enabledViaScript = false; | 288 bool enabledViaScript = false; |
| 289 if (e->hasLocalName(linkTag)) { | 289 if (e->hasLocalName(linkTag)) { |
| 290 // <LINK> element | 290 // <LINK> element |
| 291 HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(n); | 291 HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(n); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 info.addMember(m_authorStyleSheets, "authorStyleSheets"); | 489 info.addMember(m_authorStyleSheets, "authorStyleSheets"); |
| 490 info.addMember(m_activeAuthorStyleSheets, "activeAuthorStyleSheets"); | 490 info.addMember(m_activeAuthorStyleSheets, "activeAuthorStyleSheets"); |
| 491 info.addMember(m_styleSheetsForStyleSheetList, "styleSheetsForStyleSheetList
"); | 491 info.addMember(m_styleSheetsForStyleSheetList, "styleSheetsForStyleSheetList
"); |
| 492 info.addMember(m_styleSheetCandidateNodes, "styleSheetCandidateNodes"); | 492 info.addMember(m_styleSheetCandidateNodes, "styleSheetCandidateNodes"); |
| 493 info.addMember(m_preferredStylesheetSetName, "preferredStylesheetSetName"); | 493 info.addMember(m_preferredStylesheetSetName, "preferredStylesheetSetName"); |
| 494 info.addMember(m_selectedStylesheetSetName, "selectedStylesheetSetName"); | 494 info.addMember(m_selectedStylesheetSetName, "selectedStylesheetSetName"); |
| 495 info.addMember(m_document, "document"); | 495 info.addMember(m_document, "document"); |
| 496 } | 496 } |
| 497 | 497 |
| 498 } | 498 } |
| OLD | NEW |