OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 document->contentSecurityPolicy()->reportViolation( | 2094 document->contentSecurityPolicy()->reportViolation( |
2095 violation.directive, /* directiveText */ | 2095 violation.directive, /* directiveText */ |
2096 ContentSecurityPolicy::getDirectiveType( | 2096 ContentSecurityPolicy::getDirectiveType( |
2097 violation.effectiveDirective), /* effectiveType */ | 2097 violation.effectiveDirective), /* effectiveType */ |
2098 violation.consoleMessage, /* consoleMessage */ | 2098 violation.consoleMessage, /* consoleMessage */ |
2099 violation.blockedUrl, /* blockedUrl */ | 2099 violation.blockedUrl, /* blockedUrl */ |
2100 reportEndpoints, /* reportEndpoints */ | 2100 reportEndpoints, /* reportEndpoints */ |
2101 violation.header, /* header */ | 2101 violation.header, /* header */ |
2102 static_cast<ContentSecurityPolicyHeaderType>(violation.disposition), | 2102 static_cast<ContentSecurityPolicyHeaderType>(violation.disposition), |
2103 ContentSecurityPolicy::ViolationType::URLViolation, /* ViolationType */ | 2103 ContentSecurityPolicy::ViolationType::URLViolation, /* ViolationType */ |
2104 nullptr, /* LocalFrame */ | 2104 // TODO(arthursonzogni, clamy): Provide the source location here |
| 2105 // See http://crbug.com/690946 |
| 2106 std::unique_ptr<SourceLocation>(), nullptr, /* LocalFrame */ |
2105 violation.afterRedirect ? RedirectStatus::FollowedRedirect | 2107 violation.afterRedirect ? RedirectStatus::FollowedRedirect |
2106 : RedirectStatus::NoRedirect, | 2108 : RedirectStatus::NoRedirect, |
2107 // TODO(arthursonzogni, clamy) Provide the context line number here. | |
2108 // See http://crbug.com/690946 | |
2109 0, /* contextLine */ | |
2110 nullptr); /* Element */ | 2109 nullptr); /* Element */ |
2111 } | 2110 } |
2112 | 2111 |
2113 bool WebLocalFrameImpl::isLoading() const { | 2112 bool WebLocalFrameImpl::isLoading() const { |
2114 if (!frame() || !frame()->document()) | 2113 if (!frame() || !frame()->document()) |
2115 return false; | 2114 return false; |
2116 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || | 2115 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || |
2117 frame()->loader().hasProvisionalNavigation() || | 2116 frame()->loader().hasProvisionalNavigation() || |
2118 !frame()->document()->loadEventFinished(); | 2117 !frame()->document()->loadEventFinished(); |
2119 } | 2118 } |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2502 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
2504 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2503 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2505 } else { | 2504 } else { |
2506 clipHtml = | 2505 clipHtml = |
2507 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2506 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
2508 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2507 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2509 } | 2508 } |
2510 } | 2509 } |
2511 | 2510 |
2512 } // namespace blink | 2511 } // namespace blink |
OLD | NEW |