| Index: Source/core/dom/DocumentInit.cpp
|
| diff --git a/Source/core/dom/DocumentInit.cpp b/Source/core/dom/DocumentInit.cpp
|
| index 1aa80ce299c02316582a410b315dbbbe9d8b6a63..c57120c6d3783ee5ffa2d66652c864cb4e523560 100644
|
| --- a/Source/core/dom/DocumentInit.cpp
|
| +++ b/Source/core/dom/DocumentInit.cpp
|
| @@ -33,7 +33,9 @@
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/html/HTMLFrameOwnerElement.h"
|
| #include "core/html/imports/HTMLImportsController.h"
|
| +#include "core/loader/DocumentLoader.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| +#include "public/platform/Platform.h"
|
|
|
| namespace blink {
|
|
|
| @@ -123,6 +125,17 @@ bool DocumentInit::shouldEnforceStrictMixedContentChecking() const
|
| return frameForSecurityContext()->loader().shouldEnforceStrictMixedContentChecking();
|
| }
|
|
|
| +bool DocumentInit::isHostedInReservedIPRange() const
|
| +{
|
| + if (LocalFrame* frame = frameForSecurityContext()) {
|
| + if (DocumentLoader* loader = frame->loader().provisionalDocumentLoader() ? frame->loader().provisionalDocumentLoader() : frame->loader().documentLoader()) {
|
| + if (!loader->response().remoteIPAddress().isEmpty())
|
| + return Platform::current()->isReservedIPAddress(loader->response().remoteIPAddress());
|
| + }
|
| + }
|
| + return false;
|
| +}
|
| +
|
| Settings* DocumentInit::settings() const
|
| {
|
| ASSERT(frameForSecurityContext());
|
|
|