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

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

Issue 2043753002: Declarative resource hints go through mojo IPC to //content Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use unique_ptr to avoid memory leaks in unit tests Created 4 years, 6 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "core/frame/LocalFrame.h" 42 #include "core/frame/LocalFrame.h"
43 #include "core/frame/SubresourceIntegrity.h" 43 #include "core/frame/SubresourceIntegrity.h"
44 #include "core/frame/UseCounter.h" 44 #include "core/frame/UseCounter.h"
45 #include "core/frame/csp/ContentSecurityPolicy.h" 45 #include "core/frame/csp/ContentSecurityPolicy.h"
46 #include "core/html/CrossOriginAttribute.h" 46 #include "core/html/CrossOriginAttribute.h"
47 #include "core/html/LinkManifest.h" 47 #include "core/html/LinkManifest.h"
48 #include "core/html/imports/LinkImport.h" 48 #include "core/html/imports/LinkImport.h"
49 #include "core/inspector/ConsoleMessage.h" 49 #include "core/inspector/ConsoleMessage.h"
50 #include "core/loader/FrameLoader.h" 50 #include "core/loader/FrameLoader.h"
51 #include "core/loader/FrameLoaderClient.h" 51 #include "core/loader/FrameLoaderClient.h"
52 #include "core/loader/NetworkHintsInterface.h"
53 #include "core/style/StyleInheritedData.h" 52 #include "core/style/StyleInheritedData.h"
54 #include "platform/ContentType.h" 53 #include "platform/ContentType.h"
55 #include "platform/Histogram.h" 54 #include "platform/Histogram.h"
56 #include "platform/MIMETypeRegistry.h" 55 #include "platform/MIMETypeRegistry.h"
57 #include "platform/RuntimeEnabledFeatures.h" 56 #include "platform/RuntimeEnabledFeatures.h"
58 #include "wtf/StdLibExtras.h" 57 #include "wtf/StdLibExtras.h"
59 58
60 namespace blink { 59 namespace blink {
61 60
62 using namespace HTMLNames; 61 using namespace HTMLNames;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 201 }
203 } 202 }
204 203
205 bool HTMLLinkElement::shouldLoadLink() 204 bool HTMLLinkElement::shouldLoadLink()
206 { 205 {
207 return inShadowIncludingDocument(); 206 return inShadowIncludingDocument();
208 } 207 }
209 208
210 bool HTMLLinkElement::loadLink(const String& type, const String& as, const Strin g& media, const KURL& url) 209 bool HTMLLinkElement::loadLink(const String& type, const String& as, const Strin g& media, const KURL& url)
211 { 210 {
212 return m_linkLoader->loadLink(m_relAttribute, crossOriginAttributeValue(fast GetAttribute(HTMLNames::crossoriginAttr)), type, as, media, url, document(), Net workHintsInterfaceImpl()); 211 return m_linkLoader->loadLink(m_relAttribute, crossOriginAttributeValue(fast GetAttribute(HTMLNames::crossoriginAttr)), type, as, media, url, document());
213 } 212 }
214 213
215 LinkResource* HTMLLinkElement::linkResourceToProcess() 214 LinkResource* HTMLLinkElement::linkResourceToProcess()
216 { 215 {
217 bool visible = inShadowIncludingDocument() && !m_isInShadowTree; 216 bool visible = inShadowIncludingDocument() && !m_isInShadowTree;
218 if (!visible) { 217 if (!visible) {
219 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); 218 ASSERT(!linkStyle() || !linkStyle()->hasSheet());
220 return nullptr; 219 return nullptr;
221 } 220 }
222 221
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 } 785 }
787 786
788 DEFINE_TRACE(LinkStyle) 787 DEFINE_TRACE(LinkStyle)
789 { 788 {
790 visitor->trace(m_sheet); 789 visitor->trace(m_sheet);
791 LinkResource::trace(visitor); 790 LinkResource::trace(visitor);
792 ResourceOwner<StyleSheetResource>::trace(visitor); 791 ResourceOwner<StyleSheetResource>::trace(visitor);
793 } 792 }
794 793
795 } // namespace blink 794 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698