| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void setResourceHeight(int height) { ASSERT(height >= 0); m_resourceHeight =
(unsigned)height; } | 64 void setResourceHeight(int height) { ASSERT(height >= 0); m_resourceHeight =
(unsigned)height; } |
| 65 void setDensity(float densityToSet) { ASSERT(densityToSet >= 0); m_density =
densityToSet; } | 65 void setDensity(float densityToSet) { ASSERT(densityToSet >= 0); m_density =
densityToSet; } |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 float m_density; | 68 float m_density; |
| 69 int m_resourceWidth; | 69 int m_resourceWidth; |
| 70 int m_resourceHeight; | 70 int m_resourceHeight; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 class ImageCandidate { | 73 class ImageCandidate { |
| 74 ALLOW_ONLY_INLINE_ALLOCATION(); | 74 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 75 public: | 75 public: |
| 76 enum OriginAttribute { | 76 enum OriginAttribute { |
| 77 SrcsetOrigin, | 77 SrcsetOrigin, |
| 78 SrcOrigin | 78 SrcOrigin |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 ImageCandidate() | 81 ImageCandidate() |
| 82 : m_density(1.0) | 82 : m_density(1.0) |
| 83 , m_resourceWidth(UninitializedDescriptor) | 83 , m_resourceWidth(UninitializedDescriptor) |
| 84 , m_originAttribute(SrcsetOrigin) | 84 , m_originAttribute(SrcsetOrigin) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 ImageCandidate bestFitSourceForSrcsetAttribute(float deviceScaleFactor, float so
urceSize, const String& srcsetAttribute, Document* = nullptr); | 138 ImageCandidate bestFitSourceForSrcsetAttribute(float deviceScaleFactor, float so
urceSize, const String& srcsetAttribute, Document* = nullptr); |
| 139 | 139 |
| 140 CORE_EXPORT ImageCandidate bestFitSourceForImageAttributes(float deviceScaleFact
or, float sourceSize, const String& srcAttribute, const String& srcsetAttribute,
Document* = nullptr); | 140 CORE_EXPORT ImageCandidate bestFitSourceForImageAttributes(float deviceScaleFact
or, float sourceSize, const String& srcAttribute, const String& srcsetAttribute,
Document* = nullptr); |
| 141 | 141 |
| 142 String bestFitSourceForImageAttributes(float deviceScaleFactor, float sourceSize
, const String& srcAttribute, ImageCandidate& srcsetImageCandidate); | 142 String bestFitSourceForImageAttributes(float deviceScaleFactor, float sourceSize
, const String& srcAttribute, ImageCandidate& srcsetImageCandidate); |
| 143 | 143 |
| 144 } | 144 } |
| 145 | 145 |
| 146 #endif | 146 #endif |
| OLD | NEW |