Chromium Code Reviews| 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 eba719d78293ca7cfb4fa3f3d8c579cd972336ff..7be58ea0cb5cab775a7731eb5f90103bcde74b77 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -3191,6 +3191,12 @@ int Document::elapsedTime() const { |
| return static_cast<int>((currentTime() - m_startTime) * 1000); |
| } |
| +bool Document::canCreateHistoryEntry() const { |
| + if (!m_frame->settings()->getHistoryEntryRequiresUserGesture()) |
| + return true; |
| + return elapsedTime() >= 5000 || m_frame->hasReceivedUserGesture(); |
|
ojan
2017/04/03 21:03:54
I think you could test this as a SimTest that fast
Nate Chapin
2017/04/04 20:42:19
I could find ways to mess with last time of a comp
|
| +} |
| + |
| void Document::write(const SegmentedString& text, |
| Document* enteredDocument, |
| ExceptionState& exceptionState) { |