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

Side by Side Diff: Source/core/dom/IconURL.cpp

Issue 196743002: Parse the link element's size attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 6 years, 9 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 { 37 {
38 ASSERT(documentURL.protocolIsInHTTPFamily()); 38 ASSERT(documentURL.protocolIsInHTTPFamily());
39 KURL url; 39 KURL url;
40 bool couldSetProtocol = url.setProtocol(documentURL.protocol()); 40 bool couldSetProtocol = url.setProtocol(documentURL.protocol());
41 ASSERT_UNUSED(couldSetProtocol, couldSetProtocol); 41 ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
42 url.setHost(documentURL.host()); 42 url.setHost(documentURL.host());
43 if (documentURL.hasPort()) 43 if (documentURL.hasPort())
44 url.setPort(documentURL.port()); 44 url.setPort(documentURL.port());
45 url.setPath("/favicon.ico"); 45 url.setPath("/favicon.ico");
46 46
47 IconURL result(url, emptyString(), emptyString(), Favicon); 47 IconURL result(url, Vector<IntSize>(), emptyString(), Favicon);
48 result.m_isDefaultIcon = true; 48 result.m_isDefaultIcon = true;
49 return result; 49 return result;
50 } 50 }
51 51
52 bool operator==(const IconURL& lhs, const IconURL& rhs) 52 bool operator==(const IconURL& lhs, const IconURL& rhs)
53 { 53 {
54 return lhs.m_iconType == rhs.m_iconType 54 return lhs.m_iconType == rhs.m_iconType
55 && lhs.m_isDefaultIcon == rhs.m_isDefaultIcon 55 && lhs.m_isDefaultIcon == rhs.m_isDefaultIcon
56 && lhs.m_iconURL == rhs.m_iconURL 56 && lhs.m_iconURL == rhs.m_iconURL
57 && lhs.m_sizes == rhs.m_sizes 57 && lhs.m_sizes == rhs.m_sizes
58 && lhs.m_mimeType == rhs.m_mimeType; 58 && lhs.m_mimeType == rhs.m_mimeType;
59 } 59 }
60 60
61 } 61 }
62 62
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698