| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 return; | 278 return; |
| 279 result.iterator->value = uri; | 279 result.iterator->value = uri; |
| 280 } | 280 } |
| 281 | 281 |
| 282 const AtomicString& StyleSheetContents::determineNamespace(const AtomicString& p
refix) | 282 const AtomicString& StyleSheetContents::determineNamespace(const AtomicString& p
refix) |
| 283 { | 283 { |
| 284 if (prefix.isNull()) | 284 if (prefix.isNull()) |
| 285 return nullAtom; // No namespace. If an element/attribute has a namespac
e, we won't match it. | 285 return nullAtom; // No namespace. If an element/attribute has a namespac
e, we won't match it. |
| 286 if (prefix == starAtom) | 286 if (prefix == starAtom) |
| 287 return starAtom; // We'll match any namespace. | 287 return starAtom; // We'll match any namespace. |
| 288 PrefixNamespaceURIMap::const_iterator it = m_namespaces.find(prefix); | 288 return m_namespaces.get(prefix); |
| 289 if (it == m_namespaces.end()) | |
| 290 return nullAtom; | |
| 291 return it->value; | |
| 292 } | 289 } |
| 293 | 290 |
| 294 void StyleSheetContents::parseAuthorStyleSheet(const CSSStyleSheetResource* cach
edStyleSheet, const SecurityOrigin* securityOrigin) | 291 void StyleSheetContents::parseAuthorStyleSheet(const CSSStyleSheetResource* cach
edStyleSheet, const SecurityOrigin* securityOrigin) |
| 295 { | 292 { |
| 296 TRACE_EVENT0("webkit", "StyleSheetContents::parseAuthorStyleSheet"); | 293 TRACE_EVENT0("webkit", "StyleSheetContents::parseAuthorStyleSheet"); |
| 297 | 294 |
| 298 bool quirksMode = isQuirksModeBehavior(m_parserContext.mode()); | 295 bool quirksMode = isQuirksModeBehavior(m_parserContext.mode()); |
| 299 | 296 |
| 300 bool enforceMIMEType = !quirksMode; | 297 bool enforceMIMEType = !quirksMode; |
| 301 bool hasValidMIMEType = false; | 298 bool hasValidMIMEType = false; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 // See the StyleResolver calls in ScopedStyleResolver::addRulesFromSheet. | 543 // See the StyleResolver calls in ScopedStyleResolver::addRulesFromSheet. |
| 547 for (size_t i = 0; i < m_clients.size(); ++i) { | 544 for (size_t i = 0; i < m_clients.size(); ++i) { |
| 548 if (Document* document = m_clients[i]->ownerDocument()) | 545 if (Document* document = m_clients[i]->ownerDocument()) |
| 549 document->styleEngine()->clearResolver(); | 546 document->styleEngine()->clearResolver(); |
| 550 } | 547 } |
| 551 m_ruleSet.clear(); | 548 m_ruleSet.clear(); |
| 552 } | 549 } |
| 553 | 550 |
| 554 | 551 |
| 555 } | 552 } |
| OLD | NEW |