| 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 19 matching lines...) Expand all Loading... |
| 30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
| 31 #include "wtf/HashMap.h" | 31 #include "wtf/HashMap.h" |
| 32 #include "wtf/Noncopyable.h" | 32 #include "wtf/Noncopyable.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class CSSCursorImageValue; | 36 class CSSCursorImageValue; |
| 37 class CSSImageGeneratorValue; | 37 class CSSImageGeneratorValue; |
| 38 class CSSImageSetValue; | 38 class CSSImageSetValue; |
| 39 class CSSImageValue; | 39 class CSSImageValue; |
| 40 class CSSSVGDocumentValue; | 40 class CSSURIValue; |
| 41 class CSSValue; | 41 class CSSValue; |
| 42 class ComputedStyle; | 42 class ComputedStyle; |
| 43 class Document; | 43 class Document; |
| 44 class FilterOperation; | 44 class FilterOperation; |
| 45 class StyleImage; | 45 class StyleImage; |
| 46 class StylePendingImage; | 46 class StylePendingImage; |
| 47 | 47 |
| 48 // Holds information about resources, requested by stylesheets. | 48 // Holds information about resources, requested by stylesheets. |
| 49 // Lifetime: per-element style resolve. | 49 // Lifetime: per-element style resolve. |
| 50 class ElementStyleResources { | 50 class ElementStyleResources { |
| 51 STACK_ALLOCATED(); | 51 STACK_ALLOCATED(); |
| 52 WTF_MAKE_NONCOPYABLE(ElementStyleResources); | 52 WTF_MAKE_NONCOPYABLE(ElementStyleResources); |
| 53 public: | 53 public: |
| 54 ElementStyleResources(Document&, float deviceScaleFactor); | 54 ElementStyleResources(Document&, float deviceScaleFactor); |
| 55 | 55 |
| 56 StyleImage* styleImage(CSSPropertyID, const CSSValue&); | 56 StyleImage* styleImage(CSSPropertyID, const CSSValue&); |
| 57 StyleImage* cachedOrPendingFromValue(CSSPropertyID, const CSSImageValue&); | 57 StyleImage* cachedOrPendingFromValue(CSSPropertyID, const CSSImageValue&); |
| 58 StyleImage* setOrPendingFromValue(CSSPropertyID, const CSSImageSetValue&); | 58 StyleImage* setOrPendingFromValue(CSSPropertyID, const CSSImageSetValue&); |
| 59 | 59 |
| 60 void loadPendingResources(ComputedStyle*); | 60 void loadPendingResources(ComputedStyle*); |
| 61 | 61 |
| 62 void addPendingSVGDocument(FilterOperation*, const CSSSVGDocumentValue*); | 62 void addPendingSVGDocument(FilterOperation*, const CSSURIValue*); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 StyleImage* cursorOrPendingFromValue(CSSPropertyID, const CSSCursorImageValu
e&); | 65 StyleImage* cursorOrPendingFromValue(CSSPropertyID, const CSSCursorImageValu
e&); |
| 66 StyleImage* generatedOrPendingFromValue(CSSPropertyID, const CSSImageGenerat
orValue&); | 66 StyleImage* generatedOrPendingFromValue(CSSPropertyID, const CSSImageGenerat
orValue&); |
| 67 | 67 |
| 68 void loadPendingSVGDocuments(ComputedStyle*); | 68 void loadPendingSVGDocuments(ComputedStyle*); |
| 69 void loadPendingImages(ComputedStyle*); | 69 void loadPendingImages(ComputedStyle*); |
| 70 | 70 |
| 71 StyleImage* loadPendingImage(ComputedStyle*, StylePendingImage*, CrossOrigin
AttributeValue = CrossOriginAttributeNotSet); | 71 StyleImage* loadPendingImage(ComputedStyle*, StylePendingImage*, CrossOrigin
AttributeValue = CrossOriginAttributeNotSet); |
| 72 | 72 |
| 73 Member<Document> m_document; | 73 Member<Document> m_document; |
| 74 HashSet<CSSPropertyID> m_pendingImageProperties; | 74 HashSet<CSSPropertyID> m_pendingImageProperties; |
| 75 HeapHashMap<Member<FilterOperation>, Member<const CSSSVGDocumentValue>> m_pe
ndingSVGDocuments; | 75 HeapHashMap<Member<FilterOperation>, Member<const CSSURIValue>> m_pendingSVG
Documents; |
| 76 float m_deviceScaleFactor; | 76 float m_deviceScaleFactor; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| 80 | 80 |
| 81 #endif // ElementStyleResources_h | 81 #endif // ElementStyleResources_h |
| OLD | NEW |