| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/Deprecation.h" | 5 #include "core/frame/Deprecation.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/frame/FrameConsole.h" | 9 #include "core/frame/FrameConsole.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 UseCounter::Feature feature) { | 154 UseCounter::Feature feature) { |
| 155 Deprecation::CountDeprecation(document.GetFrame(), feature); | 155 Deprecation::CountDeprecation(document.GetFrame(), feature); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void Deprecation::CountDeprecationCrossOriginIframe( | 158 void Deprecation::CountDeprecationCrossOriginIframe( |
| 159 const LocalFrame* frame, | 159 const LocalFrame* frame, |
| 160 UseCounter::Feature feature) { | 160 UseCounter::Feature feature) { |
| 161 // Check to see if the frame can script into the top level document. | 161 // Check to see if the frame can script into the top level document. |
| 162 SecurityOrigin* security_origin = | 162 SecurityOrigin* security_origin = |
| 163 frame->GetSecurityContext()->GetSecurityOrigin(); | 163 frame->GetSecurityContext()->GetSecurityOrigin(); |
| 164 Frame* top = frame->Tree().Top(); | 164 Frame& top = frame->Tree().Top(); |
| 165 if (top && !security_origin->CanAccess( | 165 if (!security_origin->CanAccess( |
| 166 top->GetSecurityContext()->GetSecurityOrigin())) | 166 top.GetSecurityContext()->GetSecurityOrigin())) |
| 167 CountDeprecation(frame, feature); | 167 CountDeprecation(frame, feature); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void Deprecation::CountDeprecationCrossOriginIframe( | 170 void Deprecation::CountDeprecationCrossOriginIframe( |
| 171 const Document& document, | 171 const Document& document, |
| 172 UseCounter::Feature feature) { | 172 UseCounter::Feature feature) { |
| 173 LocalFrame* frame = document.GetFrame(); | 173 LocalFrame* frame = document.GetFrame(); |
| 174 if (!frame) | 174 if (!frame) |
| 175 return; | 175 return; |
| 176 CountDeprecationCrossOriginIframe(frame, feature); | 176 CountDeprecationCrossOriginIframe(frame, feature); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 return willBeRemoved("SVGPathElement.getPathSegAtLength", M62, | 414 return willBeRemoved("SVGPathElement.getPathSegAtLength", M62, |
| 415 "5638783282184192"); | 415 "5638783282184192"); |
| 416 | 416 |
| 417 // Features that aren't deprecated don't have a deprecation message. | 417 // Features that aren't deprecated don't have a deprecation message. |
| 418 default: | 418 default: |
| 419 return String(); | 419 return String(); |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace blink | 423 } // namespace blink |
| OLD | NEW |