| Index: third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp b/third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp
|
| index fa72e6b21a6a4bb330adaf4f6c4365516788598c..eddb018817ef6e9b94f1554e826e03bc0614e36f 100644
|
| --- a/third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp
|
| @@ -122,9 +122,10 @@ inline void TextResourceDecoderBuilder::setupEncoding(
|
| if (frame && frame->tree().parent() && frame->tree().parent()->isLocalFrame())
|
| parentFrame = toLocalFrame(frame->tree().parent());
|
|
|
| - if (!m_encoding.isEmpty())
|
| + if (!m_encoding.isEmpty()) {
|
| decoder->setEncoding(m_encoding.getString(),
|
| TextResourceDecoder::EncodingFromHTTPHeader);
|
| + }
|
|
|
| // Set the hint encoding to the parent frame encoding only if the parent and
|
| // the current frames share the security origin. We impose this condition
|
| @@ -138,9 +139,10 @@ inline void TextResourceDecoderBuilder::setupEncoding(
|
| if (parentFrame->document()->encodingWasDetectedHeuristically())
|
| decoder->setHintEncoding(parentFrame->document()->encoding());
|
|
|
| - if (m_encoding.isEmpty())
|
| + if (m_encoding.isEmpty()) {
|
| decoder->setEncoding(parentFrame->document()->encoding(),
|
| TextResourceDecoder::EncodingFromParentFrame);
|
| + }
|
| }
|
| }
|
|
|
|
|