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

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

Issue 2811793005: Rename LocalFrame::Script() to GetScriptController() (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 * Copyright (C) 2006, 2007 Rob Buis 2 * Copyright (C) 2006, 2007 Rob Buis
3 * Copyright (C) 2008 Apple, Inc. All rights reserved. 3 * Copyright (C) 2008 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (sheet_->IsLoading()) 113 if (sheet_->IsLoading())
114 owner_element.GetDocument().GetStyleEngine().RemovePendingSheet( 114 owner_element.GetDocument().GetStyleEngine().RemovePendingSheet(
115 owner_element, style_engine_context_); 115 owner_element, style_engine_context_);
116 116
117 sheet_.Release()->ClearOwnerNode(); 117 sheet_.Release()->ClearOwnerNode();
118 } 118 }
119 119
120 static bool ShouldBypassMainWorldCSP(const Element& element) { 120 static bool ShouldBypassMainWorldCSP(const Element& element) {
121 // Main world CSP is bypassed within an isolated world. 121 // Main world CSP is bypassed within an isolated world.
122 LocalFrame* frame = element.GetDocument().GetFrame(); 122 LocalFrame* frame = element.GetDocument().GetFrame();
123 if (frame && frame->Script().ShouldBypassMainWorldCSP()) 123 if (frame && frame->GetScriptController().ShouldBypassMainWorldCSP())
124 return true; 124 return true;
125 125
126 // Main world CSP is bypassed for style elements in user agent shadow DOM. 126 // Main world CSP is bypassed for style elements in user agent shadow DOM.
127 ShadowRoot* root = element.ContainingShadowRoot(); 127 ShadowRoot* root = element.ContainingShadowRoot();
128 if (root && root->GetType() == ShadowRootType::kUserAgent) 128 if (root && root->GetType() == ShadowRootType::kUserAgent)
129 return true; 129 return true;
130 130
131 return false; 131 return false;
132 } 132 }
133 133
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 void StyleElement::StartLoadingDynamicSheet(Document& document) { 198 void StyleElement::StartLoadingDynamicSheet(Document& document) {
199 document.GetStyleEngine().AddPendingSheet(style_engine_context_); 199 document.GetStyleEngine().AddPendingSheet(style_engine_context_);
200 } 200 }
201 201
202 DEFINE_TRACE(StyleElement) { 202 DEFINE_TRACE(StyleElement) {
203 visitor->Trace(sheet_); 203 visitor->Trace(sheet_);
204 } 204 }
205 205
206 } // namespace blink 206 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | third_party/WebKit/Source/core/events/EventTargetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698