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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp

Issue 2584423002: Loading: move core/fetch to platform/loader/fetch (Closed)
Patch Set: another try Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
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"
36 #include "core/fetch/ResourceFetcher.h"
37 #include "core/frame/FrameConsole.h" 35 #include "core/frame/FrameConsole.h"
38 #include "core/frame/LocalFrame.h" 36 #include "core/frame/LocalFrame.h"
39 #include "core/frame/UseCounter.h" 37 #include "core/frame/UseCounter.h"
40 #include "core/html/parser/HTMLParserIdioms.h" 38 #include "core/html/parser/HTMLParserIdioms.h"
41 #include "core/inspector/ConsoleMessage.h" 39 #include "core/inspector/ConsoleMessage.h"
42 #include "platform/json/JSONValues.h" 40 #include "platform/json/JSONValues.h"
41 #include "platform/loader/fetch/MemoryCache.h"
42 #include "platform/loader/fetch/ResourceFetcher.h"
43 #include "wtf/text/ParsingUtilities.h" 43 #include "wtf/text/ParsingUtilities.h"
44 #include "wtf/text/StringToNumber.h" 44 #include "wtf/text/StringToNumber.h"
45 #include <algorithm> 45 #include <algorithm>
46 46
47 namespace blink { 47 namespace blink {
48 48
49 static bool compareByDensity(const ImageCandidate& first, 49 static bool compareByDensity(const ImageCandidate& first,
50 const ImageCandidate& second) { 50 const ImageCandidate& second) {
51 return first.density() < second.density(); 51 return first.density() < second.density();
52 } 52 }
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 if (!srcAttribute.isEmpty()) 500 if (!srcAttribute.isEmpty())
501 imageCandidates.push_back( 501 imageCandidates.push_back(
502 ImageCandidate(srcAttribute, 0, srcAttribute.length(), 502 ImageCandidate(srcAttribute, 0, srcAttribute.length(),
503 DescriptorParsingResult(), ImageCandidate::SrcOrigin)); 503 DescriptorParsingResult(), ImageCandidate::SrcOrigin));
504 504
505 return pickBestImageCandidate(deviceScaleFactor, sourceSize, imageCandidates) 505 return pickBestImageCandidate(deviceScaleFactor, sourceSize, imageCandidates)
506 .toString(); 506 .toString();
507 } 507 }
508 508
509 } // namespace blink 509 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698