[Webkit-unassigned] [Bug 120168] Fix srcset's image candidate algorithm when DPR exceeds all candidates
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 23 12:01:29 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=120168
--- Comment #12 from Darin Adler <darin at apple.com> 2013-08-23 12:00:56 PST ---
(From update of attachment 209466)
View in context: https://bugs.webkit.org/attachment.cgi?id=209466&action=review
> Source/WebCore/html/parser/HTMLParserIdioms.cpp:369
> for (size_t i = 0; i < imageCandidates.size(); ++i) {
> if (imageCandidates[i].scaleFactor >= deviceScaleFactor)
> return imageCandidates[i].imageURL;
> }
> - return String();
> + return imageCandidates.last().imageURL;
Could also fix the loop to not waste any time looking at the scale factor for the last candidate by only going up to size - 1.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list