Changeset 245366 in webkit
- Timestamp:
- May 15, 2019 3:42:00 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245363 r245366 1 2019-05-15 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: user gesture toggle should also force user interaction flag 4 https://bugs.webkit.org/show_bug.cgi?id=197269 5 6 Reviewed by Joseph Pecoraro. 7 8 * inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html: Added. 9 * inspector/runtime/evaluate-userGestureEmulation-userIsInteracting-expected.txt: Added. 10 11 * TestExpectations: 12 * platform/wk2/TestExpectations: 13 Only enable the above test on WK2, as the user interaction state is only supported by WK2. 14 1 15 2019-05-15 Devin Rousso <drousso@apple.com> 2 16 -
trunk/LayoutTests/TestExpectations
r245362 r245366 543 543 # Debugger stepping tests can timeout if they run slowly due to a short timer scheduled in the frontend. 544 544 webkit.org/b/161951 [ Debug ] inspector/debugger/paused-scopes.html [ Skip ] 545 546 # User interaction is a WK2 concept. 547 inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html [ Skip ] 545 548 546 549 # These conformance tests are no longer in sync with the latest specification -
trunk/LayoutTests/platform/wk2/TestExpectations
r245013 r245366 502 502 # First two lines are reversed when test is flaky. 503 503 fast/preloader/document-write-2.html [ Pass Failure ] 504 505 # User interaction is a WK2 concept. 506 inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html [ Skip ] 504 507 505 508 ### END OF (3) Unclassified failures -
trunk/Source/WebCore/ChangeLog
r245361 r245366 1 2019-05-15 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: user gesture toggle should also force user interaction flag 4 https://bugs.webkit.org/show_bug.cgi?id=197269 5 6 Reviewed by Joseph Pecoraro. 7 8 Test: inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html 9 10 * inspector/agents/page/PageRuntimeAgent.cpp: 11 (WebCore::PageRuntimeAgent::evaluate): 12 13 * page/ChromeClient.h: 14 (WebCore::ChromeClient::userIsInteracting const): Added. 15 (WebCore::ChromeClient::setUserIsInteracting): Added. 16 17 * testing/Internals.idl: 18 * testing/Internals.h: 19 * testing/Internals.cpp: 20 (WebCore::Internals::userIsInteracting): Added. 21 1 22 2019-05-15 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
r243243 r245366 33 33 #include "PageRuntimeAgent.h" 34 34 35 #include "Chrome.h" 36 #include "ChromeClient.h" 35 37 #include "Document.h" 36 38 #include "Frame.h" … … 162 164 void PageRuntimeAgent::evaluate(ErrorString& errorString, const String& expression, const String* objectGroup, const bool* includeCommandLineAPI, const bool* doNotPauseOnExceptionsAndMuteConsole, const int* executionContextId, const bool* returnByValue, const bool* generatePreview, const bool* saveResult, const bool* emulateUserGesture, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex) 163 165 { 164 Optional<ProcessingUserGestureState> userGestureState = (emulateUserGesture && *emulateUserGesture) ? Optional<ProcessingUserGestureState>(ProcessingUserGesture) : WTF::nullopt; 166 auto& pageChromeClient = m_inspectedPage.chrome().client(); 167 168 auto shouldEmulateUserGesture = emulateUserGesture && *emulateUserGesture; 169 170 Optional<ProcessingUserGestureState> userGestureState = shouldEmulateUserGesture ? Optional<ProcessingUserGestureState>(ProcessingUserGesture) : WTF::nullopt; 165 171 UserGestureIndicator gestureIndicator(userGestureState); 172 173 bool userWasInteracting = false; 174 if (shouldEmulateUserGesture) { 175 userWasInteracting = pageChromeClient.userIsInteracting(); 176 if (!userWasInteracting) 177 pageChromeClient.setUserIsInteracting(true); 178 } 179 166 180 InspectorRuntimeAgent::evaluate(errorString, expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, executionContextId, returnByValue, generatePreview, saveResult, emulateUserGesture, result, wasThrown, savedResultIndex); 181 182 if (shouldEmulateUserGesture && !userWasInteracting && pageChromeClient.userIsInteracting()) 183 pageChromeClient.setUserIsInteracting(false); 167 184 } 168 185 -
trunk/Source/WebCore/page/ChromeClient.h
r245174 r245366 508 508 virtual void configureLoggingChannel(const String&, WTFLogChannelState, WTFLogLevel) { } 509 509 510 virtual bool userIsInteracting() const { return false; } 511 virtual void setUserIsInteracting(bool) { } 512 510 513 protected: 511 514 virtual ~ChromeClient() = default; -
trunk/Source/WebCore/testing/Internals.cpp
r245288 r245366 48 48 #include "CertificateInfo.h" 49 49 #include "Chrome.h" 50 #include "ChromeClient.h" 50 51 #include "ClientOrigin.h" 51 52 #include "ComposedTreeIterator.h" … … 4424 4425 } 4425 4426 4427 bool Internals::userIsInteracting() 4428 { 4429 if (auto* document = contextDocument()) { 4430 if (auto* page = document->page()) 4431 return page->chrome().client().userIsInteracting(); 4432 } 4433 return false; 4434 } 4435 4426 4436 double Internals::lastHandledUserGestureTimestamp() 4427 4437 { -
trunk/Source/WebCore/testing/Internals.h
r245280 r245366 656 656 void withUserGesture(RefPtr<VoidCallback>&&); 657 657 658 bool userIsInteracting(); 659 658 660 RefPtr<GCObservation> observeGC(JSC::JSValue); 659 661 -
trunk/Source/WebCore/testing/Internals.idl
r245280 r245366 639 639 void withUserGesture(VoidCallback callback); 640 640 641 boolean userIsInteracting(); 642 641 643 GCObservation? observeGC(any observed); 642 644 -
trunk/Source/WebKit/ChangeLog
r245360 r245366 1 2019-05-15 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: user gesture toggle should also force user interaction flag 4 https://bugs.webkit.org/show_bug.cgi?id=197269 5 6 Reviewed by Joseph Pecoraro. 7 8 * WebProcess/WebCoreSupport/WebChromeClient.h: 9 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 10 (WebKit::WebChromeClient::userIsInteracting const): Added. 11 (WebKit::WebChromeClient::setUserIsInteracting): Added. 12 13 * WebProcess/WebPage/WebPage.h: 14 (WebKit::WebPage::userIsInteracting const): Added. 15 (WebKit::WebPage::setUserIsInteracting): Added. 16 1 17 2019-05-15 Brent Fulgham <bfulgham@apple.com> 2 18 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
r245174 r245366 1341 1341 } 1342 1342 1343 bool WebChromeClient::userIsInteracting() const 1344 { 1345 return m_page.userIsInteracting(); 1346 } 1347 1348 void WebChromeClient::setUserIsInteracting(bool userIsInteracting) 1349 { 1350 m_page.setUserIsInteracting(userIsInteracting); 1351 } 1352 1343 1353 } // namespace WebKit -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
r245174 r245366 380 380 void configureLoggingChannel(const String&, WTFLogChannelState, WTFLogLevel) final; 381 381 382 bool userIsInteracting() const final; 383 void setUserIsInteracting(bool) final; 384 382 385 String m_cachedToolTip; 383 386 mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame; -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r245335 r245366 1194 1194 bool isThrottleable() const; 1195 1195 1196 bool userIsInteracting() const { return m_userIsInteracting; } 1197 void setUserIsInteracting(bool userIsInteracting) { m_userIsInteracting = userIsInteracting; } 1198 1196 1199 private: 1197 1200 WebPage(uint64_t pageID, WebPageCreationParameters&&);
Note: See TracChangeset
for help on using the changeset viewer.