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

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

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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23 matching lines...) Expand all
34 34
35 class CSSSVGDocumentValue : public CSSValue { 35 class CSSSVGDocumentValue : public CSSValue {
36 public: 36 public:
37 static CSSSVGDocumentValue* create(const String& url) 37 static CSSSVGDocumentValue* create(const String& url)
38 { 38 {
39 return new CSSSVGDocumentValue(url); 39 return new CSSSVGDocumentValue(url);
40 } 40 }
41 ~CSSSVGDocumentValue(); 41 ~CSSSVGDocumentValue();
42 42
43 DocumentResource* cachedSVGDocument() const { return m_document.get(); } 43 DocumentResource* cachedSVGDocument() const { return m_document.get(); }
44 DocumentResource* load(Document*); 44 DocumentResource* load(Document*) const;
45 45
46 String customCSSText() const; 46 String customCSSText() const;
47 const String& url() const { return m_url; } 47 const String& url() const { return m_url; }
48 bool loadRequested() const { return m_loadRequested; } 48 bool loadRequested() const { return m_loadRequested; }
49 bool equals(const CSSSVGDocumentValue&) const; 49 bool equals(const CSSSVGDocumentValue&) const;
50 50
51 DEFINE_INLINE_TRACE_AFTER_DISPATCH() 51 DEFINE_INLINE_TRACE_AFTER_DISPATCH()
52 { 52 {
53 visitor->trace(m_document); 53 visitor->trace(m_document);
54 CSSValue::traceAfterDispatch(visitor); 54 CSSValue::traceAfterDispatch(visitor);
55 } 55 }
56 56
57 private: 57 private:
58 CSSSVGDocumentValue(const String& url); 58 CSSSVGDocumentValue(const String& url);
59 59
60 String m_url; 60 String m_url;
61 Member<DocumentResource> m_document; 61
62 bool m_loadRequested; 62 // Document cache.
63 mutable Member<DocumentResource> m_document;
64 mutable bool m_loadRequested;
63 }; 65 };
64 66
65 DEFINE_CSS_VALUE_TYPE_CASTS(CSSSVGDocumentValue, isSVGDocumentValue()); 67 DEFINE_CSS_VALUE_TYPE_CASTS(CSSSVGDocumentValue, isSVGDocumentValue());
66 68
67 } // namespace blink 69 } // namespace blink
68 70
69 #endif // CSSSVGDocumentValue_h 71 #endif // CSSSVGDocumentValue_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698