| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 : CSSValue(CSSSVGDocumentClass) | 37 : CSSValue(CSSSVGDocumentClass) |
| 38 , m_url(url) | 38 , m_url(url) |
| 39 , m_loadRequested(false) | 39 , m_loadRequested(false) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 CSSSVGDocumentValue::~CSSSVGDocumentValue() | 43 CSSSVGDocumentValue::~CSSSVGDocumentValue() |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 DocumentResource* CSSSVGDocumentValue::load(Document* document) | 47 DocumentResource* CSSSVGDocumentValue::load(Document* document) const |
| 48 { | 48 { |
| 49 ASSERT(document); | 49 ASSERT(document); |
| 50 | 50 |
| 51 if (!m_loadRequested) { | 51 if (!m_loadRequested) { |
| 52 m_loadRequested = true; | 52 m_loadRequested = true; |
| 53 | 53 |
| 54 FetchRequest request(ResourceRequest(document->completeURL(m_url)), Fetc
hInitiatorTypeNames::css); | 54 FetchRequest request(ResourceRequest(document->completeURL(m_url)), Fetc
hInitiatorTypeNames::css); |
| 55 m_document = DocumentResource::fetchSVGDocument(request, document->fetch
er()); | 55 m_document = DocumentResource::fetchSVGDocument(request, document->fetch
er()); |
| 56 } | 56 } |
| 57 | 57 |
| 58 return m_document.get(); | 58 return m_document.get(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 String CSSSVGDocumentValue::customCSSText() const | 61 String CSSSVGDocumentValue::customCSSText() const |
| 62 { | 62 { |
| 63 return serializeString(m_url); | 63 return serializeString(m_url); |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool CSSSVGDocumentValue::equals(const CSSSVGDocumentValue& other) const | 66 bool CSSSVGDocumentValue::equals(const CSSSVGDocumentValue& other) const |
| 67 { | 67 { |
| 68 return m_url == other.m_url; | 68 return m_url == other.m_url; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace blink | 71 } // namespace blink |
| OLD | NEW |