| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 class ImageCandidate { | 68 class ImageCandidate { |
| 69 public: | 69 public: |
| 70 enum OriginAttribute { | 70 enum OriginAttribute { |
| 71 SrcsetOrigin, | 71 SrcsetOrigin, |
| 72 SrcOrigin | 72 SrcOrigin |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 ImageCandidate() | 75 ImageCandidate() |
| 76 : m_density(1.0) | 76 : m_density(1.0) |
| 77 , m_resourceWidth(UninitializedDescriptor) |
| 78 , m_originAttribute(SrcsetOrigin) |
| 77 { | 79 { |
| 78 } | 80 } |
| 79 | 81 |
| 80 ImageCandidate(const String& source, unsigned start, unsigned length, const
DescriptorParsingResult& result, OriginAttribute originAttribute) | 82 ImageCandidate(const String& source, unsigned start, unsigned length, const
DescriptorParsingResult& result, OriginAttribute originAttribute) |
| 81 : m_string(source.createView(start, length)) | 83 : m_string(source.createView(start, length)) |
| 82 , m_density(result.hasDensity()?result.density():UninitializedDescriptor
) | 84 , m_density(result.hasDensity()?result.density():UninitializedDescriptor
) |
| 83 , m_resourceWidth(result.hasWidth()?result.resourceWidth():Uninitialized
Descriptor) | 85 , m_resourceWidth(result.hasWidth()?result.resourceWidth():Uninitialized
Descriptor) |
| 84 , m_originAttribute(originAttribute) | 86 , m_originAttribute(originAttribute) |
| 85 { | 87 { |
| 86 } | 88 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 131 |
| 130 ImageCandidate bestFitSourceForSrcsetAttribute(float deviceScaleFactor, unsigned
sourceSize, const String& srcsetAttribute); | 132 ImageCandidate bestFitSourceForSrcsetAttribute(float deviceScaleFactor, unsigned
sourceSize, const String& srcsetAttribute); |
| 131 | 133 |
| 132 ImageCandidate bestFitSourceForImageAttributes(float deviceScaleFactor, unsigned
sourceSize, const String& srcAttribute, const String& srcsetAttribute); | 134 ImageCandidate bestFitSourceForImageAttributes(float deviceScaleFactor, unsigned
sourceSize, const String& srcAttribute, const String& srcsetAttribute); |
| 133 | 135 |
| 134 String bestFitSourceForImageAttributes(float deviceScaleFactor, unsigned sourceS
ize, const String& srcAttribute, ImageCandidate& srcsetImageCandidate); | 136 String bestFitSourceForImageAttributes(float deviceScaleFactor, unsigned sourceS
ize, const String& srcAttribute, ImageCandidate& srcsetImageCandidate); |
| 135 | 137 |
| 136 } | 138 } |
| 137 | 139 |
| 138 #endif | 140 #endif |
| OLD | NEW |