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

Side by Side Diff: Source/core/css/resolver/ElementStyleResources.h

Issue 1308953009: Move Image ownership out of CSSValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 * 20 *
21 */ 21 */
22 22
23 #ifndef ElementStyleResources_h 23 #ifndef ElementStyleResources_h
24 #define ElementStyleResources_h 24 #define ElementStyleResources_h
25 25
26 #include "core/CSSPropertyNames.h" 26 #include "core/CSSPropertyNames.h"
27 #include "core/style/StyleImage.h"
27 #include "platform/graphics/Color.h" 28 #include "platform/graphics/Color.h"
28 #include "platform/heap/Handle.h" 29 #include "platform/heap/Handle.h"
29 #include "wtf/HashMap.h" 30 #include "wtf/HashMap.h"
30 #include "wtf/Noncopyable.h" 31 #include "wtf/Noncopyable.h"
31 32
32 namespace blink { 33 namespace blink {
33 34
34 class CSSCursorImageValue; 35 class CSSCursorImageValue;
35 class CSSImageValue; 36 class CSSImageValue;
36 class CSSImageGeneratorValue; 37 class CSSImageGeneratorValue;
(...skipping 17 matching lines...) Expand all
54 55
55 PassRefPtrWillBeRawPtr<StyleImage> styleImage(Document&, CSSPropertyID, CSSV alue*); 56 PassRefPtrWillBeRawPtr<StyleImage> styleImage(Document&, CSSPropertyID, CSSV alue*);
56 57
57 PassRefPtrWillBeRawPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID , CSSImageGeneratorValue*); 58 PassRefPtrWillBeRawPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID , CSSImageGeneratorValue*);
58 PassRefPtrWillBeRawPtr<StyleImage> cachedOrPendingFromValue(Document&, CSSPr opertyID, CSSImageValue*); 59 PassRefPtrWillBeRawPtr<StyleImage> cachedOrPendingFromValue(Document&, CSSPr opertyID, CSSImageValue*);
59 PassRefPtrWillBeRawPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSI mageSetValue*); 60 PassRefPtrWillBeRawPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSI mageSetValue*);
60 PassRefPtrWillBeRawPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, C SSCursorImageValue*); 61 PassRefPtrWillBeRawPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, C SSCursorImageValue*);
61 62
62 const PendingImagePropertyMap& pendingImageProperties() const { return m_pen dingImageProperties; } 63 const PendingImagePropertyMap& pendingImageProperties() const { return m_pen dingImageProperties; }
63 const PendingSVGDocumentMap& pendingSVGDocuments() const { return m_pendingS VGDocuments; } 64 const PendingSVGDocumentMap& pendingSVGDocuments() const { return m_pendingS VGDocuments; }
65 const CSSStyleImageMap& cssImages() const { return m_cssImages; }
66 CSSStyleImageMap& mutableCssImages() { return m_cssImages; }
64 67
65 void clearPendingImageProperties(); 68 void clearPendingImageProperties();
66 void clearPendingSVGDocuments(); 69 void clearPendingSVGDocuments();
70 void clearCSSImages();
67 71
68 float deviceScaleFactor() const { return m_deviceScaleFactor; } 72 float deviceScaleFactor() const { return m_deviceScaleFactor; }
69 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d eviceScaleFactor; } 73 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d eviceScaleFactor; }
70 74
71 void addPendingSVGDocument(FilterOperation*, CSSSVGDocumentValue*); 75 void addPendingSVGDocument(FilterOperation*, CSSSVGDocumentValue*);
72 76
73 private: 77 private:
74 PendingImagePropertyMap m_pendingImageProperties; 78 PendingImagePropertyMap m_pendingImageProperties;
75 PendingSVGDocumentMap m_pendingSVGDocuments; 79 PendingSVGDocumentMap m_pendingSVGDocuments;
80
81 // A list of all the images referenced by CSS
82 CSSStyleImageMap m_cssImages;
83
76 float m_deviceScaleFactor; 84 float m_deviceScaleFactor;
77 }; 85 };
78 86
79 } // namespace blink 87 } // namespace blink
80 88
81 #endif // ElementStyleResources_h 89 #endif // ElementStyleResources_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | Source/core/css/resolver/ElementStyleResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698