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

Side by Side Diff: sky/engine/core/css/resolver/ElementStyleResources.h

Issue 1214633005: Remove CSS clients of ImageResource (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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) 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 *
(...skipping 14 matching lines...) Expand all
25 25
26 #include "gen/sky/core/CSSPropertyNames.h" 26 #include "gen/sky/core/CSSPropertyNames.h"
27 #include "sky/engine/platform/graphics/Color.h" 27 #include "sky/engine/platform/graphics/Color.h"
28 #include "sky/engine/platform/heap/Handle.h" 28 #include "sky/engine/platform/heap/Handle.h"
29 #include "sky/engine/wtf/HashMap.h" 29 #include "sky/engine/wtf/HashMap.h"
30 #include "sky/engine/wtf/Noncopyable.h" 30 #include "sky/engine/wtf/Noncopyable.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class CSSCursorImageValue; 34 class CSSCursorImageValue;
35 class CSSImageValue;
36 class CSSImageGeneratorValue; 35 class CSSImageGeneratorValue;
37 class CSSImageSetValue;
38 class CSSValue; 36 class CSSValue;
39 class FilterOperation; 37 class FilterOperation;
40 class StyleImage; 38 class StyleImage;
41 class TextLinkColors; 39 class TextLinkColors;
42 40
43 typedef HashMap<CSSPropertyID, RefPtr<CSSValue> > PendingImagePropertyMap; 41 typedef HashMap<CSSPropertyID, RefPtr<CSSValue> > PendingImagePropertyMap;
44 42
45 // Holds information about resources, requested by stylesheets. 43 // Holds information about resources, requested by stylesheets.
46 // Lifetime: per-element style resolve. 44 // Lifetime: per-element style resolve.
47 class ElementStyleResources { 45 class ElementStyleResources {
48 STACK_ALLOCATED(); 46 STACK_ALLOCATED();
49 WTF_MAKE_NONCOPYABLE(ElementStyleResources); 47 WTF_MAKE_NONCOPYABLE(ElementStyleResources);
50 public: 48 public:
51 ElementStyleResources(); 49 ElementStyleResources();
52 50
53 PassRefPtr<StyleImage> styleImage(Document&, const TextLinkColors&, Color cu rrentColor, CSSPropertyID, CSSValue*); 51 PassRefPtr<StyleImage> styleImage(Document&, const TextLinkColors&, Color cu rrentColor, CSSPropertyID, CSSValue*);
54 52
55 PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGe neratorValue*); 53 PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGe neratorValue*);
56 PassRefPtr<StyleImage> cachedOrPendingFromValue(Document&, CSSPropertyID, CS SImageValue*);
57 PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue *);
58 54
59 const PendingImagePropertyMap& pendingImageProperties() const { return m_pen dingImageProperties; } 55 const PendingImagePropertyMap& pendingImageProperties() const { return m_pen dingImageProperties; }
60 56
61 void clearPendingImageProperties(); 57 void clearPendingImageProperties();
62 58
63 float deviceScaleFactor() const { return m_deviceScaleFactor; } 59 float deviceScaleFactor() const { return m_deviceScaleFactor; }
64 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d eviceScaleFactor; } 60 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d eviceScaleFactor; }
65 61
66 private: 62 private:
67 PendingImagePropertyMap m_pendingImageProperties; 63 PendingImagePropertyMap m_pendingImageProperties;
68 float m_deviceScaleFactor; 64 float m_deviceScaleFactor;
69 }; 65 };
70 66
71 } // namespace blink 67 } // namespace blink
72 68
73 #endif // SKY_ENGINE_CORE_CSS_RESOLVER_ELEMENTSTYLERESOURCES_H_ 69 #endif // SKY_ENGINE_CORE_CSS_RESOLVER_ELEMENTSTYLERESOURCES_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/CSSToStyleMap.cpp ('k') | sky/engine/core/css/resolver/ElementStyleResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698