| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class CSSCursorImageValue; | 34 class CSSCursorImageValue; |
| 35 class CSSImageValue; | 35 class CSSImageValue; |
| 36 class CSSImageGeneratorValue; | 36 class CSSImageGeneratorValue; |
| 37 class CSSImageSetValue; | 37 class CSSImageSetValue; |
| 38 class CSSSVGDocumentValue; | 38 class CSSSVGDocumentValue; |
| 39 class CSSValue; | 39 class CSSValue; |
| 40 class FilterOperation; | 40 class FilterOperation; |
| 41 class NullableCSSValue; |
| 41 class StyleImage; | 42 class StyleImage; |
| 42 class TextLinkColors; | 43 class TextLinkColors; |
| 43 | 44 |
| 44 typedef WillBeHeapHashMap<RawPtrWillBeMember<FilterOperation>, RefPtrWillBeMembe
r<CSSSVGDocumentValue>> PendingSVGDocumentMap; | 45 typedef WillBeHeapHashMap<RawPtrWillBeMember<FilterOperation>, RefPtrWillBeMembe
r<CSSSVGDocumentValue>> PendingSVGDocumentMap; |
| 45 typedef WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<CSSValue>> PendingIm
agePropertyMap; | 46 typedef WillBeHeapHashMap<CSSPropertyID, NullableCSSValue> PendingImagePropertyM
ap; |
| 46 | 47 |
| 47 // Holds information about resources, requested by stylesheets. | 48 // Holds information about resources, requested by stylesheets. |
| 48 // Lifetime: per-element style resolve. | 49 // Lifetime: per-element style resolve. |
| 49 class ElementStyleResources { | 50 class ElementStyleResources { |
| 50 STACK_ALLOCATED(); | 51 STACK_ALLOCATED(); |
| 51 WTF_MAKE_NONCOPYABLE(ElementStyleResources); | 52 WTF_MAKE_NONCOPYABLE(ElementStyleResources); |
| 52 public: | 53 public: |
| 53 ElementStyleResources(); | 54 ElementStyleResources(); |
| 54 | 55 |
| 55 PassRefPtr<StyleImage> styleImage(Document&, const TextLinkColors&, Color cu
rrentColor, CSSPropertyID, CSSValue*); | 56 PassRefPtr<StyleImage> styleImage(Document&, const TextLinkColors&, Color cu
rrentColor, CSSPropertyID, CSSValue); |
| 56 | 57 |
| 57 PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGe
neratorValue*); | 58 PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGe
neratorValue*); |
| 58 PassRefPtr<StyleImage> cachedOrPendingFromValue(Document&, CSSPropertyID, CS
SImageValue*); | 59 PassRefPtr<StyleImage> cachedOrPendingFromValue(Document&, CSSPropertyID, CS
SImageValue&); |
| 59 PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue
*); | 60 PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue
&); |
| 60 PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImag
eValue*); | 61 PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImag
eValue&); |
| 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; } |
| 64 | 65 |
| 65 void clearPendingImageProperties(); | 66 void clearPendingImageProperties(); |
| 66 void clearPendingSVGDocuments(); | 67 void clearPendingSVGDocuments(); |
| 67 | 68 |
| 68 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 69 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
| 69 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d
eviceScaleFactor; } | 70 void setDeviceScaleFactor(float deviceScaleFactor) { m_deviceScaleFactor = d
eviceScaleFactor; } |
| 70 | 71 |
| 71 void addPendingSVGDocument(FilterOperation*, CSSSVGDocumentValue*); | 72 void addPendingSVGDocument(FilterOperation*, CSSSVGDocumentValue*); |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 PendingImagePropertyMap m_pendingImageProperties; | 75 PendingImagePropertyMap m_pendingImageProperties; |
| 75 PendingSVGDocumentMap m_pendingSVGDocuments; | 76 PendingSVGDocumentMap m_pendingSVGDocuments; |
| 76 float m_deviceScaleFactor; | 77 float m_deviceScaleFactor; |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace blink | 80 } // namespace blink |
| 80 | 81 |
| 81 #endif // ElementStyleResources_h | 82 #endif // ElementStyleResources_h |
| OLD | NEW |