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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 sheet = static_cast<SVGStyleElement*>(n)->sheet(); | 312 sheet = static_cast<SVGStyleElement*>(n)->sheet(); |
313 else if (e->hasLocalName(linkTag)) | 313 else if (e->hasLocalName(linkTag)) |
314 sheet = static_cast<HTMLLinkElement*>(n)->sheet(); | 314 sheet = static_cast<HTMLLinkElement*>(n)->sheet(); |
315 else | 315 else |
316 // <STYLE> element | 316 // <STYLE> element |
317 sheet = static_cast<HTMLStyleElement*>(n)->sheet(); | 317 sheet = static_cast<HTMLStyleElement*>(n)->sheet(); |
318 // Check to see if this sheet belongs to a styleset | 318 // Check to see if this sheet belongs to a styleset |
319 // (thus making it PREFERRED or ALTERNATE rather than | 319 // (thus making it PREFERRED or ALTERNATE rather than |
320 // PERSISTENT). | 320 // PERSISTENT). |
321 AtomicString rel = e->getAttribute(relAttr); | 321 AtomicString rel = e->getAttribute(relAttr); |
322 if (!enabledViaScript && !title.isEmpty()) { | 322 if (!enabledViaScript && sheet && !title.isEmpty()) { |
323 // Yes, we have a title. | 323 // Yes, we have a title. |
324 if (m_preferredStylesheetSetName.isEmpty()) { | 324 if (m_preferredStylesheetSetName.isEmpty()) { |
325 // No preferred set has been established. If | 325 // No preferred set has been established. If |
326 // we are NOT an alternate sheet, then establish | 326 // we are NOT an alternate sheet, then establish |
327 // us as the preferred set. Otherwise, just ignore | 327 // us as the preferred set. Otherwise, just ignore |
328 // this sheet. | 328 // this sheet. |
329 if (e->hasLocalName(styleTag) || !rel.contains("alternate")) | 329 if (e->hasLocalName(styleTag) || !rel.contains("alternate")) |
330 m_preferredStylesheetSetName = m_selectedStylesheetSetNa
me = title; | 330 m_preferredStylesheetSetName = m_selectedStylesheetSetNa
me = title; |
331 } | 331 } |
332 if (title != m_preferredStylesheetSetName) | 332 if (title != m_preferredStylesheetSetName) |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 info.addMember(m_authorStyleSheets, "authorStyleSheets"); | 490 info.addMember(m_authorStyleSheets, "authorStyleSheets"); |
491 info.addMember(m_activeAuthorStyleSheets, "activeAuthorStyleSheets"); | 491 info.addMember(m_activeAuthorStyleSheets, "activeAuthorStyleSheets"); |
492 info.addMember(m_styleSheetsForStyleSheetList, "styleSheetsForStyleSheetList
"); | 492 info.addMember(m_styleSheetsForStyleSheetList, "styleSheetsForStyleSheetList
"); |
493 info.addMember(m_styleSheetCandidateNodes, "styleSheetCandidateNodes"); | 493 info.addMember(m_styleSheetCandidateNodes, "styleSheetCandidateNodes"); |
494 info.addMember(m_preferredStylesheetSetName, "preferredStylesheetSetName"); | 494 info.addMember(m_preferredStylesheetSetName, "preferredStylesheetSetName"); |
495 info.addMember(m_selectedStylesheetSetName, "selectedStylesheetSetName"); | 495 info.addMember(m_selectedStylesheetSetName, "selectedStylesheetSetName"); |
496 info.addMember(m_document, "document"); | 496 info.addMember(m_document, "document"); |
497 } | 497 } |
498 | 498 |
499 } | 499 } |
OLD | NEW |