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

Side by Side Diff: third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp

Issue 2776163002: Change CSSParserContext to either take explicit or implicit referrer (Closed)
Patch Set: updates Created 3 years, 8 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) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 const String& href, 188 const String& href,
189 const KURL& baseURL, 189 const KURL& baseURL,
190 const String& charset, 190 const String& charset,
191 const CSSStyleSheetResource* sheet) { 191 const CSSStyleSheetResource* sheet) {
192 if (!isConnected()) { 192 if (!isConnected()) {
193 DCHECK(!m_sheet); 193 DCHECK(!m_sheet);
194 return; 194 return;
195 } 195 }
196 196
197 DCHECK(m_isCSS); 197 DCHECK(m_isCSS);
198 CSSParserContext* parserContext = 198 CSSParserContext* parserContext = CSSParserContext::create(
199 CSSParserContext::create(document(), baseURL, charset); 199 document(), baseURL, document().getReferrerPolicy(), charset);
200 200
201 StyleSheetContents* newSheet = 201 StyleSheetContents* newSheet =
202 StyleSheetContents::create(href, parserContext); 202 StyleSheetContents::create(href, parserContext);
203 203
204 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, *this); 204 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, *this);
205 cssSheet->setDisabled(m_alternate); 205 cssSheet->setDisabled(m_alternate);
206 cssSheet->setTitle(m_title); 206 cssSheet->setTitle(m_title);
207 if (!m_alternate && !m_title.isEmpty()) 207 if (!m_alternate && !m_title.isEmpty())
208 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title); 208 document().styleEngine().setPreferredStylesheetSetNameIfNotSet(m_title);
209 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); 209 cssSheet->setMediaQueries(MediaQuerySet::create(m_media));
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 293
294 DEFINE_TRACE(ProcessingInstruction) { 294 DEFINE_TRACE(ProcessingInstruction) {
295 visitor->trace(m_sheet); 295 visitor->trace(m_sheet);
296 visitor->trace(m_listenerForXSLT); 296 visitor->trace(m_listenerForXSLT);
297 CharacterData::trace(visitor); 297 CharacterData::trace(visitor);
298 ResourceOwner<StyleSheetResource>::trace(visitor); 298 ResourceOwner<StyleSheetResource>::trace(visitor);
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698