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

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

Issue 1427943002: Wrap SVGImage for container during paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use IntSize for SVGImageForContainer Created 5 years, 1 month 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #endif 60 #endif
61 61
62 bool canRender(const LayoutObject&, float multiplier) const override; 62 bool canRender(const LayoutObject&, float multiplier) const override;
63 bool isLoaded() const override; 63 bool isLoaded() const override;
64 bool errorOccurred() const override; 64 bool errorOccurred() const override;
65 LayoutSize imageSize(const LayoutObject*, float multiplier) const override; 65 LayoutSize imageSize(const LayoutObject*, float multiplier) const override;
66 bool imageHasRelativeWidth() const override; 66 bool imageHasRelativeWidth() const override;
67 bool imageHasRelativeHeight() const override; 67 bool imageHasRelativeHeight() const override;
68 void computeIntrinsicDimensions(const LayoutObject*, Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio) override; 68 void computeIntrinsicDimensions(const LayoutObject*, Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio) override;
69 bool usesImageContainerSize() const override; 69 bool usesImageContainerSize() const override;
70 void setContainerSizeForLayoutObject(const LayoutObject*, const IntSize&, fl oat) override;
71 void addClient(LayoutObject*) override; 70 void addClient(LayoutObject*) override;
72 void removeClient(LayoutObject*) override; 71 void removeClient(LayoutObject*) override;
73 PassRefPtr<Image> image(const LayoutObject*, const IntSize&) const override; 72 PassRefPtr<Image> image(const LayoutObject*, const IntSize&, float) const ov erride;
74 float imageScaleFactor() const override { return m_imageScaleFactor; } 73 float imageScaleFactor() const override { return m_imageScaleFactor; }
75 bool knownToBeOpaque(const LayoutObject*) const override; 74 bool knownToBeOpaque(const LayoutObject*) const override;
76 ImageResource* cachedImage() const override; 75 ImageResource* cachedImage() const override;
77 76
78 DECLARE_VIRTUAL_TRACE(); 77 DECLARE_VIRTUAL_TRACE();
79 78
80 private: 79 private:
81 StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValu e*); 80 StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValu e*);
82 81
83 String debugName() const override { return "StyleFetchedImageSet"; } 82 String debugName() const override { return "StyleFetchedImageSet"; }
84 83
85 ResourcePtr<ImageResource> m_bestFitImage; 84 ResourcePtr<ImageResource> m_bestFitImage;
86 float m_imageScaleFactor; 85 float m_imageScaleFactor;
87 86
88 RawPtrWillBeMember<CSSImageSetValue> m_imageSetValue; // Not retained; it ow ns us. 87 RawPtrWillBeMember<CSSImageSetValue> m_imageSetValue; // Not retained; it ow ns us.
89 }; 88 };
90 89
91 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); 90 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet());
92 91
93 } // namespace blink 92 } // namespace blink
94 93
95 #endif // StyleFetchedImageSet_h 94 #endif // StyleFetchedImageSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698