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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 1489003002: Drop Image::setContainerSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to ps#1 way, with fixed is_expensive test Created 5 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 | « third_party/WebKit/Source/platform/graphics/GeneratedImage.h ('k') | no next file » | 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) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 virtual bool currentFrameIsLazyDecoded() { return false; } 83 virtual bool currentFrameIsLazyDecoded() { return false; }
84 virtual bool isTextureBacked(); 84 virtual bool isTextureBacked();
85 85
86 // Derived classes should override this if they can assure that the current 86 // Derived classes should override this if they can assure that the current
87 // image frame contains only resources from its own security origin. 87 // image frame contains only resources from its own security origin.
88 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } 88 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; }
89 89
90 static Image* nullImage(); 90 static Image* nullImage();
91 bool isNull() const { return size().isEmpty(); } 91 bool isNull() const { return size().isEmpty(); }
92 92
93 virtual void setContainerSize(const IntSize&) { }
94 virtual bool usesContainerSize() const { return false; } 93 virtual bool usesContainerSize() const { return false; }
95 virtual bool hasRelativeWidth() const { return false; } 94 virtual bool hasRelativeWidth() const { return false; }
96 virtual bool hasRelativeHeight() const { return false; } 95 virtual bool hasRelativeHeight() const { return false; }
97 96
98 // Computes (extracts) the intrinsic dimensions and ratio from the Image. Th e intrinsic ratio 97 // Computes (extracts) the intrinsic dimensions and ratio from the Image. Th e intrinsic ratio
99 // will be the 'viewport' of the image. (Same as the dimensions for a raster image. For SVG 98 // will be the 'viewport' of the image. (Same as the dimensions for a raster image. For SVG
100 // images it can be the dimensions defined by the 'viewBox'.) 99 // images it can be the dimensions defined by the 'viewBox'.)
101 virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intr insicHeight, FloatSize& intrinsicRatio); 100 virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intr insicHeight, FloatSize& intrinsicRatio);
102 101
103 virtual IntSize size() const = 0; 102 virtual IntSize size() const = 0;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 RefPtr<SharedBuffer> m_encodedImageData; 165 RefPtr<SharedBuffer> m_encodedImageData;
167 ImageObserver* m_imageObserver; 166 ImageObserver* m_imageObserver;
168 }; 167 };
169 168
170 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ 169 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \
171 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName()) 170 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName())
172 171
173 } // namespace blink 172 } // namespace blink
174 173
175 #endif 174 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GeneratedImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698