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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImageSet.h

Issue 2847303002: Remove unnecessary zoom argument from GetImage() as its value is always available through the Layou… (Closed)
Patch Set: (rebased) Created 3 years, 7 months 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 bool IsLoaded() const override; 62 bool IsLoaded() const override;
63 bool ErrorOccurred() const override; 63 bool ErrorOccurred() const override;
64 LayoutSize ImageSize(const LayoutObject&, 64 LayoutSize ImageSize(const LayoutObject&,
65 float multiplier, 65 float multiplier,
66 const LayoutSize& default_object_size) const override; 66 const LayoutSize& default_object_size) const override;
67 bool ImageHasRelativeSize() const override; 67 bool ImageHasRelativeSize() const override;
68 bool UsesImageContainerSize() const override; 68 bool UsesImageContainerSize() const override;
69 void AddClient(LayoutObject*) override; 69 void AddClient(LayoutObject*) override;
70 void RemoveClient(LayoutObject*) override; 70 void RemoveClient(LayoutObject*) override;
71 PassRefPtr<Image> GetImage(const LayoutObject&, 71 PassRefPtr<Image> GetImage(const LayoutObject&,
72 const IntSize&, 72 const IntSize&) const override;
73 float) const override;
74 float ImageScaleFactor() const override { return image_scale_factor_; } 73 float ImageScaleFactor() const override { return image_scale_factor_; }
75 bool KnownToBeOpaque(const LayoutObject&) const override; 74 bool KnownToBeOpaque(const LayoutObject&) const override;
76 ImageResourceContent* CachedImage() const override; 75 ImageResourceContent* CachedImage() const override;
77 76
78 DECLARE_VIRTUAL_TRACE(); 77 DECLARE_VIRTUAL_TRACE();
79 78
80 private: 79 private:
81 StyleFetchedImageSet(ImageResourceContent*, 80 StyleFetchedImageSet(ImageResourceContent*,
82 float image_scale_factor, 81 float image_scale_factor,
83 CSSImageSetValue*, 82 CSSImageSetValue*,
84 const KURL&); 83 const KURL&);
85 84
86 void Dispose(); 85 void Dispose();
87 86
88 String DebugName() const override { return "StyleFetchedImageSet"; } 87 String DebugName() const override { return "StyleFetchedImageSet"; }
89 88
90 Member<ImageResourceContent> best_fit_image_; 89 Member<ImageResourceContent> best_fit_image_;
91 float image_scale_factor_; 90 float image_scale_factor_;
92 91
93 Member<CSSImageSetValue> image_set_value_; // Not retained; it owns us. 92 Member<CSSImageSetValue> image_set_value_; // Not retained; it owns us.
94 const KURL url_; 93 const KURL url_;
95 }; 94 };
96 95
97 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, IsImageResourceSet()); 96 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, IsImageResourceSet());
98 97
99 } // namespace blink 98 } // namespace blink
100 99
101 #endif // StyleFetchedImageSet_h 100 #endif // StyleFetchedImageSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698