Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Unified Diff: third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp

Issue 2415373002: Loading: bulk style errors fix in core/loader (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698