Index: Source/core/html/parser/HTMLSrcsetParser.cpp |
diff --git a/Source/core/html/parser/HTMLSrcsetParser.cpp b/Source/core/html/parser/HTMLSrcsetParser.cpp |
index eec44809b23097c7faf8eb94c62c4a2969a58f2b..35aa976503af65a7eba548215387d5f12e296021 100644 |
--- a/Source/core/html/parser/HTMLSrcsetParser.cpp |
+++ b/Source/core/html/parser/HTMLSrcsetParser.cpp |
@@ -164,7 +164,12 @@ static ImageCandidate pickBestImageCandidate(float deviceScaleFactor, unsigned s |
break; |
} |
+ if (imageCandidates[i].srcOrigin() && ignoreSrc) { |
+ ASSERT(i > 0); |
+ --i; |
+ } |
float winningScaleFactor = imageCandidates[i].scaleFactor(); |
+ |
unsigned winner = i; |
// 16. If an entry b in candidates has the same associated ... pixel density as an earlier entry a in candidates, |
// then remove entry b |