Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp

Issue 2038443003: Made ElementStyleResources store const CSSSVGDocumentValues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@+delete_nonconst_cssvaluelist_item_function
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698