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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp

Issue 2805683005: Merge SecurityOrigin::canAccessCheckSuborigins into canAccess (Closed)
Patch Set: 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (m_isInlineStylesheet) 249 if (m_isInlineStylesheet)
250 return true; 250 return true;
251 KURL baseURL = m_contents->baseURL(); 251 KURL baseURL = m_contents->baseURL();
252 if (baseURL.isEmpty()) 252 if (baseURL.isEmpty())
253 return true; 253 return true;
254 Document* document = ownerDocument(); 254 Document* document = ownerDocument();
255 if (!document) 255 if (!document)
256 return true; 256 return true;
257 if (document->getSecurityOrigin()->canRequestNoSuborigin(baseURL)) 257 if (document->getSecurityOrigin()->canRequestNoSuborigin(baseURL))
258 return true; 258 return true;
259 if (m_allowRuleAccessFromOrigin && 259 if (m_allowRuleAccessFromOrigin && document->getSecurityOrigin()->canAccess(
260 document->getSecurityOrigin()->canAccessCheckSuborigins( 260 m_allowRuleAccessFromOrigin.get())) {
261 m_allowRuleAccessFromOrigin.get()))
262 return true; 261 return true;
262 }
263 return false; 263 return false;
264 } 264 }
265 265
266 CSSRuleList* CSSStyleSheet::rules() { 266 CSSRuleList* CSSStyleSheet::rules() {
267 return cssRules(); 267 return cssRules();
268 } 268 }
269 269
270 unsigned CSSStyleSheet::insertRule(const String& ruleString, 270 unsigned CSSStyleSheet::insertRule(const String& ruleString,
271 unsigned index, 271 unsigned index,
272 ExceptionState& exceptionState) { 272 ExceptionState& exceptionState) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 visitor->trace(m_deviceDependentMediaQueryResults); 450 visitor->trace(m_deviceDependentMediaQueryResults);
451 visitor->trace(m_ownerNode); 451 visitor->trace(m_ownerNode);
452 visitor->trace(m_ownerRule); 452 visitor->trace(m_ownerRule);
453 visitor->trace(m_mediaCSSOMWrapper); 453 visitor->trace(m_mediaCSSOMWrapper);
454 visitor->trace(m_childRuleCSSOMWrappers); 454 visitor->trace(m_childRuleCSSOMWrappers);
455 visitor->trace(m_ruleListCSSOMWrapper); 455 visitor->trace(m_ruleListCSSOMWrapper);
456 StyleSheet::trace(visitor); 456 StyleSheet::trace(visitor);
457 } 457 }
458 458
459 } // namespace blink 459 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp ('k') | third_party/WebKit/Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698