| 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. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "core/CSSPropertyNames.h" | 27 #include "core/CSSPropertyNames.h" |
| 28 #include "core/css/CSSPropertyIDTemplates.h" | 28 #include "core/css/CSSPropertyIDTemplates.h" |
| 29 #include "platform/CrossOriginAttributeValue.h" | 29 #include "platform/CrossOriginAttributeValue.h" |
| 30 #include "platform/graphics/Color.h" | 30 #include "platform/graphics/Color.h" |
| 31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 32 #include "wtf/HashMap.h" | 32 #include "wtf/HashMap.h" |
| 33 #include "wtf/Noncopyable.h" | 33 #include "wtf/Noncopyable.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class CSSCursorImageValue; | |
| 38 class CSSImageGeneratorValue; | 37 class CSSImageGeneratorValue; |
| 39 class CSSImageSetValue; | 38 class CSSImageSetValue; |
| 40 class CSSImageValue; | 39 class CSSImageValue; |
| 41 class CSSURIValue; | 40 class CSSURIValue; |
| 42 class CSSValue; | 41 class CSSValue; |
| 43 class ComputedStyle; | 42 class ComputedStyle; |
| 44 class Document; | 43 class Document; |
| 45 class SVGElementProxy; | 44 class SVGElementProxy; |
| 46 class StyleImage; | 45 class StyleImage; |
| 47 class StylePendingImage; | 46 class StylePendingImage; |
| 48 | 47 |
| 49 // Holds information about resources, requested by stylesheets. | 48 // Holds information about resources, requested by stylesheets. |
| 50 // Lifetime: per-element style resolve. | 49 // Lifetime: per-element style resolve. |
| 51 class ElementStyleResources { | 50 class ElementStyleResources { |
| 52 STACK_ALLOCATED(); | 51 STACK_ALLOCATED(); |
| 53 WTF_MAKE_NONCOPYABLE(ElementStyleResources); | 52 WTF_MAKE_NONCOPYABLE(ElementStyleResources); |
| 54 | 53 |
| 55 public: | 54 public: |
| 56 ElementStyleResources(Document&, float deviceScaleFactor); | 55 ElementStyleResources(Document&, float deviceScaleFactor); |
| 57 | 56 |
| 58 StyleImage* styleImage(CSSPropertyID, const CSSValue&); | 57 StyleImage* styleImage(CSSPropertyID, const CSSValue&); |
| 59 StyleImage* cachedOrPendingFromValue(CSSPropertyID, const CSSImageValue&); | 58 StyleImage* cachedOrPendingFromValue(CSSPropertyID, const CSSImageValue&); |
| 60 StyleImage* setOrPendingFromValue(CSSPropertyID, const CSSImageSetValue&); | 59 StyleImage* setOrPendingFromValue(CSSPropertyID, const CSSImageSetValue&); |
| 61 SVGElementProxy& cachedOrPendingFromValue(const CSSURIValue&); | 60 SVGElementProxy& cachedOrPendingFromValue(const CSSURIValue&); |
| 62 | 61 |
| 63 void loadPendingResources(ComputedStyle*); | 62 void loadPendingResources(ComputedStyle*); |
| 64 | 63 |
| 65 private: | 64 private: |
| 66 StyleImage* cursorOrPendingFromValue(CSSPropertyID, | |
| 67 const CSSCursorImageValue&); | |
| 68 StyleImage* generatedOrPendingFromValue(CSSPropertyID, | 65 StyleImage* generatedOrPendingFromValue(CSSPropertyID, |
| 69 const CSSImageGeneratorValue&); | 66 const CSSImageGeneratorValue&); |
| 70 | 67 |
| 71 void loadPendingSVGDocuments(ComputedStyle*); | 68 void loadPendingSVGDocuments(ComputedStyle*); |
| 72 void loadPendingImages(ComputedStyle*); | 69 void loadPendingImages(ComputedStyle*); |
| 73 | 70 |
| 74 StyleImage* loadPendingImage( | 71 StyleImage* loadPendingImage( |
| 75 ComputedStyle*, | 72 ComputedStyle*, |
| 76 StylePendingImage*, | 73 StylePendingImage*, |
| 77 CrossOriginAttributeValue = CrossOriginAttributeNotSet); | 74 CrossOriginAttributeValue = CrossOriginAttributeNotSet); |
| 78 | 75 |
| 79 Member<Document> m_document; | 76 Member<Document> m_document; |
| 80 HashSet<CSSPropertyID> m_pendingImageProperties; | 77 HashSet<CSSPropertyID> m_pendingImageProperties; |
| 81 float m_deviceScaleFactor; | 78 float m_deviceScaleFactor; |
| 82 }; | 79 }; |
| 83 | 80 |
| 84 } // namespace blink | 81 } // namespace blink |
| 85 | 82 |
| 86 #endif // ElementStyleResources_h | 83 #endif // ElementStyleResources_h |
| OLD | NEW |