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

Side by Side Diff: third_party/WebKit/Source/core/style/StylePendingImage.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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 LayoutSize ImageSize(const LayoutObject&, 73 LayoutSize ImageSize(const LayoutObject&,
74 float /*multiplier*/, 74 float /*multiplier*/,
75 const LayoutSize& /*defaultObjectSize*/) const override { 75 const LayoutSize& /*defaultObjectSize*/) const override {
76 return LayoutSize(); 76 return LayoutSize();
77 } 77 }
78 bool ImageHasRelativeSize() const override { return false; } 78 bool ImageHasRelativeSize() const override { return false; }
79 bool UsesImageContainerSize() const override { return false; } 79 bool UsesImageContainerSize() const override { return false; }
80 void AddClient(LayoutObject*) override {} 80 void AddClient(LayoutObject*) override {}
81 void RemoveClient(LayoutObject*) override {} 81 void RemoveClient(LayoutObject*) override {}
82 PassRefPtr<Image> GetImage(const LayoutObject&, 82 PassRefPtr<Image> GetImage(const LayoutObject&,
83 const IntSize&, 83 const IntSize&) const override {
84 float) const override {
85 NOTREACHED(); 84 NOTREACHED();
86 return nullptr; 85 return nullptr;
87 } 86 }
88 bool KnownToBeOpaque(const LayoutObject&) const override { return false; } 87 bool KnownToBeOpaque(const LayoutObject&) const override { return false; }
89 88
90 DEFINE_INLINE_VIRTUAL_TRACE() { 89 DEFINE_INLINE_VIRTUAL_TRACE() {
91 visitor->Trace(value_); 90 visitor->Trace(value_);
92 StyleImage::Trace(visitor); 91 StyleImage::Trace(visitor);
93 } 92 }
94 93
95 private: 94 private:
96 explicit StylePendingImage(const CSSValue& value) 95 explicit StylePendingImage(const CSSValue& value)
97 : value_(const_cast<CSSValue*>(&value)) { 96 : value_(const_cast<CSSValue*>(&value)) {
98 is_pending_image_ = true; 97 is_pending_image_ = true;
99 } 98 }
100 99
101 // TODO(sashab): Replace this with <const CSSValue> once Member<> 100 // TODO(sashab): Replace this with <const CSSValue> once Member<>
102 // supports const types. 101 // supports const types.
103 Member<CSSValue> value_; 102 Member<CSSValue> value_;
104 }; 103 };
105 104
106 DEFINE_STYLE_IMAGE_TYPE_CASTS(StylePendingImage, IsPendingImage()); 105 DEFINE_STYLE_IMAGE_TYPE_CASTS(StylePendingImage, IsPendingImage());
107 106
108 } // namespace blink 107 } // namespace blink
109 #endif 108 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698