OLD | NEW |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Holds information about resources, requested by stylesheets. | 46 // Holds information about resources, requested by stylesheets. |
47 // Lifetime: per-element style resolve. | 47 // Lifetime: per-element style resolve. |
48 // FIXME: At least for the moment, the lifetime actually matches that of StyleRe
solverState, | 48 // FIXME: At least for the moment, the lifetime actually matches that of StyleRe
solverState, |
49 // but all data is cleared for each element resolve. We must investigate perform
ance | 49 // but all data is cleared for each element resolve. We must investigate perform
ance |
50 // implications of matching effective and intended lifetime. | 50 // implications of matching effective and intended lifetime. |
51 class ElementStyleResources { | 51 class ElementStyleResources { |
52 WTF_MAKE_NONCOPYABLE(ElementStyleResources); | 52 WTF_MAKE_NONCOPYABLE(ElementStyleResources); |
53 public: | 53 public: |
54 ElementStyleResources(); | 54 ElementStyleResources(); |
55 | 55 |
56 PassRefPtr<StyleImage> styleImage(const TextLinkColors&, Color currentColor,
CSSPropertyID, CSSValue*); | 56 PassRefPtr<StyleImage> styleImage(const TextLinkColors&, CSSPropertyID, CSSV
alue*); |
57 | 57 |
58 PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGe
neratorValue*); | 58 PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGe
neratorValue*); |
59 PassRefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue
*); | 59 PassRefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue
*); |
60 PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue
*); | 60 PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue
*); |
61 PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImag
eValue*); | 61 PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImag
eValue*); |
62 | 62 |
63 const PendingImagePropertyMap& pendingImageProperties() const { return m_pen
dingImageProperties; } | 63 const PendingImagePropertyMap& pendingImageProperties() const { return m_pen
dingImageProperties; } |
64 const PendingSVGDocumentMap& pendingSVGDocuments() const { return m_pendingS
VGDocuments; } | 64 const PendingSVGDocumentMap& pendingSVGDocuments() const { return m_pendingS
VGDocuments; } |
65 | 65 |
66 void setHasPendingShaders(bool hasPendingShaders) { m_hasPendingShaders = ha
sPendingShaders; } | 66 void setHasPendingShaders(bool hasPendingShaders) { m_hasPendingShaders = ha
sPendingShaders; } |
67 bool hasPendingShaders() const { return m_hasPendingShaders; } | 67 bool hasPendingShaders() const { return m_hasPendingShaders; } |
68 | 68 |
69 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 69 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
70 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d
eviceScaleFactor; } | 70 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d
eviceScaleFactor; } |
71 | 71 |
72 void addPendingSVGDocument(FilterOperation*, CSSSVGDocumentValue*); | 72 void addPendingSVGDocument(FilterOperation*, CSSSVGDocumentValue*); |
73 | 73 |
74 void clear(); | 74 void clear(); |
75 | 75 |
76 private: | 76 private: |
77 PendingImagePropertyMap m_pendingImageProperties; | 77 PendingImagePropertyMap m_pendingImageProperties; |
78 PendingSVGDocumentMap m_pendingSVGDocuments; | 78 PendingSVGDocumentMap m_pendingSVGDocuments; |
79 bool m_hasPendingShaders; | 79 bool m_hasPendingShaders; |
80 float m_deviceScaleFactor; | 80 float m_deviceScaleFactor; |
81 }; | 81 }; |
82 | 82 |
83 } // namespace WebCore | 83 } // namespace WebCore |
84 | 84 |
85 #endif // ElementStyleResources_h | 85 #endif // ElementStyleResources_h |
OLD | NEW |