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

Side by Side Diff: Source/core/html/HTMLLinkElement.cpp

Issue 1245223008: Add unit and layout test to <link rel=preconnect> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: style Created 5 years, 5 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com)
7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2011 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/frame/LocalFrame.h" 44 #include "core/frame/LocalFrame.h"
45 #include "core/frame/SubresourceIntegrity.h" 45 #include "core/frame/SubresourceIntegrity.h"
46 #include "core/frame/UseCounter.h" 46 #include "core/frame/UseCounter.h"
47 #include "core/frame/csp/ContentSecurityPolicy.h" 47 #include "core/frame/csp/ContentSecurityPolicy.h"
48 #include "core/html/LinkDefaultPresentation.h" 48 #include "core/html/LinkDefaultPresentation.h"
49 #include "core/html/LinkManifest.h" 49 #include "core/html/LinkManifest.h"
50 #include "core/html/imports/LinkImport.h" 50 #include "core/html/imports/LinkImport.h"
51 #include "core/inspector/ConsoleMessage.h" 51 #include "core/inspector/ConsoleMessage.h"
52 #include "core/loader/FrameLoader.h" 52 #include "core/loader/FrameLoader.h"
53 #include "core/loader/FrameLoaderClient.h" 53 #include "core/loader/FrameLoaderClient.h"
54 #include "core/loader/NetworkHintsInterface.h"
54 #include "core/style/StyleInheritedData.h" 55 #include "core/style/StyleInheritedData.h"
55 #include "platform/RuntimeEnabledFeatures.h" 56 #include "platform/RuntimeEnabledFeatures.h"
56 #include "wtf/StdLibExtras.h" 57 #include "wtf/StdLibExtras.h"
57 58
58 namespace blink { 59 namespace blink {
59 60
60 using namespace HTMLNames; 61 using namespace HTMLNames;
61 62
62 template <typename CharacterType> 63 template <typename CharacterType>
63 static void parseSizes(const CharacterType* value, unsigned length, Vector<IntSi ze>& iconSizes) 64 static void parseSizes(const CharacterType* value, unsigned length, Vector<IntSi ze>& iconSizes)
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 198 }
198 } 199 }
199 200
200 bool HTMLLinkElement::shouldLoadLink() 201 bool HTMLLinkElement::shouldLoadLink()
201 { 202 {
202 return inDocument(); 203 return inDocument();
203 } 204 }
204 205
205 bool HTMLLinkElement::loadLink(const String& type, const String& as, const KURL& url) 206 bool HTMLLinkElement::loadLink(const String& type, const String& as, const KURL& url)
206 { 207 {
207 return m_linkLoader.loadLink(m_relAttribute, fastGetAttribute(HTMLNames::cro ssoriginAttr), type, as, url, document()); 208 return m_linkLoader.loadLink(m_relAttribute, fastGetAttribute(HTMLNames::cro ssoriginAttr), type, as, url, document(), NetworkHintsInterfaceImpl());
208 } 209 }
209 210
210 LinkResource* HTMLLinkElement::linkResourceToProcess() 211 LinkResource* HTMLLinkElement::linkResourceToProcess()
211 { 212 {
212 bool visible = inDocument() && !m_isInShadowTree; 213 bool visible = inDocument() && !m_isInShadowTree;
213 if (!visible) { 214 if (!visible) {
214 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); 215 ASSERT(!linkStyle() || !linkStyle()->hasSheet());
215 return nullptr; 216 return nullptr;
216 } 217 }
217 218
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 removePendingSheet(); 771 removePendingSheet();
771 } 772 }
772 773
773 DEFINE_TRACE(LinkStyle) 774 DEFINE_TRACE(LinkStyle)
774 { 775 {
775 visitor->trace(m_sheet); 776 visitor->trace(m_sheet);
776 LinkResource::trace(visitor); 777 LinkResource::trace(visitor);
777 } 778 }
778 779
779 } // namespace blink 780 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698