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

Unified Diff: Source/core/html/parser/HTMLSrcsetParser.cpp

Issue 249353002: Fix srcset selection bug when 'w' and src are present (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@calc
Patch Set: Really fixed expected results Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..971e77ee3f68dfa0fcd4441271f3365919f87da4 100644
--- a/Source/core/html/parser/HTMLSrcsetParser.cpp
+++ b/Source/core/html/parser/HTMLSrcsetParser.cpp
@@ -164,7 +164,10 @@ static ImageCandidate pickBestImageCandidate(float deviceScaleFactor, unsigned s
break;
}
+ if (imageCandidates[i].srcOrigin() && ignoreSrc)
+ --i;
eseidel 2014/04/23 20:55:27 And i is never 0 here? can't fall off the end of t
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
« no previous file with comments | « LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698