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 21 matching lines...) Expand all Loading... |
32 #include "core/html/parser/HTMLSrcsetParser.h" | 32 #include "core/html/parser/HTMLSrcsetParser.h" |
33 | 33 |
34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
35 #include "core/fetch/MemoryCache.h" | 35 #include "core/fetch/MemoryCache.h" |
36 #include "core/fetch/ResourceFetcher.h" | 36 #include "core/fetch/ResourceFetcher.h" |
37 #include "core/frame/FrameConsole.h" | 37 #include "core/frame/FrameConsole.h" |
38 #include "core/frame/LocalFrame.h" | 38 #include "core/frame/LocalFrame.h" |
39 #include "core/frame/UseCounter.h" | 39 #include "core/frame/UseCounter.h" |
40 #include "core/html/parser/HTMLParserIdioms.h" | 40 #include "core/html/parser/HTMLParserIdioms.h" |
41 #include "core/inspector/ConsoleMessage.h" | 41 #include "core/inspector/ConsoleMessage.h" |
42 #include "platform/ParsingUtilities.h" | 42 #include "wtf/text/ParsingUtilities.h" |
43 #include "wtf/text/StringToNumber.h" | 43 #include "wtf/text/StringToNumber.h" |
44 #include <algorithm> | 44 #include <algorithm> |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 static bool compareByDensity(const ImageCandidate& first, const ImageCandidate&
second) | 48 static bool compareByDensity(const ImageCandidate& first, const ImageCandidate&
second) |
49 { | 49 { |
50 return first.density() < second.density(); | 50 return first.density() < second.density(); |
51 } | 51 } |
52 | 52 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 Vector<ImageCandidate> imageCandidates; | 436 Vector<ImageCandidate> imageCandidates; |
437 imageCandidates.append(srcsetImageCandidate); | 437 imageCandidates.append(srcsetImageCandidate); |
438 | 438 |
439 if (!srcAttribute.isEmpty()) | 439 if (!srcAttribute.isEmpty()) |
440 imageCandidates.append(ImageCandidate(srcAttribute, 0, srcAttribute.leng
th(), DescriptorParsingResult(), ImageCandidate::SrcOrigin)); | 440 imageCandidates.append(ImageCandidate(srcAttribute, 0, srcAttribute.leng
th(), DescriptorParsingResult(), ImageCandidate::SrcOrigin)); |
441 | 441 |
442 return pickBestImageCandidate(deviceScaleFactor, sourceSize, imageCandidates
).toString(); | 442 return pickBestImageCandidate(deviceScaleFactor, sourceSize, imageCandidates
).toString(); |
443 } | 443 } |
444 | 444 |
445 } // namespace blink | 445 } // namespace blink |
OLD | NEW |