OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 InvalidURLAction action_if_invalid) { | 1406 InvalidURLAction action_if_invalid) { |
1407 if (!url.IsValid()) { | 1407 if (!url.IsValid()) { |
1408 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " | 1408 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " |
1409 << UrlForLoggingMedia(url) | 1409 << UrlForLoggingMedia(url) |
1410 << ") -> FALSE because url is invalid"; | 1410 << ") -> FALSE because url is invalid"; |
1411 return false; | 1411 return false; |
1412 } | 1412 } |
1413 | 1413 |
1414 LocalFrame* frame = GetDocument().GetFrame(); | 1414 LocalFrame* frame = GetDocument().GetFrame(); |
1415 if (!frame || !GetDocument().GetSecurityOrigin()->CanDisplay(url)) { | 1415 if (!frame || !GetDocument().GetSecurityOrigin()->CanDisplay(url)) { |
1416 if (action_if_invalid == kComplain) | 1416 if (action_if_invalid == kComplain) { |
1417 FrameLoader::ReportLocalLoadFailed(frame, url.ElidedString()); | 1417 GetDocument().AddConsoleMessage(ConsoleMessage::Create( |
| 1418 kSecurityMessageSource, kErrorMessageLevel, |
| 1419 "Not allowed to load local resource: " + url.ElidedString())); |
| 1420 } |
1418 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " | 1421 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " |
1419 << UrlForLoggingMedia(url) | 1422 << UrlForLoggingMedia(url) |
1420 << ") -> FALSE rejected by SecurityOrigin"; | 1423 << ") -> FALSE rejected by SecurityOrigin"; |
1421 return false; | 1424 return false; |
1422 } | 1425 } |
1423 | 1426 |
1424 if (!GetDocument().GetContentSecurityPolicy()->AllowMediaFromSource(url)) { | 1427 if (!GetDocument().GetContentSecurityPolicy()->AllowMediaFromSource(url)) { |
1425 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " | 1428 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " |
1426 << UrlForLoggingMedia(url) | 1429 << UrlForLoggingMedia(url) |
1427 << ") -> rejected by Content Security Policy"; | 1430 << ") -> rejected by Content Security Policy"; |
(...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4081 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4084 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
4082 } | 4085 } |
4083 | 4086 |
4084 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) { | 4087 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) { |
4085 mostly_filling_viewport_ = true; | 4088 mostly_filling_viewport_ = true; |
4086 if (web_media_player_) | 4089 if (web_media_player_) |
4087 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_); | 4090 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_); |
4088 } | 4091 } |
4089 | 4092 |
4090 } // namespace blink | 4093 } // namespace blink |
OLD | NEW |