| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index 149561f8cdad9baddb47a9948cd30cacaa9c6487..c78651f2c5243571ee764c50a397e5a9265f8206 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -456,9 +456,8 @@ Document::Document(const DocumentInit& initializer,
|
| m_documentClasses(documentClasses),
|
| m_isViewSource(false),
|
| m_sawElementsInKnownNamespaces(false),
|
| - m_isSrcdocDocument(false),
|
| + m_srcdocType(NotSrcdoc),
|
| m_isMobileDocument(false),
|
| - m_isFragmentParserCreatedSrcdoc(false),
|
| m_layoutView(0),
|
| m_contextDocument(initializer.contextDocument()),
|
| m_hasFullscreenSupplement(false),
|
| @@ -5481,14 +5480,18 @@ void Document::initSecurityContext(const DocumentInit& initializer) {
|
| }
|
|
|
| if (initializer.shouldTreatURLAsSrcdocDocument()) {
|
| - m_isSrcdocDocument = true;
|
| + m_srcdocType = Srcdoc;
|
| setBaseURLOverride(initializer.parentBaseURL());
|
|
|
| if (Element* owner = domWindow()->frameElement()) {
|
| HTMLIFrameElement* iframe = toHTMLIFrameElement(owner);
|
| - m_isFragmentParserCreatedSrcdoc =
|
| - iframe->createdByFragmentParser() ||
|
| - iframe->document().isFragmentParserCreatedSrcdoc();
|
| + if (iframe->createdByFragmentParser() ||
|
| + iframe->document().isFragmentParserCreatedSrcdoc()) {
|
| + m_srcdocType = FragmentParserCreatedSrcdoc;
|
| + } else if (iframe->createdByDocumentWrite() ||
|
| + iframe->document().isDocumentWriteCreatedSrcdoc()) {
|
| + m_srcdocType = DocumentWriteCreatedSrcdoc;
|
| + }
|
| }
|
| }
|
|
|
|
|