Changeset 214982 in webkit
- Timestamp:
- Apr 5, 2017, 5:55:14 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/frames/user-gesture-timestamp-propagation-expected.txt (added)
-
LayoutTests/fast/frames/user-gesture-timestamp-propagation.html (added)
-
LayoutTests/platform/ios/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (2 diffs)
-
Source/WebCore/dom/Document.h (modified) (1 diff)
-
Source/WebCore/dom/UserGestureIndicator.cpp (modified) (2 diffs)
-
Source/WebCore/testing/Internals.cpp (modified) (1 diff)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r214976 r214982 1 2017-04-05 Simon Fraser <simon.fraser@apple.com> 2 3 Set lastHandledUserGestureTimestamp on all ancestor documents, not just the top document 4 https://bugs.webkit.org/show_bug.cgi?id=170479 5 6 Reviewed by Sam Weinig. 7 8 * fast/frames/user-gesture-timestamp-propagation-expected.txt: Added. 9 * fast/frames/user-gesture-timestamp-propagation.html: Added. 10 * platform/ios/TestExpectations: 11 1 12 2017-04-05 Eric Carlson <eric.carlson@apple.com> 2 13 -
trunk/LayoutTests/platform/ios/TestExpectations
r214955 r214982 380 380 media/audio-dealloc-crash.html [ Skip ] 381 381 382 # T his test usesEventSender's mouseMoveTo, mouseUp and mouseDown382 # Tests that use EventSender's mouseMoveTo, mouseUp and mouseDown 383 383 fast/forms/range/disabled-while-dragging.html [ Skip ] 384 384 fast/forms/range/range-drag-when-toggled-disabled.html [ Skip ] 385 fast/ media/video-element-in-details-collapse.html [ Skip]385 fast/frames/user-gesture-timestamp-propagation.html [ Failure ] 386 386 387 387 # The file-wrapper part of <attachment> is not yet working on iOS -
trunk/Source/WebCore/ChangeLog
r214980 r214982 1 2017-04-05 Simon Fraser <simon.fraser@apple.com> 2 3 Set lastHandledUserGestureTimestamp on all ancestor documents, not just the top document 4 https://bugs.webkit.org/show_bug.cgi?id=170479 5 6 Reviewed by Sam Weinig. 7 8 When interacting with a subframe document, set lastHandledUserGestureTimestamp on all ancestor 9 documents up to the root. 10 11 This will be used in future for requestAnimationFrame throttling. 12 13 Test: fast/frames/user-gesture-timestamp-propagation.html 14 15 * dom/Document.cpp: 16 (WebCore::Document::updateLastHandledUserGestureTimestamp): 17 * dom/Document.h: 18 * dom/UserGestureIndicator.cpp: 19 (WebCore::UserGestureIndicator::UserGestureIndicator): 20 * testing/Internals.cpp: 21 (WebCore::Internals::lastHandledUserGestureTimestamp): 22 * testing/Internals.h: 23 * testing/Internals.idl: 24 1 25 2017-04-05 Eric Carlson <eric.carlson@apple.com> 2 26 -
trunk/Source/WebCore/dom/Document.cpp
r214976 r214982 143 143 #include "RenderWidget.h" 144 144 #include "RequestAnimationFrameCallback.h" 145 #include "ResourceLoadObserver.h"146 145 #include "RuntimeEnabledFeatures.h" 147 146 #include "SVGDocumentExtensions.h" … … 6314 6313 } 6315 6314 6316 void Document::updateLastHandledUserGestureTimestamp() 6317 { 6318 m_lastHandledUserGestureTimestamp = MonotonicTime::now(); 6319 ResourceLoadObserver::sharedObserver().logUserInteractionWithReducedTimeResolution(*this); 6315 void Document::updateLastHandledUserGestureTimestamp(MonotonicTime time) 6316 { 6317 m_lastHandledUserGestureTimestamp = time; 6318 6319 if (HTMLFrameOwnerElement* element = ownerElement()) 6320 element->document().updateLastHandledUserGestureTimestamp(time); 6320 6321 } 6321 6322 -
trunk/Source/WebCore/dom/Document.h
r214900 r214982 1145 1145 1146 1146 MonotonicTime lastHandledUserGestureTimestamp() const { return m_lastHandledUserGestureTimestamp; } 1147 void updateLastHandledUserGestureTimestamp( );1147 void updateLastHandledUserGestureTimestamp(MonotonicTime); 1148 1148 1149 1149 // Used for testing. Count handlers in the main document, and one per frame which contains handlers. -
trunk/Source/WebCore/dom/UserGestureIndicator.cpp
r208985 r214982 28 28 29 29 #include "Document.h" 30 #include "ResourceLoadObserver.h" 30 31 #include <wtf/MainThread.h> 31 32 #include <wtf/NeverDestroyed.h> … … 55 56 currentToken() = UserGestureToken::create(state.value()); 56 57 57 if (document && currentToken()->processingUserGesture()) 58 document->topDocument().updateLastHandledUserGestureTimestamp(); 58 if (document && currentToken()->processingUserGesture()) { 59 document->updateLastHandledUserGestureTimestamp(MonotonicTime::now()); 60 ResourceLoadObserver::sharedObserver().logUserInteractionWithReducedTimeResolution(*document); 61 } 59 62 } 60 63 -
trunk/Source/WebCore/testing/Internals.cpp
r214976 r214982 3774 3774 } 3775 3775 3776 double Internals::lastHandledUserGestureTimestamp() 3777 { 3778 Document* document = contextDocument(); 3779 if (!document) 3780 return 0; 3781 3782 return document->lastHandledUserGestureTimestamp().secondsSinceEpoch().value(); 3783 } 3784 3776 3785 RefPtr<GCObservation> Internals::observeGC(JSC::JSValue value) 3777 3786 { -
trunk/Source/WebCore/testing/Internals.h
r214913 r214982 533 533 534 534 bool isProcessingUserGesture(); 535 double lastHandledUserGestureTimestamp(); 535 536 536 537 RefPtr<GCObservation> observeGC(JSC::JSValue); -
trunk/Source/WebCore/testing/Internals.idl
r214913 r214982 502 502 503 503 boolean isProcessingUserGesture(); 504 double lastHandledUserGestureTimestamp(); 504 505 505 506 GCObservation? observeGC(any observed);
Note:
See TracChangeset
for help on using the changeset viewer.