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

Side by Side Diff: sky/engine/core/css/CSSImageSetValue.h

Issue 799113003: Remove hasFailedOrCanceledSubresources. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/css/CSSFontFaceSrcValue.cpp ('k') | sky/engine/core/css/CSSImageSetValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 String customCSSText() const; 54 String customCSSText() const;
55 55
56 bool isPending() const { return !m_accessedBestFitImage; } 56 bool isPending() const { return !m_accessedBestFitImage; }
57 57
58 struct ImageWithScale { 58 struct ImageWithScale {
59 String imageURL; 59 String imageURL;
60 Referrer referrer; 60 Referrer referrer;
61 float scaleFactor; 61 float scaleFactor;
62 }; 62 };
63 63
64 bool hasFailedOrCanceledSubresources() const;
65
66 PassRefPtr<CSSImageSetValue> cloneForCSSOM() const; 64 PassRefPtr<CSSImageSetValue> cloneForCSSOM() const;
67 65
68 protected: 66 protected:
69 ImageWithScale bestImageForScaleFactor(); 67 ImageWithScale bestImageForScaleFactor();
70 68
71 private: 69 private:
72 CSSImageSetValue(); 70 CSSImageSetValue();
73 explicit CSSImageSetValue(const CSSImageSetValue& cloneFrom); 71 explicit CSSImageSetValue(const CSSImageSetValue& cloneFrom);
74 72
75 void fillImageSet(); 73 void fillImageSet();
76 static inline bool compareByScaleFactor(ImageWithScale first, ImageWithScale second) { return first.scaleFactor < second.scaleFactor; } 74 static inline bool compareByScaleFactor(ImageWithScale first, ImageWithScale second) { return first.scaleFactor < second.scaleFactor; }
77 75
78 RefPtr<StyleImage> m_imageSet; 76 RefPtr<StyleImage> m_imageSet;
79 bool m_accessedBestFitImage; 77 bool m_accessedBestFitImage;
80 78
81 // This represents the scale factor that we used to find the best fit image. It does not necessarily 79 // This represents the scale factor that we used to find the best fit image. It does not necessarily
82 // correspond to the scale factor of the best fit image. 80 // correspond to the scale factor of the best fit image.
83 float m_scaleFactor; 81 float m_scaleFactor;
84 82
85 Vector<ImageWithScale> m_imagesInSet; 83 Vector<ImageWithScale> m_imagesInSet;
86 }; 84 };
87 85
88 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageSetValue, isImageSetValue()); 86 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageSetValue, isImageSetValue());
89 87
90 } // namespace blink 88 } // namespace blink
91 89
92 #endif // SKY_ENGINE_CORE_CSS_CSSIMAGESETVALUE_H_ 90 #endif // SKY_ENGINE_CORE_CSS_CSSIMAGESETVALUE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSFontFaceSrcValue.cpp ('k') | sky/engine/core/css/CSSImageSetValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698