[Webkit-unassigned] [Bug 78584] [Encoding] We should run text encoding detector for iframes and child frame.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 14 17:36:14 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78584





--- Comment #2 from yosin at chromium.org  2012-02-14 17:36:14 PST ---
In this case, authors are different, e.g. teacher and students. Defaulting to parent frame's charset is meaningful. However, it should not prevent to run auto detector, if users enable auto detector.

My proposal is use parent's charset as hint for auto detector and run auto detector if document has no charset declaration.

There are two way to fix this issue:

(1) Change ShouldAutoDetect: 

bool TextResourceDecoder::ShouldAutoDetect() {
 return m_usesEncodingDetector && (m_source == DefaultEncoding || m_source == EncodingFromParentFrame);
}

(2) Change setHintEncoding

// We use parent document's encoding information for hint of child document encoding.
void TextResourceDecoder::setHintEncoding(const TextResourceDecoder* hintDecoder) {
  if (hintDecoder) {
    m_hintEncoding = hintDecoder->encoding().name();
  }
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list