| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 137ece01796830ffc0f0e1e5167997dbfafef7c6..af63ac2d13a1ff509a4ce80810c31cff471c9d8f 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -1221,6 +1221,26 @@ String Document::suggestedMIMEType() const
|
| return String();
|
| }
|
|
|
| +void Document::setMimeType(const AtomicString& mimeType)
|
| +{
|
| + m_mimeType = mimeType;
|
| +}
|
| +
|
| +AtomicString Document::contentType() const
|
| +{
|
| + if (!m_mimeType.isEmpty())
|
| + return m_mimeType;
|
| +
|
| + if (DocumentLoader* documentLoader = loader())
|
| + return documentLoader->mimeType();
|
| +
|
| + String mimeType = suggestedMIMEType();
|
| + if (!mimeType.isEmpty())
|
| + return AtomicString(mimeType);
|
| +
|
| + return AtomicString("application/xml");
|
| +}
|
| +
|
| Element* Document::elementFromPoint(int x, int y) const
|
| {
|
| if (!renderView())
|
| @@ -3221,6 +3241,7 @@ void Document::cloneDataFromDocument(const Document& other)
|
| setEncodingData(other.m_encodingData);
|
| setContextFeatures(other.contextFeatures());
|
| setSecurityOrigin(other.securityOrigin()->isolatedCopy());
|
| + setMimeType(other.contentType());
|
| }
|
|
|
| StyleSheetList* Document::styleSheets()
|
|
|