| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |