Changeset 167406 in webkit
- Timestamp:
- Apr 16, 2014 5:56:35 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167402 r167406 1 2014-04-16 Brian J. Burg <burg@cs.washington.edu> 2 3 Web Replay: memoize fallback time values for document.lastModified 4 https://bugs.webkit.org/show_bug.cgi?id=131318 5 6 Reviewed by Joseph Pecoraro. 7 8 Mark the new test as skipped until dependent functionality is landed. 9 10 * http/tests/inspector/replay/document-last-modified-fallback-value.html: Added. 11 1 12 2014-04-16 Dean Jackson <dino@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r167322 r167406 100 100 webkit.org/b/131679 inspector/dom/content-flow-list.html [ Skip ] 101 101 webkit.org/b/131679 inspector/dom/content-flow-content-removal.html [ Skip ] 102 103 # Doesn't work yet, relies on network replay functionality (webkit.org/b/130728, webkit.org/b/129391) 104 webkit.org/b/131318 http/tests/inspector/replay/document-last-modified-fallback-value.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r167404 r167406 1 2014-04-16 Brian J. Burg <burg@cs.washington.edu> 2 3 Web Replay: memoize fallback time values for document.lastModified 4 https://bugs.webkit.org/show_bug.cgi?id=131318 5 6 Reviewed by Joseph Pecoraro. 7 8 If a document's Last-Modified header can't be found or used, then 9 document.lastModified is derived from the current system time or 10 from filesystem data, which is obviously nondeterministic. 11 12 It's better to handle this inside Document::lastModified rather than using 13 MemoizedDOMResult, because only the fallback case is nondeterministic. 14 15 Test: http/tests/inspector/replay/document-last-modified-fallback-value.html 16 17 The test is skipped for now, as it will be very flaky without the 18 functionality introduced by bugs 130728 and 129391. 19 20 * dom/Document.cpp: 21 (WebCore::Document::lastModified): Save or reuse memoized fallback value. 22 * replay/WebInputs.json: Add input DocumentLastModifiedDate. 23 1 24 2014-04-16 David Hyatt <hyatt@apple.com> 2 25 -
trunk/Source/WebCore/dom/Document.cpp
r167299 r167406 221 221 222 222 #if ENABLE(WEB_REPLAY) 223 #include "WebReplayInputs.h" 223 224 #include <replay/EmptyInputCursor.h> 224 225 #endif … … 3892 3893 // specificiation tells us to read the last modification date from the file 3893 3894 // system. 3894 if (!foundDate) 3895 date.setMillisecondsSinceEpochForDateTime(currentTimeMS()); 3895 if (!foundDate) { 3896 double fallbackDate = currentTimeMS(); 3897 #if ENABLE(WEB_REPLAY) 3898 InputCursor& cursor = inputCursor(); 3899 if (cursor.isCapturing()) 3900 cursor.appendInput<DocumentLastModifiedDate>(fallbackDate); 3901 else if (cursor.isReplaying()) { 3902 if (DocumentLastModifiedDate* input = cursor.fetchInput<DocumentLastModifiedDate>()) 3903 fallbackDate = input->fallbackValue(); 3904 } 3905 #endif 3906 date.setMillisecondsSinceEpochForDateTime(fallbackDate); 3907 } 3908 3896 3909 return String::format("%02d/%02d/%04d %02d:%02d:%02d", date.month() + 1, date.monthDay(), date.fullYear(), date.hour(), date.minute(), date.second()); 3897 3910 } -
trunk/Source/WebCore/replay/WebInputs.json
r167299 r167406 166 166 }, 167 167 { 168 "name": "DocumentLastModifiedDate", 169 "description": "A fallback value used for the document's last modified date if the Last-Modified header can't be found or used.", 170 "queue": "SCRIPT_MEMOIZED", 171 "members": [ 172 { "name": "fallbackValue", "type": "double" } 173 ] 174 }, 175 { 168 176 "name": "EndSegmentSentinel", 169 177 "description": "A sentinel input to signal the end of a segment.",
Note: See TracChangeset
for help on using the changeset viewer.