[XHR] Document.lastModified doesn't work for non-rendered documents
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2018 20:28:07 +0000 (20:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2018 20:28:07 +0000 (20:28 +0000)
commitec00dcd5ae314985a3a2322b7c7a46672c957e3f
tree65b027f8df24e63f69004a2bc854998c67400e84
parentdbe6a08c92983a147b9f0e7936ba9ea462f9d127
[XHR] Document.lastModified doesn't work for non-rendered documents
https://bugs.webkit.org/show_bug.cgi?id=179375

Patch by Rob Buis <rbuis@igalia.com> on 2018-11-28
Reviewed by Alexey Proskuryakov.

LayoutTests/imported/w3c:

* web-platform-tests/xhr/responsexml-document-properties-expected.txt:

Source/WebCore:

Add setOverrideLastModified to override last modified date for
standalone Documents.

Behavior matches Firefox and Chrome.

Test: web-platform-tests/xhr/responsexml-document-properties.htm

* dom/Document.cpp:
(WebCore::Document::overrideLastModified):
(WebCore::Document::lastModified const): no need to test m_frame since that's already done in loader().
(WebCore::Document::lastModified): Deleted.
* dom/Document.h:
* xml/XMLHttpRequest.cpp:

LayoutTests:

Unskip responsexml-document-properties.htm since the dynamic message is gone.

* TestExpectations:
* platform/wpe/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/xhr/responsexml-document-properties-expected.txt
LayoutTests/platform/wpe/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/xml/XMLHttpRequest.cpp