[webkit-changes] [287895] trunk/Source/WebKit
Title: [287895] trunk/Source/WebKit Revision 287895 Author bb...@apple.com Date 2022-01-11 13:57:15 -0800 (Tue, 11 Jan 2022) Log Message [Cocoa] Inspector Extensions: tabIconURLs with custom scheme URLs are incorrectly loaded https://bugs.webkit.org/show_bug.cgi?id=235045 Reviewed by Darin Adler. * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension createTabWithName:tabIconURL:sourceURL:completionHandler:]): Construct a WTF::URL from the .baseURL and the .relativePath of the NSURL. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm Diff Modified: trunk/Source/WebKit/ChangeLog (287894 => 287895) --- trunk/Source/WebKit/ChangeLog 2022-01-11 21:49:02 UTC (rev 287894) +++ trunk/Source/WebKit/ChangeLog 2022-01-11 21:57:15 UTC (rev 287895) @@ -1,3 +1,15 @@ +2022-01-11 BJ Burg + +[Cocoa] Inspector Extensions: tabIconURLs with custom scheme URLs are incorrectly loaded +https://bugs.webkit.org/show_bug.cgi?id=235045 + + +Reviewed by Darin Adler. + +* UIProcess/API/Cocoa/_WKInspectorExtension.mm: +(-[_WKInspectorExtension createTabWithName:tabIconURL:sourceURL:completionHandler:]): +Construct a WTF::URL from the .baseURL and the .relativePath of the NSURL. + 2022-01-11 Adrian Perez de Castro Non-unified build fixes, early January 2022 edition Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm (287894 => 287895) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm 2022-01-11 21:49:02 UTC (rev 287894) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm 2022-01-11 21:57:15 UTC (rev 287895) @@ -72,7 +72,7 @@ - (void)createTabWithName:(NSString *)tabName tabIconURL:(NSURL *)tabIconURL sourceURL:(NSURL *)sourceURL completionHandler:(void(^)(NSError *, NSString *))completionHandler { -_extension->createTab(tabName, tabIconURL, sourceURL, [protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected result) mutable { +_extension->createTab(tabName, { tabIconURL.baseURL, tabIconURL.relativeString }, { tabIconURL.baseURL, sourceURL.relativeString }, [protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected result) mutable { if (!result) { capturedBlock([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:@{ NSLocalizedFailureReasonErrorKey: Inspector::extensionErrorToString(result.error())}], nil); return; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [286887] trunk/Source/WebInspectorUI
Title: [286887] trunk/Source/WebInspectorUI Revision 286887 Author bb...@apple.com Date 2021-12-10 16:47:02 -0800 (Fri, 10 Dec 2021) Log Message Web Inspector: save and restore extension tab positions https://bugs.webkit.org/show_bug.cgi?id=234115 Reviewed by Devin Rousso and Patrick Angle. The existing tab state restoration system works by saving or loading tab positions from persistent storage and saving or restoring each tab's state using one cookie per tab type. With extension tabs, it is now possible to have more than one tab per tab type. Additionally, extension tabs can be added at any time via InspectorFrontendAPI. Given these challenges, we need a different system for saving and restoring extension tabs. Extension tab restoration is now handled by WI.WebInspectorExtensionController. We consider a tab to be an 'anchor' tab if it is saveable, visible, and not pinnable. In other words, an anchor tab is one of the built-in singleton tabs like Console, Elements, etc. When the tab bar item list is modified, for each extension tab, we save the observed 'anchor' tab's type and a distance from that anchor tab's insertion index. Updates to extension tab positions are saved to persistent storage at most every 5 seconds. When it is time to place an extension tab with createTabForExtension() or showExtensionTab(), perform the reverse operation of computing an insertion index from a anchorTabType and distanceFromAnchorTab. This patch was tested with one extension, multiple extensions, showing/hiding extension tabs, remote inspecting a JSContext, and remote inspecting a WKWebView. * UserInterface/Views/TabBar.js: (WI.TabBar.prototype.get visibleTabBarItemsFromLeftToRight): Added. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController): (WI.WebInspectorExtensionController.get extensionTabPositionsObjectStoreKey): Added. (WI.WebInspectorExtensionController.prototype.registerExtension): (WI.WebInspectorExtensionController.prototype.unregisterExtension): Add and remove WI.TabBar event listeners that notify us of changes to the tab bar. (WI.WebInspectorExtensionController.prototype.createTabForExtension): Deleted. (WI.WebInspectorExtensionController.prototype.async createTabForExtension): Renamed. Load saved tab positions from persistent storage if needed. Compute the insertion index for the new tab. This method is already expected to return a promise, so make it `async` to allow using `await`. (WI.WebInspectorExtensionController.prototype.showExtensionTab): Compute the insertion index for the new tab. (WI.WebInspectorExtensionController.prototype.async _loadExtensionTabPositions): Load saved tab positions from persistent storage, allowing for the case where nothing has been saved yet. (WI.WebInspectorExtensionController.prototype.async _saveExtensionTabPositions): Recompute and save tab positions for all extension tabs. Then write to persistent storage at most every 5 seconds using a WI.Debouncer. (WI.WebInspectorExtensionController.prototype._insertionIndexForExtensionTab): Added, wrapper method. (WI.WebInspectorExtensionController.prototype._computeIndicesForExtensionTab): Compute the anchorTabType, distanceFromAnchorTab, and insertionIndex for the extension tab. If saving tab positions, pass `options.recomputePositions` to ignore saved positions and recompute these fields based on what is currently visible in the tab bar. * UserInterface/Views/WebInspectorExtensionTabContentView.js: (WI.WebInspectorExtensionTabContentView.prototype.get savedTabPositionKey): Added. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (286886 => 286887) --- trunk/Source/WebInspectorUI/ChangeLog 2021-12-11 00:46:51 UTC (rev 286886) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-12-11 00:47:02 UTC (rev 286887) @@ -1,3 +1,67 @@ +2021-12-10 BJ Burg + +Web Inspector: save and restore extension tab positions +https://bugs.webkit.org/show_bug.cgi?id=234115 + + +Reviewed by Devin Rousso and Patrick Angle. + +The existing tab state restoration system works by saving or loading tab positions +from persistent storage and saving or restoring each tab's state using one cookie per tab type. + +With extension tabs, it is now possible to have more than one tab per tab type. +Additionally, extension tabs can be added at any time via InspectorFrontendAPI. +Given these challenges, we need a different system for saving and restoring extension tabs. + +Extension tab restoration is now handled by WI.WebInspectorExtensionController. +We consider a tab to be an 'anchor' tab if it is saveable, visible, and
[webkit-changes] [286799] trunk
Title: [286799] trunk Revision 286799 Author bb...@apple.com Date 2021-12-09 12:55:16 -0800 (Thu, 09 Dec 2021) Log Message [Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be to notified when an extension tab navigates https://bugs.webkit.org/show_bug.cgi?id=233935 Reviewed by Patrick Angle. Source/WebCore: Add new InspectorFrontendHost hooks to notify the client about didNavigateExtensionTab(). * inspector/InspectorFrontendClient.h: (WebCore::InspectorFrontendClient::didNavigateExtensionTab): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::didNavigateExtensionTab): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: Source/WebInspectorUI: In order instrument all loads inside the extension iframe, we cannot rely on the attribute to query the currently loaded page, or to change the current page. Use a helper method to query and set the iframe location indirectly using `document.location`. * UserInterface/Protocol/InspectorFrontendAPI.js: * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.createTabForExtension): (WI.WebInspectorExtensionController.prototype.showExtensionTab): Standardize on returning {"result": value} from these methods. * UserInterface/Views/WebInspectorExtensionTabContentView.js: (WI.WebInspectorExtensionTabContentView): (WI.WebInspectorExtensionTabContentView.prototype.whenPageAvailable): Added. (WI.WebInspectorExtensionTabContentView.prototype._extensionFrameDidLoad): Trigger a load of the actual requested page by evaluating `document.location.href = "" in the context of the extension tab iframe. Notify clients when this non-initial load completes. (WI.WebInspectorExtensionTabContentView.prototype.async _maybeDispatchDidNavigateExtensionTab): Dispatch didNavigateExtensionTab with the new URL when the extension tab iframe completes a load. Don't notify the client if the extension tab has not yet loaded. Source/WebKit: Add plumbing to notify clients when an extension tab loads. This is implemented similarly to -inspectorExtension:didShowExtensionTab: and -inspectorExtension:didHideExtensionTab:. * UIProcess/API/APIInspectorExtensionClient.h: (API::InspectorExtensionClient::didNavigateExtensionTab): * UIProcess/API/Cocoa/_WKInspectorExtensionDelegate.h: * UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.h: * UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm: (WebKit::InspectorExtensionDelegate::InspectorExtensionDelegate): (WebKit::InspectorExtensionDelegate::InspectorExtensionClient::didNavigateExtensionTab): * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.messages.in: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::didNavigateExtensionTab): * WebProcess/Inspector/RemoteWebInspectorUI.h: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::didNavigateExtensionTab): * WebProcess/Inspector/WebInspectorUI.h: * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::didHideExtensionTab): (WebKit::WebInspectorUI::didNavigateExtensionTab): * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::createTabForExtension): Standardize on returning {result: value} for showExtensionTab. (WebKit::WebInspectorUIExtensionController::showExtensionTab): Standardize on returning {result: value} for showExtensionTab. Also, there's no need to inspect the result value if it's not an error. (WebKit::WebInspectorUIExtensionController::didNavigateExtensionTab): Add plumbing. Tools: Add API test coverage for -inspectorExtension:didNavigateTabWithIdentifier:newURL: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): Drive-by, fix an outdated completion handler type signature. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (-[InspectorExtensionDelegateForTesting inspectorExtension:didNavigateTabWithIdentifier:newURL:]): (TEST): Add a test case which exercises the new delegate method. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendClient.h trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp trunk/Source/WebCore/inspector/InspectorFrontendHost.h trunk/Source/WebCore/inspector/InspectorFrontendHost.idl trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionDelegate.h trunk/Source/WebKit/UIP
[webkit-changes] [286747] trunk/Source/WebKit
Title: [286747] trunk/Source/WebKit Revision 286747 Author bb...@apple.com Date 2021-12-08 16:05:55 -0800 (Wed, 08 Dec 2021) Log Message Web Inspector: evaluateScriptForExtension() incorrectly unwraps internal errors, causing an ASSERT https://bugs.webkit.org/show_bug.cgi?id=233961 Reviewed by Patrick Angle. Standardize the unwrapping code based on the evaluateScriptInExtensionTab version, which correctly handles the case where an internal error is returned by the evaluation. This happens, for example, when NotImplemented is returned for unsupported evaluation options. This particular issue was caused by a lack of support for the 'frameURL' option. The fix for that is tracked by https://webkit.org/b/222568/. * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (286746 => 286747) --- trunk/Source/WebKit/ChangeLog 2021-12-08 23:49:16 UTC (rev 286746) +++ trunk/Source/WebKit/ChangeLog 2021-12-09 00:05:55 UTC (rev 286747) @@ -1,3 +1,22 @@ +2021-12-08 BJ Burg + +Web Inspector: evaluateScriptForExtension() incorrectly unwraps internal errors, causing an ASSERT +https://bugs.webkit.org/show_bug.cgi?id=233961 + + +Reviewed by Patrick Angle. + +Standardize the unwrapping code based on the evaluateScriptInExtensionTab version, which +correctly handles the case where an internal error is returned by the evaluation. +This happens, for example, when NotImplemented is returned for unsupported evaluation +options. + +This particular issue was caused by a lack of support for the 'frameURL' option. +The fix for that is tracked by https://webkit.org/b/222568/. + +* WebProcess/Inspector/WebInspectorUIExtensionController.cpp: +(WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension): + 2021-12-08 J Pascoe [WebAuthn] Consider support for the displayName for FIDO authenticator Modified: trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp (286746 => 286747) --- trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp 2021-12-08 23:49:16 UTC (rev 286746) +++ trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp 2021-12-09 00:05:55 UTC (rev 286747) @@ -250,8 +250,12 @@ JSC::JSLockHolder lock(frontendGlobalObject); if (auto parsedError = weakThis->parseExtensionErrorFromEvaluationResult(result)) { -auto exceptionDetails = result.value().error(); -LOG(Inspector, "Internal error encountered while evaluating upon the frontend: at %s:%d:%d: %s", exceptionDetails.sourceURL.utf8().data(), exceptionDetails.lineNumber, exceptionDetails.columnNumber, exceptionDetails.message.utf8().data()); +if (!result.value().has_value()) { +auto exceptionDetails = result.value().error(); +LOG(Inspector, "Internal error encountered while evaluating upon the frontend at %s:%d:%d: %s", exceptionDetails.sourceURL.utf8().data(), exceptionDetails.lineNumber, exceptionDetails.columnNumber, exceptionDetails.message.utf8().data()); +} else +LOG(Inspector, "Internal error encountered while evaluating upon the frontend: %s", extensionErrorToString(parsedError.value()).utf8().data()); + completionHandler({ }, std::nullopt, parsedError); return; } @@ -259,7 +263,7 @@ // Expected result is either an ErrorString or {result: }. auto objectResult = weakThis->unwrapEvaluationResultAsObject(result); if (!objectResult) { -LOG(Inspector, "Unexpected non-object value returned from InspectorFrontendAPI.createTabForExtension()."); +LOG(Inspector, "Unexpected non-object value returned from InspectorFrontendAPI.evaluateScriptForExtension()."); completionHandler({ }, std::nullopt, Inspector::ExtensionError::InternalError); return; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [286498] trunk/Source/WebKit
Title: [286498] trunk/Source/WebKit Revision 286498 Author bb...@apple.com Date 2021-12-03 09:45:21 -0800 (Fri, 03 Dec 2021) Log Message Web Inspector: Web Inspector^2 crashes after closing if Web Inspector^1 closed first https://bugs.webkit.org/show_bug.cgi?id=233293 Reviewed by Devin Rousso. Cache the inspected page's identifier. During frontend teardown, use the cached indentifier to remove the message receiver that was added to receive messages from the inspected page. Other operations using m_inspectedPage should be guarded in case that the inspected page already been closed and destroyed. * UIProcess/Inspector/WebInspectorUIProxy.cpp: (WebKit::WebInspectorUIProxy::createFrontendPage): (WebKit::WebInspectorUIProxy::closeFrontendPageAndWindow): * UIProcess/Inspector/WebInspectorUIProxy.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h Diff Modified: trunk/Source/WebKit/ChangeLog (286497 => 286498) --- trunk/Source/WebKit/ChangeLog 2021-12-03 17:36:07 UTC (rev 286497) +++ trunk/Source/WebKit/ChangeLog 2021-12-03 17:45:21 UTC (rev 286498) @@ -1,5 +1,25 @@ 2021-12-03 BJ Burg +Web Inspector: Web Inspector^2 crashes after closing if Web Inspector^1 closed first +https://bugs.webkit.org/show_bug.cgi?id=233293 + + +Reviewed by Devin Rousso. + +Cache the inspected page's identifier. During frontend teardown, use the cached indentifier +to remove the message receiver that was added to receive messages from the inspected page. + +Other operations using m_inspectedPage should be guarded in case that the inspected +page already been closed and destroyed. + +* UIProcess/Inspector/WebInspectorUIProxy.cpp: +(WebKit::WebInspectorUIProxy::createFrontendPage): +(WebKit::WebInspectorUIProxy::closeFrontendPageAndWindow): +* UIProcess/Inspector/WebInspectorUIProxy.h: + + +2021-12-03 BJ Burg + [Cocoa] Web Inspector: fix completion handler type signature for _WKInspectorExtension methods https://bugs.webkit.org/show_bug.cgi?id=233792 Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp (286497 => 286498) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp 2021-12-03 17:36:07 UTC (rev 286497) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp 2021-12-03 17:45:21 UTC (rev 286498) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2020 Apple Inc. All rights reserved. + * Copyright (C) 2010-2021 Apple Inc. All rights reserved. * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -225,6 +225,8 @@ ASSERT(!m_inspectedPage); m_inspectedPage = &inspectedPage; +m_inspectedPageIdentifier = m_inspectedPage->identifier(); + m_inspectedPage->process().addMessageReceiver(Messages::WebInspectorUIProxy::messageReceiverName(), m_inspectedPage->webPageID(), *this); if (m_inspectorPage) @@ -419,7 +421,7 @@ // Make sure the inspected page has a running WebProcess so we can inspect it. m_inspectedPage->launchInitialProcessIfNecessary(); -m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorUIProxy::messageReceiverName(), m_inspectedPage->identifier(), *this); +m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorUIProxy::messageReceiverName(), m_inspectedPageIdentifier, *this); #if ENABLE(INSPECTOR_EXTENSIONS) m_extensionController = WebInspectorUIExtensionControllerProxy::create(*m_inspectorPage); @@ -529,7 +531,8 @@ SetForScope reentrancyProtector(m_closing, true); // Notify WebKit client when a local inspector closes so it can clear _WKInspectorDelegate and perform other cleanup. -m_inspectedPage->uiClient().willCloseLocalInspector(*m_inspectedPage, *this); +if (m_inspectedPage) +m_inspectedPage->uiClient().willCloseLocalInspector(*m_inspectedPage, *this); m_isVisible = false; m_isProfilingPage = false; @@ -539,13 +542,13 @@ untrackInspectorPage(m_inspectorPage); m_inspectorPage->send(Messages::WebInspectorUI::SetIsVisible(m_isVisible)); -m_inspectorPage->process().removeMessageReceiver(Messages::WebInspectorUIProxy::messageReceiverName(), m_inspectedPage->identifier()); +m_inspectorPage->process().removeMessageReceiver(Messages::WebInspectorUIProxy::messageReceiverName(), m_inspectedPageIdentifier); -if (m_isActiveFrontend) { -m_isActiveFrontend = false; +if (m_inspectedPage && m_isActiveFrontend) m_inspectedPage->inspectorController().disconnectFrontend(*this); -} +m_isActiveFrontend = false; + if (m_isAttached) platformDetach(); Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h (286497 => 28649
[webkit-changes] [286497] trunk/Source/WebKit
Title: [286497] trunk/Source/WebKit Revision 286497 Author bb...@apple.com Date 2021-12-03 09:36:07 -0800 (Fri, 03 Dec 2021) Log Message [Cocoa] Web Inspector: fix completion handler type signature for _WKInspectorExtension methods https://bugs.webkit.org/show_bug.cgi?id=233792 Reviewed by Devin Rousso. * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension evaluateScript:frameURL:contextSecurityOrigin:useContentScriptContext:completionHandler:]): (-[_WKInspectorExtension evaluateScript:inTabWithIdentifier:completionHandler:]): Replace the completionHandler's NSDictionary argument type with `id`. A dictionary is not necessarily returned here because the implementation deserializes a SerializedScriptValue. This could be a string, number, array, dictionary, or other serializable values. While the frontend does return a dictionary payload, this is unpacked on the WebProcess-side before being sent back out via the _WKInspectorExtension APi. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm Diff Modified: trunk/Source/WebKit/ChangeLog (286496 => 286497) --- trunk/Source/WebKit/ChangeLog 2021-12-03 17:35:24 UTC (rev 286496) +++ trunk/Source/WebKit/ChangeLog 2021-12-03 17:36:07 UTC (rev 286497) @@ -1,3 +1,23 @@ +2021-12-03 BJ Burg + +[Cocoa] Web Inspector: fix completion handler type signature for _WKInspectorExtension methods +https://bugs.webkit.org/show_bug.cgi?id=233792 + + +Reviewed by Devin Rousso. + +* UIProcess/API/Cocoa/_WKInspectorExtension.h: +* UIProcess/API/Cocoa/_WKInspectorExtension.mm: +(-[_WKInspectorExtension evaluateScript:frameURL:contextSecurityOrigin:useContentScriptContext:completionHandler:]): +(-[_WKInspectorExtension evaluateScript:inTabWithIdentifier:completionHandler:]): +Replace the completionHandler's NSDictionary argument type with `id`. + +A dictionary is not necessarily returned here because the implementation deserializes a SerializedScriptValue. +This could be a string, number, array, dictionary, or other serializable values. + +While the frontend does return a dictionary payload, this is unpacked on the WebProcess-side +before being sent back out via the _WKInspectorExtension APi. + 2021-12-03 Alex Christensen Add room for more bytecode in WKContentRuleList file format Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h (286496 => 286497) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h 2021-12-03 17:35:24 UTC (rev 286496) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h 2021-12-03 17:36:07 UTC (rev 286497) @@ -63,7 +63,7 @@ * scriptSource is treated as a top-level evaluation. By default, the script is evaluated in the inspected page's script context. * The inspected page ultimately controls its execution context and the result of this evaluation. Thus, the result shall be treated as untrusted input. */ -- (void)evaluateScript:(NSString *)scriptSource frameURL:(NSURL *)frameURL contextSecurityOrigin:(NSURL *)contextSecurityOrigin useContentScriptContext:(BOOL)useContentScriptContext completionHandler:(void(^)(NSError * _Nullable, NSDictionary * _Nullable result))completionHandler; +- (void)evaluateScript:(NSString *)scriptSource frameURL:(NSURL *)frameURL contextSecurityOrigin:(NSURL *)contextSecurityOrigin useContentScriptContext:(BOOL)useContentScriptContext completionHandler:(void(^)(NSError * _Nullable, id result))completionHandler; /** * @abstract Evaluates _javascript_ in the context of a Web Inspector tab created by this _WKInspectorExtension. @@ -73,7 +73,7 @@ * @discussion The completionHandler is passed an NSJSONSerialization-compatible NSObject representing the evaluation result, or an error. * scriptSource is treated as a top-level evaluation. */ -- (void)evaluateScript:(NSString *)scriptSource inTabWithIdentifier:(NSString *)tabIdentifier completionHandler:(void(^)(NSError * _Nullable, NSDictionary * _Nullable result))completionHandler; +- (void)evaluateScript:(NSString *)scriptSource inTabWithIdentifier:(NSString *)tabIdentifier completionHandler:(void(^)(NSError * _Nullable, id result))completionHandler; /** * @abstract Reloads the inspected page on behalf of the _WKInspectorExtension. Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm (286496 => 286497) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm 2021-12-03 17:35:24 UTC (rev 286496) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm 2021-12-03 17:36:07 UTC (rev 286497) @@ -82,7 +82,7 @@ }); } -- (void)evaluateScript:(NSString *)scriptSource frameURL:(NSURL *)frameURL contextSecurityOrigin:(NSURL *)contextSecurityOrigin useCo
[webkit-changes] [286329] trunk
Title: [286329] trunk Revision 286329 Author bb...@apple.com Date 2021-11-30 14:58:27 -0800 (Tue, 30 Nov 2021) Log Message Web Inspector: add ExtensionTabActivation diagnostic event https://bugs.webkit.org/show_bug.cgi?id=233101 Reviewed by Devin Rousso. Source/WebInspectorUI: Add new diagnostic event that reports the first activation of an extension tab. Also report the number of active extension tabs. * UserInterface/Controllers/ExtensionTabActivationDiagnosticEventRecorder.js: Added. (WI.ExtensionTabActivationDiagnosticEventRecorder): (WI.ExtensionTabActivationDiagnosticEventRecorder.prototype.setup): (WI.ExtensionTabActivationDiagnosticEventRecorder.prototype.teardown): (WI.ExtensionTabActivationDiagnosticEventRecorder.prototype._selectedTabContentViewDidChange): Report only the first activation. The extension tab iframe does not load until the first time that the tab is selected and shown. * UserInterface/Base/Main.js: (WI.contentLoaded): Add diagnostic event recorder if extensions are supported. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.registerExtension): Pass along the new extensionBundleIdentifier argument to the model object. (WI.WebInspectorExtensionController.prototype.activeExtensionTabContentViews): Added. This is a helper method for collecting diagnostic event data. * UserInterface/Debug/Bootstrap.js: (updateMockWebExtensionTab): (WI.runBootstrapOperations): Pass new extensionBundleIdentifier argument for the Mock Extension. * UserInterface/Main.html: Add new file. * UserInterface/Models/WebInspectorExtension.js: (WI.WebInspectorExtension): (WI.WebInspectorExtension.prototype.get extensionBundleIdentifier): Store the extension bundle identifier on the model object. Add a getter. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.registerExtension): Pass new extensionBundleIdentifier argument. * UserInterface/Views/WebInspectorExtensionTabContentView.js: (WI.WebInspectorExtensionTabContentView.prototype.get extension): Added. Source/WebKit: Add plumbing for new argument 'extensionBundleIdentifier' that's passed to WebInspectorUI when registering an extension. * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector registerExtensionWithID:extensionBundleIdentifier:displayName:completionHandler:]): (-[_WKInspector registerExtensionWithID:displayName:completionHandler:]): Deleted. * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController registerExtensionWithID:extensionBundleIdentifier:displayName:completionHandler:]): (-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]): Deleted. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::registerExtension): * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::registerExtension): * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Tools: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: (TEST): Start using new method parameter 'extensionBundleIdentifier'. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js trunk/Source/WebInspectorUI/UserInterface/Main.html trunk/Source/WebInspectorUI/UserInterface/Models/WebInspectorExtension.js trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.h trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.messages.in trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm Added Paths trunk/Source/WebInspectorUI/Use
[webkit-changes] [286314] trunk/Source/WebKit
Title: [286314] trunk/Source/WebKit Revision 286314 Author bb...@apple.com Date 2021-11-30 12:10:32 -0800 (Tue, 30 Nov 2021) Log Message [Cocoa] Web Inspector: fix bundle identifier lookup for enabling remote inspection https://bugs.webkit.org/show_bug.cgi?id=233015 Reviewed by Darin Adler. * UIProcess/Inspector/WebInspectorUtilities.h: * UIProcess/Inspector/WebInspectorUtilities.cpp: (WebKit::bundleIdentifierForSandboxBroker): To avoid repeating the logic, extract this code to a helper. * UIProcess/Cocoa/WebInspectorPreferenceObserver.mm: (-[WKWebInspectorPreferenceObserver init]): * UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::shouldEnableRemoteInspector): Use the helper method. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Cocoa/WebInspectorPreferenceObserver.mm trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUtilities.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUtilities.h Diff Modified: trunk/Source/WebKit/ChangeLog (286313 => 286314) --- trunk/Source/WebKit/ChangeLog 2021-11-30 20:08:27 UTC (rev 286313) +++ trunk/Source/WebKit/ChangeLog 2021-11-30 20:10:32 UTC (rev 286314) @@ -1,3 +1,22 @@ +2021-11-30 BJ Burg + +[Cocoa] Web Inspector: fix bundle identifier lookup for enabling remote inspection +https://bugs.webkit.org/show_bug.cgi?id=233015 + + +Reviewed by Darin Adler. + +* UIProcess/Inspector/WebInspectorUtilities.h: +* UIProcess/Inspector/WebInspectorUtilities.cpp: +(WebKit::bundleIdentifierForSandboxBroker): +To avoid repeating the logic, extract this code to a helper. + +* UIProcess/Cocoa/WebInspectorPreferenceObserver.mm: +(-[WKWebInspectorPreferenceObserver init]): +* UIProcess/Cocoa/WebProcessProxyCocoa.mm: +(WebKit::WebProcessProxy::shouldEnableRemoteInspector): +Use the helper method. + 2021-11-30 Brent Fulgham Correct serialization error in _WKApplicationManifestIcon Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebInspectorPreferenceObserver.mm (286313 => 286314) --- trunk/Source/WebKit/UIProcess/Cocoa/WebInspectorPreferenceObserver.mm 2021-11-30 20:08:27 UTC (rev 286313) +++ trunk/Source/WebKit/UIProcess/Cocoa/WebInspectorPreferenceObserver.mm 2021-11-30 20:10:32 UTC (rev 286314) @@ -1,5 +1,5 @@ /* -* Copyright (C) 2020 Apple Inc. All rights reserved. +* Copyright (C) 2020-2021 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,9 +26,10 @@ #import "config.h" #import "WebInspectorPreferenceObserver.h" +#import "WebInspectorUtilities.h" #import "WebProcessPool.h" - #import +#import @interface WKWebInspectorPreferenceObserver () { @@ -50,9 +51,10 @@ if (!(self = [super init])) return nil; -m_userDefaults = adoptNS([[NSUserDefaults alloc] initWithSuiteName:@"com.apple.Safari.SandboxBroker"]); +auto sandboxBrokerBundleIdentifier = WebKit::bundleIdentifierForSandboxBroker(); +m_userDefaults = adoptNS([[NSUserDefaults alloc] initWithSuiteName:bridge_cast(sandboxBrokerBundleIdentifier)]); if (!m_userDefaults) { -WTFLogAlways("Could not init user defaults instance for domain com.apple.Safari.SandboxBroker."); +WTFLogAlways("Could not init user defaults instance for domain %s.", sandboxBrokerBundleIdentifier); return self; } [m_userDefaults.get() addObserver:self forKeyPath:@"ShowDevelopMenu" options:NSKeyValueObservingOptionNew context:nil]; Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (286313 => 286314) --- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm 2021-11-30 20:08:27 UTC (rev 286313) +++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm 2021-11-30 20:10:32 UTC (rev 286314) @@ -52,6 +52,7 @@ #endif #if ENABLE(REMOTE_INSPECTOR) +#import "WebInspectorUtilities.h" #import <_javascript_Core/RemoteInspectorConstants.h> #endif @@ -204,10 +205,7 @@ #if PLATFORM(IOS_FAMILY) return CFPreferencesGetAppIntegerValue(WIRRemoteInspectorEnabledKey, WIRRemoteInspectorDomainName, nullptr); #else -auto sandboxBrokerBundleIdentifier = CFSTR("com.apple.Safari.SandboxBroker"); -if (WebCore::applicationBundleIdentifier() == "com.apple.SafariTechnologyPreview"_s) -sandboxBrokerBundleIdentifier = CFSTR("com.apple.SafariTechnologyPreview.SandboxBroker"); -return CFPreferencesGetAppIntegerValue(CFSTR("ShowDevelopMenu"), sandboxBrokerBundleIdentifier, nullptr); +return CFPreferencesGetAppIntegerValue(CFSTR("ShowDevelopMenu"), bundleIdentifierForSandboxBroker(), nullptr); #endif } Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUtilities.cpp (286313 => 286314) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUtilities.cpp 202
[webkit-changes] [286306] trunk/Source/WebKit
Title: [286306] trunk/Source/WebKit Revision 286306 Author bb...@apple.com Date 2021-11-30 10:53:24 -0800 (Tue, 30 Nov 2021) Log Message Web Inspector: fix IPC race between unregistering an extension and Web Inspector closing https://bugs.webkit.org/show_bug.cgi?id=233264 Reviewed by Devin Rousso. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendWillClose): Remaining registrations will not be removed via unregisterExtension() if the frontend is already in the midst of closing. Clear out the registry. (WebKit::WebInspectorUIExtensionControllerProxy::registerExtension): (WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension): Bail out if the inspector has closed between the IPC message being sent and receiving the async response. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (286305 => 286306) --- trunk/Source/WebKit/ChangeLog 2021-11-30 18:15:46 UTC (rev 286305) +++ trunk/Source/WebKit/ChangeLog 2021-11-30 18:53:24 UTC (rev 286306) @@ -1,3 +1,20 @@ +2021-11-30 BJ Burg + +Web Inspector: fix IPC race between unregistering an extension and Web Inspector closing +https://bugs.webkit.org/show_bug.cgi?id=233264 + +Reviewed by Devin Rousso. + +* UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: +(WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendWillClose): +Remaining registrations will not be removed via unregisterExtension() if +the frontend is already in the midst of closing. Clear out the registry. + +(WebKit::WebInspectorUIExtensionControllerProxy::registerExtension): +(WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension): +Bail out if the inspector has closed between the IPC message being sent +and receiving the async response. + 2021-11-30 Youenn Fablet Migrate some WebSWClientConnection messages to async replies Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp (286305 => 286306) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp 2021-11-30 18:15:46 UTC (rev 286305) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp 2021-11-30 18:53:24 UTC (rev 286306) @@ -86,6 +86,8 @@ m_inspectorPage->process().removeMessageReceiver(Messages::WebInspectorUIExtensionControllerProxy::messageReceiverName(), m_inspectorPage->webPageID()); m_inspectorPage = nullptr; + +m_extensionAPIObjectMap.clear(); } // API @@ -104,6 +106,11 @@ return; } +if (!strongThis->m_inspectorPage) { +completionHandler(makeUnexpected(Inspector::ExtensionError::ContextDestroyed)); +return; +} + RefPtr extensionAPIObject = API::InspectorExtension::create(extensionID, strongThis.get()); strongThis->m_extensionAPIObjectMap.set(extensionID, extensionAPIObject.copyRef()); @@ -126,6 +133,11 @@ return; } +if (!strongThis->m_inspectorPage) { +completionHandler(makeUnexpected(Inspector::ExtensionError::ContextDestroyed)); +return; +} + strongThis->m_extensionAPIObjectMap.take(extensionID); completionHandler(WTFMove(result)); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [285122] trunk
Title: [285122] trunk Revision 285122 Author bb...@apple.com Date 2021-11-01 13:08:01 -0700 (Mon, 01 Nov 2021) Log Message Add bburg's GitHub username to contributors.json. Unreviewed. * metadata/contributors.json: Also, canonicalize a recent change. Modified Paths trunk/ChangeLog trunk/metadata/contributors.json Diff Modified: trunk/ChangeLog (285121 => 285122) --- trunk/ChangeLog 2021-11-01 19:31:45 UTC (rev 285121) +++ trunk/ChangeLog 2021-11-01 20:08:01 UTC (rev 285122) @@ -1,3 +1,12 @@ +2021-11-01 BJ Burg + +Add bburg's GitHub username to contributors.json. + +Unreviewed. + +* metadata/contributors.json: +Also, canonicalize a recent change. + 2021-10-31 Fujii Hironori [WinCairo] New GraphicsLayer for GPU process mode Modified: trunk/metadata/contributors.json (285121 => 285122) --- trunk/metadata/contributors.json 2021-11-01 19:31:45 UTC (rev 285121) +++ trunk/metadata/contributors.json 2021-11-01 20:08:01 UTC (rev 285122) @@ -939,6 +939,7 @@ "b...@cs.washington.edu" ], "expertise" : "Developer Tools, Web Inspector, WebDriver, Cocoa API", + "github" : "burg", "name" : "BJ Burg", "nicks" : [ "bburg", @@ -5103,7 +5104,7 @@ "emails" : [ "obru...@igalia.com" ], - "github": "Loirooriol", + "github" : "Loirooriol", "name" : "Oriol Brufau", "nicks" : [ "obrufau" @@ -7021,4 +7022,4 @@ ], "status" : "reviewer" } -] +] \ No newline at end of file ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [284958] trunk/Source/WebInspectorUI
Title: [284958] trunk/Source/WebInspectorUI Revision 284958 Author bb...@apple.com Date 2021-10-27 14:23:40 -0700 (Wed, 27 Oct 2021) Log Message Web Inspector: extension iframes leak when disabling an extension https://bugs.webkit.org/show_bug.cgi?id=232049 Reviewed by Timothy Hatcher. Since shouldNotRemoveFromDOMWhenHidden() is true, the will not be detached and unload its document in the normal tab-closing code path. Add a `dispose()` method for cleaning up the tab when its extension is unregistered. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.unregisterExtension): * UserInterface/Views/WebInspectorExtensionTabContentView.js: (WI.WebInspectorExtensionTabContentView.prototype.dispose): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (284957 => 284958) --- trunk/Source/WebInspectorUI/ChangeLog 2021-10-27 21:06:24 UTC (rev 284957) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-10-27 21:23:40 UTC (rev 284958) @@ -1,3 +1,20 @@ +2021-10-27 BJ Burg + +Web Inspector: extension iframes leak when disabling an extension +https://bugs.webkit.org/show_bug.cgi?id=232049 + +Reviewed by Timothy Hatcher. + +Since shouldNotRemoveFromDOMWhenHidden() is true, the will not +be detached and unload its document in the normal tab-closing code path. +Add a `dispose()` method for cleaning up the tab when its extension is +unregistered. + +* UserInterface/Controllers/WebInspectorExtensionController.js: +(WI.WebInspectorExtensionController.prototype.unregisterExtension): +* UserInterface/Views/WebInspectorExtensionTabContentView.js: +(WI.WebInspectorExtensionTabContentView.prototype.dispose): + 2021-10-21 Devin Rousso [css-values-4] Support small (sv*), large (lv*) and dynamic (dv*) viewport units Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js (284957 => 284958) --- trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js 2021-10-27 21:06:24 UTC (rev 284957) +++ trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js 2021-10-27 21:23:40 UTC (rev 284958) @@ -68,7 +68,10 @@ let extensionTabIDsToRemove = this._tabIDsForExtensionIDMap.take(extensionID) || []; for (let extensionTabID of extensionTabIDsToRemove) { let tabContentView = this._extensionTabContentViewForExtensionTabIDMap.take(extensionTabID); + +// Ensure that the iframe is actually detached and does not leak. WI.tabBrowser.closeTabForContentView(tabContentView, {suppressAnimations: true}); +tabContentView.dispose(); } this.dispatchEventToListeners(WI.WebInspectorExtensionController.Event.ExtensionRemoved, {extension}); Modified: trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js (284957 => 284958) --- trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js 2021-10-27 21:06:24 UTC (rev 284957) +++ trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js 2021-10-27 21:23:40 UTC (rev 284958) @@ -87,6 +87,11 @@ super.detached(); } +dispose() +{ +this.element?.remove(); +} + tabInfo() { return this._tabInfo; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [284337] trunk
Title: [284337] trunk Revision 284337 Author bb...@apple.com Date 2021-10-17 12:00:41 -0700 (Sun, 17 Oct 2021) Log Message [Cocoa] Web Inspector: remove _WKInspectorExtensionPrivateForTesting https://bugs.webkit.org/show_bug.cgi?id=231784 Reviewed by Timothy Hatcher. Source/WebKit: Promote the only method to be API for _WKInspectorExtension. It is needed to implement some parts of the devtools API. * SourcesCocoa.txt: * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension evaluateScript:inTabWithIdentifier:completionHandler:]): * UIProcess/API/Cocoa/_WKInspectorExtensionPrivateForTesting.h: Removed. * UIProcess/API/Cocoa/_WKInspectorExtensionTesting.mm: Removed. * WebKit.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/SourcesCocoa.txt trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm Removed Paths trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionPrivateForTesting.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionTesting.mm Diff Modified: trunk/Source/WebKit/ChangeLog (284336 => 284337) --- trunk/Source/WebKit/ChangeLog 2021-10-17 16:54:24 UTC (rev 284336) +++ trunk/Source/WebKit/ChangeLog 2021-10-17 19:00:41 UTC (rev 284337) @@ -1,3 +1,22 @@ +2021-10-17 BJ Burg + +[Cocoa] Web Inspector: remove _WKInspectorExtensionPrivateForTesting +https://bugs.webkit.org/show_bug.cgi?id=231784 + + +Reviewed by Timothy Hatcher. + +Promote the only method to be API for _WKInspectorExtension. It is needed +to implement some parts of the devtools API. + +* SourcesCocoa.txt: +* UIProcess/API/Cocoa/_WKInspectorExtension.h: +* UIProcess/API/Cocoa/_WKInspectorExtension.mm: +(-[_WKInspectorExtension evaluateScript:inTabWithIdentifier:completionHandler:]): +* UIProcess/API/Cocoa/_WKInspectorExtensionPrivateForTesting.h: Removed. +* UIProcess/API/Cocoa/_WKInspectorExtensionTesting.mm: Removed. +* WebKit.xcodeproj/project.pbxproj: + 2021-10-16 David Kilzer [WebAuthn] Many Objective-C classes leak their instance variables Modified: trunk/Source/WebKit/SourcesCocoa.txt (284336 => 284337) --- trunk/Source/WebKit/SourcesCocoa.txt 2021-10-17 16:54:24 UTC (rev 284336) +++ trunk/Source/WebKit/SourcesCocoa.txt 2021-10-17 19:00:41 UTC (rev 284337) @@ -288,7 +288,6 @@ UIProcess/API/Cocoa/_WKInspectorTesting.mm UIProcess/API/Cocoa/_WKInspectorDebuggableInfo.mm UIProcess/API/Cocoa/_WKInspectorExtension.mm -UIProcess/API/Cocoa/_WKInspectorExtensionTesting.mm UIProcess/API/Cocoa/_WKInspectorWindow.mm UIProcess/API/Cocoa/_WKInternalDebugFeature.mm UIProcess/API/Cocoa/_WKLinkIconParameters.mm Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h (284336 => 284337) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h 2021-10-17 16:54:24 UTC (rev 284336) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h 2021-10-17 19:00:41 UTC (rev 284337) @@ -66,6 +66,16 @@ - (void)evaluateScript:(NSString *)scriptSource frameURL:(NSURL *)frameURL contextSecurityOrigin:(NSURL *)contextSecurityOrigin useContentScriptContext:(BOOL)useContentScriptContext completionHandler:(void(^)(NSError * _Nullable, NSDictionary * _Nullable result))completionHandler; /** + * @abstract Evaluates _javascript_ in the context of a Web Inspector tab created by this _WKInspectorExtension. + * @param scriptSource The _javascript_ code to be evaluated. + * @param tabIdentifier Identifier for the Web Inspector tab in which to evaluate _javascript_. + * @param completionHandler A block to invoke when the operation completes or fails. + * @discussion The completionHandler is passed an NSJSONSerialization-compatible NSObject representing the evaluation result, or an error. + * scriptSource is treated as a top-level evaluation. + */ +- (void)evaluateScript:(NSString *)scriptSource inTabWithIdentifier:(NSString *)tabIdentifier completionHandler:(void(^)(NSError * _Nullable, NSDictionary * _Nullable result))completionHandler; + +/** * @abstract Reloads the inspected page on behalf of the _WKInspectorExtension. * @param ignoreCache If YES, reloads the page while ignoring the cache. * @param userAgent If specified, overrides the user agent to be sent in the `User-Agent` header and returned by calls to `navigator.userAgent` made by scripts running in the page. This only affects the next navigation. Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm (284336 => 284337) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension
[webkit-changes] [284264] trunk
Title: [284264] trunk Revision 284264 Author bb...@apple.com Date 2021-10-15 12:16:17 -0700 (Fri, 15 Oct 2021) Log Message [Cocoa] Web Inspector: handle Promise objects returned from evaluateScriptInExtensionTab https://bugs.webkit.org/show_bug.cgi?id=231709 Reviewed by Timothy Hatcher. Source/WebCore: New API test: WKInspectorExtension.EvaluateScriptInExtensionTabCanReturnPromises * inspector/InspectorFrontendAPIDispatcher.cpp: (WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): Add JSLockHolders for when we are poking at the result value. Source/WebInspectorUI: This patch improves the handling of promises and exceptions that come from InspectorFrontendHost.evaluateScriptInExtensionTab(). For promises, wait for the returned promise to settle before fulfilling our returned value. For errors, perform a better stringification of the Error instance. The is needed because the default toString implementation leaves out most of the relevant details of the error. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.evaluateScriptInExtensionTab): * UserInterface/Protocol/InspectorFrontendAPI.js: Fix incorrect header docs for InspectorFrontendAPI.evaluateScriptForExtension. Copy the improved header doc for InspectorFrontendAPI.evaluateScriptInExtensionTab since it now has the same calling convention. Source/WebKit: * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension): (WebKit::WebInspectorUIExtensionController::evaluateScriptInExtensionTab): Add JSLockHolders for when we are poking at the result value. Drive-by, fix a typo in logging code. Tools: Add a new test: WKInspectorExtension.EvaluateScriptInExtensionTabCanReturnPromises * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm Diff Modified: trunk/Source/WebCore/ChangeLog (284263 => 284264) --- trunk/Source/WebCore/ChangeLog 2021-10-15 19:14:53 UTC (rev 284263) +++ trunk/Source/WebCore/ChangeLog 2021-10-15 19:16:17 UTC (rev 284264) @@ -1,3 +1,17 @@ +2021-10-15 BJ Burg + +[Cocoa] Web Inspector: handle Promise objects returned from evaluateScriptInExtensionTab +https://bugs.webkit.org/show_bug.cgi?id=231709 + + +Reviewed by Timothy Hatcher. + +New API test: WKInspectorExtension.EvaluateScriptInExtensionTabCanReturnPromises + +* inspector/InspectorFrontendAPIDispatcher.cpp: +(WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): +Add JSLockHolders for when we are poking at the result value. + 2021-10-15 Commit Queue Unreviewed, reverting r284244. Modified: trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp (284263 => 284264) --- trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp 2021-10-15 19:14:53 UTC (rev 284263) +++ trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp 2021-10-15 19:16:17 UTC (rev 284264) @@ -176,7 +176,9 @@ optionalResultHandler(makeUnexpected(EvaluationError::ContextDestroyed)); return; } - + +JSC::JSLockHolder lock(globalObject); + auto& vm = globalObject->vm(); auto* castedPromise = JSC::jsDynamicCast(vm, result.value()); if (!castedPromise) { Modified: trunk/Source/WebInspectorUI/ChangeLog (284263 => 284264) --- trunk/Source/WebInspectorUI/ChangeLog 2021-10-15 19:14:53 UTC (rev 284263) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-10-15 19:16:17 UTC (rev 284264) @@ -1,3 +1,26 @@ +2021-10-15 BJ Burg + +[Cocoa] Web Inspector: handle Promise objects returned from evaluateScriptInExtensionTab +https://bugs.webkit.org/show_bug.cgi?id=231709 + + +Reviewed by Timothy Hatcher. + +This patch improves the handling of promises and exceptions that come from +InspectorFrontendHost.evaluateScriptInExtensionTab(). + +For promises, wait for the returned promise to settle before fulfilling our returned value. +For errors, perform a better stringification of the Error instance. The is needed because +the default toString implementation leaves out most of the relevant details of the error. + +* UserInterface/Controllers/WebInspectorExtensionController.js: +(WI.WebInspectorExtensionController.prototype.evaluateScriptInExtensionTab): + +* UserInterface/Protocol/
[webkit-changes] [283921] trunk/Source/WebInspectorUI
Title: [283921] trunk/Source/WebInspectorUI Revision 283921 Author bb...@apple.com Date 2021-10-11 12:17:10 -0700 (Mon, 11 Oct 2021) Log Message Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView https://bugs.webkit.org/show_bug.cgi?id=231181 Unreviewed. Land parts of the previous patch which seem to have been mis-merged and not landed. * UserInterface/Base/Main.js: (WI.isNewTabWithTypeAllowed): * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.showExtensionTab): * UserInterface/Views/TabBar.js: (WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown): (WI.TabBar.prototype._handleTabContainerContextMenu): (WI.TabBar): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (283920 => 283921) --- trunk/Source/WebInspectorUI/ChangeLog 2021-10-11 19:14:52 UTC (rev 283920) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-10-11 19:17:10 UTC (rev 283921) @@ -1,3 +1,20 @@ +2021-10-11 BJ Burg + +Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView +https://bugs.webkit.org/show_bug.cgi?id=231181 + + +Unreviewed. Land parts of the previous patch which seem to have been mis-merged and not landed. + +* UserInterface/Base/Main.js: +(WI.isNewTabWithTypeAllowed): +* UserInterface/Controllers/WebInspectorExtensionController.js: +(WI.WebInspectorExtensionController.prototype.showExtensionTab): +* UserInterface/Views/TabBar.js: +(WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown): +(WI.TabBar.prototype._handleTabContainerContextMenu): +(WI.TabBar): + 2021-10-11 Razvan Caliman Web Inspector: Move CSS longhand and shorthand mapping away from WI.CSSCompletions Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (283920 => 283921) --- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2021-10-11 19:14:52 UTC (rev 283920) +++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2021-10-11 19:17:10 UTC (rev 283921) @@ -742,6 +742,9 @@ WI.isNewTabWithTypeAllowed = function(tabType) { +if (tabType === WI.WebInspectorExtensionTabContentView.Type) +return false; + let tabClass = WI._knownTabClassesByType.get(tabType); if (!tabClass || !tabClass.isTabAllowed()) return false; Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js (283920 => 283921) --- trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js 2021-10-11 19:14:52 UTC (rev 283920) +++ trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js 2021-10-11 19:17:10 UTC (rev 283921) @@ -160,7 +160,7 @@ return target.PageAgent.reload.invoke({ignoreCache}); } -showExtensionTab(extensionTabID) +showExtensionTab(extensionTabID, options = {}) { let tabContentView = this._extensionTabContentViewForExtensionTabIDMap.get(extensionTabID); if (!tabContentView) { @@ -170,6 +170,7 @@ tabContentView.visible = true; let success = WI.tabBrowser.showTabForContentView(tabContentView, { +...options, initiatorHint: WI.TabBrowser.TabNavigationInitiator.FrontendAPI, }); @@ -177,6 +178,8 @@ WI.reportInternalError("Unable to show extension tab with extensionTabID: " + extensionTabID); return WI.WebInspectorExtension.ErrorCode.InternalError; } + +tabContentView.visible = true; } hideExtensionTab(extensionTabID, options = {}) Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js (283920 => 283921) --- trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js 2021-10-11 19:14:52 UTC (rev 283920) +++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js 2021-10-11 19:17:10 UTC (rev 283921) @@ -762,11 +762,17 @@ }); for (let closedTabClass of closedTabClasses) { +// Tab types that are not restorable (i.e., extension tab) should not be added in the generic code path. +if (!closedTabClass.shouldSaveTab()) +continue; + contextMenu.appendItem(closedTabClass.tabInfo().displayName, () => { WI.createNewTabWithType(closedTabClass.Type, {shouldShowNewTab: true}); }); } +WI.sharedApp.extensionController.addContextMenuItemsForClosedExtensionTabs(contextMenu); + contextMenu.show(); } @@ -941,6 +947,8 @@ WI.createNewTabWithType(tabClass.Type, {shouldShowNewTab: true}); }, checked
[webkit-changes] [283859] trunk/Source/WebInspectorUI
Title: [283859] trunk/Source/WebInspectorUI Revision 283859 Author bb...@apple.com Date 2021-10-08 18:40:57 -0700 (Fri, 08 Oct 2021) Log Message Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView https://bugs.webkit.org/show_bug.cgi?id=231181 Reviewed by Devin Rousso. The existing TabBar/TabBrowser system relies on the fact that each tab class can be instantiated once. This is no longer true with extension tabs, as all of them are instances of the same WI.WebInspectorExtensionTabContentView class. The new approach builds on bug 230758 by introducing a 'visible' property on ContentView. This is necessary to mark extension tabs as "attached by not showing" due to the override of shouldNotRemoveFromDOMWhenHidden(). * UserInterface/Base/Main.js: (WI._createTabContentViewForType): (WI.isNewTabWithTypeAllowed): List WebInspectorExtensionTabContentView as a known tab class. But do not allow this tab class to be instantiated directly. Extension tabs are intended to be created using WebInspectorExtensionController.createTabForExtension(). * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.unregisterExtension): (WI.WebInspectorExtensionController.prototype.createTabForExtension): Drive-by, suppress animations when extension tabs are created and destroyed. Otherwise there is a lot of unnecessary and glitchy animation when multiple extension tabs are created upon loading Web Inspector the first time. (WI.WebInspectorExtensionController.prototype.showExtensionTab): (WI.WebInspectorExtensionController.prototype.hideExtensionTab): Added. These methods are counterparts. They toggle tabContentView.visible to make the tab visible and not visible. Note that 'hiding' does not actually close/destroy the extension tab. Extension tabs are hidden by setting .not-visible ('display:none') and removing the tab's TabBarItem from the TabBar. (WI.WebInspectorExtensionController.prototype.addContextMenuItemsForClosedExtensionTabs): (WI.WebInspectorExtensionController.prototype.addContextMenuItemsForAllExtensionTabs): Added. TabBar delegates the creation of extension tab context menu items to this class. The first method only shows hidden extension tabs (for the Reopen Closed Tabs + item). The second method shows visible and not visible extension tabs and feeds the main context menu. * UserInterface/Views/ContentView.css: (.content-view.not-visible): * UserInterface/Views/ContentViewContainer.css: (.content-view-container > .content-view): (.content-view-container > .content-view.not-visible): Deleted. This style class is now managed by ContentView.js. So, move the style declaration. * UserInterface/Views/ContentView.js: (WI.ContentView): (WI.ContentView.prototype.get visible): (WI.ContentView.prototype.set visible): Add a flag so that clients can determine when the content view is not visible and not closed. This can be true if a subclass overrides shouldNotRemoveFromDOMWhenHidden() to return true. * UserInterface/Views/ContentViewContainer.js: (WI.ContentViewContainer.prototype._disassociateFromContentView): Fix this code to not detach extension tabs that are hidden. (WI.ContentViewContainer.prototype._showEntry): (WI.ContentViewContainer.prototype._hideEntry): Adopt new setter for ContentView.prototype.hidden. * UserInterface/Views/TabBar.js: (WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown): Don't add generic context menu items for WebInspectorExtensionTabContentView. Call out to WebInspectorExtensionController to create the appropriate extension tab context menu items. (WI.TabBar.prototype._handleTabContainerContextMenu): (WI.TabBar): * UserInterface/Views/WebInspectorExtensionTabContentView.js: (WI.WebInspectorExtensionTabContentView.isTabAllowed): Drive-by, gate creation of this class on Web Extensions being enabled (InspectorFrontendHost.supportsWebExtensions). Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js.orig trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.css trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (283858 => 283859) --- trunk/Source/WebInspectorUI/ChangeLog 2021-10-09 01:39:28 UTC (rev 283858) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-10-09 01:40:57 UTC (rev 283859) @@ -1,5 +1,81 @@ 2021-10-08 BJ Burg +Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView +https://bugs.webkit.org/show_b
[webkit-changes] [283857] trunk
Title: [283857] trunk Revision 283857 Author bb...@apple.com Date 2021-10-08 18:38:43 -0700 (Fri, 08 Oct 2021) Log Message [Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be notified when the inspected page navigates https://bugs.webkit.org/show_bug.cgi?id=231338 Reviewed by Devin Rousso. Source/WebCore: New API test: WKInspectorExtensionDelegate.InspectedPageNavigatedCallbacks Add plumbing for new event. * inspector/InspectorFrontendClient.h: (WebCore::InspectorFrontendClient::inspectedPageDidNavigate): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::inspectedPageDidNavigate): Source/WebInspectorUI: Pass along an onNavigated event to InspectorFrontendHost when the WI.Frame.MainResourceDidChange event fires at a main frame target. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController): (WI.WebInspectorExtensionController.prototype.registerExtension): (WI.WebInspectorExtensionController.prototype.unregisterExtension): Do not add this global listener unless at least one WI.WebInspectorExtension is currently registered. (WI.WebInspectorExtensionController.prototype._handleMainResourceDidChange): Source/WebKit: Add plumbing for a new event to pass from WebInspectorUI out to _WKInspectorExtensionDelegate. * UIProcess/API/APIInspectorExtensionClient.h: (API::InspectorExtensionClient::inspectedPageDidNavigate): * UIProcess/API/Cocoa/_WKInspectorExtensionDelegate.h: * UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.h: * UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm: (WebKit::InspectorExtensionDelegate::InspectorExtensionDelegate): (WebKit::InspectorExtensionDelegate::InspectorExtensionClient::inspectedPageDidNavigate): * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.messages.in: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::inspectedPageDidNavigate): Call the delegate method for all _WKInspectorExtensions associated with this id<_WKInspectorExtensionHost>. Clients can map from extension to inspector if needed. * WebProcess/Inspector/RemoteWebInspectorUI.h: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::inspectedPageDidNavigate): * WebProcess/Inspector/WebInspectorUI.h: * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::inspectedPageDidNavigate): * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::inspectedPageDidNavigate): Tools: Add a new test to verify that triggering a navigation on the inspected WKWebView causes the -extension:inspectedPageDidNavigate: method of _WKInspectorExtensionDelegate to fire. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (resetGlobalState): (-[InspectorExtensionDelegateForTesting inspectorExtension:inspectedPageDidNavigate:]): (TEST): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendClient.h trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp trunk/Source/WebCore/inspector/InspectorFrontendHost.h trunk/Source/WebCore/inspector/InspectorFrontendHost.idl trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionDelegate.h trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.h trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.messages.in trunk/Source/WebKit/WebProcess/Inspector/RemoteWebInspectorUI.cpp trunk/Source/WebKit/WebProcess/Inspector/RemoteWebInspectorUI.h trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.h trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm Added Paths trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js.orig trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-page.html Diff Modified: trunk/Source/WebCore/ChangeLog (283856 => 283857) --- trunk/Source/WebCore/ChangeLog 2021-10-09 0
[webkit-changes] [283728] trunk
Title: [283728] trunk Revision 283728 Author bb...@apple.com Date 2021-10-07 11:38:12 -0700 (Thu, 07 Oct 2021) Log Message Web Inspector: WebInspectorExtensionTabContentView should not reload its iframe when detached https://bugs.webkit.org/show_bug.cgi?id=230758 Reviewed by Timothy Hatcher. Source/WebInspectorUI: When an element detaches from the DOM, the script context is destroyed, which we don't want to happen for _WKInspectorExtension tabs. Fix this by teaching ContentViewContainer to 'hide' such content views by setting `display:none` rather than detaching from the DOM. * UserInterface/Views/ContentViewContainer.js: (WI.ContentViewContainer.prototype._showEntry): (WI.ContentViewContainer.prototype._hideEntry): Set and unset 'display:none' instead of calling addSubview() / removeSubview(). * UserInterface/Views/ContentViewContainer.css: (.content-view-container > .content-view.hidden-for-detach): Added. (WI.ContentViewContainer.prototype._disassociateFromContentView): Clean up any remaining content views that were not detached due to overriding shouldNotRemoveFromDOMWhenHidden. * UserInterface/Views/ContentView.js: (WI.ContentView.prototype.get shouldNotRemoveFromDOMWhenHidden): Added. * UserInterface/Views/WebInspectorExtensionTabContentView.js: (WI.WebInspectorExtensionTabContentView): (WI.WebInspectorExtensionTabContentView.prototype.get shouldNotRemoveFromDOMWhenHidden): Override this to opt into the alternate behavior that does not detach from the DOM. It is still necessary to call attached() and detached() so that WebInpectorExtensionTabContentView can generate didShowExtensionTab/didHideExtensionTab event callbacks. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.get registeredExtensionIDs): * UserInterface/Debug/Bootstrap.js: (updateMockWebExtensionTab): (WI.runBootstrapOperations): This is a drive-by fix to address a console assertion seen while developing the API test. Don't unregister the mock extension if it is not registered in the first place. Tools: Add a new test to verify that re-selecting an extension tab does not cause it to reload. * TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.css trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js trunk/Source/WebInspectorUI/UserInterface/Views/WebInspectorExtensionTabContentView.js trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (283727 => 283728) --- trunk/Source/WebInspectorUI/ChangeLog 2021-10-07 18:35:01 UTC (rev 283727) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-10-07 18:38:12 UTC (rev 283728) @@ -1,3 +1,44 @@ +2021-10-07 BJ Burg + +Web Inspector: WebInspectorExtensionTabContentView should not reload its iframe when detached +https://bugs.webkit.org/show_bug.cgi?id=230758 + + +Reviewed by Timothy Hatcher. + +When an element detaches from the DOM, the script context is destroyed, which we don't +want to happen for _WKInspectorExtension tabs. Fix this by teaching ContentViewContainer to +'hide' such content views by setting `display:none` rather than detaching from the DOM. + +* UserInterface/Views/ContentViewContainer.js: +(WI.ContentViewContainer.prototype._showEntry): +(WI.ContentViewContainer.prototype._hideEntry): +Set and unset 'display:none' instead of calling addSubview() / removeSubview(). + +* UserInterface/Views/ContentViewContainer.css: +(.content-view-container > .content-view.hidden-for-detach): Added. + +(WI.ContentViewContainer.prototype._disassociateFromContentView): +Clean up any remaining content views that were not detached due to overriding shouldNotRemoveFromDOMWhenHidden. + +* UserInterface/Views/ContentView.js: +(WI.ContentView.prototype.get shouldNotRemoveFromDOMWhenHidden): Added. + +* UserInterface/Views/WebInspectorExtensionTabContentView.js: +(WI.WebInspectorExtensionTabContentView): +(WI.WebInspectorExtensionTabContentView.prototype.get shouldNotRemoveFromDOMWhenHidden): +Override this to opt into the alternate behavior that does not detach from the DOM. It is still +necessary to call attached() and detached() so that WebInpectorExtensionTabContentView can generate +
[webkit-changes] [283276] trunk
Title: [283276] trunk Revision 283276 Author bb...@apple.com Date 2021-09-29 16:28:22 -0700 (Wed, 29 Sep 2021) Log Message [Cocoa] add _WKInspectorExtension SPI to evaluate script on an extension tab https://bugs.webkit.org/show_bug.cgi?id=230646 Reviewed by Devin Rousso. Source/WebCore: Exercised by new API test: WKInspectorExtension.CanEvaluateScriptInExtensionTab * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::evaluateScriptInExtensionTab): Find the global object that corresponds to the passed-in and try to evaluate scriptSource in the mainThreadNormalWorld() of that . * html/HTMLIFrameElement.idl: Add [JSGenerateToNativeObject] so that it's possible to pass HTMLIFrameElement to the IDL function and convert it to the native object (HTMLIFrameElement&) from a JSValue. Source/WebInspectorUI: Add a new InspectorFrontendAPI method to evaluate script on an iframe within Web Inspector. This in turn calls out to InspectorFrontendHost to do the actual evaluation. Otherwise, the CSP policy set by the tab content may block any such evaluation if the 'script-src' directive does not include 'unsafe-eval'. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.showExtensionTab): (InspectorFrontendAPI.evaluateScriptInExtensionTab): Call through to the WebInspectorExtensionController method. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.evaluateScriptInExtensionTab): Added. Try to get the for a extensionTabID, and use InspectorFrontendHost to evaluate script in the context of the . Be sure to correctly wrap the result. * UserInterface/Views/WebInspectorExtensionTabContentView.js: (WI.WebInspectorExtensionTabContentView): (WI.WebInspectorExtensionTabContentView.prototype.get iframeElement): (WI.WebInspectorExtensionTabContentView.shouldSaveTab): (WI.WebInspectorExtensionTabContentView.prototype.initialLayout): Deleted. While writing the API test, I saw that the first evaluation frequently failed because the did not exist. Change this class so that the is created in the constructor. Add a getter for the element. (WI.WebInspectorExtensionTabContentView.prototype._extensionFrameDidLoad): (WI.WebInspectorExtensionTabContentView.prototype._maybeDispatchDidShowExtensionTab): While writing this patch, it became apparent that didShowExtensionTab() was being called prior to the iframe actually completing its initial load. Then, the test would try to evaluate script on about:blank instead of the actual tab content. To fix this, require that the be attached and have fired the `onload` event before we notify clients that it has been 'shown'. * UserInterface/Main.html: Adjust the default CSP policy to not mention img-src. This allows ports such as Cocoa to set their own img-src CSP directive. These changes are necessary to allow images to load from custom URL schemes. * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject): The new API test exposes a bug in this assertion, namely, that it does not account for the situation where a tab does not wish to be saved. In that case, the displayed WebInspectorExtensionTabContentView is *not* at index 0 of WI.TabBrowser.recentTabContentViews. This is correctly handled with a special case in WI.TabBrowser._tabBarItemSelected, so incorporate that logic into the assertion. Source/WebKit: Add new testing API for evaluating script expressions in the context of a tab created by _WKInspectorExtension. For the most part, this is implemented in the same way as the -evaluateScript: method, but the script is evaluated within the Web Inspector frontend itself rather than in the inspected page. To avoid CSP issues, the actual evaluation is performed on subframes using a new InspectorFrontendHost method which takes an and script source. Along the way, tweak Web Inspector's CSP policy to allow loading images from custom URL schemes as specified using _WKInspectorConfiguration. This is so that tab icons from the test-resource: scheme can be loaded in the main frame of Web Inspector's WKWebView under testing situations. * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Add new files. * UIProcess/API/APIInspectorExtension.h: * UIProcess/API/APIInspectorExtension.cpp: (API::InspectorExtension::evaluateScriptInExtensionTab): Based on evaluateScript(). Call through to the shared extension controller. * UIProcess/API/Cocoa/_WKInspectorExtensionPrivateForTesting.h: Added. * UIProcess/API/Cocoa/_WKInspectorExtensionTesting.mm: Added. (-[_WKInspectorExtension _evaluateScript:inExtensionTabWithIdentifier:completionHandler:]): Added. Call through to the shared extension controller. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionController
[webkit-changes] [283212] trunk/Source/WebInspectorUI
Title: [283212] trunk/Source/WebInspectorUI Revision 283212 Author bb...@apple.com Date 2021-09-28 23:32:29 -0700 (Tue, 28 Sep 2021) Log Message Web Inspector: add settings option for 'Show Mock Web Extension Tab' in engineering builds https://bugs.webkit.org/show_bug.cgi?id=230923 Reviewed by Devin Rousso. This is an engineering-only facility to quickly check the behavior of WebInspectorExtensionTabContentView (aka Web Extension Tabs). The behavior of these tabs differs from other tabs, so it is important to make this easy to verify. * UserInterface/Base/Setting.js: Add new setting. * UserInterface/Debug/Bootstrap.js: (updateMockWebExtensionTab): (WI.runBootstrapOperations): Call the InspectorFrontendAPI commands that would be called by WebInspectorUIExtensionController to register an extension and create a tab for it. * UserInterface/Debug/MockWebExtensionTab.html: Added. This is adapted from InspectorExtension-basic-tab.html as used in TestWebKitAPI. * UserInterface/Protocol/InspectorFrontendAPI.js: Fix a typo in the headerdoc for createTabForExtension. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createEngineeringSettingsView): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js Added Paths trunk/Source/WebInspectorUI/UserInterface/Debug/MockWebExtensionTab.html Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (283211 => 283212) --- trunk/Source/WebInspectorUI/ChangeLog 2021-09-29 06:23:31 UTC (rev 283211) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-09-29 06:32:29 UTC (rev 283212) @@ -1,5 +1,32 @@ 2021-09-28 BJ Burg +Web Inspector: add settings option for 'Show Mock Web Extension Tab' in engineering builds +https://bugs.webkit.org/show_bug.cgi?id=230923 + +Reviewed by Devin Rousso. + +This is an engineering-only facility to quickly check the behavior of +WebInspectorExtensionTabContentView (aka Web Extension Tabs). The behavior +of these tabs differs from other tabs, so it is important to make this easy to verify. + +* UserInterface/Base/Setting.js: Add new setting. +* UserInterface/Debug/Bootstrap.js: +(updateMockWebExtensionTab): +(WI.runBootstrapOperations): +Call the InspectorFrontendAPI commands that would be called by WebInspectorUIExtensionController +to register an extension and create a tab for it. + +* UserInterface/Debug/MockWebExtensionTab.html: Added. +This is adapted from InspectorExtension-basic-tab.html as used in TestWebKitAPI. + +* UserInterface/Protocol/InspectorFrontendAPI.js: Fix a typo in the headerdoc +for createTabForExtension. + +* UserInterface/Views/SettingsTabContentView.js: +(WI.SettingsTabContentView.prototype._createEngineeringSettingsView): + +2021-09-28 BJ Burg + [Cocoa] Add SPI to select a tab created by _WKInspectorExtension https://bugs.webkit.org/show_bug.cgi?id=230580 Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js (283211 => 283212) --- trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js 2021-09-29 06:23:31 UTC (rev 283211) +++ trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js 2021-09-29 06:32:29 UTC (rev 283212) @@ -245,6 +245,7 @@ engineeringShowInternalObjectsInHeapSnapshot: new WI.EngineeringSetting("engineering-show-internal-objects-in-heap-snapshot", false), engineeringShowPrivateSymbolsInHeapSnapshot: new WI.EngineeringSetting("engineering-show-private-symbols-in-heap-snapshot", false), engineeringAllowEditingUserAgentShadowTrees: new WI.EngineeringSetting("engineering-allow-editing-user-agent-shadow-trees", false), +engineeringShowMockWebExtensionTab: new WI.EngineeringSetting("engineering-show-mock-web-extension-tab", false), // Debug debugShowConsoleEvaluations: new WI.DebugSetting("debug-show-console-evaluations", false), Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js (283211 => 283212) --- trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js 2021-09-29 06:23:31 UTC (rev 283211) +++ trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js 2021-09-29 06:32:29 UTC (rev 283212) @@ -139,6 +139,36 @@ WI.tabBar.needsLayout(); } +function updateMockWebExtensionTab() { +let mockData = { +extensionID: "1234567890ABCDEF", +displayName: WI.unlocalizedString("Mock Extension"), +tabName: WI.unlocalizedString("Mock"), +tabIconURL: "Images/Info.svg", +sourceURL: "Debug/MockWebExtensionTab.html", +}; + +// Simulates the steps taken by WebInspecto
[webkit-changes] [283196] trunk
Title: [283196] trunk Revision 283196 Author bb...@apple.com Date 2021-09-28 14:28:07 -0700 (Tue, 28 Sep 2021) Log Message [Cocoa] Add SPI to select a tab created by _WKInspectorExtension https://bugs.webkit.org/show_bug.cgi?id=230580 Reviewed by Devin Rousso. Source/WebInspectorUI: Add a method to look up a WebInspectorExtensionTabContentView by its extensionTabID and then show it with WI.tabBrowser. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.reloadForExtension): Remove extra newlines. (WI.WebInspectorExtensionController.prototype.showExtensionTab): Added. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.showExtensionTab): Added. Source/WebKit: Add a new method for selecting an extension tab in WebInspectorUI that was previously created by using -[_WKInspectorExtension createNewTab:tabIconURL:sourceURL:completionHandler]. This is a straightforward plumbing exercise. The API test uses the new method to test the existing _WKInspectorExtensionDelegate callback methods for didShowTab and didHideTab. New API test: WKInspectorExtensionDelegate.ShowAndHideTabCallbacks. * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector showExtensionTabWithIdentifier:completionHandler:]): * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController showExtensionTabWithIdentifier:completionHandler:]): * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::showExtensionTab): * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::showExtensionTab): * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Tools: Create a new test file for _WKInspectorExtensionDelegate. Add a new test case that exercises creating an extension tab, showing an extension tab, and uses delegate callbacks for didShowTab/didHideTab. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-TabIcon-30x30.png: Added. * TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: Added. (resetGlobalState): (-[UIDelegateForTestingInspectorExtensionDelegate _webView:didAttachLocalInspector:]): (-[InspectorExtensionDelegateForTesting inspectorExtension:didShowTabWithIdentifier:]): (-[InspectorExtensionDelegateForTesting inspectorExtension:didHideTabWithIdentifier:]): (TEST): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.h trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.messages.in trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-TabIcon-30x30.png trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (283195 => 283196) --- trunk/Source/WebInspectorUI/ChangeLog 2021-09-28 21:16:29 UTC (rev 283195) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-09-28 21:28:07 UTC (rev 283196) @@ -1,3 +1,22 @@ +2021-09-28 BJ Burg + +[Cocoa] Add SPI to select a tab created by _WKInspectorExtension +https://bugs.webkit.org/show_bug.cgi?id=230580 + + +Reviewed by Devin Rousso. + +Add a method to look up a WebInspectorExtensionTabContentView +by its extensionTabID and then show it with WI.tabBrowser. + +* UserInterface/Controllers/WebInspectorExtensionController.js: +(WI.WebInspectorExtensionController.prototype.reloadForExtension): +Remove extra newlines. +(WI.WebInspectorExtensionController.prototype.showExtensionTab): Added. + +* UserInterface/Protocol/InspectorFrontendAPI.js: +(InspectorFrontendAPI.showExtensionTab): Added. + 2021-09-23 Myles C. Maxfield Web Inspector support for font-pa
[webkit-changes] [283119] trunk/Source/WebKit
Title: [283119] trunk/Source/WebKit Revision 283119 Author bb...@apple.com Date 2021-09-27 09:19:05 -0700 (Mon, 27 Sep 2021) Log Message [Cocoa] backport showConsole() and showResources() for RemoteWebInspectorUI https://bugs.webkit.org/show_bug.cgi?id=230573 Reviewed by Devin Rousso. These methods already exist for _WKInspector. A test will be added in future patch that tests _WKInspectorExtensionDelegate shown/hidden callback methods. * UIProcess/API/Cocoa/_WKInspectorIBActions.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h. Added. API and SPI that are shared between local and remote Web Inspector should go in this class. Since these methods are used to implement IBActions for a detached Web Inspector window, the protocol is named _WKInspectorIBActions. Hoist showResources() and showConsole() to this shared protocol. * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: * UIProcess/API/Cocoa/_WKInspector.h: Remove methods that are part of the _WKInspectorIBActions protocol. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController showConsole]): (-[_WKRemoteWebInspectorViewController showResources]): Added. Call into RemoteWebInspectorUIProxy. * UIProcess/Inspector/RemoteWebInspectorUIProxy.h: * UIProcess/Inspector/RemoteWebInspectorUIProxy.cpp: (WebKit::RemoteWebInspectorUIProxy::showConsole): (WebKit::RemoteWebInspectorUIProxy::showResources): Added. Send an IPC message to the Inspector web process. * WebProcess/Inspector/RemoteWebInspectorUI.h: * WebProcess/Inspector/RemoteWebInspectorUI.messages.in: Add new messages. * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::showConsole): (WebKit::RemoteWebInspectorUI::showResources): Added. Backport the implementation from WebInspectorUI. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorUIProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorUIProxy.h trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/Inspector/RemoteWebInspectorUI.cpp trunk/Source/WebKit/WebProcess/Inspector/RemoteWebInspectorUI.h trunk/Source/WebKit/WebProcess/Inspector/RemoteWebInspectorUI.messages.in Added Paths trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorIBActions.h Diff Modified: trunk/Source/WebKit/ChangeLog (283118 => 283119) --- trunk/Source/WebKit/ChangeLog 2021-09-27 16:12:27 UTC (rev 283118) +++ trunk/Source/WebKit/ChangeLog 2021-09-27 16:19:05 UTC (rev 283119) @@ -1,3 +1,44 @@ +2021-09-27 BJ Burg + +[Cocoa] backport showConsole() and showResources() for RemoteWebInspectorUI +https://bugs.webkit.org/show_bug.cgi?id=230573 + + +Reviewed by Devin Rousso. + +These methods already exist for _WKInspector. A test will be added in +future patch that tests _WKInspectorExtensionDelegate shown/hidden callback methods. + +* UIProcess/API/Cocoa/_WKInspectorIBActions.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h. +Added. API and SPI that are shared between local and remote Web Inspector +should go in this class. Since these methods are used to implement IBActions for a +detached Web Inspector window, the protocol is named _WKInspectorIBActions. +Hoist showResources() and showConsole() to this shared protocol. + +* UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: +* UIProcess/API/Cocoa/_WKInspector.h: Remove methods that are +part of the _WKInspectorIBActions protocol. + +* UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: +(-[_WKRemoteWebInspectorViewController showConsole]): +(-[_WKRemoteWebInspectorViewController showResources]): +Added. Call into RemoteWebInspectorUIProxy. + +* UIProcess/Inspector/RemoteWebInspectorUIProxy.h: +* UIProcess/Inspector/RemoteWebInspectorUIProxy.cpp: +(WebKit::RemoteWebInspectorUIProxy::showConsole): +(WebKit::RemoteWebInspectorUIProxy::showResources): +Added. Send an IPC message to the Inspector web process. + +* WebProcess/Inspector/RemoteWebInspectorUI.h: +* WebProcess/Inspector/RemoteWebInspectorUI.messages.in: +Add new messages. + +* WebProcess/Inspector/RemoteWebInspectorUI.cpp: +(WebKit::RemoteWebInspectorUI::showConsole): +(WebKit::RemoteWebInspectorUI::showResources): +Added. Backport the implementation from WebInspectorUI. + 2021-09-27 Youenn Fablet iPadOS 15 / iOS 15 unable to decode VP9 stream Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h (283118 => 2
[webkit-changes] [276514] trunk/Source/WebKit
Title: [276514] trunk/Source/WebKit Revision 276514 Author bb...@apple.com Date 2021-04-23 12:53:26 -0700 (Fri, 23 Apr 2021) Log Message Web Inspector: [Cocoa] WKInspectorResourceURLSchemeHandler needs to serialize cleanup actions https://bugs.webkit.org/show_bug.cgi?id=224986 Reviewed by Devin Rousso. * UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: (-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): Do cleanup on the main queue so that it can be serialized with reads. (-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]): Ensure that all removals from the map are processed before doing a lookup. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm Diff Modified: trunk/Source/WebKit/ChangeLog (276513 => 276514) --- trunk/Source/WebKit/ChangeLog 2021-04-23 19:51:44 UTC (rev 276513) +++ trunk/Source/WebKit/ChangeLog 2021-04-23 19:53:26 UTC (rev 276514) @@ -1,3 +1,18 @@ +2021-04-23 BJ Burg + +Web Inspector: [Cocoa] WKInspectorResourceURLSchemeHandler needs to serialize cleanup actions +https://bugs.webkit.org/show_bug.cgi?id=224986 + + +Reviewed by Devin Rousso. + +* UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: +(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): +Do cleanup on the main queue so that it can be serialized with reads. + +(-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]): +Ensure that all removals from the map are processed before doing a lookup. + 2021-04-23 Darin Adler Remove decoder memory allocations based on untrusted data (sizes) in the stream; related changes Modified: trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm (276513 => 276514) --- trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm 2021-04-23 19:51:44 UTC (rev 276513) +++ trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm 2021-04-23 19:53:26 UTC (rev 276514) @@ -88,7 +88,9 @@ } NSBlockOperation *operation = [NSBlockOperation blockOperationWithBlock:^{ -[_fileLoadOperations removeObjectForKey:urlSchemeTask]; +dispatch_async(dispatch_get_main_queue(), ^{ +[_fileLoadOperations removeObjectForKey:urlSchemeTask]; +}); NSURL *requestURL = urlSchemeTask.request.URL; NSURL *fileURLForRequest = [_cachedBundle URLForResource:requestURL.relativePath withExtension:@""]; @@ -136,10 +138,13 @@ - (void)webView:(WKWebView *)webView stopURLSchemeTask:(id )urlSchemeTask { -if (NSOperation *operation = [_fileLoadOperations objectForKey:urlSchemeTask]) { -[operation cancel]; -[_fileLoadOperations removeObjectForKey:urlSchemeTask]; -} +// Ensure that all blocks with pending removals are dispatched before doing a map lookup. +dispatch_async(dispatch_get_main_queue(), ^{ +if (NSOperation *operation = [_fileLoadOperations objectForKey:urlSchemeTask]) { +[operation cancel]; +[_fileLoadOperations removeObjectForKey:urlSchemeTask]; +} +}); } @end ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [276476] trunk
Title: [276476] trunk Revision 276476 Author bb...@apple.com Date 2021-04-22 17:09:05 -0700 (Thu, 22 Apr 2021) Log Message [Cocoa] re-enable test case WKInspectorDelegate.InspectorConfiguration https://bugs.webkit.org/show_bug.cgi?id=224577 Reviewed by Devin Rousso. Source/WebInspectorUI: Adjust the CSP directive list in the tag to allow for customization by WebKit ports. * UserInterface/Main.html: - Remove `default-src 'self'` so as not to block custom scheme loads. - Remove `connect-src * ws:` so as not to block custom scheme loads. - Add `object-src 'none'` as we have no reason to allow , , or . Source/WebKit: For the purposes of testing, we want to be able to issue a fetch() that will hit a custom URL scheme handler registered with _WKInspectorConfiguration. This is not allowed by the existing tag CSP directive list because 'connect-src *' does not allow connecting to arbitrary schemes, just arbitrary domains. To fix this, relax the 'connect-src' directive in Main.html and apply a dynamically-computed CSP directive using the 'Content-Security-Policy' HTTP response header. This is only sent for main resources (Main.html and Test.html) using the newly added inspector-resource: URL scheme handler. The dynamically computed directive explicitly allows 'self' and any other registered custom URL scheme handlers. WebKit ports which have not migrated away from file:/// will only apply the weaker 'connect-src' directive from the tag after this change. Progresses an existing API test: WKInspectorDelegate.InspectorConfiguration. * UIProcess/API/Cocoa/_WKInspectorDelegate.h: * UIProcess/API/APIInspectorClient.h: (API::InspectorClient::frontendLoaded): * UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h: * UIProcess/API/Cocoa/_WKInspector.mm: * UIProcess/API/Cocoa/_WKInspectorTesting.mm: (_javascript_SnippetToFetchURL): (-[_WKInspector _fetchURLForTesting:]): * UIProcess/Inspector/WebInspectorUIProxy.cpp: (WebKit::WebInspectorUIProxy::frontendLoaded): Notify the _WKInspectorDelegate adapter that the frontend has finished loading. * UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.h: * UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: (-[WKInspectorResourceURLSchemeHandler allowedURLSchemesForCSP]): (-[WKInspectorResourceURLSchemeHandler setAllowedURLSchemesForCSP:]): (-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): Added. Keep track of allowed custom schemes and allowed main resources. Apply the CSP directive for main resource requests only. * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController webViewConfiguration]): Set the allowed URL schemes property so the URL scheme handler can include the schemes in the dynamically computed 'connect-src' directive. Tools: Trigger a fetch of a resource that uses a custom URL scheme handler in order to test that custom scheme handlers registered in an _WKInspectorConfiguration are getting used as expected. Add an -inspectorFrontendLoaded: delegate method to -WKInspectorDelegate. This is mainly used to prevent tests from progressing with a half-loaded inspector. To make it possible to do this fetch(), there are some CSP related changes that were made for Main.html so that fetching from a registered custom scheme is allowed. Drive-by, per post-commit comments, add a better fix for the memory leak reported in https://bugs.webkit.org/show_bug.cgi?id=223899. Thanks Joe! * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (resetGlobalState): (-[InspectorDelegate inspectorFrontendLoaded:]): (TEST): (-[UIDelegate _webView:didAttachLocalInspector:]): (-[UIDelegate _webView:willCloseLocalInspector:]): (-[UIDelegate _webViewDidEnableInspectorBrowserDomain:]): (-[UIDelegate _webViewDidDisableInspectorBrowserDomain:]): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Main.html trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIInspectorClient.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorDelegate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.h trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (276475 => 276476) --- trunk/Source/WebInspectorUI/ChangeLog 2021-04-22 23:04:43 UTC (rev 276475) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-04-23 00:09:05 UTC (rev 276476) @@ -1,3 +1,19 @@ +2021-04-22 BJ Burg + +[Cocoa] re-enable test case WKInspectorDelegate.Inspec
[webkit-changes] [276454] trunk
Title: [276454] trunk Revision 276454 Author bb...@apple.com Date 2021-04-22 12:48:17 -0700 (Thu, 22 Apr 2021) Log Message v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak https://bugs.webkit.org/show_bug.cgi?id=223899 Reviewed by Devin Rousso. Address post-review feedback. Source/WebKit: * UIProcess/API/Cocoa/_WKInspectorTesting.mm: (-[_WKInspector _openURLExternallyForTesting:useFrontendAPI:]): Tools: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm Diff Modified: trunk/Source/WebKit/ChangeLog (276453 => 276454) --- trunk/Source/WebKit/ChangeLog 2021-04-22 19:32:20 UTC (rev 276453) +++ trunk/Source/WebKit/ChangeLog 2021-04-22 19:48:17 UTC (rev 276454) @@ -1,3 +1,16 @@ +2021-04-22 BJ Burg + +v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak +https://bugs.webkit.org/show_bug.cgi?id=223899 + + +Reviewed by Devin Rousso. + +Address post-review feedback. + +* UIProcess/API/Cocoa/_WKInspectorTesting.mm: +(-[_WKInspector _openURLExternallyForTesting:useFrontendAPI:]): + 2021-04-22 Alex Christensen Add some new messages.in files to the Mac CMake build Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm (276453 => 276454) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm 2021-04-22 19:32:20 UTC (rev 276453) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm 2021-04-22 19:48:17 UTC (rev 276454) @@ -49,11 +49,11 @@ - (void)_openURLExternallyForTesting:(NSURL *)url useFrontendAPI:(BOOL)useFrontendAPI { if (useFrontendAPI) -_inspector->evaluateInFrontendForTesting(_javascript_SnippetToOpenURLExternally([url copy])); +_inspector->evaluateInFrontendForTesting(_javascript_SnippetToOpenURLExternally(url)); else { // Force the navigation request to be handled naturally through the // internal NavigationDelegate of WKInspectorViewController. -[self.inspectorWebView loadRequest:[NSURLRequest requestWithURL:[url copy]]]; +[self.inspectorWebView loadRequest:[NSURLRequest requestWithURL:url]]; } } Modified: trunk/Tools/ChangeLog (276453 => 276454) --- trunk/Tools/ChangeLog 2021-04-22 19:32:20 UTC (rev 276453) +++ trunk/Tools/ChangeLog 2021-04-22 19:48:17 UTC (rev 276454) @@ -1,3 +1,16 @@ +2021-04-22 BJ Burg + +v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak +https://bugs.webkit.org/show_bug.cgi?id=223899 + + +Reviewed by Devin Rousso. + +Address post-review feedback. + +* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: +(TEST): + 2021-04-22 Sam Sneddon Ensure all non-local AutoInstalled libraries specify version Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm (276453 => 276454) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm 2021-04-22 19:32:20 UTC (rev 276453) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm 2021-04-22 19:48:17 UTC (rev 276454) @@ -221,7 +221,7 @@ [[webView _inspector] show]; TestWebKitAPI::Util::run(&didAttachLocalInspectorCalled); -urlToOpen = adoptNS([NSURL URLWithString:@"https://www.webkit.org/"]); +urlToOpen = [NSURL URLWithString:@"https://www.webkit.org/"]; // Check the case where the load is intercepted by the navigation delegate. [[webView _inspector] _openURLExternallyForTesting:urlToOpen.get() useFrontendAPI:NO]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [276446] trunk/Source/WebKit
Title: [276446] trunk/Source/WebKit Revision 276446 Author bb...@apple.com Date 2021-04-22 11:00:50 -0700 (Thu, 22 Apr 2021) Log Message v2: Web Inspector: exempt API::SharedJSContext from remote inspection and automatic inspection https://bugs.webkit.org/show_bug.cgi?id=224841 Reviewed by Devin Rousso. Use the RemoteInspector C SPI to temporarily turn off "allow remote inspection by default". * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: (API::SharedJSContext::ensureContext): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm Diff Modified: trunk/Source/WebKit/ChangeLog (276445 => 276446) --- trunk/Source/WebKit/ChangeLog 2021-04-22 17:12:25 UTC (rev 276445) +++ trunk/Source/WebKit/ChangeLog 2021-04-22 18:00:50 UTC (rev 276446) @@ -1,3 +1,16 @@ +2021-04-20 BJ Burg + +v2: Web Inspector: exempt API::SharedJSContext from remote inspection and automatic inspection +https://bugs.webkit.org/show_bug.cgi?id=224841 + + +Reviewed by Devin Rousso. + +Use the RemoteInspector C SPI to temporarily turn off "allow remote inspection by default". + +* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: +(API::SharedJSContext::ensureContext): + 2021-04-21 Wenson Hsieh [iOS] The Look Up text service popover should avoid covering selected text Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm (276445 => 276446) --- trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm 2021-04-22 17:12:25 UTC (rev 276445) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm 2021-04-22 18:00:50 UTC (rev 276446) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Apple Inc. All rights reserved. + * Copyright (C) 2015, 2021 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,6 +29,7 @@ #import <_javascript_Core/APICast.h> #import <_javascript_Core/JSContextPrivate.h> #import <_javascript_Core/JSGlobalObjectInlines.h> +#import <_javascript_Core/JSRemoteInspector.h> #import <_javascript_Core/JSValue.h> #import #import @@ -45,8 +46,11 @@ JSContext* ensureContext() { if (!m_context) { +bool previous = JSRemoteInspectorGetInspectionEnabledByDefault(); +JSRemoteInspectorSetInspectionEnabledByDefault(false); m_context = adoptNS([[JSContext alloc] init]); -[m_context _setRemoteInspectionEnabled:NO]; +JSRemoteInspectorSetInspectionEnabledByDefault(previous); + m_timer.startOneShot(1_s); } return m_context.get(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [276276] trunk/Tools
Title: [276276] trunk/Tools Revision 276276 Author bb...@apple.com Date 2021-04-19 16:03:26 -0700 (Mon, 19 Apr 2021) Log Message Can't use Web Inspector on web views made by TestWebKitAPI https://bugs.webkit.org/show_bug.cgi?id=147073 Reviewed by Devin Rousso. It is necessary to spin a nested run loop at the point in the test where you would like to remote inspect a WebView. Messages from the remote connection are dispatched through UIProcess, so if lldb has paused UIProcess, WebInspectorUI will not be able to get any data from the inspected WebView. * TestWebKitAPI/DebugUtilities.h: Added. Add macros to wait for a remote inspector to attach or detach, then drop into the debugger when it has done so. * TestWebKitAPI/PlatformUtilities.h: Add missing `#pragma once`. * TestWebKitAPI/WTFStringUtilities.h: Force the build to fail noisily if we have attempted to redefine WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING. Force the correct ordering between "WTFStringUtilities.h" and . Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/PlatformUtilities.h trunk/Tools/TestWebKitAPI/WTFStringUtilities.h Added Paths trunk/Tools/TestWebKitAPI/DebugUtilities.h Diff Modified: trunk/Tools/ChangeLog (276275 => 276276) --- trunk/Tools/ChangeLog 2021-04-19 22:20:53 UTC (rev 276275) +++ trunk/Tools/ChangeLog 2021-04-19 23:03:26 UTC (rev 276276) @@ -1,3 +1,25 @@ +2021-04-19 BJ Burg + +Can't use Web Inspector on web views made by TestWebKitAPI +https://bugs.webkit.org/show_bug.cgi?id=147073 + + +Reviewed by Devin Rousso. + +It is necessary to spin a nested run loop at the point in the test where you would +like to remote inspect a WebView. Messages from the remote connection are dispatched +through UIProcess, so if lldb has paused UIProcess, WebInspectorUI will not be able to +get any data from the inspected WebView. + +* TestWebKitAPI/DebugUtilities.h: Added. +Add macros to wait for a remote inspector to attach or detach, then drop into +the debugger when it has done so. + +* TestWebKitAPI/PlatformUtilities.h: Add missing `#pragma once`. +* TestWebKitAPI/WTFStringUtilities.h: Force the build to fail noisily if we have +attempted to redefine WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING. Force the correct +ordering between "WTFStringUtilities.h" and . + 2021-04-19 Wenson Hsieh Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty() Added: trunk/Tools/TestWebKitAPI/DebugUtilities.h (0 => 276276) --- trunk/Tools/TestWebKitAPI/DebugUtilities.h (rev 0) +++ trunk/Tools/TestWebKitAPI/DebugUtilities.h 2021-04-19 23:03:26 UTC (rev 276276) @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2021 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#if PLATFORM(COCOA) + +#include "WTFStringUtilities.h" +#include +#include + +#define WAIT_FOR_INSPECTOR_TO_ATTACH(webView) \ +do { \ +WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "Spinning a nested run loop until an inspector attaches to the WebView. Remote inspect the process (PID: %d) to continue.", getCurrentProcessID()); \ +do { \ +TestWebKitAPI::Util::sleep(1); \ +if ([webView _isBeingInspected]) \ +break; \ +} while (1); \ +WTFBreakpointTrap(); \ +} while (0) + +#define WAIT_FOR_INSPECTOR_TO_DETACH(webView) \ +do { \ +WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "Spinning a nested run loop until no inspectors are attached to the WebView. Close all local and remote inspectors for the process (PID: %d) to continue.", getCurrentProce
[webkit-changes] [275982] trunk/Source
Title: [275982] trunk/Source Revision 275982 Author bb...@apple.com Date 2021-04-14 17:18:33 -0700 (Wed, 14 Apr 2021) Log Message Web Inspector: add setting to allow inspecting Web Inspector https://bugs.webkit.org/show_bug.cgi?id=224082 Reviewed by Devin Rousso. Source/WebCore: Add a property to check if inspecting inspector is allowed, and to enable/disable upon loading the frontend or toggling the setting. * en.lproj/Localizable.strings: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::inspectInspector): (WebCore::InspectorFrontendHost::allowsInspectingInspector): (WebCore::InspectorFrontendHost::setAllowsInspectingInspector): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: Source/WebInspectorUI: Instead of telling curious users to set the WebKitDeveloperExtras default, expose an experimental setting that does the same thing. * UserInterface/Base/Main.js: (WI.loaded): * UserInterface/Base/Setting.js: * UserInterface/Views/SettingsTabContentView.js: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp trunk/Source/WebCore/inspector/InspectorFrontendHost.h trunk/Source/WebCore/inspector/InspectorFrontendHost.idl trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js Diff Modified: trunk/Source/WebCore/ChangeLog (275981 => 275982) --- trunk/Source/WebCore/ChangeLog 2021-04-15 00:15:02 UTC (rev 275981) +++ trunk/Source/WebCore/ChangeLog 2021-04-15 00:18:33 UTC (rev 275982) @@ -1,3 +1,22 @@ +2021-04-13 BJ Burg + +Web Inspector: add setting to allow inspecting Web Inspector +https://bugs.webkit.org/show_bug.cgi?id=224082 + + +Reviewed by Devin Rousso. + +Add a property to check if inspecting inspector is allowed, +and to enable/disable upon loading the frontend or toggling the setting. + +* en.lproj/Localizable.strings: +* inspector/InspectorFrontendHost.cpp: +(WebCore::InspectorFrontendHost::inspectInspector): +(WebCore::InspectorFrontendHost::allowsInspectingInspector): +(WebCore::InspectorFrontendHost::setAllowsInspectingInspector): +* inspector/InspectorFrontendHost.h: +* inspector/InspectorFrontendHost.idl: + 2021-04-14 Sam Weinig Use range-for loop in target contrast selection to simplify/improve code readability Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (275981 => 275982) --- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp 2021-04-15 00:15:02 UTC (rev 275981) +++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp 2021-04-15 00:18:33 UTC (rev 275982) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2020 Apple Inc. All rights reserved. + * Copyright (C) 2007-2021 Apple Inc. All rights reserved. * Copyright (C) 2008 Matt Lilek * * Redistribution and use in source and binary forms, with or without @@ -563,10 +563,10 @@ void InspectorFrontendHost::inspectInspector() { -if (m_frontendPage) { -m_frontendPage->settings().setDeveloperExtrasEnabled(true); +setAllowsInspectingInspector(true); + +if (m_frontendPage) m_frontendPage->inspectorController().show(); -} } bool InspectorFrontendHost::isBeingInspected() @@ -578,6 +578,12 @@ return inspectorController.hasLocalFrontend() || inspectorController.hasRemoteFrontend(); } +void InspectorFrontendHost::setAllowsInspectingInspector(bool allow) +{ +if (m_frontendPage) +m_frontendPage->settings().setDeveloperExtrasEnabled(allow); +} + bool InspectorFrontendHost::supportsShowCertificate() const { #if PLATFORM(COCOA) Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.h (275981 => 275982) --- trunk/Source/WebCore/inspector/InspectorFrontendHost.h 2021-04-15 00:15:02 UTC (rev 275981) +++ trunk/Source/WebCore/inspector/InspectorFrontendHost.h 2021-04-15 00:18:33 UTC (rev 275982) @@ -129,6 +129,7 @@ void beep(); void inspectInspector(); bool isBeingInspected(); +void setAllowsInspectingInspector(bool); bool supportsDiagnosticLogging(); #if ENABLE(INSPECTOR_TELEMETRY) Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.idl (275981 => 275982) --- trunk/Source/WebCore/inspector/InspectorFrontendHost.idl 2021-04-15 00:15:02 UTC (rev 275981) +++ trunk/Source/WebCore/inspector/InspectorFrontendHost.idl 2021-04-15 00:18:33 UTC (rev 275982) @@ -92,6 +92,7 @@ undefined beep(); undefined inspectInspector(); boolean isBeingInspected(); +undefined setAllowsInspectingInspector(boolean allow); readonly attribute boolean supportsDiagnosticLogging; [Conditio
[webkit-changes] [275845] trunk/Source
Title: [275845] trunk/Source Revision 275845 Author bb...@apple.com Date 2021-04-12 16:14:49 -0700 (Mon, 12 Apr 2021) Log Message Modernize uses of ConsoleClient https://bugs.webkit.org/show_bug.cgi?id=224398 Reviewed by David Kilzer. ConsoleClient acts like a delegate, so its callers should be using weak references to it. Source/_javascript_Core: * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::consoleClient const): * inspector/JSGlobalObjectInspectorController.h: * runtime/ConsoleClient.h: * runtime/ConsoleObject.cpp: (JSC::consoleLogWithLevel): (JSC::JSC_DEFINE_HOST_FUNCTION): * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::setConsoleClient): * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::consoleClient const): (JSC::JSGlobalObject::setConsoleClient): Deleted. Source/WebCore: * bindings/js/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::restore): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::initScriptForWindowProxy): * bindings/js/WindowProxy.cpp: (WebCore::WindowProxy::setDOMWindow): * workers/WorkerOrWorkletScriptController.cpp: (WebCore::WorkerOrWorkletScriptController::initScriptWithSubclass): Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.h trunk/Source/_javascript_Core/runtime/ConsoleClient.h trunk/Source/_javascript_Core/runtime/ConsoleObject.cpp trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp trunk/Source/_javascript_Core/runtime/JSGlobalObject.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/ScriptCachedFrameData.cpp trunk/Source/WebCore/bindings/js/ScriptController.cpp trunk/Source/WebCore/bindings/js/WindowProxy.cpp trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.cpp Diff Modified: trunk/Source/_javascript_Core/ChangeLog (275844 => 275845) --- trunk/Source/_javascript_Core/ChangeLog 2021-04-12 23:12:21 UTC (rev 275844) +++ trunk/Source/_javascript_Core/ChangeLog 2021-04-12 23:14:49 UTC (rev 275845) @@ -1,3 +1,27 @@ +2021-04-12 BJ Burg + +Modernize uses of ConsoleClient +https://bugs.webkit.org/show_bug.cgi?id=224398 + +Reviewed by David Kilzer. + +ConsoleClient acts like a delegate, so its callers +should be using weak references to it. + +* inspector/JSGlobalObjectInspectorController.cpp: +(Inspector::JSGlobalObjectInspectorController::consoleClient const): +* inspector/JSGlobalObjectInspectorController.h: +* runtime/ConsoleClient.h: +* runtime/ConsoleObject.cpp: +(JSC::consoleLogWithLevel): +(JSC::JSC_DEFINE_HOST_FUNCTION): +* runtime/JSGlobalObject.cpp: +(JSC::JSGlobalObject::init): +(JSC::JSGlobalObject::setConsoleClient): +* runtime/JSGlobalObject.h: +(JSC::JSGlobalObject::consoleClient const): +(JSC::JSGlobalObject::setConsoleClient): Deleted. + 2021-04-11 Yusuke Suzuki [JSC] Do not copy StringSwitchJumpTable Modified: trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp (275844 => 275845) --- trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp 2021-04-12 23:12:21 UTC (rev 275844) +++ trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp 2021-04-12 23:14:49 UTC (rev 275845) @@ -198,9 +198,9 @@ m_consoleAgent->addMessageToConsole(makeUnique(MessageSource::JS, MessageType::Log, MessageLevel::Error, errorMessage, WTFMove(callStack))); } -ConsoleClient* JSGlobalObjectInspectorController::consoleClient() const +WeakPtr JSGlobalObjectInspectorController::consoleClient() const { -return m_consoleClient.get(); +return makeWeakPtr(m_consoleClient.get()); } bool JSGlobalObjectInspectorController::developerExtrasEnabled() const Modified: trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.h (275844 => 275845) --- trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.h 2021-04-12 23:12:21 UTC (rev 275844) +++ trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.h 2021-04-12 23:14:49 UTC (rev 275845) @@ -81,7 +81,7 @@ void reportAPIException(JSC::JSGlobalObject*, JSC::Exception*); -JSC::ConsoleClient* consoleClient() const; +WeakPtr consoleClient() const; bool developerExtrasEnabled() const final; bool canAccessInspectedScriptState(JSC::JSGlobalObject*) const final { return true; } Modified: trunk/Source/_javascript_Core/runtime/ConsoleClient.h (275844 => 275845) --- trunk/Source/_javascript_Core/runtime/ConsoleClient.h 2021-04-12 23:12:21 UTC (rev 275844) +++ trunk/Source/_javascript_Core/runtime/ConsoleClient.h 2021-04-12 23:14:49 UTC (rev 275845) @@ -27,6 +27,7 @@ #include "ConsoleTypes.h" #include +#include
[webkit-changes] [275545] trunk/Source/WebInspectorUI
Title: [275545] trunk/Source/WebInspectorUI Revision 275545 Author bb...@apple.com Date 2021-04-06 13:26:30 -0700 (Tue, 06 Apr 2021) Log Message Web Inspector: remove duplicate Box Model section from Layout panel in Elements Tab https://bugs.webkit.org/show_bug.cgi?id=224206 Reviewed by Devin Rousso. For now, remove it from Layout panel. It may go back there when it is able to show used values. It currently only shows computed. * UserInterface/Views/LayoutDetailsSidebarPanel.js: (WI.LayoutDetailsSidebarPanel.prototype.initialLayout): (WI.LayoutDetailsSidebarPanel.prototype.layout): (WI.LayoutDetailsSidebarPanel.prototype.get minimumWidth): Deleted. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (275544 => 275545) --- trunk/Source/WebInspectorUI/ChangeLog 2021-04-06 20:20:41 UTC (rev 275544) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-04-06 20:26:30 UTC (rev 275545) @@ -1,3 +1,19 @@ +2021-04-06 BJ Burg + +Web Inspector: remove duplicate Box Model section from Layout panel in Elements Tab +https://bugs.webkit.org/show_bug.cgi?id=224206 + + +Reviewed by Devin Rousso. + +For now, remove it from Layout panel. It may go back there +when it is able to show used values. It currently only shows computed. + +* UserInterface/Views/LayoutDetailsSidebarPanel.js: +(WI.LayoutDetailsSidebarPanel.prototype.initialLayout): +(WI.LayoutDetailsSidebarPanel.prototype.layout): +(WI.LayoutDetailsSidebarPanel.prototype.get minimumWidth): Deleted. + 2021-04-06 Razvan Caliman Web Inspector: Layout sidebar grid overlay color swatch tooltip shouldn't include "switch format" hint Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js (275544 => 275545) --- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js 2021-04-06 20:20:41 UTC (rev 275544) +++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js 2021-04-06 20:26:30 UTC (rev 275545) @@ -36,11 +36,6 @@ // Public -get minimumWidth() -{ -return this._boxModelDiagramRow?.minimumWidth ?? 0; -} - inspect(objects) { // Layout panel doesn't show when hasDOMNode is false. @@ -102,11 +97,6 @@ initialLayout() { -this._boxModelDiagramRow = new WI.BoxModelDetailsSectionRow; -let boxModelGroup = new WI.DetailsSectionGroup([this._boxModelDiagramRow]); -let boxModelSection = new WI.DetailsSection("layout-box-model", WI.UIString("Box Model"), [boxModelGroup]); -this.contentView.element.appendChild(boxModelSection.element); - this._gridDetailsSectionRow = new WI.DetailsSectionRow(WI.UIString("No CSS Grid Contexts", "No CSS Grid Contexts @ Layout Details Sidebar Panel", "Message shown when there are no CSS Grid contexts on the inspected page.")); let gridGroup = new WI.DetailsSectionGroup([this._gridDetailsSectionRow]); let gridDetailsSection = new WI.DetailsSection("layout-css-grid", WI.UIString("Grid", "Grid @ Elements details sidebar", "CSS Grid layout section name"), [gridGroup]); @@ -134,9 +124,6 @@ this._gridSection.gridNodeSet = this._gridNodeSet; } - -if (this._boxModelDiagramRow.nodeStyles !== this._nodeStyles) -this._boxModelDiagramRow.nodeStyles = this._nodeStyles; } // Private ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [275393] trunk
Title: [275393] trunk Revision 275393 Author bb...@apple.com Date 2021-04-01 16:32:22 -0700 (Thu, 01 Apr 2021) Log Message v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak https://bugs.webkit.org/show_bug.cgi?id=223899 Reviewed by Devin Rousso. Refactor to *not* use the helper ObjC class InspectorDelegate. Instead, store the _WKInspectorDelegate in _WKInspector directly using a WeakObjCPtr ivar. Move the C++ bridge class to be defined inside _WKInspector.mm since it's only used there. Adapt it to work better with a nil delegate. * UIProcess/API/APIInspectorClient.h: (API::InspectorClient::openURLExternally): * UIProcess/API/Cocoa/_WKInspectorInternal.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector delegate]): (-[_WKInspector setDelegate:]): (-[_WKInspector dealloc]): * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * UIProcess/Inspector/Cocoa/InspectorDelegate.h: Removed. * UIProcess/Inspector/Cocoa/InspectorDelegate.mm: Removed. * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithConfiguration:inspectedPage:]): Drive-by, fix the leak of _WKInspectorConfiguration. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/SourcesCocoa.txt trunk/Source/WebKit/UIProcess/API/APIInspectorClient.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm Removed Paths trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.h trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.mm Diff Modified: trunk/Source/WebKit/ChangeLog (275392 => 275393) --- trunk/Source/WebKit/ChangeLog 2021-04-01 23:06:51 UTC (rev 275392) +++ trunk/Source/WebKit/ChangeLog 2021-04-01 23:32:22 UTC (rev 275393) @@ -1,3 +1,35 @@ +2021-04-01 BJ Burg + +v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak +https://bugs.webkit.org/show_bug.cgi?id=223899 + + +Reviewed by Devin Rousso. + +Refactor to *not* use the helper ObjC class InspectorDelegate. +Instead, store the _WKInspectorDelegate in _WKInspector directly +using a WeakObjCPtr ivar. Move the C++ bridge class to be defined +inside _WKInspector.mm since it's only used there. Adapt it to +work better with a nil delegate. + +* UIProcess/API/APIInspectorClient.h: +(API::InspectorClient::openURLExternally): + +* UIProcess/API/Cocoa/_WKInspectorInternal.h: +* UIProcess/API/Cocoa/_WKInspector.mm: +(-[_WKInspector delegate]): +(-[_WKInspector setDelegate:]): +(-[_WKInspector dealloc]): + +* SourcesCocoa.txt: +* WebKit.xcodeproj/project.pbxproj: +* UIProcess/Inspector/Cocoa/InspectorDelegate.h: Removed. +* UIProcess/Inspector/Cocoa/InspectorDelegate.mm: Removed. + +* UIProcess/Inspector/mac/WKInspectorViewController.mm: +(-[WKInspectorViewController initWithConfiguration:inspectedPage:]): +Drive-by, fix the leak of _WKInspectorConfiguration. + 2021-04-01 Chris Dumez Share same code between network process termination and crash handling Modified: trunk/Source/WebKit/SourcesCocoa.txt (275392 => 275393) --- trunk/Source/WebKit/SourcesCocoa.txt 2021-04-01 23:06:51 UTC (rev 275392) +++ trunk/Source/WebKit/SourcesCocoa.txt 2021-04-01 23:32:22 UTC (rev 275393) @@ -421,7 +421,6 @@ UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm UIProcess/Gamepad/mac/UIGamepadProviderMac.mm -UIProcess/Inspector/Cocoa/InspectorDelegate.mm UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm UIProcess/Inspector/ios/WKInspectorHighlightView.mm Modified: trunk/Source/WebKit/UIProcess/API/APIInspectorClient.h (275392 => 275393) --- trunk/Source/WebKit/UIProcess/API/APIInspectorClient.h 2021-04-01 23:06:51 UTC (rev 275392) +++ trunk/Source/WebKit/UIProcess/API/APIInspectorClient.h 2021-04-01 23:32:22 UTC (rev 275393) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Apple Inc. All rights reserved. + * Copyright (C) 2020-2021 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm (275392 => 275393) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-04-01 23:06:51 UTC (rev 275392) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-04-01 23:32:22 UTC (rev 275393) @@ -26,12 +26,14 @@ #import "config.h" #import "_WKInspectorInternal.h" -#import "InspectorDelegate.h" +#import "APIInspectorClient.h" #im
[webkit-changes] [275313] trunk/Tools
Title: [275313] trunk/Tools Revision 275313 Author bb...@apple.com Date 2021-03-31 16:05:02 -0700 (Wed, 31 Mar 2021) Log Message Style checker should warn about use of future OS versions in WK_API_AVAILABLE https://bugs.webkit.org/show_bug.cgi?id=223881 Reviewed by Jonathan Bedard. Add some more brains to the WK_API_AVAILABLE style checker. It is now more fussy and won't allow anything except a valid version string or a TBA macro. There is also a mechanism to prevent adding version numbers that exceed the publicly available SDK version for the relevant OS. * Scripts/webkitpy/common/version_name_map.py: (VersionNameMap.mapping_for_platform): Add 'macos' as an alias for 'mac'. (VersionNameMap.max_public_version): Added. * Scripts/webkitpy/style/checkers/cpp.py: (check_arguments_for_wk_api_available): (check_arguments_for_wk_api_available.max_version_for_platform): (check_arguments_for_wk_api_available.check_version_string): (check_style): (check_min_versions_of_wk_api_available): Deleted. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (WebKitStyleTest): Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/common/version_name_map.py trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py Diff Modified: trunk/Tools/ChangeLog (275312 => 275313) --- trunk/Tools/ChangeLog 2021-03-31 22:36:17 UTC (rev 275312) +++ trunk/Tools/ChangeLog 2021-03-31 23:05:02 UTC (rev 275313) @@ -1,3 +1,28 @@ +2021-03-31 BJ Burg + +Style checker should warn about use of future OS versions in WK_API_AVAILABLE +https://bugs.webkit.org/show_bug.cgi?id=223881 + +Reviewed by Jonathan Bedard. + +Add some more brains to the WK_API_AVAILABLE style checker. It is now more +fussy and won't allow anything except a valid version string or a TBA macro. +There is also a mechanism to prevent adding version numbers that exceed the +publicly available SDK version for the relevant OS. + +* Scripts/webkitpy/common/version_name_map.py: +(VersionNameMap.mapping_for_platform): Add 'macos' as an alias for 'mac'. +(VersionNameMap.max_public_version): Added. + +* Scripts/webkitpy/style/checkers/cpp.py: +(check_arguments_for_wk_api_available): +(check_arguments_for_wk_api_available.max_version_for_platform): +(check_arguments_for_wk_api_available.check_version_string): +(check_style): +(check_min_versions_of_wk_api_available): Deleted. +* Scripts/webkitpy/style/checkers/cpp_unittest.py: +(WebKitStyleTest): + 2021-03-31 Aakash Jain EWS should stress test newly added tests Modified: trunk/Tools/Scripts/webkitpy/common/version_name_map.py (275312 => 275313) --- trunk/Tools/Scripts/webkitpy/common/version_name_map.py 2021-03-31 22:36:17 UTC (rev 275312) +++ trunk/Tools/Scripts/webkitpy/common/version_name_map.py 2021-03-31 23:05:02 UTC (rev 275313) @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Apple Inc. All rights reserved. +# Copyright (C) 2017-2021 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -107,6 +107,14 @@ closest_match = (os_name, os_version) return closest_match[0] +def max_public_version(self, platform=None): +found_max_version = None +for os_name, os_version in self.mapping_for_platform(platform, PUBLIC_TABLE).items(): +if os_version > found_max_version: +found_max_version = os_version + +return found_max_version + @staticmethod def strip_name_formatting(name): # major.minor.tiny should map to major @@ -149,6 +157,11 @@ return sorted(names, key=lambda os_name: mapping[os_name]) def mapping_for_platform(self, platform=None, table=PUBLIC_TABLE): +# Alias macos to mac here. Adding a separate entry to the table +# would cause from_name() to return either 'mac' or 'macos'. +if platform == 'macos': +platform = 'mac' + """return proper os_name: os_version mapping for platform""" platform = self.default_system_platform if platform is None else platform return self.mapping.get(table, {}).get(platform, {}) Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (275312 => 275313) --- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2021-03-31 22:36:17 UTC (rev 275312) +++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2021-03-31 23:05:02 UTC (rev 275313) @@ -2,7 +2,7 @@ # # Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved. # Copyright (C) 2009 Torch Mobile Inc. -# Copyright (C) 2009-2020 Apple Inc. All rights reserved. +# Copyright (C) 2009-2021 Apple Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (cjerdo...@webkit.org) # # Redistribution and use in source an
[webkit-changes] [275050] trunk/Source/WebKit
Title: [275050] trunk/Source/WebKit Revision 275050 Author bb...@apple.com Date 2021-03-25 11:54:45 -0700 (Thu, 25 Mar 2021) Log Message SendKeys on Input of type=file returns element not found in some cases https://bugs.webkit.org/show_bug.cgi?id=223028 Reviewed by Devin Rousso. This bizarre behavior is triggered by removing the element inside an onclick() handler for the input element. This confuses safaridriver, which expects to be able to query the file input's .value via _javascript_ after setting the files. As part of the fix, provide the list of selected filenames in the Automation.fileChooserDismissed event. On the safaridriver side, just use the list of filenames provided in this event to avoid an extra JS evaluation that may race with page content. * UIProcess/Automation/Automation.json: * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::handleRunOpenPanel): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/Automation.json trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (275049 => 275050) --- trunk/Source/WebKit/ChangeLog 2021-03-25 18:47:17 UTC (rev 275049) +++ trunk/Source/WebKit/ChangeLog 2021-03-25 18:54:45 UTC (rev 275050) @@ -1,3 +1,23 @@ +2021-03-25 BJ Burg + +SendKeys on Input of type=file returns element not found in some cases +https://bugs.webkit.org/show_bug.cgi?id=223028 + + +Reviewed by Devin Rousso. + +This bizarre behavior is triggered by removing the element inside an onclick() handler +for the input element. This confuses safaridriver, which expects to be able to query the file input's .value +via _javascript_ after setting the files. + +As part of the fix, provide the list of selected filenames in the Automation.fileChooserDismissed event. +On the safaridriver side, just use the list of filenames provided in this event to avoid an extra JS evaluation +that may race with page content. + +* UIProcess/Automation/Automation.json: +* UIProcess/Automation/WebAutomationSession.cpp: +(WebKit::WebAutomationSession::handleRunOpenPanel): + 2021-03-25 Alex Christensen REGRESSION (r272376): [iOS] ASSERTION FAILED: sessionID.isEphemeral() || !path.isEmpty() in WebKit::NetworkProcess::swServerForSession Modified: trunk/Source/WebKit/UIProcess/Automation/Automation.json (275049 => 275050) --- trunk/Source/WebKit/UIProcess/Automation/Automation.json 2021-03-25 18:47:17 UTC (rev 275049) +++ trunk/Source/WebKit/UIProcess/Automation/Automation.json 2021-03-25 18:54:45 UTC (rev 275050) @@ -721,7 +721,8 @@ "description": "Fired when a file chooser for a file input element is dismissed by selecting files or cancelling.", "parameters": [ { "name": "browsingContextHandle", "$ref": "BrowsingContextHandle", "description": "The handle for the browsing context." }, -{ "name": "selectionCancelled", "type": "boolean", "description": "If true, the chooser was dismissed because file selection was cancelled." } +{ "name": "selectionCancelled", "type": "boolean", "description": "If true, file selection was cancelled due to an error. For example, this could occur if a file's MIME type cannot be handled by WebKit." }, +{ "name": "selectedFiles", "type": "array", "items": { "type": "string" }, "optional": true, "description": "A list of file names that were successfully selected for upload." } ] }, { Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (275049 => 275050) --- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2021-03-25 18:47:17 UTC (rev 275049) +++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2021-03-25 18:54:45 UTC (rev 275050) @@ -900,13 +900,13 @@ String browsingContextHandle = handleForWebPageProxy(page); if (!m_filesToSelectForFileUpload.size()) { resultListener.cancel(); -m_domainNotifier->fileChooserDismissed(browsingContextHandle, true); +m_domainNotifier->fileChooserDismissed(browsingContextHandle, true, { }); return; } if (m_filesToSelectForFileUpload.size() > 1 && !parameters.allowMultipleFiles()) { resultListener.cancel(); -m_domainNotifier->fileChooserDismissed(browsingContextHandle, true); +m_domainNotifier->fileChooserDismissed(browsingContextHandle, true, { }); return; } @@ -925,17 +925,22 @@ } // Per §14.3.10.5 in the W3C spec, if at least one file cannot be accepted, the command should fail. -// The REST API service can tell that this failed by checking the "files" attribute of the input element. for (const String& filename : m_filesToSelectForFileUpload) { if (!fileCanBeAcceptedForUpload(filename, allo
[webkit-changes] [274744] trunk/Tools
Title: [274744] trunk/Tools Revision 274744 Author bb...@apple.com Date 2021-03-19 15:44:42 -0700 (Fri, 19 Mar 2021) Log Message Update filter-build-webkit https://bugs.webkit.org/show_bug.cgi?id=223528 Reviewed by Simon Fraser. - Remove a bunch of informational messages that clog up output. - Remove some linker/loader warnings that are non-actionable. - Generalize a few existing filters to work with more targets. - Remove super-noisy and meaningless device preparation warnings. * Scripts/filter-build-webkit: (shouldIgnoreLine): Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/filter-build-webkit Diff Modified: trunk/Tools/ChangeLog (274743 => 274744) --- trunk/Tools/ChangeLog 2021-03-19 22:32:30 UTC (rev 274743) +++ trunk/Tools/ChangeLog 2021-03-19 22:44:42 UTC (rev 274744) @@ -1,3 +1,18 @@ +2021-03-19 BJ Burg + +Update filter-build-webkit +https://bugs.webkit.org/show_bug.cgi?id=223528 + +Reviewed by Simon Fraser. + +- Remove a bunch of informational messages that clog up output. +- Remove some linker/loader warnings that are non-actionable. +- Generalize a few existing filters to work with more targets. +- Remove super-noisy and meaningless device preparation warnings. + +* Scripts/filter-build-webkit: +(shouldIgnoreLine): + 2021-03-19 Kimmo Kinnunen update-webgl-conformance-tests script should use webgl/1.0.x and webgl/2.0.y directories Modified: trunk/Tools/Scripts/filter-build-webkit (274743 => 274744) --- trunk/Tools/Scripts/filter-build-webkit 2021-03-19 22:32:30 UTC (rev 274743) +++ trunk/Tools/Scripts/filter-build-webkit 2021-03-19 22:44:42 UTC (rev 274744) @@ -83,6 +83,7 @@ our $unfilteredOutputPath = "build.log"; our $useColor = -t STDOUT; our $inEntitlements = 0; +our $inDevicePreparationWarnings = 0; sub usageAndExit() { @@ -147,7 +148,7 @@ printLine($line, STYLE_PLAIN); } elsif ($line =~ /\*\* BUILD SUCCEEDED \*\*/) { printLine("Build Succeeded", STYLE_SUCCESS); -} elsif ($line =~ /^(\e\[1m)?(PhaseScriptExecution|RuleScriptExecution|ClCompile|CompileC|Distributed-CompileC|Ld|PBXCp|CpResource|CopyPNGFile|CopyTiffFile|CpHeader|Preprocess|Processing|ProcessInfoPlistFile|ProcessPCH|ProcessPCH\+\+|Touch|Libtool|CopyStringsFile|Mig|CreateUniversalBinary|Analyze|AnalyzeShallow|ProcessProductPackaging|CodeSign|Validate|SymLink|Updating|CompileDTraceScript|CompileXIB|StripNIB|CopyPlistFile|GenerateDSYMFile|GenerateTAPI|CompileStoryboard|ExternalBuildToolExecution|CreateBuildDirectory|WriteAuxiliaryFile|RegisterWithLaunchServices|RegisterExecutionPolicyException|MkDir|Strip|MetalLink|CompileMetalFile)(\e\[0m)? ("[^"]+"|(\\|(?<=\\)\s|\S)+)?/) { +} elsif ($line =~ /^(\e\[1m)?(PhaseScriptExecution|RuleScriptExecution|ClCompile|CompileC|Distributed-CompileC|Ld|PBXCp|CpResource|CopyPNGFile|CopyTiffFile|CpHeader|Preprocess|Processing|ProcessInfoPlistFile|ProcessPCH|ProcessPCH\+\+|Touch|Libtool|CopyStringsFile|Mig|CreateUniversalBinary|Analyze|AnalyzeShallow|ProcessProductPackaging|CodeSign|Validate|SymLink|Updating|CompileDTraceScript|CompileXIB|StripNIB|CopyPlistFile|GenerateDSYMFile|GenerateTAPI|CompileStoryboard|ExternalBuildToolExecution|CreateBuildDirectory|WriteAuxiliaryFile|RegisterWithLaunchServices|RegisterExecutionPolicyException|MkDir|Strip|MetalLink|CompileMetalFile|ValidateEmbeddedBinary)(\e\[0m)? ("[^"]+"|(\\|(?<=\\)\s|\S)+)?/) { my ($command, $path) = ($2, basename($4)); $path =~ s/("|\\|\.[ah]$)//g; printLine("$command $path", STYLE_PLAIN); @@ -300,6 +301,17 @@ return 1 } +# iPhone preparation errors always start and end with lines containing 'iPhoneConnect:'. +if ($inDevicePreparationWarnings) { +$inDevicePreparationWarnings = 0 if $line =~ /== END: Underlying device preparation warnings ==/; +return 1 +} + +if ($line =~ /iPhoneConnect:/) { +$inDevicePreparationWarnings = 1; +return 1 +} + return 1 if $line =~ /^\s*$/; return 1 if $line =~ /^Command line invocation:/; return 1 if $line =~ /^Build settings from command line:/; @@ -313,7 +325,7 @@ return 1 if $line =~ /^note: Using eager compilation/; return 1 if $line =~ /^note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"/; return 1 if $line =~ /^note: detected encoding of input file as Unicode \(.*\)/; -return 1 if $line =~ /make(\[\d+\])?: Nothing to be done for `all'\./; +return 1 if $line =~ /make(\[\d+\])?: Nothing to be done for/; return 1 if $line =~ /^_javascript_Core\/create_hash_table/; return 1 if $line =~ /_javascript_Core.framework\/PrivateHeaders\/create_hash_table/; return 1 if $line =~ /^_javascript_Core\/pcre\/dftables/; @@ -333,10 +345,12 @@ return 1 if $line =~ /One of the two will be used\. Which one is undefined\./; return 1
[webkit-changes] [274737] trunk/Source/WebInspectorUI
Title: [274737] trunk/Source/WebInspectorUI Revision 274737 Author bb...@apple.com Date 2021-03-19 14:20:02 -0700 (Fri, 19 Mar 2021) Log Message Uncaught Exception: RangeError: Array size is not a small enough positive integer. https://bugs.webkit.org/show_bug.cgi?id=223532 Reviewed by Devin Rousso. This patch fixes the broken CPU instrument when viewing a JSON timeline recordng. This exception is thrown when viewing a timeline recording that has been imported from JSON file. Aside from the exception, the code is functionally broken in this situation since passing a negative number to Array() doesn't work. I tested this change manually and selection ranges now behave as expected, and have not regressed in other instruments / UI. * UserInterface/Views/CPUTimelineView.js: Based on my investigation, the visibleEndTime is incorrectly computed when showing a JSON timeline recording because the currentTime property is always '0'. If this is the case, then let's assume that the entire range should be displayed. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (274736 => 274737) --- trunk/Source/WebInspectorUI/ChangeLog 2021-03-19 20:19:29 UTC (rev 274736) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-03-19 21:20:02 UTC (rev 274737) @@ -1 +1,23 @@ +2021-03-19 BJ Burg + +Uncaught Exception: RangeError: Array size is not a small enough positive integer. +https://bugs.webkit.org/show_bug.cgi?id=223532 + + +Reviewed by Devin Rousso. + +This patch fixes the broken CPU instrument when viewing a JSON timeline recordng. + +This exception is thrown when viewing a timeline recording that has been +imported from JSON file. Aside from the exception, the code is functionally +broken in this situation since passing a negative number to Array() doesn't work. + +I tested this change manually and selection ranges now behave as expected, and +have not regressed in other instruments / UI. + +* UserInterface/Views/CPUTimelineView.js: +Based on my investigation, the visibleEndTime is incorrectly computed when +showing a JSON timeline recording because the currentTime property is always '0'. +If this is the case, then let's assume that the entire range should be displayed. + == Rolled over to ChangeLog-2021-03-18 == Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js (274736 => 274737) --- trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2021-03-19 20:19:29 UTC (rev 274736) +++ trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2021-03-19 21:20:02 UTC (rev 274737) @@ -437,7 +437,9 @@ let graphStartTime = this.startTime; let graphEndTime = this.endTime; -let visibleEndTime = Math.min(this.endTime, this.currentTime); + +// When viewing a timeline recording from JSON, this.currentTime is always 0. +let visibleEndTime = Math.min(this.endTime, this.currentTime) || this.endTime; let visibleDuration = visibleEndTime - graphStartTime; let discontinuities = this._recording.discontinuitiesInTimeRange(graphStartTime, visibleEndTime); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [274735] trunk/Source/WebKit
Title: [274735] trunk/Source/WebKit Revision 274735 Author bb...@apple.com Date 2021-03-19 13:18:05 -0700 (Fri, 19 Mar 2021) Log Message Web Inspector: remove unnecessary inspectorBaseURL() and assumed read access https://bugs.webkit.org/show_bug.cgi?id=223526 Reviewed by Devin Rousso. inspectorBaseURL() is only used to call WebProcess::assumeReadAccessToBaseURL, which generates a sandbox extension. However, after r274697, all ports now use non-file:/// schemes to load inspector resources, so any needed sandbox extensions are handled in port-specific code or by the URL scheme handler. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow): * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::createFrontendPage): (WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. * UIProcess/Inspector/WebInspectorProxy.h: * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::inspectorPageURL): (WebKit::WebInspectorProxy::inspectorTestPageURL): (WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. * UIProcess/Inspector/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. * mac/WebKit2.order: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.h trunk/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm trunk/Source/WebKit/UIProcess/Inspector/win/WebInspectorProxyWin.cpp trunk/Source/WebKit/mac/WebKit2.order Diff Modified: trunk/Source/WebKit/ChangeLog (274734 => 274735) --- trunk/Source/WebKit/ChangeLog 2021-03-19 19:55:02 UTC (rev 274734) +++ trunk/Source/WebKit/ChangeLog 2021-03-19 20:18:05 UTC (rev 274735) @@ -1,3 +1,31 @@ +2021-03-19 BJ Burg + +Web Inspector: remove unnecessary inspectorBaseURL() and assumed read access +https://bugs.webkit.org/show_bug.cgi?id=223526 + +Reviewed by Devin Rousso. + +inspectorBaseURL() is only used to call WebProcess::assumeReadAccessToBaseURL, which +generates a sandbox extension. However, after r274697, all ports now use non-file:/// +schemes to load inspector resources, so any needed sandbox extensions are handled in +port-specific code or by the URL scheme handler. + +* UIProcess/Inspector/RemoteWebInspectorProxy.cpp: +(WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow): +* UIProcess/Inspector/WebInspectorProxy.cpp: +(WebKit::WebInspectorProxy::createFrontendPage): +(WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. +* UIProcess/Inspector/WebInspectorProxy.h: +* UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: +(WebKit::WebInspectorProxy::inspectorPageURL): +(WebKit::WebInspectorProxy::inspectorTestPageURL): +(WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. +* UIProcess/Inspector/mac/WebInspectorProxyMac.mm: +(WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. +* UIProcess/Inspector/win/WebInspectorProxyWin.cpp: +(WebKit::WebInspectorProxy::inspectorBaseURL): Deleted. +* mac/WebKit2.order: + 2021-03-19 Jer Noble [GPUP] platform/mac/media/encrypted-media/fps-clearkey-crash.html is a flaky timeout Modified: trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp (274734 => 274735) --- trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp 2021-03-19 19:55:02 UTC (rev 274734) +++ trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp 2021-03-19 20:18:05 UTC (rev 274735) @@ -185,7 +185,6 @@ trackInspectorPage(m_inspectorPage, nullptr); m_inspectorPage->process().addMessageReceiver(Messages::RemoteWebInspectorProxy::messageReceiverName(), m_inspectorPage->webPageID(), *this); -m_inspectorPage->process().assumeReadAccessToBaseURL(*m_inspectorPage, WebInspectorProxy::inspectorBaseURL()); #if ENABLE(INSPECTOR_EXTENSIONS) m_extensionController = WebInspectorUIExtensionControllerProxy::create(*m_inspectorPage); Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp (274734 => 274735) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2021-03-19 19:55:02 UTC (rev 274734) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2021-03-19 20:18:05 UTC (rev 274735) @@ -423,7 +423,6 @@ m_inspectedPage->launchInitialProcessIfNecessary(); m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->identifier(), *this); -m_inspectorPage->process().assumeReadAccessToBaseURL(*m_inspectorP
[webkit-changes] [274697] trunk/Source/WebKit
Title: [274697] trunk/Source/WebKit Revision 274697 Author bb...@apple.com Date 2021-03-18 19:37:52 -0700 (Thu, 18 Mar 2021) Log Message [Cocoa] Web Inspector: load inspector resources using a custom scheme handler https://bugs.webkit.org/show_bug.cgi?id=179904 Reviewed by Geoff Garen. Load WebInspectorUI resources via the inspector-resource:// scheme. Moving off of file:// URLs will allow for a tighter sandbox and will fix the longstanding issue that Web Inspector's settings are part of the file:// scheme and cleared when Safari clears website data. This also has the effect of resetting Web Inspector settings since they are no longer associated with file:///. Loading via this scheme is exercised by existing inspector tests. * SourcesCocoa.txt: Added new file. * WebKit.xcodeproj/project.pbxproj: * UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.h: Copied from Source/WebKit/WebProcess/Inspector/mac/WebInspectorUIMac.mm. * UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: Added. (-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): Use a global concurrent queue and NSOperation / NSOperationQueue to support reading files off the main queue. (-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]): Translate the request URL to a bundle resource URL, read the data, and send a response with the file data. Return an error if the file could not be found or read. * UIProcess/Inspector/mac/WKInspectorViewController.h: * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController webViewConfiguration]): (+[WKInspectorViewController URLForInspectorResource:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): Allow navigations to URIs with the inspector-resource:// scheme. * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::inspectorPageURL): (WebKit::WebInspectorProxy::inspectorTestPageURL): (WebKit::WebInspectorProxy::inspectorBaseURL): Updated. * WebProcess/Inspector/mac/WebInspectorUIMac.mm: (WebKit::webInspectorUILocalizedStringsURL): Updated. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/SourcesCocoa.txt trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.h trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/Inspector/mac/WebInspectorUIMac.mm Added Paths trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.h trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm Diff Modified: trunk/Source/WebKit/ChangeLog (274696 => 274697) --- trunk/Source/WebKit/ChangeLog 2021-03-19 02:23:14 UTC (rev 274696) +++ trunk/Source/WebKit/ChangeLog 2021-03-19 02:37:52 UTC (rev 274697) @@ -1,3 +1,50 @@ +2021-03-18 BJ Burg + +[Cocoa] Web Inspector: load inspector resources using a custom scheme handler +https://bugs.webkit.org/show_bug.cgi?id=179904 + + +Reviewed by Geoff Garen. + +Load WebInspectorUI resources via the inspector-resource:// scheme. +Moving off of file:// URLs will allow for a tighter sandbox and +will fix the longstanding issue that Web Inspector's settings are +part of the file:// scheme and cleared when Safari clears website data. + +This also has the effect of resetting Web Inspector settings since +they are no longer associated with file:///. + +Loading via this scheme is exercised by existing inspector tests. + +* SourcesCocoa.txt: Added new file. +* WebKit.xcodeproj/project.pbxproj: +* UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.h: Copied from Source/WebKit/WebProcess/Inspector/mac/WebInspectorUIMac.mm. +* UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: Added. +(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): +Use a global concurrent queue and NSOperation / NSOperationQueue to support +reading files off the main queue. + +(-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]): +Translate the request URL to a bundle resource URL, read the data, and send a response +with the file data. Return an error if the file could not be found or read. + +* UIProcess/Inspector/mac/WKInspectorViewController.h: +* UIProcess/Inspector/mac/WKInspectorViewController.mm: +(-[WKInspectorViewController webViewConfiguration]): +(+[WKInspectorViewController URLForInspectorResource:]): +(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): +Allow navigations to URIs with the inspector-resource:// scheme. + +* UIProcess/Inspector/mac/WebInspectorProxyMac.mm: +(WebKit::WebInspect
[webkit-changes] [274592] trunk/Source/WebInspectorUI
Title: [274592] trunk/Source/WebInspectorUI Revision 274592 Author bb...@apple.com Date 2021-03-17 14:37:32 -0700 (Wed, 17 Mar 2021) Log Message Web Inspector: add GridOverlay diagnostic event and related hooks https://bugs.webkit.org/show_bug.cgi?id=223256 Patch by Razvan Caliman on 2021-03-17 Reviewed by BJ Burg. Add instrumentation to log telemetry for the CSS Grid Inspector. We want to answer these questions: - How do users prefer to toggle the overlay, in-context from grid badges in the DOM tree or from the aggregated grid node overlay list in Layout sidebar panel? - Which overlay options are most used? Did we pick good defaults or do users prefer others? * UserInterface/Base/Main.js: (WI.contentLoaded): * UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js: Added. (WI.GridOverlayDiagnosticEventRecorder): (WI.GridOverlayDiagnosticEventRecorder.prototype.setup): (WI.GridOverlayDiagnosticEventRecorder.prototype.teardown): (WI.GridOverlayDiagnosticEventRecorder.prototype._handleGridOverlayShown): * UserInterface/Controllers/OverlayManager.js: (WI.OverlayManager.prototype.showGridOverlay): (WI.OverlayManager.prototype.toggleGridOverlay): (WI.OverlayManager.prototype._handleGridSettingChanged): * UserInterface/Main.html: * UserInterface/Views/CSSGridSection.js: (WI.CSSGridSection.prototype._handleToggleAllCheckboxChanged): (WI.CSSGridSection.prototype.layout): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._gridBadgeClicked): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Controllers/OverlayManager.js trunk/Source/WebInspectorUI/UserInterface/Main.html trunk/Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js Added Paths trunk/Source/WebInspectorUI/UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (274591 => 274592) --- trunk/Source/WebInspectorUI/ChangeLog 2021-03-17 21:25:42 UTC (rev 274591) +++ trunk/Source/WebInspectorUI/ChangeLog 2021-03-17 21:37:32 UTC (rev 274592) @@ -1,3 +1,36 @@ +2021-03-17 Razvan Caliman + +Web Inspector: add GridOverlay diagnostic event and related hooks +https://bugs.webkit.org/show_bug.cgi?id=223256 + + +Reviewed by BJ Burg. + +Add instrumentation to log telemetry for the CSS Grid Inspector. + +We want to answer these questions: +- How do users prefer to toggle the overlay, in-context from grid badges in the DOM tree + or from the aggregated grid node overlay list in Layout sidebar panel? +- Which overlay options are most used? Did we pick good defaults or do users prefer others? + +* UserInterface/Base/Main.js: +(WI.contentLoaded): +* UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js: Added. +(WI.GridOverlayDiagnosticEventRecorder): +(WI.GridOverlayDiagnosticEventRecorder.prototype.setup): +(WI.GridOverlayDiagnosticEventRecorder.prototype.teardown): +(WI.GridOverlayDiagnosticEventRecorder.prototype._handleGridOverlayShown): +* UserInterface/Controllers/OverlayManager.js: +(WI.OverlayManager.prototype.showGridOverlay): +(WI.OverlayManager.prototype.toggleGridOverlay): +(WI.OverlayManager.prototype._handleGridSettingChanged): +* UserInterface/Main.html: +* UserInterface/Views/CSSGridSection.js: +(WI.CSSGridSection.prototype._handleToggleAllCheckboxChanged): +(WI.CSSGridSection.prototype.layout): +* UserInterface/Views/DOMTreeElement.js: +(WI.DOMTreeElement.prototype._gridBadgeClicked): + 2021-03-17 Nikita Vasilyev Web Inspector: remove experimental setting and enable "grid" badges Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (274591 => 274592) --- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2021-03-17 21:25:42 UTC (rev 274591) +++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2021-03-17 21:37:32 UTC (rev 274592) @@ -587,6 +587,9 @@ WI.diagnosticController.addRecorder(new WI.InspectedTargetTypesDiagnosticEventRecorder(WI.diagnosticController)); WI.diagnosticController.addRecorder(new WI.TabActivityDiagnosticEventRecorder(WI.diagnosticController)); WI.diagnosticController.addRecorder(new WI.TabNavigationDiagnosticEventRecorder(WI.diagnosticController)); + +if (InspectorBackend.hasCommand("DOM.showGridOverlay")) +WI.diagnosticController.addRecorder(new WI.GridOverlayDiagnosticEventRecorder(WI.diagnosticController)); } }; Added: trunk/Source/WebInspectorUI/UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js (0 => 274592) --- trunk/Source/WebInspectorUI/UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js
[webkit-changes] [274288] trunk/Source/JavaScriptCore
Title: [274288] trunk/Source/_javascript_Core Revision 274288 Author bb...@apple.com Date 2021-03-11 10:52:02 -0800 (Thu, 11 Mar 2021) Log Message Web Inspector: Occasional crash under RemoteConnectionToTargetCocoa::close() https://bugs.webkit.org/show_bug.cgi?id=223038 Reviewed by Alex Christensen. * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm: (Inspector::RemoteConnectionToTarget::setup): (Inspector::RemoteConnectionToTarget::close): Don't use a capture default, and copy the targetIdentifier. Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm Diff Modified: trunk/Source/_javascript_Core/ChangeLog (274287 => 274288) --- trunk/Source/_javascript_Core/ChangeLog 2021-03-11 18:10:59 UTC (rev 274287) +++ trunk/Source/_javascript_Core/ChangeLog 2021-03-11 18:52:02 UTC (rev 274288) @@ -1,3 +1,16 @@ +2021-03-11 BJ Burg + +Web Inspector: Occasional crash under RemoteConnectionToTargetCocoa::close() +https://bugs.webkit.org/show_bug.cgi?id=223038 + + +Reviewed by Alex Christensen. + +* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm: +(Inspector::RemoteConnectionToTarget::setup): +(Inspector::RemoteConnectionToTarget::close): +Don't use a capture default, and copy the targetIdentifier. + 2021-03-11 Commit Queue Unreviewed, reverting r274263. Modified: trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm (274287 => 274288) --- trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm 2021-03-11 18:10:59 UTC (rev 274287) +++ trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm 2021-03-11 18:52:02 UTC (rev 274288) @@ -162,7 +162,7 @@ auto targetIdentifier = this->targetIdentifier().valueOr(0); -dispatchAsyncOnTarget([&, strongThis = makeRef(*this)]() { +dispatchAsyncOnTarget([this, targetIdentifier, isAutomaticInspection, automaticallyPause, strongThis = makeRef(*this)]() { LockHolder lock(m_targetMutex); if (!m_target || !m_target->remoteControlAllowed()) { @@ -197,7 +197,7 @@ { auto targetIdentifier = m_target ? m_target->targetIdentifier() : 0; -dispatchAsyncOnTarget([&, strongThis = makeRef(*this)]() { +dispatchAsyncOnTarget([this, targetIdentifier, strongThis = makeRef(*this)]() { LockHolder lock(m_targetMutex); if (m_target) { if (m_connected) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [274106] trunk/Source/WebKit
Title: [274106] trunk/Source/WebKit Revision 274106 Author bb...@apple.com Date 2021-03-08 14:10:06 -0800 (Mon, 08 Mar 2021) Log Message [Cocoa] Changes in WebInspectorUI's appearance don't propagate to .effectiveAppearance while docked https://bugs.webkit.org/show_bug.cgi?id=222925 Reviewed by Devin Rousso. Update the appearance property for the underlying webView in addition to setting it for the inspector NSWindow (undocked only). This fix is needed for both local and remote inspector code paths. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: (WebKit::RemoteWebInspectorProxy::platformSetForcedAppearance): * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::applyForcedAppearance): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm Diff Modified: trunk/Source/WebKit/ChangeLog (274105 => 274106) --- trunk/Source/WebKit/ChangeLog 2021-03-08 22:09:28 UTC (rev 274105) +++ trunk/Source/WebKit/ChangeLog 2021-03-08 22:10:06 UTC (rev 274106) @@ -1,3 +1,21 @@ +2021-03-08 BJ Burg + +[Cocoa] Changes in WebInspectorUI's appearance don't propagate to .effectiveAppearance while docked +https://bugs.webkit.org/show_bug.cgi?id=222925 + + +Reviewed by Devin Rousso. + +Update the appearance property for the underlying webView in addition to +setting it for the inspector NSWindow (undocked only). + +This fix is needed for both local and remote inspector code paths. + +* UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: +(WebKit::RemoteWebInspectorProxy::platformSetForcedAppearance): +* UIProcess/Inspector/mac/WebInspectorProxyMac.mm: +(WebKit::WebInspectorProxy::applyForcedAppearance): + 2021-03-08 Stephan Szabo [WinCairo] Builds with ENABLE_CONTEXT_MENUS=OFF fail Modified: trunk/Source/WebKit/UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm (274105 => 274106) --- trunk/Source/WebKit/UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm 2021-03-08 22:09:28 UTC (rev 274105) +++ trunk/Source/WebKit/UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm 2021-03-08 22:10:06 UTC (rev 274106) @@ -240,22 +240,26 @@ void RemoteWebInspectorProxy::platformSetForcedAppearance(InspectorFrontendClient::Appearance appearance) { -NSWindow *window = m_window.get(); -ASSERT(window); - +NSAppearance *platformAppearance; switch (appearance) { case InspectorFrontendClient::Appearance::System: -window.appearance = nil; +platformAppearance = nil; break; case InspectorFrontendClient::Appearance::Light: -window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; +platformAppearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; break; case InspectorFrontendClient::Appearance::Dark: -window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]; +platformAppearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]; break; } + +webView().appearance = platformAppearance; + +NSWindow *window = m_window.get(); +ASSERT(window); +window.appearance = platformAppearance; } void RemoteWebInspectorProxy::platformStartWindowDrag() Modified: trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm (274105 => 274106) --- trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm 2021-03-08 22:09:28 UTC (rev 274105) +++ trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm 2021-03-08 22:10:06 UTC (rev 274106) @@ -841,23 +841,25 @@ void WebInspectorProxy::applyForcedAppearance() { -NSWindow *window = m_inspectorWindow.get(); -if (!window) -return; - +NSAppearance *platformAppearance; switch (m_frontendAppearance) { case InspectorFrontendClient::Appearance::System: -window.appearance = nil; +platformAppearance = nil; break; case InspectorFrontendClient::Appearance::Light: -window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; +platformAppearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; break; case InspectorFrontendClient::Appearance::Dark: -window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]; +platformAppearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]; break; } + +if (NSWindow *window = m_inspectorWindow.get()) +window.appearance = platformAppearance; + +[m_inspectorViewController webView].appearance = platformAppearance; } } // namespace WebKit ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [273588] trunk/Source/WebKit
Title: [273588] trunk/Source/WebKit Revision 273588 Author bb...@apple.com Date 2021-02-26 13:43:24 -0800 (Fri, 26 Feb 2021) Log Message Web Inspector: give WebInspectorUIExtensionControllerProxy a chance to teardown when the frontend is about to close https://bugs.webkit.org/show_bug.cgi?id=222486 Reviewed by Devin Rousso. Sometimes when closing Web Inspector, the message receiver for WebInspectorUIExtensionControllerProxy is not removed. Move this teardown into a separate method. It's too late to do this in the destructor if a lambda has kept a strong reference to the controller beyond the point when the frontend was closed. Covered by existing API tests, which will hopefully become less flaky as a result. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::closeFrontendPageAndWindow): * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::closeFrontendPageAndWindow): Notify the extensions controller that it's time to teardown. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::~WebInspectorUIExtensionControllerProxy): By the time this destructor runs, we should have already gotten the message to teardown. (WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendWillClose): Added. Use the soon-to-be-gone m_frontendPage to unregister as a message receiver. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h Diff Modified: trunk/Source/WebKit/ChangeLog (273587 => 273588) --- trunk/Source/WebKit/ChangeLog 2021-02-26 21:41:37 UTC (rev 273587) +++ trunk/Source/WebKit/ChangeLog 2021-02-26 21:43:24 UTC (rev 273588) @@ -1,5 +1,32 @@ 2021-02-26 BJ Burg +Web Inspector: give WebInspectorUIExtensionControllerProxy a chance to teardown when the frontend is about to close +https://bugs.webkit.org/show_bug.cgi?id=222486 + +Reviewed by Devin Rousso. + +Sometimes when closing Web Inspector, the message receiver for WebInspectorUIExtensionControllerProxy +is not removed. Move this teardown into a separate method. It's too late to do this in the destructor +if a lambda has kept a strong reference to the controller beyond the point when the frontend was closed. + +Covered by existing API tests, which will hopefully become less flaky as a result. + +* UIProcess/Inspector/RemoteWebInspectorProxy.cpp: +(WebKit::RemoteWebInspectorProxy::closeFrontendPageAndWindow): +* UIProcess/Inspector/WebInspectorProxy.cpp: +(WebKit::WebInspectorProxy::closeFrontendPageAndWindow): +Notify the extensions controller that it's time to teardown. + +* UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: +* UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: +(WebKit::WebInspectorUIExtensionControllerProxy::~WebInspectorUIExtensionControllerProxy): +By the time this destructor runs, we should have already gotten the message to teardown. + +(WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendWillClose): Added. +Use the soon-to-be-gone m_frontendPage to unregister as a message receiver. + +2021-02-26 BJ Burg + [Cocoa] Web Inspector: add support for receiving Web Extension events via _WKInspectorExtensionDelegate https://bugs.webkit.org/show_bug.cgi?id=52 Modified: trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp (273587 => 273588) --- trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp 2021-02-26 21:41:37 UTC (rev 273587) +++ trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp 2021-02-26 21:43:24 UTC (rev 273588) @@ -201,6 +201,13 @@ untrackInspectorPage(m_inspectorPage); +#if ENABLE(INSPECTOR_EXTENSIONS) +// This extension controller may be kept alive by the IPC dispatcher beyond the point +// when m_inspectorPage is cleared below. Notify the controller so it can clean up before then. +m_extensionController->inspectorFrontendWillClose(); +m_extensionController = nullptr; +#endif + m_inspectorPage = nullptr; platformCloseFrontendPageAndWindow(); Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp (273587 => 273588) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2021-02-26 21:41:37 UTC (rev 273587) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2021-02-26 21:43:24 UTC (rev 273588) @@ -554,6 +554,9 @@ platformDetach(); #if ENABLE(INSPECTOR_EXTENSIONS) +// This extension controller
[webkit-changes] [273586] trunk/Source/WebKit
Title: [273586] trunk/Source/WebKit Revision 273586 Author bb...@apple.com Date 2021-02-26 13:40:25 -0800 (Fri, 26 Feb 2021) Log Message [Cocoa] Web Inspector: add support for receiving Web Extension events via _WKInspectorExtensionDelegate https://bugs.webkit.org/show_bug.cgi?id=52 Unreviewed, revert one unintentionally changed error code. Fixes failing API test WKInspectorExtensionHost.UnregisterExtension. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (273585 => 273586) --- trunk/Source/WebKit/ChangeLog 2021-02-26 21:36:24 UTC (rev 273585) +++ trunk/Source/WebKit/ChangeLog 2021-02-26 21:40:25 UTC (rev 273586) @@ -1,3 +1,16 @@ +2021-02-26 BJ Burg + +[Cocoa] Web Inspector: add support for receiving Web Extension events via _WKInspectorExtensionDelegate +https://bugs.webkit.org/show_bug.cgi?id=52 + + +Unreviewed, revert one unintentionally changed error code. + +Fixes failing API test WKInspectorExtensionHost.UnregisterExtension. + +* UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: +(WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension): + 2021-02-26 Per Arne [Cocoa] Send QOS parameters as part of Web process creation parameters Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp (273585 => 273586) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp 2021-02-26 21:36:24 UTC (rev 273585) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp 2021-02-26 21:40:25 UTC (rev 273586) @@ -115,7 +115,7 @@ weakThis->m_inspectorPage->sendWithAsyncReply(Messages::WebInspectorUIExtensionController::UnregisterExtension { extensionID }, [strongThis = makeRef(*weakThis.get()), extensionID, completionHandler = WTFMove(completionHandler)](Expected result) mutable { if (!result) { -completionHandler(makeUnexpected(Inspector::ExtensionError::RegistrationFailed)); +completionHandler(makeUnexpected(Inspector::ExtensionError::InvalidRequest)); return; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [273471] trunk/Source/WebKit
Title: [273471] trunk/Source/WebKit Revision 273471 Author bb...@apple.com Date 2021-02-24 22:10:40 -0800 (Wed, 24 Feb 2021) Log Message [Cocoa] Web Inspector: expose the extension host that is used to load _WKInspectorExtension tabs https://bugs.webkit.org/show_bug.cgi?id=222344 Reviewed by Devin Rousso. Clients need access to the WKWebView that hosts extension content in order to implement message passing and event delivery to the extension panel iframes. (Currently, that WebView is the same underlying WKWebView for the whole interface, but that is open to change.) * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: New property. * UIProcess/API/Cocoa/_WKInspectorPrivate.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector extensionHostWebView]): Added. (-[_WKInspector handle]): Deleted. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController extensionHostWebView]): Added. (-[_WKRemoteWebInspectorViewController handle]): Deleted. * Shared/API/Cocoa/WKBrowsingContextHandle.mm: (-[WKBrowsingContextHandle description]): Drive-by, add the standard -description for debugging purposes. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm Diff Modified: trunk/Source/WebKit/ChangeLog (273470 => 273471) --- trunk/Source/WebKit/ChangeLog 2021-02-25 05:59:46 UTC (rev 273470) +++ trunk/Source/WebKit/ChangeLog 2021-02-25 06:10:40 UTC (rev 273471) @@ -1,3 +1,30 @@ +2021-02-24 BJ Burg + +[Cocoa] Web Inspector: expose the extension host that is used to load _WKInspectorExtension tabs +https://bugs.webkit.org/show_bug.cgi?id=222344 + + +Reviewed by Devin Rousso. + +Clients need access to the WKWebView that hosts extension content in order to implement message passing +and event delivery to the extension panel iframes. (Currently, that WebView is +the same underlying WKWebView for the whole interface, but that is open to change.) + +* UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: New property. + +* UIProcess/API/Cocoa/_WKInspectorPrivate.h: +* UIProcess/API/Cocoa/_WKInspector.mm: +(-[_WKInspector extensionHostWebView]): Added. +(-[_WKInspector handle]): Deleted. + +* UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: +(-[_WKRemoteWebInspectorViewController extensionHostWebView]): Added. +(-[_WKRemoteWebInspectorViewController handle]): Deleted. + +* Shared/API/Cocoa/WKBrowsingContextHandle.mm: +(-[WKBrowsingContextHandle description]): +Drive-by, add the standard -description for debugging purposes. + 2021-02-24 Alex Christensen Add stubs to enable SafariForWebKitDevelopment to launch Modified: trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm (273470 => 273471) --- trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm 2021-02-25 05:59:46 UTC (rev 273470) +++ trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm 2021-02-25 06:10:40 UTC (rev 273471) @@ -93,4 +93,9 @@ return [[WKBrowsingContextHandle allocWithZone:zone] _initWithPageProxyID:_pageProxyID andWebPageID:_webPageID]; } +- (NSString *)description +{ +return [NSString stringWithFormat:@"<%@: %p; pageProxyID = %llu; webPageID = %llu>", NSStringFromClass(self.class), self, _pageProxyID.toUInt64(), _webPageID.toUInt64()]; +} + @end Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm (273470 => 273471) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-02-25 05:59:46 UTC (rev 273470) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-02-25 06:10:40 UTC (rev 273471) @@ -33,6 +33,7 @@ #import "WebProcessProxy.h" #import "_WKFrameHandleInternal.h" #import "_WKInspectorPrivateForTesting.h" +#import "_WKRemoteObjectRegistry.h" #import #import #import @@ -169,11 +170,6 @@ _inspector->setDiagnosticLoggingAvailable(!!delegate); } -- (WKBrowsingContextHandle *)handle -{ -return self.inspectorWebView._handle; -} - // MARK: _WKInspectorInternal methods - (API::Object&)_apiObject @@ -183,6 +179,11 @@ // MARK: _WKInspectorExtensionHost methods +- (WKWebView *)extensionHostWebView +{ +return self.inspectorWebView; +} + - (void)registerExtensionWithID:(NSString *)extensionID displayName:(NSString *)displayName completionHandler:(void(^)(NSError *, _WKInspectorExtension *))completionHandler { #if ENABLE(INSPECTOR_EXTENSIONS) Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h (273470 => 273471) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h 20
[webkit-changes] [273215] trunk/Source/WebKit
Title: [273215] trunk/Source/WebKit Revision 273215 Author bb...@apple.com Date 2021-02-20 20:24:31 -0800 (Sat, 20 Feb 2021) Log Message [Cocoa] Web Inspector: expose the WKBrowsingContextHandle associated with Web Inspector's page https://bugs.webkit.org/show_bug.cgi?id=26 Reviewed by Timothy Hatcher. In order to implement browser.devtools.inspectedWindow.tabId for Web Extensions, we need a way to do a reverse lookup of the tabId using the current browsing context controller (WKWebProcessPlugInBrowserContextController) in the injected bundle. This patch exposes the browsing context handle for the underlying WKWebView that hosts the inspector page. Clients can use this to precompute a tabId for each inspector browsing context that may be encountered by injected bundle code. * UIProcess/API/Cocoa/_WKInspectorPrivate.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector handle]): Added. * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: (WebKit::InjectedBundle::classesForCoder): Drive-by, make it possible to use WKBrowsingContextHandle in injected bundle parameters. This is easy because it conforms to NSSecureCoding and is simply a pageId + frameId. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm Diff Modified: trunk/Source/WebKit/ChangeLog (273214 => 273215) --- trunk/Source/WebKit/ChangeLog 2021-02-21 04:15:52 UTC (rev 273214) +++ trunk/Source/WebKit/ChangeLog 2021-02-21 04:24:31 UTC (rev 273215) @@ -1,3 +1,27 @@ +2021-02-20 BJ Burg + +[Cocoa] Web Inspector: expose the WKBrowsingContextHandle associated with Web Inspector's page +https://bugs.webkit.org/show_bug.cgi?id=26 + +Reviewed by Timothy Hatcher. + +In order to implement browser.devtools.inspectedWindow.tabId for Web Extensions, +we need a way to do a reverse lookup of the tabId using the current browsing context +controller (WKWebProcessPlugInBrowserContextController) in the injected bundle. + +This patch exposes the browsing context handle for the underlying WKWebView that +hosts the inspector page. Clients can use this to precompute a tabId for each +inspector browsing context that may be encountered by injected bundle code. + +* UIProcess/API/Cocoa/_WKInspectorPrivate.h: +* UIProcess/API/Cocoa/_WKInspector.mm: +(-[_WKInspector handle]): Added. + +* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: +(WebKit::InjectedBundle::classesForCoder): +Drive-by, make it possible to use WKBrowsingContextHandle in injected bundle parameters. +This is easy because it conforms to NSSecureCoding and is simply a pageId + frameId. + 2021-02-20 Chris Fleizach AX: Image should report the embedded accessibility description if available Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm (273214 => 273215) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-02-21 04:15:52 UTC (rev 273214) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-02-21 04:24:31 UTC (rev 273215) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Apple Inc. All rights reserved. + * Copyright (C) 2018-2021 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -169,6 +169,11 @@ _inspector->setDiagnosticLoggingAvailable(!!delegate); } +- (WKBrowsingContextHandle *)handle +{ +return self.inspectorWebView._handle; +} + // MARK: _WKInspectorInternal methods - (API::Object&)_apiObject Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h (273214 => 273215) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h 2021-02-21 04:15:52 UTC (rev 273214) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h 2021-02-21 04:24:31 UTC (rev 273215) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Apple Inc. All rights reserved. + * Copyright (C) 2019-2021 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,6 +25,7 @@ #import "_WKInspector.h" +@class WKBrowsingContextHandle; @protocol _WKDiagnosticLoggingDelegate; @interface _WKInspector (WKPrivate) @@ -31,4 +32,11 @@ @property (nonatomic, weak, setter=_setDiagnosticLoggingDelegate:) id<_WKDiagnosticLoggingDelegate> _diagnosticLoggingDelegate; +/** + * @abstract The browsing context handle associated with Web Inspector's user interface. + * @discussion This can be used to identify the inspector page and any associated subframes + * from within the injected bundle. + */ +@property (nonatomic, readonly) WKBrowsingContextHandle *handle; + @end
[webkit-changes] [273195] trunk/Source/WebKit
Title: [273195] trunk/Source/WebKit Revision 273195 Author bb...@apple.com Date 2021-02-19 22:37:59 -0800 (Fri, 19 Feb 2021) Log Message [Cocoa] WKBrowsingContextHandle should conform to NSCopying https://bugs.webkit.org/show_bug.cgi?id=14 Reviewed by Devin Rousso. * Shared/API/Cocoa/WKBrowsingContextHandle.h: * Shared/API/Cocoa/WKBrowsingContextHandle.mm: (-[WKBrowsingContextHandle copyWithZone:]): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.h trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm Diff Modified: trunk/Source/WebKit/ChangeLog (273194 => 273195) --- trunk/Source/WebKit/ChangeLog 2021-02-20 06:37:00 UTC (rev 273194) +++ trunk/Source/WebKit/ChangeLog 2021-02-20 06:37:59 UTC (rev 273195) @@ -1,3 +1,14 @@ +2021-02-19 BJ Burg + +[Cocoa] WKBrowsingContextHandle should conform to NSCopying +https://bugs.webkit.org/show_bug.cgi?id=14 + +Reviewed by Devin Rousso. + +* Shared/API/Cocoa/WKBrowsingContextHandle.h: +* Shared/API/Cocoa/WKBrowsingContextHandle.mm: +(-[WKBrowsingContextHandle copyWithZone:]): + 2021-02-19 Chris Dumez Review remaining usage of autorelease to make sure it is necessary Modified: trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.h (273194 => 273195) --- trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.h 2021-02-20 06:37:00 UTC (rev 273194) +++ trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.h 2021-02-20 06:37:59 UTC (rev 273195) @@ -26,5 +26,5 @@ #import WK_CLASS_AVAILABLE(macos(10.10), ios(8.0)) -@interface WKBrowsingContextHandle : NSObject +@interface WKBrowsingContextHandle : NSObject @end Modified: trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm (273194 => 273195) --- trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm 2021-02-20 06:37:00 UTC (rev 273194) +++ trunk/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm 2021-02-20 06:37:59 UTC (rev 273195) @@ -88,4 +88,9 @@ return YES; } +- (id)copyWithZone:(NSZone *)zone +{ +return [[WKBrowsingContextHandle allocWithZone:zone] _initWithPageProxyID:_pageProxyID andWebPageID:_webPageID]; +} + @end ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [273109] trunk/Source/WebKit
Title: [273109] trunk/Source/WebKit Revision 273109 Author bb...@apple.com Date 2021-02-18 16:07:52 -0800 (Thu, 18 Feb 2021) Log Message [Cocoa] Web Inspector: add support for using custom process pool and page group identifier https://bugs.webkit.org/show_bug.cgi?id=222046 Reviewed by Timothy Hatcher. These additions are necessary for clients to inject Web Extensions API into the tabs created using _WKInspectorExtension. Currently, Web Inspector pages use a private process pool that is separate from page content. Since there is no way to set the pool's injected bundle path prior to opening Web Inspector, we need to allow clients to explicitly configure and set a process pool to be used for WebInspectorUI and any iframe tabs created using _WKInspectorExtension. * UIProcess/API/APIInspectorConfiguration.cpp: (API::InspectorConfiguration::processPool): (API::InspectorConfiguration::setProcessPool): * UIProcess/API/APIInspectorConfiguration.h: * UIProcess/API/Cocoa/_WKInspectorConfiguration.h: * UIProcess/API/Cocoa/_WKInspectorConfiguration.mm: (-[_WKInspectorConfiguration setProcessPool:]): (-[_WKInspectorConfiguration processPool]): (-[_WKInspectorConfiguration applyToWebViewConfiguration:]): (-[_WKInspectorConfiguration copyWithZone:]): Add some plumbing for the new properties. * UIProcess/Inspector/WebInspectorUtilities.h: * UIProcess/Inspector/WebInspectorUtilities.cpp: (WebKit::defaultInspectorPageGroupIdentifierForPage): Renamed. (WebKit::defaultInspectorProcessPool): Renamed. (WebKit::allInspectorProcessPools): Move to using a WeakHashSet since there could be a number of pools specified by the client for different inspector instances. (WebKit::prepareProcessPoolForInspector): Added. (WebKit::isInspectorProcessPool): Turn this into a set lookup. * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController webViewConfiguration]): Add logic to use a custom process pool or a default process pool (existing behavior). Add logic to use a custom page group identifier or a default value (existing behavior). * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow): * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::platformCreateFrontendPage): * UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp: (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow): * UIProcess/Inspector/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformCreateFrontendPage): Adapt to renames. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIInspectorConfiguration.cpp trunk/Source/WebKit/UIProcess/API/APIInspectorConfiguration.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorConfiguration.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorConfiguration.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUtilities.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUtilities.h trunk/Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp trunk/Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp trunk/Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm trunk/Source/WebKit/UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp trunk/Source/WebKit/UIProcess/Inspector/win/WebInspectorProxyWin.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (273108 => 273109) --- trunk/Source/WebKit/ChangeLog 2021-02-19 00:01:40 UTC (rev 273108) +++ trunk/Source/WebKit/ChangeLog 2021-02-19 00:07:52 UTC (rev 273109) @@ -1,3 +1,55 @@ +2021-02-18 BJ Burg + +[Cocoa] Web Inspector: add support for using custom process pool and page group identifier +https://bugs.webkit.org/show_bug.cgi?id=222046 + + +Reviewed by Timothy Hatcher. + +These additions are necessary for clients to inject Web Extensions API into the tabs created +using _WKInspectorExtension. + +Currently, Web Inspector pages use a private process pool that is separate from page content. +Since there is no way to set the pool's injected bundle path prior to opening Web Inspector, +we need to allow clients to explicitly configure and set a process pool to be used for +WebInspectorUI and any iframe tabs created using _WKInspectorExtension. + +* UIProcess/API/APIInspectorConfiguration.cpp: +(API::InspectorConfiguration::processPool): +(API::InspectorConfiguration::setProcessPool): +* UIProcess/API/APIInspectorConfiguration.h: +* UIProcess/API/Cocoa/_WKInspectorConfiguration.h: +* UIProcess/API/Cocoa/_WKInspectorConfiguration.mm: +(-[_WKInspectorConfiguration setProcessPool:]): +(-[_WKInspectorConfiguration processPool]): +(-[_WKInspectorConfiguration applyToWebViewConfiguration:]): +(-[_WKInspectorConfiguration copyWithZone:]): +Add some plumbing for the new properties. + +
[webkit-changes] [272935] trunk/Source/WebKit
Title: [272935] trunk/Source/WebKit Revision 272935 Author bb...@apple.com Date 2021-02-16 15:43:36 -0800 (Tue, 16 Feb 2021) Log Message REGRESSION(r266890): [Cocoa] Fix InspectorDelegate / API::InspectorClient leak https://bugs.webkit.org/show_bug.cgi?id=221988 Reviewed by Devin Rousso. There was a logic error introduced into the new delegate situation after moving _WKInspectorDelegate from WKWebView to _WKInspector. When setting .delegate to nil, we shouldn't allocate dummy API::InspectorClient/ InspectorDelegate instances. As written, these instances form their own retain cycle and cause a leak if Web Inspector has been opened or if WKWebView._inspector is accessed (which lazily creates the delegates). * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector setDelegate:]): Adopt new constructor and pass in the ObjC delegate. * UIProcess/Inspector/Cocoa/InspectorDelegate.h: * UIProcess/Inspector/Cocoa/InspectorDelegate.mm: (WebKit::InspectorDelegate::InspectorDelegate): (WebKit::InspectorDelegate::createInspectorClient): Deleted. (WebKit::InspectorDelegate::setDelegate): Deleted. Clean up this class so that we always receive the ObjC delegate via the constructor. If a nil delegate is passed---for example, when closing the WKWebView---then don't create an API::InspectorClient and set the WebInspectorProxy's client to nullptr. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.h trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.mm Diff Modified: trunk/Source/WebKit/ChangeLog (272934 => 272935) --- trunk/Source/WebKit/ChangeLog 2021-02-16 23:36:08 UTC (rev 272934) +++ trunk/Source/WebKit/ChangeLog 2021-02-16 23:43:36 UTC (rev 272935) @@ -1,3 +1,32 @@ +2021-02-16 BJ Burg + +REGRESSION(r266890): [Cocoa] Fix InspectorDelegate / API::InspectorClient leak +https://bugs.webkit.org/show_bug.cgi?id=221988 + + +Reviewed by Devin Rousso. + +There was a logic error introduced into the new delegate situation after +moving _WKInspectorDelegate from WKWebView to _WKInspector. When setting +.delegate to nil, we shouldn't allocate dummy API::InspectorClient/ +InspectorDelegate instances. As written, these instances form their own retain +cycle and cause a leak if Web Inspector has been opened or if +WKWebView._inspector is accessed (which lazily creates the delegates). + +* UIProcess/API/Cocoa/_WKInspector.mm: +(-[_WKInspector setDelegate:]): +Adopt new constructor and pass in the ObjC delegate. + +* UIProcess/Inspector/Cocoa/InspectorDelegate.h: +* UIProcess/Inspector/Cocoa/InspectorDelegate.mm: +(WebKit::InspectorDelegate::InspectorDelegate): +(WebKit::InspectorDelegate::createInspectorClient): Deleted. +(WebKit::InspectorDelegate::setDelegate): Deleted. +Clean up this class so that we always receive the ObjC delegate +via the constructor. If a nil delegate is passed---for example, when +closing the WKWebView---then don't create an API::InspectorClient +and set the WebInspectorProxy's client to nullptr. + 2021-02-16 Brent Fulgham Remove unneeded sandbox access to some file paths Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm (272934 => 272935) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-02-16 23:36:08 UTC (rev 272934) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm 2021-02-16 23:43:36 UTC (rev 272935) @@ -57,11 +57,10 @@ - (void)setDelegate:(id<_WKInspectorDelegate>)delegate { -if (!_delegate) -_delegate = makeUnique(self); +if (!delegate && !_delegate) +return; -_inspector->setInspectorClient(_delegate->createInspectorClient()); -_delegate->setDelegate(delegate); +_delegate = makeUnique(self, delegate); } - (WKWebView *)webView Modified: trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.h (272934 => 272935) --- trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.h 2021-02-16 23:36:08 UTC (rev 272934) +++ trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.h 2021-02-16 23:43:36 UTC (rev 272935) @@ -39,10 +39,9 @@ class InspectorDelegate { WTF_MAKE_FAST_ALLOCATED; public: -explicit InspectorDelegate(_WKInspector *); +InspectorDelegate(_WKInspector *, id <_WKInspectorDelegate>); +~InspectorDelegate(); -std::unique_ptr createInspectorClient(); - RetainPtr> delegate(); void setDelegate(id <_WKInspectorDelegate>); Modified: trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.mm (272934 => 272935) --- trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.mm 2021-02-16 23:36:08 UTC (rev 272934) +++ trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.mm 2021-02-16 23:43:36 UTC (r
[webkit-changes] [272684] trunk/Source
Title: [272684] trunk/Source Revision 272684 Author bb...@apple.com Date 2021-02-10 13:34:27 -0800 (Wed, 10 Feb 2021) Log Message [Cocoa] Web Inspector: add support for evaluating script on the inspected page via _WKInspectorExtension https://bugs.webkit.org/show_bug.cgi?id=221567 Reviewed by Devin Rousso. Source/WebCore: This patch adds support for handling returned Promise values in an intelligent way. If a callback was supplied, then wait for the promise to settle and invoke the callback with its settled result. To support this, the dispatcher keeps a map of unfulfilled DOMPromises and the callback that is chained to the DOMPromise. * inspector/InspectorFrontendAPIDispatcher.h: * inspector/InspectorFrontendAPIDispatcher.cpp: (WebCore::InspectorFrontendAPIDispatcher::~InspectorFrontendAPIDispatcher): (WebCore::InspectorFrontendAPIDispatcher::reset): Clear the pending responses map when destructing or resetting the dispatcher. (WebCore::InspectorFrontendAPIDispatcher::frontendGlobalObject): Upgrade from JSGlobalObject to JSDOMGlobalObject, which is needed to call JSDOMPromise methods. (WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): The meat of this patch. Chain a Function onto the JSDOMPromise. Inside the lambda function, try to look up and invoke the corresponding EvaluationResultHandler for this evaluation result. (WebCore::InspectorFrontendAPIDispatcher::invalidatePendingResponses): Since these are CompletionHandlers we need to call them one way or another. Source/WebInspectorUI: This patch adds InspectorFrontendAPI.evaluateScriptForExtension(). * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController.prototype.evaluateScriptForExtension): Translate arguments into a corresponding RuntimeAgent.evaluate invocation. The parameters are not yet implemented, and will be filled in by a subsequent patch. * UserInterface/Models/WebInspectorExtension.js: Add new error enum value. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.evaluateScriptForExtension): Plumbing. Source/WebKit: This patch adds a new method to _WKInspectorExtension which is used to implement `browser.devtools.inspectedWindow.eval` in the Web Extensions API. * Shared/InspectorExtensionTypes.h: * Shared/InspectorExtensionTypes.cpp: (WebKit::inspectorExtensionErrorToString): Add enum value NotImplemented. * UIProcess/API/APIInspectorExtension.h: * UIProcess/API/APIInspectorExtension.cpp: (API::InspectorExtension::evaluateScript): Plumbing. * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/Cocoa/WKWebView.mm: (nsErrorFromExceptionDetails): Move this helper up near the top as it is now exposed via . * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension evaluateScript:frameURL:contextSecurityOrigin:useContentScriptContext:completionHandler:]): Add new method to evaluate script in the inspected page. The semantics of the parameters are intended to match those of `browser.devtools.inspectedWindow.eval`. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::evaluateScriptForExtension): Plumbing. * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Add new message for evaluateScript. * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromEvaluationResult): Support the new error enum value. (WebKit::WebInspectorUIExtensionController::unregisterExtension): (WebKit::WebInspectorUIExtensionController::createTabForExtension): Drive-by, simplify this by passing the EvaluationResult value without unwrapping. (WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension): This is the meat of the patch. Call out to InspectorFrontendAPI.evaluateScriptForExtension. Inspect the return value and invoke the completion handler with the result or an error. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.h trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Models/WebInspectorExtension.js trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/InspectorExtensionTypes.cpp trunk/Source/WebKit/Shared/InspectorExtensionTypes.h trunk/Source/WebKit/UIProcess/API/APIInspectorExtension.cpp trunk/Source/WebKit/UIProcess/API/APIInspectorExtension.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h trunk/Source/WebKit/UIPr
[webkit-changes] [272222] trunk/Source/JavaScriptCore
Title: [27] trunk/Source/_javascript_Core Revision 27 Author bb...@apple.com Date 2021-02-02 10:43:27 -0800 (Tue, 02 Feb 2021) Log Message REGRESSION(r269309): [Cocoa] RemoteInspectorCocoa files are being compiled twice https://bugs.webkit.org/show_bug.cgi?id=220951 Patch by Don Olmstead on 2021-02-02 Reviewed by BJ Burg. Refactor our SourcesCocoa files in _javascript_Core to avoid double-listing or double-building remote inspection-related files. Properly track inspector/remote/SourcesCocoa.txt as a build dependency. * _javascript_Core.xcodeproj/project.pbxproj: * Scripts/generate-unified-sources.sh: * SourcesCocoa.txt: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh trunk/Source/_javascript_Core/SourcesCocoa.txt Diff Modified: trunk/Source/_javascript_Core/ChangeLog (272221 => 27) --- trunk/Source/_javascript_Core/ChangeLog 2021-02-02 18:30:42 UTC (rev 272221) +++ trunk/Source/_javascript_Core/ChangeLog 2021-02-02 18:43:27 UTC (rev 27) @@ -1,3 +1,19 @@ +2021-02-02 Don Olmstead + +REGRESSION(r269309): [Cocoa] RemoteInspectorCocoa files are being compiled twice +https://bugs.webkit.org/show_bug.cgi?id=220951 + + +Reviewed by BJ Burg. + +Refactor our SourcesCocoa files in _javascript_Core to avoid double-listing +or double-building remote inspection-related files. Properly track +inspector/remote/SourcesCocoa.txt as a build dependency. + +* _javascript_Core.xcodeproj/project.pbxproj: +* Scripts/generate-unified-sources.sh: +* SourcesCocoa.txt: + 2021-02-02 Xan Lopez [JSC] Small cleanup in StackVisitor::readNonInlinedFrame Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (272221 => 27) --- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2021-02-02 18:30:42 UTC (rev 272221) +++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2021-02-02 18:43:27 UTC (rev 27) @@ -4335,6 +4335,7 @@ 996B73151BDA05AA00331B84 /* ArrayConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayConstructor.lut.h; sourceTree = ""; }; 998ED6721BED659A00DD8017 /* RemoteControllableTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteControllableTarget.cpp; sourceTree = ""; }; 998ED6731BED659A00DD8017 /* RemoteControllableTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteControllableTarget.h; sourceTree = ""; }; + 99A3273825C9CBEE00DA8CAF /* SourcesCocoa.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = SourcesCocoa.txt; sourceTree = ""; }; 99DA00991BD5992700F4575C /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = __init__.py; sourceTree = ""; }; 99DA009A1BD5992700F4575C /* builtins_generator.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generator.py; sourceTree = ""; }; 99DA009B1BD5992700F4575C /* builtins_model.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_model.py; sourceTree = ""; }; @@ -8781,6 +8782,7 @@ 995566851E4E8B0700AAE13C /* RemoteInspector.cpp */, A5BA15E1182340B300A82E69 /* RemoteInspector.h */, A5BA15E3182340B300A82E69 /* RemoteInspectorConstants.h */, +99A3273825C9CBEE00DA8CAF /* SourcesCocoa.txt */, ); path = remote; sourceTree = ""; @@ -11156,6 +11158,7 @@ "$(SRCROOT)/Scripts/generate-unified-sources.sh", "$(SRCROOT)/Sources.txt", "$(SRCROOT)/SourcesCocoa.txt", +"$(SRCROOT)/inspector/remote/SourcesCocoa.txt", ); name = "Generate Unified Sources"; outputFileListPaths = ( Modified: trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh (272221 => 27) --- trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh 2021-02-02 18:30:42 UTC (rev 272221) +++ trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh 2021-02-02 18:43:27 UTC (rev 27) @@ -18,7 +18,7 @@ UnifiedSourceMmFileCount=5 if [ $# -eq 0 ]; then -echo "Using unified source list files: Sources.txt, SourcesCocoa.txt" +echo "Using unified source list files: Sources.txt, SourcesCocoa.txt, inspector/remote/SourcesCocoa.txt" fi -/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" --derived-sources-path "${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core" --source-tree-path "${SRCROOT}" --max-cpp-bundle-count ${UnifiedSourceCppFileCount} --max-obj-c-bundle-count ${UnifiedSourceMmFileCount} Sources.txt SourcesCocoa.txt "${ARGS[@]}" > /dev/null +/usr/bin/env ruby "${BUILD_SCRIPTS_D
[webkit-changes] [272197] trunk
Title: [272197] trunk Revision 272197 Author bb...@apple.com Date 2021-02-02 01:02:31 -0800 (Tue, 02 Feb 2021) Log Message Web Inspector: implement the basics for showing/hiding grid overlays https://bugs.webkit.org/show_bug.cgi?id=221062 Reviewed by Devin Rousso. Source/_javascript_Core: Add new commands to show and hide CSS grid overlays: - DOM.showGridOverlay - DOM.hideGridOverlay * inspector/protocol/DOM.json: Source/WebCore: Implement backend commands for showing and hiding CSS grid overlays. This patch draws a very simplistic grid overlay. Support for the various grid overlay options will be added in later patches. New test: inspector/dom/showGridOverlay.html * inspector/InspectorOverlay.h: (WebCore::InspectorOverlay::gridOverlayCount const): Added, for testing only. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::paint): (WebCore::InspectorOverlay::shouldShowOverlay const): Hook up the painting of any active grid overlays. (WebCore::InspectorOverlay::setGridOverlayForNode): (WebCore::InspectorOverlay::clearGridOverlayForNode): (WebCore::InspectorOverlay::clearAllGridOverlays): Maintain the list of active grid overlays. A node can only have one grid overlay at a time. (WebCore::InspectorOverlay::drawNodeHighlight): Add a note about why grid overlays are not considered when calculating the ruler exclusion area. (WebCore::InspectorOverlay::drawGridOverlay): Added. This drawing code exists to flesh out the rest of this patch, and is obviously incomplete. Draw grid lines that extend to the edge of the viewport, equivalent to `config.showExtendedGridLines = true`. * inspector/agents/InspectorDOMAgent.h: * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::showGridOverlay): (WebCore::InspectorDOMAgent::hideGridOverlay): Translate protocol commands into InspectorOverlay method calls. * inspector/InspectorController.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::gridOverlayCount const): Added. This is used for testing purposes only. * testing/Internals.h: * testing/Internals.idl: * testing/Internals.cpp: (WebCore::Internals::inspectorGridOverlayCount): Added. Source/WebInspectorUI: Expose new DOM.showGridOverlay and DOM.hideGridOverlay commands via WI.DOMNode. Add initial engineering UI to toggle grid overlays. New methods are covered by a new test: inspector/dom/showGridOverlay.html Additions to WI.DOMManager.prototype.requestDocument are covered by existing tests (callback case) and a new test (promise case). Additions to WI.Color are covered by a new test case in: inspector/model/color.html * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.prototype.requestDocument): (WI.DOMManager.prototype._requestDocumentWithPromise): Drive-by: upgrade requestDocument() to return a promise if no callback argument was passed. This is used by a new test. * UserInterface/Models/Color.js: (WI.Color.prototype.toProtocol): Added. The protocol object is DOM.RGBAColor, which is the same thing as WI.Color.Format.RGBA. * UserInterface/Models/DOMNode.js: (WI.DOMNode.prototype.showGridOverlay): (WI.DOMNode.prototype.hideGridOverlay): Added. These are the methods that the rest of WebInspectorUI uses to interact with grid overlays for a particular node. Note that these methods return either an unsettled promise (from the agent call) or a rejected promise (in the case that the node is destroyed). This allows test cases to `await` before checking the grid overlay count. * UserInterface/Test/TestHarness.js: (TestHarness.prototype.expectException): Improve logging output when InspectorTest.expectException does not catch an exception. * UserInterface/Views/ContextMenuUtilities.js: Add some engineering-only context menu items for showing/hiding grid overlays to DOMTreeElements in the Elements Tab. These are in place for development purposes and should eventually be removed when no longer needed. LayoutTests: * inspector/dom/showGridOverlay-expected.txt: Added. * inspector/dom/showGridOverlay.html: Added. This test does not cover the actual drawing code. The drawing method will change a lot and is not easy to test currently. The new test covers the behavior of showGridOverlay/hideGridOverlay by querying how many grid overlays are active according to InspectorOverlay. * inspector/model/color-expected.txt: * inspector/model/color.html: Add a test case to exercise WI.Color.prototype.toProtocol(). * inspector/unit-tests/test-harness-expect-functions-async-expected.txt: Rebaseline results after adding more state dumping in the failure case for InspectorTest.expectException(). Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/inspector/model/color-expected.txt trunk/LayoutTests/inspector/model/color.html trunk/LayoutTests/inspector/unit-tests/test-harness-expect-functions-async-expected.txt trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/inspector/protocol/DOM.json trunk/Source/WebCore/Cha
[webkit-changes] [271926] trunk/Source
Title: [271926] trunk/Source Revision 271926 Author bb...@apple.com Date 2021-01-26 17:11:19 -0800 (Tue, 26 Jan 2021) Log Message REGRESSION(r267641): WebKitDeveloperExtras preference has no effect for WebKitLegacy clients https://bugs.webkit.org/show_bug.cgi?id=220996 Reviewed by Sam Weinig. Source/WebKitLegacy/mac: Read back this preference when propagating it, because the value depends on more than just the preference key. For example, it allows Debug builds to act as if the preference is always enabled. * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WTF: This preference should use custom bindings for WebKitLegacy. * Scripts/Preferences/WebPreferencesDebug.yaml: Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml trunk/Source/WebKitLegacy/mac/ChangeLog trunk/Source/WebKitLegacy/mac/WebView/WebView.mm Diff Modified: trunk/Source/WTF/ChangeLog (271925 => 271926) --- trunk/Source/WTF/ChangeLog 2021-01-27 01:06:10 UTC (rev 271925) +++ trunk/Source/WTF/ChangeLog 2021-01-27 01:11:19 UTC (rev 271926) @@ -1,3 +1,15 @@ +2021-01-26 BJ Burg + +REGRESSION(r267641): WebKitDeveloperExtras preference has no effect for WebKitLegacy clients +https://bugs.webkit.org/show_bug.cgi?id=220996 + + +Reviewed by Sam Weinig. + +This preference should use custom bindings for WebKitLegacy. + +* Scripts/Preferences/WebPreferencesDebug.yaml: + 2021-01-26 Saam Barati Revive the build when MALLOC_HEAP_BREAKDOWN is enabled Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml (271925 => 271926) --- trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml 2021-01-27 01:06:10 UTC (rev 271925) +++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml 2021-01-27 01:11:19 UTC (rev 271926) @@ -65,6 +65,7 @@ DeveloperExtrasEnabled: type: bool webKitLegacyPreferenceKey: WebKitDeveloperExtrasEnabledPreferenceKey + webKitLegacyBinding: custom defaultValue: WebKitLegacy: default: false Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (271925 => 271926) --- trunk/Source/WebKitLegacy/mac/ChangeLog 2021-01-27 01:06:10 UTC (rev 271925) +++ trunk/Source/WebKitLegacy/mac/ChangeLog 2021-01-27 01:11:19 UTC (rev 271926) @@ -1,3 +1,18 @@ +2021-01-26 BJ Burg + +REGRESSION(r267641): WebKitDeveloperExtras preference has no effect for WebKitLegacy clients +https://bugs.webkit.org/show_bug.cgi?id=220996 + + +Reviewed by Sam Weinig. + +Read back this preference when propagating it, because the value depends on +more than just the preference key. For example, it allows Debug builds to act +as if the preference is always enabled. + +* WebView/WebView.mm: +(-[WebView _preferencesChanged:]): + 2021-01-22 Nikolas Zimmermann Finish introduction of RenderLayerScrollableArea: remove remaining glue code from RenderLayer Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (271925 => 271926) --- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2021-01-27 01:06:10 UTC (rev 271925) +++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2021-01-27 01:11:19 UTC (rev 271926) @@ -2929,6 +2929,9 @@ settings.setBackForwardCacheExpirationInterval(Seconds { [preferences _backForwardCacheExpirationInterval] }); settings.setPitchCorrectionAlgorithm(static_cast([preferences _pitchCorrectionAlgorithm])); +// FIXME: Add a way to have a preference check multiple different keys. +settings.setDeveloperExtrasEnabled([preferences developerExtrasEnabled]); + BOOL mediaPlaybackRequiresUserGesture = [preferences mediaPlaybackRequiresUserGesture]; settings.setVideoPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture || [preferences videoPlaybackRequiresUserGesture]); settings.setAudioPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture || [preferences audioPlaybackRequiresUserGesture]); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [271424] trunk
Title: [271424] trunk Revision 271424 Author bb...@apple.com Date 2021-01-12 16:19:38 -0800 (Tue, 12 Jan 2021) Log Message [Cocoa] Web Inspector: move browser domain activation methods back to WKWebView and UIDelegate https://bugs.webkit.org/show_bug.cgi?id=220480 Reviewed by Devin Rousso. Source/WebKit: Having browser domain activation methods on WKInspectorDelegate means that the browser domain will not work with remote inspection of WKWebViews on macOS. Move these methods back to UIDelegate/WKWebView so that it is possible to remote inspect Safari Technology Preview with another Safari while still benefiting from the browser domain being turned on. Covered by existing API tests. * UIProcess/API/APIInspectorClient.h: (API::InspectorClient::browserDomainEnabled): Deleted. (API::InspectorClient::browserDomainDisabled): Deleted. * UIProcess/API/APIUIClient.h: (API::UIClient::didEnableInspectorBrowserDomain): Moved. (API::UIClient::didDisableInspectorBrowserDomain): Moved. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _didEnableBrowserExtensions:]): Moved. (-[WKWebView _didDisableBrowserExtensions:]): Moved. Moved from WKInspector.mm. Rather than accessing the browser agent directly from ObjC code, use the page's WebPageInspectorController. * UIProcess/API/Cocoa/_WKInspectorDelegate.h: * UIProcess/API/Cocoa/_WKInspectorPrivate.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector _browserExtensionsEnabled:]): Deleted. (-[_WKInspector _browserExtensionsDisabled:]): Deleted. * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::UIDelegate::UIClient::didEnableInspectorBrowserDomain): (WebKit::UIDelegate::UIClient::didDisableInspectorBrowserDomain): * UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp: (WebKit::InspectorBrowserAgent::enable): (WebKit::InspectorBrowserAgent::disable): * UIProcess/Inspector/Cocoa/InspectorDelegate.h: * UIProcess/Inspector/Cocoa/InspectorDelegate.mm: (WebKit::InspectorDelegate::setDelegate): (WebKit::InspectorDelegate::InspectorClient::~InspectorClient): (WebKit::InspectorDelegate::InspectorClient::browserDomainEnabled): Deleted. (WebKit::InspectorDelegate::InspectorClient::browserDomainDisabled): Deleted. * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::browserExtensionsEnabled): Deleted. (WebKit::WebInspectorProxy::browserExtensionsDisabled): Deleted. * UIProcess/Inspector/WebInspectorProxy.h: * UIProcess/Inspector/WebPageInspectorController.h: * UIProcess/Inspector/WebPageInspectorController.cpp: (WebKit::WebPageInspectorController::WebPageInspectorController): (WebKit::WebPageInspectorController::init): (WebKit::WebPageInspectorController::connectFrontend): (WebKit::WebPageInspectorController::disconnectFrontend): (WebKit::WebPageInspectorController::disconnectAllFrontends): (WebKit::WebPageInspectorController::setIndicating): (WebKit::WebPageInspectorController::createInspectorTarget): (WebKit::WebPageInspectorController::webPageAgentContext): (WebKit::WebPageInspectorController::setEnabledBrowserAgent): Added. (WebKit::WebPageInspectorController::browserExtensionsEnabled): Added. (WebKit::WebPageInspectorController::browserExtensionsDisabled): Added. Drive-by: rename m_page to m_inspectedPage to emphasize that this class exists as part of Web Inspector's backend, not its frontend. Tools: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (-[UIDelegate _webViewDidEnableInspectorBrowserDomain:]): (-[UIDelegate _webViewDidDisableInspectorBrowserDomain:]): (-[InspectorDelegate inspectorDidEnableBrowserDomain:]): Deleted. (-[InspectorDelegate inspectorDidDisableBrowserDomain:]): Deleted. Adapt to new location for delegate methods. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIInspectorClient.h trunk/Source/WebKit/UIProcess/API/APIUIClient.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorDelegate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivate.h trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm trunk/Source/WebKit/UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.h trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.h trunk/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp trunk/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm Diff Mo
[webkit-changes] [271374] trunk/Source/WebKit
Title: [271374] trunk/Source/WebKit Revision 271374 Author bb...@apple.com Date 2021-01-11 12:20:37 -0800 (Mon, 11 Jan 2021) Log Message Web Inspector: add nullptr check for WebInspectorProxy::m_extensionsController https://bugs.webkit.org/show_bug.cgi?id=220485 Reviewed by Devin Rousso. * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::frontendLoaded): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (271373 => 271374) --- trunk/Source/WebKit/ChangeLog 2021-01-11 20:13:30 UTC (rev 271373) +++ trunk/Source/WebKit/ChangeLog 2021-01-11 20:20:37 UTC (rev 271374) @@ -1,3 +1,14 @@ +2021-01-11 BJ Burg + +Web Inspector: add nullptr check for WebInspectorProxy::m_extensionsController +https://bugs.webkit.org/show_bug.cgi?id=220485 + + +Reviewed by Devin Rousso. + +* UIProcess/Inspector/WebInspectorProxy.cpp: +(WebKit::WebInspectorProxy::frontendLoaded): + 2021-01-11 Youenn Fablet WebProcessPool::establishWorkerContextConnectionToNetworkProcess should make sure to remove the selected process from the cache Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp (271373 => 271374) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2021-01-11 20:13:30 UTC (rev 271373) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2021-01-11 20:20:37 UTC (rev 271374) @@ -584,7 +584,8 @@ automationSession->inspectorFrontendLoaded(*m_inspectedPage); #if ENABLE(INSPECTOR_EXTENSIONS) -m_extensionController->inspectorFrontendLoaded(); +if (m_extensionController) +m_extensionController->inspectorFrontendLoaded(); #endif } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [271371] trunk/Tools
Title: [271371] trunk/Tools Revision 271371 Author bb...@apple.com Date 2021-01-11 12:10:53 -0800 (Mon, 11 Jan 2021) Log Message Unreviewed, update my contributor information. * Scripts/webkitpy/common/config/contributors.json: Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/common/config/contributors.json Diff Modified: trunk/Tools/ChangeLog (271370 => 271371) --- trunk/Tools/ChangeLog 2021-01-11 19:52:57 UTC (rev 271370) +++ trunk/Tools/ChangeLog 2021-01-11 20:10:53 UTC (rev 271371) @@ -1,3 +1,9 @@ +2021-01-11 BJ Burg + +Unreviewed, update my contributor information. + +* Scripts/webkitpy/common/config/contributors.json: + 2021-01-11 Youenn Fablet WebProcessPool::establishWorkerContextConnectionToNetworkProcess should make sure to remove the selected process from the cache Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (271370 => 271371) --- trunk/Tools/Scripts/webkitpy/common/config/contributors.json 2021-01-11 19:52:57 UTC (rev 271370) +++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json 2021-01-11 20:10:53 UTC (rev 271371) @@ -781,6 +781,18 @@ "AryehGregor" ] }, + "BJ Burg" : { + "emails" : [ + "bb...@apple.com", + "b...@cs.washington.edu" + ], + "expertise" : "Developer Tools, Web Inspector, WebDriver, Cocoa API", + "nicks" : [ + "bburg", + "burg" + ], + "status" : "reviewer" + }, "Babak Shafiei" : { "emails" : [ "bshaf...@apple.com" @@ -963,18 +975,6 @@ "brettx" ] }, - "Brian Burg" : { - "emails" : [ - "bb...@apple.com", - "b...@cs.washington.edu" - ], - "expertise" : "Developer Tools, Web Inspector", - "nicks" : [ - "bburg", - "brrian" - ], - "status" : "reviewer" - }, "Brian Holt" : { "emails" : [ "brian.h...@samsung.com" ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [270996] trunk/Source/WebKit
Title: [270996] trunk/Source/WebKit Revision 270996 Author bb...@apple.com Date 2020-12-18 16:16:08 -0800 (Fri, 18 Dec 2020) Log Message [Cocoa] Web Inspector: clean up _WKRemoteWebInspectorViewController https://bugs.webkit.org/show_bug.cgi?id=219963 Reviewed by Devin Rousso. Remove deprecated and unused debuggableType-based SPI to load the frontend. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h: Promote the _WKInspectorDebuggableInfo-based SPI to the main header. Fix availability annotations. This class has never worked on iOS. Add TBA annotations for things added since the Big Sur SDK was finalized. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (legacyDebuggableTypeToModernDebuggableType): Deleted. (-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]): Deleted. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h Diff Modified: trunk/Source/WebKit/ChangeLog (270995 => 270996) --- trunk/Source/WebKit/ChangeLog 2020-12-19 00:11:41 UTC (rev 270995) +++ trunk/Source/WebKit/ChangeLog 2020-12-19 00:16:08 UTC (rev 270996) @@ -1,3 +1,22 @@ +2020-12-18 BJ Burg + +[Cocoa] Web Inspector: clean up _WKRemoteWebInspectorViewController +https://bugs.webkit.org/show_bug.cgi?id=219963 + +Reviewed by Devin Rousso. + +Remove deprecated and unused debuggableType-based SPI to load the frontend. + +* UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: +* UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h: +Promote the _WKInspectorDebuggableInfo-based SPI to the main header. +Fix availability annotations. This class has never worked on iOS. +Add TBA annotations for things added since the Big Sur SDK was finalized. + +* UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: +(legacyDebuggableTypeToModernDebuggableType): Deleted. +(-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]): Deleted. + 2020-12-18 Peng Liu [Media in GPU Process][MSE] SourceBufferPrivateRemote needs to override some track buffer related functions of SourceBufferPrivate Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h (270995 => 270996) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h 2020-12-19 00:11:41 UTC (rev 270995) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h 2020-12-19 00:16:08 UTC (rev 270996) @@ -30,21 +30,13 @@ @class WKWebView; @class _WKInspectorConfiguration; +@class _WKInspectorDebuggableInfo; @protocol _WKRemoteWebInspectorViewControllerDelegate; NS_ASSUME_NONNULL_BEGIN -typedef NS_ENUM(NSInteger, WKRemoteWebInspectorDebuggableType) { -WKRemoteWebInspectorDebuggableTypeITML WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)), -WKRemoteWebInspectorDebuggableTypeJavaScript, -WKRemoteWebInspectorDebuggableTypeServiceWorker WK_API_AVAILABLE(macos(10.13.4), ios(11.3)), -WKRemoteWebInspectorDebuggableTypeWeb WK_API_DEPRECATED("Split into Page and WebPage", macos(10.12.3, WK_MAC_TBA), ios(10.3, WK_IOS_TBA)), -WKRemoteWebInspectorDebuggableTypePage WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)), -WKRemoteWebInspectorDebuggableTypeWebPage WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)), -} WK_API_AVAILABLE(macos(10.12.3), ios(10.3)); - -WK_CLASS_AVAILABLE(macos(10.12.3), ios(10.3)) +WK_CLASS_AVAILABLE(macos(10.12.3)) @interface _WKRemoteWebInspectorViewController : NSObject <_WKInspectorExtensionHost> @property (nonatomic, assign) id <_WKRemoteWebInspectorViewControllerDelegate> delegate; @@ -51,10 +43,10 @@ @property (nonatomic, readonly, retain) NSWindow *window; @property (nonatomic, readonly, retain) WKWebView *webView; -@property (nonatomic, readonly, copy) _WKInspectorConfiguration *configuration; +@property (nonatomic, readonly, copy) _WKInspectorConfiguration *configuration WK_API_AVAILABLE(macos(WK_MAC_TBA)); -- (instancetype)initWithConfiguration:(_WKInspectorConfiguration *)configuration; -- (void)loadForDebuggableType:(WKRemoteWebInspectorDebuggableType)debuggableType backendCommandsURL:(NSURL *)backendCommandsURL; +- (instancetype)initWithConfiguration:(_WKInspectorConfiguration *)configuration WK_API_AVAILABLE(macos(WK_MAC_TBA)); +- (void)loadForDebuggable:(_WKInspectorDebuggableInfo *)debuggableInfo backendCommandsURL:(NSURL *)backendCommandsURL WK_API_AVAILABLE(macos(WK_MAC_TBA)); - (void)close; - (void)show; Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm (270995 => 270996) --
[webkit-changes] [270606] trunk/Source
Title: [270606] trunk/Source Revision 270606 Author bb...@apple.com Date 2020-12-09 15:08:25 -0800 (Wed, 09 Dec 2020) Log Message [Cocoa] Web Inspector: add support for creating extension tabs in WebInspectorUI via _WKInspectorExtension https://bugs.webkit.org/show_bug.cgi?id=219380 Reviewed by Devin Rousso and Timothy Hatcher. Source/WebInspectorUI: * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController): (WI.WebInspectorExtensionController.prototype._makeNextExtensionTabID): (WI.WebInspectorExtensionController.prototype.unregisterExtension): (WI.WebInspectorExtensionController.prototype.createTabForExtension): * UserInterface/Main.html: * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.createTabForExtension): * UserInterface/Views/GeneralTabBarItem.js: (WI.GeneralTabBarItem.fromTabContentView): (WI.GeneralTabBarItem.get displayName): Deleted. * UserInterface/Views/PinnedTabBarItem.js: (WI.PinnedTabBarItem.fromTabContentView): (WI.PinnedTabBarItem): * UserInterface/Views/TabContentView.js: (WI.TabContentView.prototype.get tabBarItem): (WI.TabContentView.prototype.tabInfo): (WI.TabContentView.prototype.get managesNavigationSidebarPanel): Deleted. (WI.TabContentView.prototype.attached): Deleted. * UserInterface/Views/WebInspectorExtensionTabContentView.css: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h. (.content-view.web-inspector-extension-tab > iframe): * UserInterface/Views/WebInspectorExtensionTabContentView.js: Copied from Source/WebKit/UIProcess/API/APIInspectorExtension.h. (WI.WebInspectorExtensionTabContentView): (WI.WebInspectorExtensionTabContentView.prototype.tabInfo): (WI.WebInspectorExtensionTabContentView.prototype.get type): (WI.WebInspectorExtensionTabContentView.prototype.get supportsSplitContentBrowser): (WI.WebInspectorExtensionTabContentView.prototype.get extensionTabID): (WI.WebInspectorExtensionTabContentView.prototype.initialLayout): Source/WebKit: Add a new method to _WKInspectorExtension for creating an extension tab in WebInpectorUI. This can be used to implement browser.devtools.panels.create() as provided by the Web Extensions API. * Platform/Logging.h: Add Inspector channel for error logging. * Shared/InspectorExtensionTypes.h: Add a missing EnumTraits case. * WebKit.xcodeproj/project.pbxproj: * Sources.txt: Add files. * UIProcess/API/APIInspectorExtension.h: * UIProcess/API/APIInspectorExtension.cpp: (API::InspectorExtension::InspectorExtension): (API::InspectorExtension::create): (API::InspectorExtension::createTab): Inspector extensions need to be able to invoke commands in the WebProcess-side extension proxy controller, so keep a WeakRef to the extension controller that created the extension object. Also, implement the new API by forwarding it on. * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector registerExtensionWithID:displayName:completionHandler:]): Adapt to the new constructor as explained above. * UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h: Expose member m_remoteInspectorPorxy for use in the API::InspectorExtension constructor. * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension initWithIdentifier:]): Deleted. (-[_WKInspectorExtension createTabWithName:tabIconURL:sourceURL:completionHandler:]): Implement new API. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerInternal.h: Added. Make the RefPtr member variable accessible to the API object constructor. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]): Adapt to new constructor as explained above. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::createTabForExtension): Forward the request to the inspector frontend WebProcess. * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Add a new async IPC command for creating a new inspector extension tab. * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::unwrapEvaluationResultAsObject): Added. Pull out the code needed for error-handling this common operation. (WebKit::WebInspectorUIExtensionController::createTabForExtension): Added. Call into InspectorFrontendAPI to request a new tab. Turn the result into an InspectorExtensionError or InspectorExtensionTabID and send the IPC reply. * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h: Fix unified sources fallout. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js trunk/Source/WebInspectorUI/UserInterface/Main.html trunk/Source/WebInspectorUI
[webkit-changes] [270453] trunk/Source
Title: [270453] trunk/Source Revision 270453 Author bb...@apple.com Date 2020-12-04 13:06:17 -0800 (Fri, 04 Dec 2020) Log Message Web Inspector: InspectorFrontendAPIDispatcher should not ignore all exceptions https://bugs.webkit.org/show_bug.cgi?id=219378 Reviewed by Devin Rousso. Source/WebCore: Covered by existing Web Inspector layout tests. * bindings/js/ScriptController.h: Make evaluateInWorld public and exported. * inspector/InspectorFrontendAPIDispatcher.h: * inspector/InspectorFrontendAPIDispatcher.cpp: (WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): (WebCore::InspectorFrontendAPIDispatcher::evaluateExpression): Evaluate and pass along the result whether it's a value or exception. * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::evaluationResultToBoolean): (WebCore::InspectorFrontendClientLocal::isDebuggingEnabled): (WebCore::InspectorFrontendClientLocal::isTimelineProfilingEnabled): (WebCore::InspectorFrontendClientLocal::isProfilingJavaScript): Refactor the common code to take an EvaluationResult and figure out if the value is true or falsy. * platform/Logging.h: Add an Inspector logging channel, for logging errors. Source/WebKit: The underlying method used for frontend _expression_ evaluations is ScriptController::evaluateIgnoringExceptions. This method calls evaluateInWorld and returns nullopt if an exception happens. Switch to using evaluateInWorld directly and using the existing ValueOrException type from in WebCore. Change our EvaluationResult type to use ValueOrException in place of JSC::JSValue. ValueOrException is Expected so this is exposing more error information in addition to the JSC::JSValue. * Platform/Logging.h: Add 'Inspector' log channel for WebKit.framework. * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::WebInspectorUIExtensionController): (WebKit::WebInspectorUIExtensionController::~WebInspectorUIExtensionController): Remove unnecessary debugging code that was accidentally left in/commented out. * WebProcess/Inspector/WebInspectorUIExtensionController.h: (WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromResult): Deleted. (WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromEvaluationResult): Added. (WebKit::WebInspectorUIExtensionController::registerExtension): (WebKit::WebInspectorUIExtensionController::unregisterExtension): Adapt to using the new result type. Use the InspectorExtensionID type where possible. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/ScriptController.h trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.h trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h trunk/Source/WebCore/platform/Logging.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Platform/Logging.h trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.h Diff Modified: trunk/Source/WebCore/ChangeLog (270452 => 270453) --- trunk/Source/WebCore/ChangeLog 2020-12-04 20:53:59 UTC (rev 270452) +++ trunk/Source/WebCore/ChangeLog 2020-12-04 21:06:17 UTC (rev 270453) @@ -1,3 +1,30 @@ +2020-12-04 Brian Burg + +Web Inspector: InspectorFrontendAPIDispatcher should not ignore all exceptions +https://bugs.webkit.org/show_bug.cgi?id=219378 + +Reviewed by Devin Rousso. + +Covered by existing Web Inspector layout tests. + +* bindings/js/ScriptController.h: Make evaluateInWorld public and exported. + +* inspector/InspectorFrontendAPIDispatcher.h: +* inspector/InspectorFrontendAPIDispatcher.cpp: +(WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): +(WebCore::InspectorFrontendAPIDispatcher::evaluateExpression): +Evaluate and pass along the result whether it's a value or exception. + +* inspector/InspectorFrontendClientLocal.h: +* inspector/InspectorFrontendClientLocal.cpp: +(WebCore::InspectorFrontendClientLocal::evaluationResultToBoolean): +(WebCore::InspectorFrontendClientLocal::isDebuggingEnabled): +(WebCore::InspectorFrontendClientLocal::isTimelineProfilingEnabled): +(WebCore::InspectorFrontendClientLocal::isProfilingJavaScript): +Refactor the common code to take an EvaluationResult and figure out if the value is true or falsy. + +* platform/Logging.h: Add an Inspector logging channel, for logging errors. + 2020-12-04 Zalan Bujtas [LFC][Floats] FloatAvoider does not need to keep a pointer to Layout::Box around. Modified: trunk/Source/WebCore/bindings/js/ScriptController.h (270452 => 270453) --- trunk/Source/WebCor
[webkit-changes] [270276] trunk/Tools
Title: [270276] trunk/Tools Revision 270276 Author bb...@apple.com Date 2020-11-30 16:34:36 -0800 (Mon, 30 Nov 2020) Log Message filter-build-webkit: reduce non-actionable warnings from objc runtime and xcodebuild https://bugs.webkit.org/show_bug.cgi?id=219376 Reviewed by Simon Fraser. * Scripts/filter-build-webkit: (shouldIgnoreLine): Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/filter-build-webkit Diff Modified: trunk/Tools/ChangeLog (270275 => 270276) --- trunk/Tools/ChangeLog 2020-12-01 00:30:38 UTC (rev 270275) +++ trunk/Tools/ChangeLog 2020-12-01 00:34:36 UTC (rev 270276) @@ -1,3 +1,13 @@ +2020-11-30 Brian Burg + +filter-build-webkit: reduce non-actionable warnings from objc runtime and xcodebuild +https://bugs.webkit.org/show_bug.cgi?id=219376 + +Reviewed by Simon Fraser. + +* Scripts/filter-build-webkit: +(shouldIgnoreLine): + 2020-11-30 Chris Dumez sessionStorage should not be cloned when a window is opened with rel=noopener Modified: trunk/Tools/Scripts/filter-build-webkit (270275 => 270276) --- trunk/Tools/Scripts/filter-build-webkit 2020-12-01 00:30:38 UTC (rev 270275) +++ trunk/Tools/Scripts/filter-build-webkit 2020-12-01 00:34:36 UTC (rev 270276) @@ -330,6 +330,8 @@ return 1 if $line =~ /^\S+\/$/; return 1 if $line =~ /^sent \d+ bytes/; return 1 if $line =~ /^total size is/; +return 1 if $line =~ /One of the two will be used\. Which one is undefined\./; +return 1 if $line =~ /The Legacy Build System will be removed in a future release/; return 1 if $line =~ /^\( (xcodebuild|if) /; return 1 if $line =~ /^warning\: detected internal install, passing entitlements to simulator anyway\./; return 1 if $line =~ /may not function in the Simulator because Ad Hoc/; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [270149] trunk
Title: [270149] trunk Revision 270149 Author bb...@apple.com Date 2020-11-21 11:08:51 -0800 (Sat, 21 Nov 2020) Log Message Web Inspector: implement Multimap.prototype.take() https://bugs.webkit.org/show_bug.cgi?id=219231 Reviewed by Devin Rousso. Source/WebInspectorUI: * UserInterface/Base/Multimap.js: (Multimap.prototype.take): * UserInterface/Base/Utilities.js: (value): LayoutTests: * inspector/unit-tests/multimap-expected.txt: * inspector/unit-tests/multimap.html: * inspector/unit-tests/set-utilities.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/inspector/unit-tests/multimap-expected.txt trunk/LayoutTests/inspector/unit-tests/multimap.html trunk/LayoutTests/inspector/unit-tests/set-utilities.html trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Multimap.js trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js Diff Modified: trunk/LayoutTests/ChangeLog (270148 => 270149) --- trunk/LayoutTests/ChangeLog 2020-11-21 17:24:24 UTC (rev 270148) +++ trunk/LayoutTests/ChangeLog 2020-11-21 19:08:51 UTC (rev 270149) @@ -1,3 +1,14 @@ +2020-11-21 Brian Burg + +Web Inspector: implement Multimap.prototype.take() +https://bugs.webkit.org/show_bug.cgi?id=219231 + +Reviewed by Devin Rousso. + +* inspector/unit-tests/multimap-expected.txt: +* inspector/unit-tests/multimap.html: +* inspector/unit-tests/set-utilities.html: + 2020-11-21 Aditya Keerthi Space between minute and meridiem fields in time inputs is too large Modified: trunk/LayoutTests/inspector/unit-tests/multimap-expected.txt (270148 => 270149) --- trunk/LayoutTests/inspector/unit-tests/multimap-expected.txt 2020-11-21 17:24:24 UTC (rev 270148) +++ trunk/LayoutTests/inspector/unit-tests/multimap-expected.txt 2020-11-21 19:08:51 UTC (rev 270149) @@ -57,6 +57,35 @@ PASS: Values were removed for key "opossum". [["raccoon","opossum"]] +-- Running test case: Multimap.prototype.take.SingleKeyAndValue +[[0,1],[2,3],[2,4]] +1 +PASS: The key 0 and the value 1 were taken. +PASS: Only one key should remain. +[[2,3],[2,4]] +undefined +PASS: Nothing should have been taken. +PASS: Only one key should remain. +[[2,3],[2,4]] +3 +PASS: The key 2 and the value 3 were taken. +PASS: Only one key should remain. +[[2,4]] +4 +PASS: The key 2 and the value 4 were taken. +PASS: No more keys should remain. +[] + +-- Running test case: Multimap.prototype.take.AllValuesForKey +[["opossum","badger"],["opossum","raccoon"],["raccoon","opossum"]] +PASS: Nothing was removed for key "badger". +[["opossum","badger"],["opossum","raccoon"],["raccoon","opossum"]] +PASS: Only one key should remain. +PASS: Two values from the key "opossum" should be taken. +PASS: Result should include "badger". +PASS: Result should include "raccoon". +[["raccoon","opossum"]] + -- Running test case: Multimap.prototype.clear [["one","two"],["one","five"],["three","four"],["three","six"]] [] Modified: trunk/LayoutTests/inspector/unit-tests/multimap.html (270148 => 270149) --- trunk/LayoutTests/inspector/unit-tests/multimap.html 2020-11-21 17:24:24 UTC (rev 270148) +++ trunk/LayoutTests/inspector/unit-tests/multimap.html 2020-11-21 19:08:51 UTC (rev 270149) @@ -165,6 +165,72 @@ }); suite.addTestCase({ +name: "Multimap.prototype.take.SingleKeyAndValue", +test() { +let multimap = new Multimap; +let result; + +multimap.add(0, 1); +multimap.add(2, 3); +multimap.add(2, 4); + +InspectorTest.log(multimap); + +result = multimap.take(0, 1); +InspectorTest.log(result); +InspectorTest.expectEqual(result, 1, "The key 0 and the value 1 were taken."); +InspectorTest.expectEqual(multimap.size, 1, "Only one key should remain."); + +InspectorTest.log(multimap); + +result = multimap.take(5, 1); +InspectorTest.log(result); +InspectorTest.expectEqual(result, undefined, "Nothing should have been taken."); +InspectorTest.expectEqual(multimap.size, 1, "Only one key should remain."); + +InspectorTest.log(multimap); + +result = multimap.take(2, 3) +InspectorTest.log(result); +InspectorTest.expectEqual(result, 3, "The key 2 and the value 3 were taken."); +InspectorTest.expectEqual(multimap.size, 1, "Only one key should remain."); + +InspectorTest.log(multimap); + +result = multimap.take(2, 4) +InspectorTest.log(result); +InspectorTest.expectEqual(result, 4, "The key 2 and the value 4 were taken."); +InspectorTest.expectEqual(multimap.size, 0, "No more keys should remain."); + +InspectorTest.log(multimap); +}, +}); + +suite.addTestCase({ +name: "Multimap.prototype.take.AllValuesForKey", +test() { +let multimap
[webkit-changes] [269905] trunk/Source/WebKit
Title: [269905] trunk/Source/WebKit Revision 269905 Author bb...@apple.com Date 2020-11-17 09:09:11 -0800 (Tue, 17 Nov 2020) Log Message [Cocoa] _WKInspectorExtensionHost should conform to NSObject protocol https://bugs.webkit.org/show_bug.cgi?id=219035 Reviewed by Alex Christensen. This was overlooked in the initial patch. Without it, we can't call -isEqual: and similar basic methods on a type of id<_WKInspectorExtensionHost>. * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h Diff Modified: trunk/Source/WebKit/ChangeLog (269904 => 269905) --- trunk/Source/WebKit/ChangeLog 2020-11-17 17:07:28 UTC (rev 269904) +++ trunk/Source/WebKit/ChangeLog 2020-11-17 17:09:11 UTC (rev 269905) @@ -1,3 +1,15 @@ +2020-11-17 Brian Burg + +[Cocoa] _WKInspectorExtensionHost should conform to NSObject protocol +https://bugs.webkit.org/show_bug.cgi?id=219035 + +Reviewed by Alex Christensen. + +This was overlooked in the initial patch. Without it, we can't call -isEqual: and +similar basic methods on a type of id<_WKInspectorExtensionHost>. + +* UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: + 2020-11-17 Tim Horton Preemptive build fix for https://bugs.webkit.org/show_bug.cgi?id=219024 Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h (269904 => 269905) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h 2020-11-17 17:07:28 UTC (rev 269904) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h 2020-11-17 17:09:11 UTC (rev 269905) @@ -30,7 +30,7 @@ @class _WKInspectorExtension; -@protocol _WKInspectorExtensionHost +@protocol _WKInspectorExtensionHost @optional /** ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [269806] trunk/Source/WebCore
Title: [269806] trunk/Source/WebCore Revision 269806 Author bb...@apple.com Date 2020-11-13 16:20:47 -0800 (Fri, 13 Nov 2020) Log Message REGRESSION(r269701): inspector/console/webcore-logging.html is crashing https://bugs.webkit.org/show_bug.cgi?id=218840 Reviewed by Devin Rousso. This test is triggering a bizarre backtrace that fails the assertion ASSERT(m_frontendLoaded) in the frontend dispatcher. The sequence of events present in the stack trace is as follows: 1. Test.html finishes loading. 2. DOMContentLoaded event listener eventually calls InspectorFrontendHost::loaded(). 3. InspectorFrontendClient::frontendLoaded() calls -[NSWindow showWindow:] on the inspector window, which makes the inspected webpage window unfocus and resign first responder. 4. Unfocusing causes an activity state change and style recalc. Script is unsafe to execute under this. 5. Synchronously under the style recalc, inspector instrumentation is triggered when layers change. 6. The backend sends a protocol event, which is synchronously dispatched to the frontend. 7. Due to script evaluation being unsafe in (4), the frontend dispatcher tries to suspend. This hits the assertion because the frontend dispatcher hasn't been notified that the frontend finished loading as part of (3). This only affects WebKitLegacy clients, where events 1-7 happen synchronously from top to bottom due to the single process architecture. In the multiprocess case, frontendLoaded is an async IPC message and frontend evaluations are not affected by the state of the inspected page. * inspector/InspectorFrontendAPIDispatcher.cpp: (WebCore::InspectorFrontendAPIDispatcher::frontendLoaded): Dispatch messages iff not suspended. (WebCore::InspectorFrontendAPIDispatcher::suspend): Remove the assertion that is incorrect. Allow clients of this class to call suspend() before frontendLoaded(). (WebCore::InspectorFrontendAPIDispatcher::unsuspend): Using a similar argument as above, it is possible that WebKitLegacy may unsuspend the dispatcher before the frontend has fully loaded. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (269805 => 269806) --- trunk/Source/WebCore/ChangeLog 2020-11-14 00:02:18 UTC (rev 269805) +++ trunk/Source/WebCore/ChangeLog 2020-11-14 00:20:47 UTC (rev 269806) @@ -1,3 +1,38 @@ +2020-11-13 Brian Burg + +REGRESSION(r269701): inspector/console/webcore-logging.html is crashing +https://bugs.webkit.org/show_bug.cgi?id=218840 + + +Reviewed by Devin Rousso. + +This test is triggering a bizarre backtrace that fails the assertion ASSERT(m_frontendLoaded) +in the frontend dispatcher. The sequence of events present in the stack trace is as follows: + +1. Test.html finishes loading. +2. DOMContentLoaded event listener eventually calls InspectorFrontendHost::loaded(). +3. InspectorFrontendClient::frontendLoaded() calls -[NSWindow showWindow:] on the inspector window, + which makes the inspected webpage window unfocus and resign first responder. +4. Unfocusing causes an activity state change and style recalc. Script is unsafe to execute under this. +5. Synchronously under the style recalc, inspector instrumentation is triggered when layers change. +6. The backend sends a protocol event, which is synchronously dispatched to the frontend. +7. Due to script evaluation being unsafe in (4), the frontend dispatcher tries to suspend. + This hits the assertion because the frontend dispatcher hasn't been notified that the frontend + finished loading as part of (3). + +This only affects WebKitLegacy clients, where events 1-7 happen synchronously from top to bottom +due to the single process architecture. In the multiprocess case, frontendLoaded is an async +IPC message and frontend evaluations are not affected by the state of the inspected page. + +* inspector/InspectorFrontendAPIDispatcher.cpp: +(WebCore::InspectorFrontendAPIDispatcher::frontendLoaded): Dispatch messages iff not suspended. + +(WebCore::InspectorFrontendAPIDispatcher::suspend): Remove the assertion that is incorrect. +Allow clients of this class to call suspend() before frontendLoaded(). + +(WebCore::InspectorFrontendAPIDispatcher::unsuspend): Using a similar argument as above, it +is possible that WebKitLegacy may unsuspend the dispatcher before the frontend has fully loaded. + 2020-11-13 Sam Weinig Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml Modified: trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp (269805 => 269806) --- trunk/Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp 2020-11-14 00:02:18 UTC (rev 269805) +++ trunk/Source/WebCore/inspector/InspectorFro
[webkit-changes] [269718] trunk/Source/WebKit
Title: [269718] trunk/Source/WebKit Revision 269718 Author bb...@apple.com Date 2020-11-11 22:30:12 -0800 (Wed, 11 Nov 2020) Log Message REGRESSION(r267411): Unable to "Start Element Selection" with Web Inspector closed https://bugs.webkit.org/show_bug.cgi?id=218838 Reviewed by Devin Rousso. The inspector side of the connection between WebInspector (inspected WebProcess) and WebInspectorUI (inspector WebProcess) was mistakenly removed in r267411. Revert those changes. Without a valid frontend connection, WebInspector cannot forward some IPC messages to WebInspectorUI including StartElementSelection. * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::updateConnection): (WebKit::WebInspectorUI::closeWindow): * WebProcess/Inspector/WebInspectorUI.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.h Diff Modified: trunk/Source/WebKit/ChangeLog (269717 => 269718) --- trunk/Source/WebKit/ChangeLog 2020-11-12 06:24:45 UTC (rev 269717) +++ trunk/Source/WebKit/ChangeLog 2020-11-12 06:30:12 UTC (rev 269718) @@ -1,3 +1,21 @@ +2020-11-11 Brian Burg + +REGRESSION(r267411): Unable to "Start Element Selection" with Web Inspector closed +https://bugs.webkit.org/show_bug.cgi?id=218838 + + +Reviewed by Devin Rousso. + +The inspector side of the connection between WebInspector (inspected WebProcess) and +WebInspectorUI (inspector WebProcess) was mistakenly removed in r267411. Revert those changes. +Without a valid frontend connection, WebInspector cannot forward some IPC messages +to WebInspectorUI including StartElementSelection. + +* WebProcess/Inspector/WebInspectorUI.cpp: +(WebKit::WebInspectorUI::updateConnection): +(WebKit::WebInspectorUI::closeWindow): +* WebProcess/Inspector/WebInspectorUI.h: + 2020-11-11 Said Abou-Hallawa [GPU Process] Delete the DisplayList items: DrawImage and DrawTiledImage Modified: trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp (269717 => 269718) --- trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp 2020-11-12 06:24:45 UTC (rev 269717) +++ trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp 2020-11-12 06:30:12 UTC (rev 269718) @@ -93,6 +93,11 @@ void WebInspectorUI::updateConnection() { +if (m_backendConnection) { +m_backendConnection->invalidate(); +m_backendConnection = nullptr; +} + #if USE(UNIX_DOMAIN_SOCKETS) IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection(); IPC::Connection::Identifier connectionIdentifier(socketPair.server); @@ -118,6 +123,11 @@ return; #endif +#if USE(UNIX_DOMAIN_SOCKETS) || OS(DARWIN) || PLATFORM(WIN) +m_backendConnection = IPC::Connection::createServerConnection(connectionIdentifier, *this); +m_backendConnection->open(); +#endif + WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetFrontendConnection(connectionClientPort), m_inspectedPageIdentifier); } @@ -166,6 +176,11 @@ { WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::DidClose(), m_inspectedPageIdentifier); +if (m_backendConnection) { +m_backendConnection->invalidate(); +m_backendConnection = nullptr; +} + if (m_frontendController) { m_frontendController->setInspectorFrontendClient(nullptr); m_frontendController = nullptr; Modified: trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.h (269717 => 269718) --- trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.h 2020-11-12 06:24:45 UTC (rev 269717) +++ trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.h 2020-11-12 06:30:12 UTC (rev 269718) @@ -172,6 +172,8 @@ std::unique_ptr m_extensionController; #endif +RefPtr m_backendConnection; + WebPageProxyIdentifier m_inspectedPageIdentifier; bool m_underTest { false }; DebuggableInfoData m_debuggableInfo; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [269210] trunk
Title: [269210] trunk Revision 269210 Author bb...@apple.com Date 2020-10-30 16:56:26 -0700 (Fri, 30 Oct 2020) Log Message Web Inspector: move InspectorFrontendAPIDispatcher to WebCore, clean up uses https://bugs.webkit.org/show_bug.cgi?id=217835 Reviewed by Devin Rousso. Source/WebCore: Expose the dispatcher as part of the InspectorFrontendClient API so that other code can use the dispatcher regardless of whether it's a WebInspectorUI or RemoteWebInspectorUI. Add an InspectorFrontendAPIDispatcher instance and getter to InspectorFrontendClientLocal. Adopt the JSONValue-based InspectorFrontendAPIDispatcher::dispatch() method in InspectorFrontendClientLocal. Remove the redundant parallel queuing implementation. Remove redundant public methods that are available on InspectorFrontendAPIDispatcher. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Moved files. * inspector/InspectorFrontendAPIDispatcher.cpp: Renamed from Source/WebKit/WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp. (WebCore::InspectorFrontendAPIDispatcher::InspectorFrontendAPIDispatcher): (WebCore::InspectorFrontendAPIDispatcher::reset): (WebCore::InspectorFrontendAPIDispatcher::frontendLoaded): (WebCore::InspectorFrontendAPIDispatcher::suspend): (WebCore::InspectorFrontendAPIDispatcher::unsuspend): (WebCore::InspectorFrontendAPIDispatcher::dispatchCommand): (WebCore::InspectorFrontendAPIDispatcher::dispatchMessageAsync): (WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): (WebCore::InspectorFrontendAPIDispatcher::evaluateQueuedExpressions): (WebCore::InspectorFrontendAPIDispatcher::evaluateExpression): (WebCore::InspectorFrontendAPIDispatcher::evaluateExpressionForTesting): Add new dispatch() method. Remove other dispatch methods that can be expressed using the new JSON::Value-based method. If it's not possible to evaluate JS immediately, schedule a one-shot task to try again on a different event loop turn. * inspector/InspectorFrontendAPIDispatcher.h: Renamed from Source/WebKit/WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h. Add new dispatch() method which takes a vector of JSON::Value objects and serializes them into command arguments for the frontend. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal): (WebCore::InspectorFrontendClientLocal::frontendLoaded): (WebCore::InspectorFrontendClientLocal::pagePaused): (WebCore::InspectorFrontendClientLocal::pageUnpaused): (WebCore::InspectorFrontendClientLocal::setDockingUnavailable): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled): (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled): (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::showConsole): (WebCore::InspectorFrontendClientLocal::showResources): (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame): Use InspectorFrontendAPIDispatcher to dispatch commands to the frontend. (WebCore::InspectorFrontendClientLocal::dispatch): Deleted. (WebCore::InspectorFrontendClientLocal::dispatchMessage): Deleted. (WebCore::InspectorFrontendClientLocal::dispatchMessageAsync): Deleted. (WebCore::InspectorFrontendClientLocal::evaluateOnLoad): Deleted. These are redundant with InspectorFrontendAPIDispatcher. * testing/Internals.cpp: (WebCore::InspectorStubFrontend::sendMessageToFrontend): Use frontend dispatcher directly. Source/WebKit: Adopt the JSONValue-based InspectorFrontendAPIDispatcher::dispatch() method in WebInspectorUI and RemoteInspectorUI methods that dispatch to the frontend. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Move files. * WebProcess/Inspector/RemoteWebInspectorUI.h: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI): (WebKit::RemoteWebInspectorUI::initialize): (WebKit::RemoteWebInspectorUI::updateFindString): (WebKit::RemoteWebInspectorUI::didSave): (WebKit::RemoteWebInspectorUI::didAppend): (WebKit::RemoteWebInspectorUI::frontendLoaded): (WebKit::RemoteWebInspectorUI::sendMessageToFrontend): (WebKit::RemoteWebInspectorUI::pagePaused): (WebKit::RemoteWebInspectorUI::pageUnpaused): (WebKit::RemoteWebInspectorUI::setDiagnosticLoggingAvailable): * WebProcess/Inspector/WebInspectorUI.h: * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::WebInspectorUI): (WebKit::WebInspectorUI::setDockSide): (WebKit::WebInspectorUI::setDockingUnavailable): (WebKit::WebInspectorUI::setIsVisible): (WebKit::WebInspectorUI::updateFindString): (WebKit::WebInspectorUI::setDiagnosticLoggingAvailable): (WebKit::WebInspectorUI::showConsole): (WebKit::WebInspectorUI::showResources): (WebKit::WebInspectorUI::showMainResourceForFrame): (WebKit::WebInspectorUI::start
[webkit-changes] [269068] trunk
Title: [269068] trunk Revision 269068 Author bb...@apple.com Date 2020-10-27 13:54:03 -0700 (Tue, 27 Oct 2020) Log Message [Cocoa] Introduce _WKInspectorConfiguration for customizing local and remote Web Inspectors https://bugs.webkit.org/show_bug.cgi?id=217896 Reviewed by Devin Rousso. Source/WebKit: Introduce _WKInspectorConfiguration for customizing the behavior of Web Inspector instances. The initial customization is to allow for custom WKURLSchemeHandlers to be used by Web Inspector's WebView to load resources from client-controlled locations. This can be used to implement loading of extension resources using a custom scheme such as web-extension://. Scheme handlers need to be registered at WebView creation time via WKWebViewConfiguration. In order to configure a inspector page summoned from within WebKit (i.e., Inspect Element context menu item), we need to add a method to the UI delegate to get a configuration when the page is being created. This configuration object is used in two different SPI (local and remote cases): - As part of WKUIDelegatePrivate, to retrieve a _WKInspectorConfiguration given a _WKInspector. - As an argument to the _WKRemoteWebInspectorViewController initializer. It's used later as needed. New API test: WKInspectorDelegate.InspectorConfiguration. * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Add new files. * UIProcess/API/APIInspectorConfiguration.h: Added. * UIProcess/API/APIInspectorConfiguration.cpp: Added. * UIProcess/API/Cocoa/_WKInspectorConfiguration.h: Added. * UIProcess/API/Cocoa/_WKInspectorConfigurationInternal.h: Added. * UIProcess/API/Cocoa/_WKInspectorConfiguration.mm: Added. (-[_WKInspectorConfiguration init]): (-[_WKInspectorConfiguration dealloc]): (-[_WKInspectorConfiguration _apiObject]): (-[_WKInspectorConfiguration setURLSchemeHandler:forURLScheme:]): (-[_WKInspectorConfiguration applyToWebViewConfiguration:]): (-[_WKInspectorConfiguration copyWithZone:]): Create _WKInspectorConfiguration and add a method to register WKURLSchemeHandlers. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): Add new API object types. Add missing InspectorExtension. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/API/APIUIClient.h: (API::UIClient::configurationForLocalInspector): * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::UIDelegate::UIClient::configurationForLocalInspector): Add new client/delegate method to fetch an inspector configuration as needed. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController initWithConfiguration:]): Renamed from -init. (-[_WKRemoteWebInspectorViewController init]): Deleted. (-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]): (-[_WKRemoteWebInspectorViewController configurationForDebuggable:]): (-[_WKRemoteWebInspectorViewController _setDiagnosticLoggingDelegate:]): Store a _WKInspectorConfiguration and provide it when asked by RemoteWebInspectorProxy. * UIProcess/Inspector/RemoteWebInspectorProxy.h: * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::load): Store m_debuggableInfo before creating the page and window. It's used from inside platformCreateFrontendPageAndWindow to pass as an argument to the delegate method. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow): * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateFrontendPage): Obtain a configuration and use it to initialize the WKInspectorViewController. * UIProcess/Inspector/mac/WKInspectorViewController.h: * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithConfiguration:inspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController webViewConfiguration]): Renamed from -configuration. (-[WKInspectorViewController initWithInspectedPage:]): Deleted. (-[WKInspectorViewController configuration]): Deleted. Apply the URL scheme handlers registered in the _WKInspectorConfiguration to the WKWebViewConfiguration. * UIProcess/Inspector/glib/RemoteInspectorClient.cpp: * UIProcess/Inspector/socket/RemoteInspectorClient.cpp: Stub out RemoteWebInspectorProxyClient::configurationForRemoteInspector(). * UIProcess/API/Cocoa/_WKUserStyleSheet.h: * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Fix build problems caused by repartitioning of unified sources. Tools: Add an API test for _WKInspectorConfiguration. Disabled for now, will be turned back on when more web extensions API has landed. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (-[SimpleURLSchemeHandler webView:startURLSchemeTask:]): (-[SimpleURLSchemeHandler webView:stopURLSchem
[webkit-changes] [269045] trunk
Title: [269045] trunk Revision 269045 Author bb...@apple.com Date 2020-10-27 09:58:03 -0700 (Tue, 27 Oct 2020) Log Message Web Inspector: add ENABLE(INSPECTOR_EXTENSIONS) to feature defines https://bugs.webkit.org/show_bug.cgi?id=218237 Reviewed by Antti Koivisto. .: * Source/cmake/OptionsMac.cmake: * Source/cmake/WebKitFeatures.cmake: Add ENABLE(INSPECTOR_EXTENSIONS), which is only on for the Cocoa macOS port. Source/WTF: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Add ENABLE(INSPECTOR_EXTENSIONS), which is only on for the Cocoa macOS port. Modified Paths trunk/ChangeLog trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/PlatformEnable.h trunk/Source/WTF/wtf/PlatformEnableCocoa.h trunk/Source/cmake/OptionsMac.cmake trunk/Source/cmake/WebKitFeatures.cmake Diff Modified: trunk/ChangeLog (269044 => 269045) --- trunk/ChangeLog 2020-10-27 16:51:13 UTC (rev 269044) +++ trunk/ChangeLog 2020-10-27 16:58:03 UTC (rev 269045) @@ -1,3 +1,15 @@ +2020-10-27 Brian Burg + +Web Inspector: add ENABLE(INSPECTOR_EXTENSIONS) to feature defines +https://bugs.webkit.org/show_bug.cgi?id=218237 + + +Reviewed by Antti Koivisto. + +* Source/cmake/OptionsMac.cmake: +* Source/cmake/WebKitFeatures.cmake: +Add ENABLE(INSPECTOR_EXTENSIONS), which is only on for the Cocoa macOS port. + 2020-10-26 Keith Rollin Move some initialization code from top-level CMakeLists.txt to WebKitCommon.cmake Modified: trunk/Source/WTF/ChangeLog (269044 => 269045) --- trunk/Source/WTF/ChangeLog 2020-10-27 16:51:13 UTC (rev 269044) +++ trunk/Source/WTF/ChangeLog 2020-10-27 16:58:03 UTC (rev 269045) @@ -1,3 +1,15 @@ +2020-10-27 Brian Burg + +Web Inspector: add ENABLE(INSPECTOR_EXTENSIONS) to feature defines +https://bugs.webkit.org/show_bug.cgi?id=218237 + + +Reviewed by Antti Koivisto. + +* wtf/PlatformEnable.h: +* wtf/PlatformEnableCocoa.h: +Add ENABLE(INSPECTOR_EXTENSIONS), which is only on for the Cocoa macOS port. + 2020-10-15 Tadeu Zagallo Sign MacroAssembler::jumpsToLink Modified: trunk/Source/WTF/wtf/PlatformEnable.h (269044 => 269045) --- trunk/Source/WTF/wtf/PlatformEnable.h 2020-10-27 16:51:13 UTC (rev 269044) +++ trunk/Source/WTF/wtf/PlatformEnable.h 2020-10-27 16:58:03 UTC (rev 269045) @@ -328,6 +328,10 @@ #define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 0 #endif +#if !defined(ENABLE_INSPECTOR_EXTENSIONS) +#define ENABLE_INSPECTOR_EXTENSIONS 0 +#endif + #if !defined(ENABLE_INSPECTOR_TELEMETRY) #define ENABLE_INSPECTOR_TELEMETRY 0 #endif Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (269044 => 269045) --- trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2020-10-27 16:51:13 UTC (rev 269044) +++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2020-10-27 16:58:03 UTC (rev 269045) @@ -272,6 +272,10 @@ #define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1 #endif +#if !defined(ENABLE_INSPECTOR_EXTENSIONS) && PLATFORM(MAC) +#define ENABLE_INSPECTOR_EXTENSIONS 1 +#endif + #if !defined(ENABLE_INSPECTOR_TELEMETRY) #define ENABLE_INSPECTOR_TELEMETRY 1 #endif Modified: trunk/Source/cmake/OptionsMac.cmake (269044 => 269045) --- trunk/Source/cmake/OptionsMac.cmake 2020-10-27 16:51:13 UTC (rev 269044) +++ trunk/Source/cmake/OptionsMac.cmake 2020-10-27 16:58:03 UTC (rev 269045) @@ -50,6 +50,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE_IN_WORKERS PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS PRIVATE ON) +WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INSPECTOR_EXTENSIONS PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INSPECTOR_TELEMETRY PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTERSECTION_OBSERVER PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYOUT_FORMATTING_CONTEXT PRIVATE ON) Modified: trunk/Source/cmake/WebKitFeatures.cmake (269044 => 269045) --- trunk/Source/cmake/WebKitFeatures.cmake 2020-10-27 16:51:13 UTC (rev 269044) +++ trunk/Source/cmake/WebKitFeatures.cmake 2020-10-27 16:58:03 UTC (rev 269045) @@ -151,6 +151,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_INPUT_TYPE_TIME "Toggle Input Type Time support" PRIVATE OFF) WEBKIT_OPTION_DEFINE(ENABLE_INPUT_TYPE_WEEK "Toggle Input Type Week support" PRIVATE OFF) WEBKIT_OPTION_DEFINE(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS "Toggle inspector alternate dispatchers support" PRIVATE OFF) +WEBKIT_OPTION_DEFINE(ENABLE_INSPECTOR_EXTENSIONS "Toggle inspector web extensions support" PRIVATE OFF) WEBKIT_OPTION_DEFINE(ENABLE_INSPECTOR_TELEMETRY "Toggle inspector telemetry support" PRIVATE OFF) WEBKIT_OPTION_DEFINE(ENABLE_INTERSECTION_OBSERVER "Enable Intersection Observer support" PRIVATE ON) WEBKIT_OPTION_DEFINE(ENABLE_IOS_GESTURE_EVENTS "Toggle iOS gesture events support" PRIVATE OFF) ___ webkit-changes mailing list
[webkit-changes] [267950] trunk
Title: [267950] trunk Revision 267950 Author bb...@apple.com Date 2020-10-04 14:47:12 -0700 (Sun, 04 Oct 2020) Log Message [Cocoa] Add WKUIDelegate SPI to inform clients when a _WKInspector is about to close https://bugs.webkit.org/show_bug.cgi?id=217233 Reviewed by Timothy Hatcher and Devin Rousso. Source/WebKit: This is complementary to _webView:didAttachLocalInspector: and works similarly. Clients need to be careful in depending on this during teardown, because it won't come if the UIDelegate has already been cleared out while the inspected page is being closed. API test: WKInspectorDelegate.WillCloseLocalInspector * UIProcess/API/APIUIClient.h: (API::UIClient::willCloseLocalInspector): * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::UIDelegate::UIClient::willCloseLocalInspector): * UIProcess/Inspector/WebInspectorProxy.h: * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::closeFrontendPageAndWindow): Add a guard for reentrant calls to close(). Tools: Add new test case for -_webView:willCloseLocalInspector:. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (-[InspectorDelegate inspectorDidEnableBrowserDomain:]): (-[UIDelegate _webView:didAttachLocalInspector:]): (-[UIDelegate _webView:willCloseLocalInspector:]): (TEST): Clean up how the other test case works so we don't call close from inside a delegate callback. Let's keep our tests structured the same way. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIUIClient.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm Diff Modified: trunk/Source/WebKit/ChangeLog (267949 => 267950) --- trunk/Source/WebKit/ChangeLog 2020-10-04 21:09:14 UTC (rev 267949) +++ trunk/Source/WebKit/ChangeLog 2020-10-04 21:47:12 UTC (rev 267950) @@ -1,3 +1,28 @@ +2020-10-04 Brian Burg + +[Cocoa] Add WKUIDelegate SPI to inform clients when a _WKInspector is about to close +https://bugs.webkit.org/show_bug.cgi?id=217233 + +Reviewed by Timothy Hatcher and Devin Rousso. + +This is complementary to _webView:didAttachLocalInspector: and works similarly. +Clients need to be careful in depending on this during teardown, because it won't +come if the UIDelegate has already been cleared out while the inspected page is being closed. + +API test: WKInspectorDelegate.WillCloseLocalInspector + +* UIProcess/API/APIUIClient.h: +(API::UIClient::willCloseLocalInspector): +* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: +* UIProcess/Cocoa/UIDelegate.h: +* UIProcess/Cocoa/UIDelegate.mm: +(WebKit::UIDelegate::setDelegate): +(WebKit::UIDelegate::UIClient::willCloseLocalInspector): +* UIProcess/Inspector/WebInspectorProxy.h: +* UIProcess/Inspector/WebInspectorProxy.cpp: +(WebKit::WebInspectorProxy::closeFrontendPageAndWindow): +Add a guard for reentrant calls to close(). + 2020-10-03 Yusuke Suzuki [JSC] Introduce JITOperationList to validate JIT-caged pointers Modified: trunk/Source/WebKit/UIProcess/API/APIUIClient.h (267949 => 267950) --- trunk/Source/WebKit/UIProcess/API/APIUIClient.h 2020-10-04 21:09:14 UTC (rev 267949) +++ trunk/Source/WebKit/UIProcess/API/APIUIClient.h 2020-10-04 21:47:12 UTC (rev 267950) @@ -195,6 +195,7 @@ #endif virtual void didAttachLocalInspector(WebKit::WebPageProxy&, WebKit::WebInspectorProxy&) { } +virtual void willCloseLocalInspector(WebKit::WebPageProxy&, WebKit::WebInspectorProxy&) { } }; } // namespace API Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (267949 => 267950) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2020-10-04 21:09:14 UTC (rev 267949) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2020-10-04 21:47:12 UTC (rev 267950) @@ -253,6 +253,12 @@ */ - (void)_webView:(WKWebView *)webView didAttachLocalInspector:(_WKInspector *)inspector WK_API_AVAILABLE(macos(WK_MAC_TBA)); +/*! @abstract Called before closing the Web Inspector instance for this WKWebView. This is not called in the case of remote inspection. +@param webView The WKWebView instance being inspected. +@param inspector The Web Inspector instance being closed. + */ +- (void)_webView:(WKWebView *)webView willCloseLocalInspector:(_WKInspector *)inspector WK_API_AVAILABLE(macos(WK_MAC_TBA)); + #endif // !TARGET_OS_IPHONE @end Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h (267949 => 267950) --- trunk/Source/WebKit/UIProcess/C
[webkit-changes] [267889] trunk/Source/WebKit
Title: [267889] trunk/Source/WebKit Revision 267889 Author bb...@apple.com Date 2020-10-02 10:57:12 -0700 (Fri, 02 Oct 2020) Log Message [Cocoa] Web Inspector: add an ObjC protocol for extension support https://bugs.webkit.org/show_bug.cgi?id=217191 Reviewed by Timothy Hatcher. * UIProcess/API/Cocoa/_WKInspector.h: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h Diff Modified: trunk/Source/WebKit/ChangeLog (267888 => 267889) --- trunk/Source/WebKit/ChangeLog 2020-10-02 17:47:06 UTC (rev 267888) +++ trunk/Source/WebKit/ChangeLog 2020-10-02 17:57:12 UTC (rev 267889) @@ -1,3 +1,13 @@ +2020-10-02 Brian Burg + +[Cocoa] Web Inspector: add an ObjC protocol for extension support +https://bugs.webkit.org/show_bug.cgi?id=217191 + + +Reviewed by Timothy Hatcher. + +* UIProcess/API/Cocoa/_WKInspector.h: + 2020-10-02 Wenson Hsieh [GPU Process] fast/canvas/canvas-createPattern-video-loading.html times out Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h (267888 => 267889) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h 2020-10-02 17:47:06 UTC (rev 267888) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h 2020-10-02 17:57:12 UTC (rev 267889) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Apple Inc. All rights reserved. + * Copyright (C) 2018-2020 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,8 +32,12 @@ NS_ASSUME_NONNULL_BEGIN +@protocol _WKInspectorExtensionHost +- (void)close; +@end + WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2)) -@interface _WKInspector : NSObject +@interface _WKInspector : NSObject <_WKInspectorExtensionHost> - (instancetype)init NS_UNAVAILABLE; @@ -49,7 +53,6 @@ - (void)connect; - (void)show; - (void)hide; -- (void)close; - (void)showConsole; - (void)showResources; - (void)showMainResourceForFrame:(_WKFrameHandle *)frame; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [267793] trunk/Source/WebKit
Title: [267793] trunk/Source/WebKit Revision 267793 Author bb...@apple.com Date 2020-09-30 09:34:59 -0700 (Wed, 30 Sep 2020) Log Message Web Inspector: exempt API::SharedJSContext from remote inspection and automatic inspection https://bugs.webkit.org/show_bug.cgi?id=217109 Reviewed by Mark Lam. We have seen occasional unexpected spins underneath pauseWaitingForRemoteInspection() waiting for this JSContext. Since it does not evaluate _javascript_ and is WebKit-internal, simply disable remote inspection for the JSContext. * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: (API::SharedJSContext::ensureContext): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm Diff Modified: trunk/Source/WebKit/ChangeLog (267792 => 267793) --- trunk/Source/WebKit/ChangeLog 2020-09-30 16:30:38 UTC (rev 267792) +++ trunk/Source/WebKit/ChangeLog 2020-09-30 16:34:59 UTC (rev 267793) @@ -1,3 +1,18 @@ +2020-09-30 Brian Burg + +Web Inspector: exempt API::SharedJSContext from remote inspection and automatic inspection +https://bugs.webkit.org/show_bug.cgi?id=217109 + + +Reviewed by Mark Lam. + +We have seen occasional unexpected spins underneath pauseWaitingForRemoteInspection() waiting +for this JSContext. Since it does not evaluate _javascript_ and is WebKit-internal, simply disable +remote inspection for the JSContext. + +* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: +(API::SharedJSContext::ensureContext): + 2020-09-30 Tim Horton REGRESSION (r265009): Web Share API can no longer be invoked if a previous invocation was dismissed using the close button Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm (267792 => 267793) --- trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm 2020-09-30 16:30:38 UTC (rev 267792) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm 2020-09-30 16:34:59 UTC (rev 267793) @@ -27,7 +27,7 @@ #import "APISerializedScriptValue.h" #import <_javascript_Core/APICast.h> -#import <_javascript_Core/JSContext.h> +#import <_javascript_Core/JSContextPrivate.h> #import <_javascript_Core/JSGlobalObjectInlines.h> #import <_javascript_Core/JSValue.h> #import @@ -46,6 +46,7 @@ { if (!m_context) { m_context = adoptNS([[JSContext alloc] init]); +[m_context _setRemoteInspectionEnabled:NO]; m_timer.startOneShot(1_s); } return m_context.get(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [267545] trunk/Source/WebKit
Title: [267545] trunk/Source/WebKit Revision 267545 Author bb...@apple.com Date 2020-09-24 14:36:45 -0700 (Thu, 24 Sep 2020) Log Message REGRESSION(iOS WebDriver): action chains with 'Touch' pointerType don't work on Mac https://bugs.webkit.org/show_bug.cgi?id=216937 Reviewed by Darin Adler. Before iOS WebDriver shipped, 'Touch' was unconditionally aliased to 'Mouse.' Make sure the aliasing happens for macOS so the command doesn't fail frivolously. * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::performInteractionSequence): Alias 'Touch' to 'Mouse' when touch is not available and mouse is. This is the case for macOS. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (267544 => 267545) --- trunk/Source/WebKit/ChangeLog 2020-09-24 20:10:05 UTC (rev 267544) +++ trunk/Source/WebKit/ChangeLog 2020-09-24 21:36:45 UTC (rev 267545) @@ -1,3 +1,19 @@ +2020-09-24 Brian Burg + +REGRESSION(iOS WebDriver): action chains with 'Touch' pointerType don't work on Mac +https://bugs.webkit.org/show_bug.cgi?id=216937 + + +Reviewed by Darin Adler. + +Before iOS WebDriver shipped, 'Touch' was unconditionally aliased to 'Mouse.' +Make sure the aliasing happens for macOS so the command doesn't fail frivolously. + +* UIProcess/Automation/WebAutomationSession.cpp: +(WebKit::WebAutomationSession::performInteractionSequence): +Alias 'Touch' to 'Mouse' when touch is not available and mouse is. +This is the case for macOS. + 2020-09-24 Kate Cheney CrashTracer: com.apple.WebKit.Networking in NetworkSession::firstPartyHostCNAMEDomain() code Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (267544 => 267545) --- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-09-24 20:10:05 UTC (rev 267544) +++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-09-24 21:36:45 UTC (rev 267545) @@ -1855,6 +1855,9 @@ #if !ENABLE(WEBDRIVER_MOUSE_INTERACTIONS) && ENABLE(WEBDRIVER_TOUCH_INTERACTIONS) if (inputSourceType == SimulatedInputSourceType::Mouse) inputSourceType = SimulatedInputSourceType::Touch; +#elif ENABLE(WEBDRIVER_MOUSE_INTERACTIONS) && !ENABLE(WEBDRIVER_TOUCH_INTERACTIONS) +if (inputSourceType == SimulatedInputSourceType::Touch) +inputSourceType = SimulatedInputSourceType::Mouse; #endif #if !ENABLE(WEBDRIVER_MOUSE_INTERACTIONS) if (inputSourceType == SimulatedInputSourceType::Mouse) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [267411] trunk
Title: [267411] trunk Revision 267411 Author bb...@apple.com Date 2020-09-22 09:14:08 -0700 (Tue, 22 Sep 2020) Log Message [Cocoa] _WKInspectorDelegate should handle showing external resources https://bugs.webkit.org/show_bug.cgi?id=216334 Reviewed by Devin Rousso. Source/WebCore: Adapt to the rename of InspectorFrontendHost.{openInNewTab => openURLExternally}. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::openURLExternally): (WebCore::InspectorFrontendClientLocal::openInNewTab): Deleted. * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::openURLExternally): (WebCore::InspectorFrontendHost::openInNewTab): Deleted. * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: Source/WebInspectorUI: Adapt to the rename of InspectorFrontendHost.{openInNewTab => openURLExternally}. * UserInterface/Base/Main.js: * UserInterface/Debug/UncaughtExceptionReporter.js: (sheetElement.innerHTML.div): * UserInterface/Protocol/InspectorFrontendAPI.js: * UserInterface/Views/ResourceTreeElement.js: (WI.ResourceTreeElement.prototype.ondblclick): Source/WebKit: WebKit clients need a way to control the loading and presentation of external resources that are linked in Web Inspector's user interface. Rename InspectorFrontendHost.openInNewTab to openURLExternally. Change the implementation to forward the request to UIProcess rather than the inspected WebProcess. When a navigation is triggered in WKInspectorViewController's WKWebView, allow the delegate to open the requested resource. Otherwise, redirect the navigation to the inspected WebView or open it using NSWorkspace (for the remote case). New API test: WKInspectorDelegate.OpenURLExternally. * UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h: Added. * UIProcess/API/Cocoa/_WKInspectorTesting.mm: Added. (snippetToOpenURLExternally): (-[_WKInspector _openURLExternallyForTesting:useFrontendAPI:]): Add some helpers for writing API tests. * UIProcess/API/APIInspectorClient.h: (API::InspectorClient::openURLExternally): * UIProcess/API/Cocoa/_WKInspectorDelegate.h: * UIProcess/Cocoa/PageClientImplCocoa.mm: * UIProcess/Inspector/Cocoa/InspectorDelegate.h: * UIProcess/Inspector/Cocoa/InspectorDelegate.mm: (WebKit::InspectorDelegate::setDelegate): (WebKit::InspectorDelegate::InspectorClient::openURLExternally): Add new delegate method to _WKInspectorDelegate. * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: * UIProcess/Inspector/RemoteWebInspectorProxy.h: * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::openURLExternally): (WebKit::RemoteWebInspectorProxy::platformOpenURLExternally): (WebKit::RemoteWebInspectorProxy::openInNewTab): Deleted. (WebKit::RemoteWebInspectorProxy::platformOpenInNewTab): Deleted. * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: (WebKit::RemoteWebInspectorProxy::platformURLExternally): (WebKit::RemoteWebInspectorProxy::platformOpenInNewTab): Deleted. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: (WebKit::RemoteWebInspectorProxy::platformOpenURLExternally): (WebKit::RemoteWebInspectorProxy::platformOpenInNewTab): Deleted. * UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp: (WebKit::RemoteWebInspectorProxy::platformOpenURLExternally): (WebKit::RemoteWebInspectorProxy::platformOpenInNewTab): Deleted. Rename openInNewTab to openURLExternally. In some cases the client may not choose to present a new tab, so the name is no longer accurate. * UIProcess/Inspector/WebInspectorProxy.messages.in: * UIProcess/Inspector/WebInspectorProxy.h: * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::inspectorWindow const): (WebKit::WebInspectorProxy::openURLExternally): (WebKit::WebInspectorProxy::evaluateInFrontendForTesting): * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter inspectorViewController:openURLExternally:]): Add some helpers for writing API tests. Add an IPC message for evaluating a _javascript_ _expression_ in the frontend page. Also, add a message receiver for the OpenURLExternally message which passes the request to the API layer. * UIProcess/Inspector/mac/WKInspectorViewController.h: * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): Call the delegate method if a navigation inside the inspector WKWebView is an external URL. Specifically the request is to load something other than the Web Inspector's main HTML page. * WebProcess/Inspector/WebInspector.cpp: (WebKit::WebInspector::openInNewTab): Deleted. * WebProcess/Inspector/WebInspector.h: * WebProcess/Inspector/WebInspector.messages.in: No need to handle this message anymore in the inspected WebProcess. * WebProcess/Inspector/RemoteWebInspectorUI.h: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::Re
[webkit-changes] [266890] trunk
Title: [266890] trunk Revision 266890 Author bb...@apple.com Date 2020-09-10 14:40:11 -0700 (Thu, 10 Sep 2020) Log Message Web Inspector: _WKInspectorDelegate should be attached to _WKInspector not WKWebView https://bugs.webkit.org/show_bug.cgi?id=215961 Reviewed by Devin Rousso. Source/WebKit: Move _WKInspectorDelegate to be a property of _WKInspector. If there is no _WKInspector available (i.e. for iOS), the delegate cannot be set. As part of this change, move -didAttachLocalInspector: back to UIDelegatePrivate. This delegate method is called just as the inspector is shown, so there would be no way to act upon this message if it were part of _WKInspectorDelegate. Now, -didAttachLocalInspector: is the designated time to attach _WKInspectorDelegate. Covered by existing API tests. * UIProcess/API/APIInspectorClient.h: (API::InspectorClient::browserDomainEnabled): (API::InspectorClient::browserDomainDisabled): (API::InspectorClient::didAttachLocalInspector): Deleted. * UIProcess/API/APIUIClient.h: (API::UIClient::didAttachLocalInspector): * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): (-[WKWebView _inspectorDelegate]): Deleted. (-[WKWebView _setInspectorDelegate:]): Deleted. * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/API/Cocoa/_WKInspector.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector dealloc]): Added. (-[_WKInspector delegate]): Added. (-[_WKInspector setDelegate:]): Added. Since _WKInspector/WebInspectorProxy is always created internally instead of via ObjC initializer, we need to initialize ivars before using them, as there is no other place for them to be initialized. * UIProcess/API/Cocoa/_WKInspectorDelegate.h: * UIProcess/API/Cocoa/_WKInspectorInternal.h: * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::UIDelegate::UIClient::didAttachLocalInspector): * UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp: (WebKit::InspectorBrowserAgent::enable): (WebKit::InspectorBrowserAgent::disable): * UIProcess/Inspector/Cocoa/InspectorDelegate.h: * UIProcess/Inspector/Cocoa/InspectorDelegate.mm: (WebKit::InspectorDelegate::InspectorDelegate): (WebKit::InspectorDelegate::setDelegate): (WebKit::InspectorDelegate::InspectorClient::browserDomainEnabled): (WebKit::InspectorDelegate::InspectorClient::browserDomainDisabled): (WebKit::InspectorDelegate::InspectorClient::didAttachLocalInspector): Deleted. * UIProcess/Inspector/WebInspectorProxy.h: (WebKit::WebInspectorProxy::inspectorClient): * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): (WebKit::WebInspectorProxy::setInspectorClient): (WebKit::WebInspectorProxy::openLocalInspectorFrontend): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::inspectorClient): Deleted. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::setInspectorClient): Deleted. Similar to the Cocoa SPI, move InspectorClient from WebPageProxy to WebInspectorProxy. Tools: Refactor the test to set the _WKInspectorDelegate correctly. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKInspectorDelegate.mm. (-[InspectorDelegate inspectorDidEnableBrowserDomain:]): (-[InspectorDelegate inspectorDidDisableBrowserDomain:]): (-[UIDelegate _webView:didAttachLocalInspector:]): (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/API/APIInspectorClient.h trunk/Source/WebKit/UIProcess/API/APIUIClient.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorDelegate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm trunk/Source/WebKit/UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.h trunk/Source/WebKit/UIProcess/Inspector/Cocoa/InspectorDelegate.mm trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.h trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/WebPageProxy.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm Removed Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKInspectorDelegate.mm Diff Modified: trunk/Source/WebKit
[webkit-changes] [266225] trunk/Source
Title: [266225] trunk/Source Revision 266225 Author bb...@apple.com Date 2020-08-26 23:46:54 -0700 (Wed, 26 Aug 2020) Log Message Web Inspector: button for Inspector^2 doesn't work without setting default for DeveloperExtrasEnabled https://bugs.webkit.org/show_bug.cgi?id=215828 Reviewed by Devin Rousso. Source/WebCore: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::inspectInspector): Explicitly set DeveloperExtrasEnabled for the Inspector web view so that the Inspect context menu appears and so the [2] button works as expected. Source/WebInspectorUI: Drive-by: because the Inspector^2 button is text-only and has no .name element, the '2' button does not become dimmed when the window is inactive, unlike every other item in the tab bar. Fix this by coloring the text-only button similar to tab labels. * UserInterface/Debug/Bootstrap.css: (body.window-inactive .tab-bar > .navigation-bar .item.button.text-only): (.tab-bar > .navigation-bar .item.button.text-only): (.tab-bar > .navigation-bar .item.button.text-only:not(.selected):hover): (.tab-bar > .navigation-bar .item.button.text-only:not(.disabled).selected): (body.window-inactive .tab-bar > .navigation-bar .item.button.text-only:not(.disabled).selected >): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css Diff Modified: trunk/Source/WebCore/ChangeLog (266224 => 266225) --- trunk/Source/WebCore/ChangeLog 2020-08-27 05:43:04 UTC (rev 266224) +++ trunk/Source/WebCore/ChangeLog 2020-08-27 06:46:54 UTC (rev 266225) @@ -1,3 +1,15 @@ +2020-08-26 Brian Burg +Web Inspector: button for Inspector^2 doesn't work without setting default for DeveloperExtrasEnabled +https://bugs.webkit.org/show_bug.cgi?id=215828 + +Reviewed by Devin Rousso. + +* inspector/InspectorFrontendHost.cpp: +(WebCore::InspectorFrontendHost::inspectInspector): +Explicitly set DeveloperExtrasEnabled for the Inspector +web view so that the Inspect context menu appears and +so the [2] button works as expected. + 2020-08-26 Zalan Bujtas [LFC][IFC] LineBuilder should not align the runs Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (266224 => 266225) --- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp 2020-08-27 05:43:04 UTC (rev 266224) +++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp 2020-08-27 06:46:54 UTC (rev 266225) @@ -546,8 +546,10 @@ void InspectorFrontendHost::inspectInspector() { -if (m_frontendPage) +if (m_frontendPage) { +m_frontendPage->settings().setDeveloperExtrasEnabled(true); m_frontendPage->inspectorController().show(); +} } bool InspectorFrontendHost::isBeingInspected() Modified: trunk/Source/WebInspectorUI/ChangeLog (266224 => 266225) --- trunk/Source/WebInspectorUI/ChangeLog 2020-08-27 05:43:04 UTC (rev 266224) +++ trunk/Source/WebInspectorUI/ChangeLog 2020-08-27 06:46:54 UTC (rev 266225) @@ -1,3 +1,22 @@ +2020-08-26 Brian Burg + +Web Inspector: button for Inspector^2 doesn't work without setting default for DeveloperExtrasEnabled +https://bugs.webkit.org/show_bug.cgi?id=215828 + +Reviewed by Devin Rousso. + +Drive-by: because the Inspector^2 button is text-only and has no +.name element, the '2' button does not become dimmed when the +window is inactive, unlike every other item in the tab bar. +Fix this by coloring the text-only button similar to tab labels. + +* UserInterface/Debug/Bootstrap.css: +(body.window-inactive .tab-bar > .navigation-bar .item.button.text-only): +(.tab-bar > .navigation-bar .item.button.text-only): +(.tab-bar > .navigation-bar .item.button.text-only:not(.selected):hover): +(.tab-bar > .navigation-bar .item.button.text-only:not(.disabled).selected): +(body.window-inactive .tab-bar > .navigation-bar .item.button.text-only:not(.disabled).selected >): + 2020-08-26 Devin Rousso Web Inspector: REGRESSION(r266074): cannot edit _javascript_ breakpoints Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css (266224 => 266225) --- trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css 2020-08-27 05:43:04 UTC (rev 266224) +++ trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css 2020-08-27 06:46:54 UTC (rev 266225) @@ -36,3 +36,23 @@ .tab-bar > .navigation-bar .inspect-inspector { width: 1em !important; } + +/* These rules are adapted from TabBar.css and are expected to match. */ +body.window-inactive .tab-bar > .navigation-bar .item.button.text-only { +color: hsla(0, 0%, var(--foreground-lightness), 0.4); +} +.tab-bar > .navigation-bar .item.button.text-only { +color: hsla(0, 0%, var(--foreground-lightness), 0.6); +} + +.tab-bar > .navi
[webkit-changes] [265537] trunk/Tools
Title: [265537] trunk/Tools Revision 265537 Author bb...@apple.com Date 2020-08-11 16:57:15 -0700 (Tue, 11 Aug 2020) Log Message REGRESSION(r?): build-webkit --inspector-frontend always builds ImageDiff https://bugs.webkit.org/show_bug.cgi?id=215393 Reviewed by Darin Adler. * Scripts/build-webkit: exit after building projects if --inspector-frontend is passed. This flag is for desk builds only and not used by build infrastructure. We don't need to build ImageDiff when iterating on the Web Inspector frontend. Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/build-webkit Diff Modified: trunk/Tools/ChangeLog (265536 => 265537) --- trunk/Tools/ChangeLog 2020-08-11 23:55:33 UTC (rev 265536) +++ trunk/Tools/ChangeLog 2020-08-11 23:57:15 UTC (rev 265537) @@ -1,3 +1,15 @@ +2020-08-11 Brian Burg + +REGRESSION(r?): build-webkit --inspector-frontend always builds ImageDiff +https://bugs.webkit.org/show_bug.cgi?id=215393 + + +Reviewed by Darin Adler. + +* Scripts/build-webkit: exit after building projects if --inspector-frontend is passed. +This flag is for desk builds only and not used by build infrastructure. We don't need to build ImageDiff +when iterating on the Web Inspector frontend. + 2020-08-11 Keith Rollin Update filter-build-webkit for unknown/unhandled messages Modified: trunk/Tools/Scripts/build-webkit (265536 => 265537) --- trunk/Tools/Scripts/build-webkit 2020-08-11 23:55:33 UTC (rev 265536) +++ trunk/Tools/Scripts/build-webkit 2020-08-11 23:57:15 UTC (rev 265537) @@ -367,6 +367,10 @@ } } +if (isInspectorFrontend()) { +exit exitStatus($result); +} + # Build ImageDiff for host my @command = File::Spec->catfile(getcwd(), "/Tools/Scripts/build-imagediff"); chdirWebKit(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [265439] trunk/Tools
Title: [265439] trunk/Tools Revision 265439 Author bb...@apple.com Date 2020-08-10 12:25:26 -0700 (Mon, 10 Aug 2020) Log Message Unreviewed, fix ordering of contributors. * Scripts/webkitpy/common/config/contributors.json: Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/common/config/contributors.json Diff Modified: trunk/Tools/ChangeLog (265438 => 265439) --- trunk/Tools/ChangeLog 2020-08-10 17:55:09 UTC (rev 265438) +++ trunk/Tools/ChangeLog 2020-08-10 19:25:26 UTC (rev 265439) @@ -1,3 +1,9 @@ +2020-08-10 Brian Burg + +Unreviewed, fix ordering of contributors. + +* Scripts/webkitpy/common/config/contributors.json: + 2020-08-09 Wenson Hsieh REGRESSION (r260831): Web process crashes under Editor::setComposition() after navigating with marked text Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (265438 => 265439) --- trunk/Tools/Scripts/webkitpy/common/config/contributors.json 2020-08-10 17:55:09 UTC (rev 265438) +++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json 2020-08-10 19:25:26 UTC (rev 265439) @@ -2615,22 +2615,22 @@ "fawek" ] }, - "James Darpinian" : { + "James Craig" : { "emails" : [ - "jdarpin...@chromium.org" + "jcr...@apple.com", + "ja...@cookiecrook.com" ], - "expertise" : "WebGL (Chromium and Safari ports)", "nicks" : [ - "darpinian" + "jcraig" ] }, - "James Craig" : { + "James Darpinian" : { "emails" : [ - "jcr...@apple.com", - "ja...@cookiecrook.com" + "jdarpin...@chromium.org" ], + "expertise" : "WebGL (Chromium and Safari ports)", "nicks" : [ - "jcraig" + "darpinian" ] }, "James Hawkins" : { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [265224] trunk/Source/WebInspectorUI
Title: [265224] trunk/Source/WebInspectorUI Revision 265224 Author bb...@apple.com Date 2020-08-03 15:16:02 -0700 (Mon, 03 Aug 2020) Log Message Web Inspector: "Show transparency grid" string needs to be disambiguated for localization https://bugs.webkit.org/show_bug.cgi?id=215101 Reviewed by Darin Adler. Add two different string keys with the same English translation. This is specifically needed for Portuguese, apparently. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView): * UserInterface/Views/GraphicsOverviewContentView.js: (WI.GraphicsOverviewContentView): * UserInterface/Views/ImageResourceContentView.js: * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): * UserInterface/Views/ResourceCollectionContentView.js: (WI.ResourceCollectionContentView): * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createSourcesSettingsView): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js trunk/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js trunk/Source/WebInspectorUI/UserInterface/Views/GraphicsOverviewContentView.js trunk/Source/WebInspectorUI/UserInterface/Views/ImageResourceContentView.js trunk/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js trunk/Source/WebInspectorUI/UserInterface/Views/ResourceCollectionContentView.js trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (265223 => 265224) --- trunk/Source/WebInspectorUI/ChangeLog 2020-08-03 22:14:10 UTC (rev 265223) +++ trunk/Source/WebInspectorUI/ChangeLog 2020-08-03 22:16:02 UTC (rev 265224) @@ -1,3 +1,26 @@ +2020-08-03 Brian Burg + +Web Inspector: "Show transparency grid" string needs to be disambiguated for localization +https://bugs.webkit.org/show_bug.cgi?id=215101 + +Reviewed by Darin Adler. + +Add two different string keys with the same English translation. This is specifically +needed for Portuguese, apparently. + +* Localizations/en.lproj/localizedStrings.js: +* UserInterface/Views/CanvasContentView.js: +(WI.CanvasContentView): +* UserInterface/Views/GraphicsOverviewContentView.js: +(WI.GraphicsOverviewContentView): +* UserInterface/Views/ImageResourceContentView.js: +* UserInterface/Views/RecordingContentView.js: +(WI.RecordingContentView): +* UserInterface/Views/ResourceCollectionContentView.js: +(WI.ResourceCollectionContentView): +* UserInterface/Views/SettingsTabContentView.js: +(WI.SettingsTabContentView.prototype._createSourcesSettingsView): + 2020-08-03 Devin Rousso Web Inspector: REGRESSION(r243301): Network: initiator column missing Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (265223 => 265224) --- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2020-08-03 22:14:10 UTC (rev 265223) +++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2020-08-03 22:16:02 UTC (rev 265224) @@ -1147,7 +1147,8 @@ localizedStrings["Show rulers"] = "Show rulers"; localizedStrings["Show the details sidebar (%s)"] = "Show the details sidebar (%s)"; localizedStrings["Show the navigation sidebar (%s)"] = "Show the navigation sidebar (%s)"; -localizedStrings["Show transparency grid"] = "Show transparency grid"; +localizedStrings["Show transparency grid (tooltip)"] = "Show transparency grid"; +localizedStrings["Show transparency grid (settings label)"] = "Show transparency grid"; localizedStrings["Show type information"] = "Show type information"; localizedStrings["Show:"] = "Show:"; localizedStrings["Site-specific Hacks"] = "Site-specific Hacks"; Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js (265223 => 265224) --- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js 2020-08-03 22:14:10 UTC (rev 265223) +++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js 2020-08-03 22:16:02 UTC (rev 265224) @@ -47,7 +47,7 @@ this._refreshButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low; this._refreshButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this.handleRefreshButtonClicked, this); -this._showGridButtonNavigationItem = new WI.ActivateButtonNavigationItem("show-grid", WI.UIString("Show transparency grid"), WI.UIString("Hide transparency grid"), "Images/NavigationItemCheckers.svg", 13, 13); +this._showGridButtonNavigationItem = new WI.ActivateButtonNavigationItem("show-grid", WI.UIString("Show transparency grid", "Show transparency grid (tooltip)"), WI.UIString("Hide transparency grid"), "Images/NavigationItemCheckers.svg", 13, 13); this._showGridBu
[webkit-changes] [265207] trunk/Source/WebCore
Title: [265207] trunk/Source/WebCore Revision 265207 Author bb...@apple.com Date 2020-08-03 11:00:44 -0700 (Mon, 03 Aug 2020) Log Message [WebDriver] window.print should not invoke native UI https://bugs.webkit.org/show_bug.cgi?id=215084 Reviewed by Devin Rousso. This could be handled at a higher level if there is a valid use case to allow printing, but I'm not aware of one. For now, this fixes a script evaluation hang on Mac and iOS. * page/DOMWindow.cpp: (WebCore::DOMWindow::print): Don't call out to print delegates if this is a WebDriver-controlled page. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/DOMWindow.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (265206 => 265207) --- trunk/Source/WebCore/ChangeLog 2020-08-03 17:49:37 UTC (rev 265206) +++ trunk/Source/WebCore/ChangeLog 2020-08-03 18:00:44 UTC (rev 265207) @@ -1,3 +1,17 @@ +2020-08-03 Brian Burg + +[WebDriver] window.print should not invoke native UI +https://bugs.webkit.org/show_bug.cgi?id=215084 + +Reviewed by Devin Rousso. + +This could be handled at a higher level if there is a valid use case to allow printing, +but I'm not aware of one. For now, this fixes a script evaluation hang on Mac and iOS. + +* page/DOMWindow.cpp: +(WebCore::DOMWindow::print): +Don't call out to print delegates if this is a WebDriver-controlled page. + 2020-08-03 Rob Buis Remove unused API in HighlightMap Modified: trunk/Source/WebCore/page/DOMWindow.cpp (265206 => 265207) --- trunk/Source/WebCore/page/DOMWindow.cpp 2020-08-03 17:49:37 UTC (rev 265206) +++ trunk/Source/WebCore/page/DOMWindow.cpp 2020-08-03 18:00:44 UTC (rev 265207) @@ -1069,6 +1069,9 @@ return; } +if (page->isControlledByAutomation()) +return; + if (frame->loader().activeDocumentLoader()->isLoading()) { m_shouldPrintWhenFinishedLoading = true; return; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [265201] trunk/Tools
Title: [265201] trunk/Tools Revision 265201 Author bb...@apple.com Date 2020-08-03 09:59:25 -0700 (Mon, 03 Aug 2020) Log Message REGRESSION(r264766) webkitpy: newly added --suite flag conflicts with other --suite flags in safaripy https://bugs.webkit.org/show_bug.cgi?id=215038 Reviewed by Jonathan Bedard. * Scripts/webkitpy/results/options.py: (upload_options): For compatibility, make it possible to create the option with a differently-named flag. Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/results/options.py Diff Modified: trunk/Tools/ChangeLog (265200 => 265201) --- trunk/Tools/ChangeLog 2020-08-03 16:54:52 UTC (rev 265200) +++ trunk/Tools/ChangeLog 2020-08-03 16:59:25 UTC (rev 265201) @@ -1,3 +1,14 @@ +2020-08-03 Brian Burg + +REGRESSION(r264766) webkitpy: newly added --suite flag conflicts with other --suite flags in safaripy +https://bugs.webkit.org/show_bug.cgi?id=215038 + +Reviewed by Jonathan Bedard. + +* Scripts/webkitpy/results/options.py: +(upload_options): +For compatibility, make it possible to create the option with a differently-named flag. + 2020-08-03 Philippe Normand [WPE][GTK] run-minibrowser no longer assumes release configuration by default Modified: trunk/Tools/Scripts/webkitpy/results/options.py (265200 => 265201) --- trunk/Tools/Scripts/webkitpy/results/options.py 2020-08-03 16:54:52 UTC (rev 265200) +++ trunk/Tools/Scripts/webkitpy/results/options.py 2020-08-03 16:59:25 UTC (rev 265201) @@ -23,7 +23,7 @@ import optparse -def upload_options(): +def upload_options(suite_name_flag='suite'): return [ optparse.make_option('--report', action='', dest='report_urls', help='URL (or URLs) to report test results to'), optparse.make_option('--buildbot-master', help='The url of the buildbot master.'), @@ -31,5 +31,5 @@ optparse.make_option('--build-number', help='The buildbot build number tests are associated with.'), optparse.make_option('--buildbot-worker', help='The buildbot worker tests were run on.'), optparse.make_option('--result-report-flavor', help='Optional flag for categorizing test runs which do not fit into other configuration options.'), -optparse.make_option('--suite', help='Optional flag for overriding reported suite name.', default=None), +optparse.make_option('--' + suite_name_flag, help='Optional flag for overriding reported suite name.', default=None), ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [265027] trunk/Source/WebInspectorUI
Title: [265027] trunk/Source/WebInspectorUI Revision 265027 Author bb...@apple.com Date 2020-07-28 21:31:28 -0700 (Tue, 28 Jul 2020) Log Message Web Inspector: REGRESSION(r255396): Audit: button to exit edit mode in main content area is missing border https://bugs.webkit.org/show_bug.cgi?id=214898 Reviewed by Devin Rousso. * UserInterface/Base/Main.js: codify that this function only accepts ButtonNavigationItems. Future developers, you'll need to adjust the CSS for non-button navigation items to work out. * UserInterface/Views/Main.css: (.navigation-item-help > .navigation-bar > .item.button): (.navigation-item-help > .navigation-bar > .item.button:not(.text-only)): (.navigation-item-help > .navigation-bar > .item.button.text-only): (.navigation-item-help > .navigation-bar > .item): Deleted. (.navigation-item-help > .navigation-bar > .item:not(.text-only)): Deleted. (.navigation-item-help > .navigation-bar > .item.text-only): Deleted. Split out the rules for text-only buttons. The regressing change added more specificity for the text + image case which made the border transparent and removed extra padding. Also add .button since we only expect buttons to be used in this context. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Views/Main.css Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (265026 => 265027) --- trunk/Source/WebInspectorUI/ChangeLog 2020-07-29 01:58:54 UTC (rev 265026) +++ trunk/Source/WebInspectorUI/ChangeLog 2020-07-29 04:31:28 UTC (rev 265027) @@ -1,5 +1,27 @@ 2020-07-28 Brian Burg +Web Inspector: REGRESSION(r255396): Audit: button to exit edit mode in main content area is missing border +https://bugs.webkit.org/show_bug.cgi?id=214898 + + +Reviewed by Devin Rousso. + +* UserInterface/Base/Main.js: codify that this function only accepts ButtonNavigationItems. +Future developers, you'll need to adjust the CSS for non-button navigation items to work out. + +* UserInterface/Views/Main.css: +(.navigation-item-help > .navigation-bar > .item.button): +(.navigation-item-help > .navigation-bar > .item.button:not(.text-only)): +(.navigation-item-help > .navigation-bar > .item.button.text-only): +(.navigation-item-help > .navigation-bar > .item): Deleted. +(.navigation-item-help > .navigation-bar > .item:not(.text-only)): Deleted. +(.navigation-item-help > .navigation-bar > .item.text-only): Deleted. +Split out the rules for text-only buttons. The regressing change added more specificity +for the text + image case which made the border transparent and removed extra padding. +Also add .button since we only expect buttons to be used in this context. + +2020-07-28 Brian Burg + REGRESSION(r262716) Web Inspector: start button is misaligned in Audit content view https://bugs.webkit.org/show_bug.cgi?id=214891 Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (265026 => 265027) --- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2020-07-29 01:58:54 UTC (rev 265026) +++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2020-07-29 04:31:28 UTC (rev 265027) @@ -2939,7 +2939,7 @@ WI.createNavigationItemHelp = function(formatString, navigationItem) { console.assert(typeof formatString === "string"); -console.assert(navigationItem instanceof WI.NavigationItem); +console.assert(navigationItem instanceof WI.ButtonNavigationItem); function append(a, b) { a.append(b); Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Main.css (265026 => 265027) --- trunk/Source/WebInspectorUI/UserInterface/Views/Main.css 2020-07-29 01:58:54 UTC (rev 265026) +++ trunk/Source/WebInspectorUI/UserInterface/Views/Main.css 2020-07-29 04:31:28 UTC (rev 265027) @@ -235,14 +235,22 @@ vertical-align: -3px; } -.navigation-item-help > .navigation-bar > .item { +.navigation-item-help > .navigation-bar > .item.button { height: 100%; -padding: 0 4px !important; font-size: 11px; border-radius: 4px; border: solid 1px var(--border-color); } +.navigation-item-help > .navigation-bar > .item.button:not(.text-only) { +padding: 0 4px !important; +} + +/* Note: this is necessary due to the specificity of `.navigation-bar .item.button.text-only` */ +.navigation-item-help > .navigation-bar > .item.button.text-only { +border: solid 1px var(--border-color); +} + .message-text-view.error { color: var(--error-text-color); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [265008] trunk/Source/WebInspectorUI
Title: [265008] trunk/Source/WebInspectorUI Revision 265008 Author bb...@apple.com Date 2020-07-28 14:34:36 -0700 (Tue, 28 Jul 2020) Log Message REGRESSION(r262716) Web Inspector: start button is misaligned in Audit content view https://bugs.webkit.org/show_bug.cgi?id=214891 Reviewed by Devin Rousso. In r262716, a rendering defect related to flexbox was fixed. Web Inspector layout inadvertently relied on the defect. Now that it's fixed, a CSS rule is pushing the outline for navigation help buttons out of vertical alignment with surrounding textt. * UserInterface/Views/Main.css: (.navigation-item-help): Remove line-height. It was previously ignored due to a layout bug, and now its presence messes up vertical alignment. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Views/Main.css Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (265007 => 265008) --- trunk/Source/WebInspectorUI/ChangeLog 2020-07-28 21:20:17 UTC (rev 265007) +++ trunk/Source/WebInspectorUI/ChangeLog 2020-07-28 21:34:36 UTC (rev 265008) @@ -1,3 +1,19 @@ +2020-07-28 Brian Burg + +REGRESSION(r262716) Web Inspector: start button is misaligned in Audit content view +https://bugs.webkit.org/show_bug.cgi?id=214891 + +Reviewed by Devin Rousso. + +In r262716, a rendering defect related to flexbox was fixed. Web Inspector +layout inadvertently relied on the defect. Now that it's fixed, a CSS rule is +pushing the outline for navigation help buttons out of vertical alignment +with surrounding textt. + +* UserInterface/Views/Main.css: +(.navigation-item-help): Remove line-height. It was previously ignored +due to a layout bug, and now its presence messes up vertical alignment. + 2020-07-27 Nikita Vasilyev Web Inspector: Change default tab order to display most commonly used tabs first Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Main.css (265007 => 265008) --- trunk/Source/WebInspectorUI/UserInterface/Views/Main.css 2020-07-28 21:20:17 UTC (rev 265007) +++ trunk/Source/WebInspectorUI/UserInterface/Views/Main.css 2020-07-28 21:34:36 UTC (rev 265008) @@ -225,7 +225,6 @@ .navigation-item-help { display: block; -line-height: 22px; } .navigation-item-help > .navigation-bar { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [264803] trunk/Source/WebKit
Title: [264803] trunk/Source/WebKit Revision 264803 Author bb...@apple.com Date 2020-07-23 15:48:27 -0700 (Thu, 23 Jul 2020) Log Message Web Inspector: developerExtrasEnabled should be respected when opening local Web Inspector (part 2) https://bugs.webkit.org/show_bug.cgi?id=214669 Reviewed by Devin Rousso and Joseph Pecoraro. * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::save): (WebKit::WebInspectorProxy::append): Add missing check for developerExtrasEnabled. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (264802 => 264803) --- trunk/Source/WebKit/ChangeLog 2020-07-23 22:35:06 UTC (rev 264802) +++ trunk/Source/WebKit/ChangeLog 2020-07-23 22:48:27 UTC (rev 264803) @@ -1,3 +1,14 @@ +2020-07-23 Brian Burg + +Web Inspector: developerExtrasEnabled should be respected when opening local Web Inspector (part 2) +https://bugs.webkit.org/show_bug.cgi?id=214669 + +Reviewed by Devin Rousso and Joseph Pecoraro. + +* UIProcess/Inspector/WebInspectorProxy.cpp: +(WebKit::WebInspectorProxy::save): +(WebKit::WebInspectorProxy::append): Add missing check for developerExtrasEnabled. + 2020-07-23 Sihui Liu Allow IndexedDB in third-party frames Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp (264802 => 264803) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2020-07-23 22:35:06 UTC (rev 264802) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2020-07-23 22:48:27 UTC (rev 264803) @@ -673,6 +673,9 @@ void WebInspectorProxy::save(const String& filename, const String& content, bool base64Encoded, bool forceSaveAs) { +if (!m_inspectedPage->preferences().developerExtrasEnabled()) +return; + ASSERT(!filename.isEmpty()); if (filename.isEmpty()) return; @@ -682,6 +685,9 @@ void WebInspectorProxy::append(const String& filename, const String& content) { +if (!m_inspectedPage->preferences().developerExtrasEnabled()) +return; + ASSERT(!filename.isEmpty()); if (filename.isEmpty()) return; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [264717] trunk/Source/WebInspectorUI
Title: [264717] trunk/Source/WebInspectorUI Revision 264717 Author bb...@apple.com Date 2020-07-22 11:59:45 -0700 (Wed, 22 Jul 2020) Log Message Web Inspector: Sources tab empty, sidebar nonfunctional https://bugs.webkit.org/show_bug.cgi?id=214611 Reviewed by Devin Rousso. This is caused when a subresource fails its initial load. This generates a networking IssueMessage without a source code location, which is not adequately handled. * UserInterface/Views/IssueTreeElement.js: (WI.IssueTreeElement.prototype._updateTitles): (WI.IssueTreeElement): If there is no sourceCodeLocation for the issue, then don't try to compute line numbers. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Views/IssueTreeElement.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (264716 => 264717) --- trunk/Source/WebInspectorUI/ChangeLog 2020-07-22 18:47:32 UTC (rev 264716) +++ trunk/Source/WebInspectorUI/ChangeLog 2020-07-22 18:59:45 UTC (rev 264717) @@ -1,3 +1,19 @@ +2020-07-22 Brian Burg + +Web Inspector: Sources tab empty, sidebar nonfunctional +https://bugs.webkit.org/show_bug.cgi?id=214611 + + +Reviewed by Devin Rousso. + +This is caused when a subresource fails its initial load. This generates a +networking IssueMessage without a source code location, which is not adequately handled. + +* UserInterface/Views/IssueTreeElement.js: +(WI.IssueTreeElement.prototype._updateTitles): +(WI.IssueTreeElement): +If there is no sourceCodeLocation for the issue, then don't try to compute line numbers. + 2020-07-21 Devin Rousso Web Inspector: unable to save files that are base64 encoded Modified: trunk/Source/WebInspectorUI/UserInterface/Views/IssueTreeElement.js (264716 => 264717) --- trunk/Source/WebInspectorUI/UserInterface/Views/IssueTreeElement.js 2020-07-22 18:47:32 UTC (rev 264716) +++ trunk/Source/WebInspectorUI/UserInterface/Views/IssueTreeElement.js 2020-07-22 18:59:45 UTC (rev 264717) @@ -58,15 +58,18 @@ _updateTitles() { -var displayLineNumber = this._issueMessage.sourceCodeLocation.displayLineNumber; -var displayColumnNumber = this._issueMessage.sourceCodeLocation.displayColumnNumber; -var title; -if (displayColumnNumber > 0) -title = WI.UIString("Line %d:%d").format(displayLineNumber + 1, displayColumnNumber + 1); // The user visible line and column numbers are 1-based. -else -title = WI.UIString("Line %d").format(displayLineNumber + 1); // The user visible line number is 1-based. +if (this._issueMessage.sourceCodeLocation) { +let displayLineNumber = this._issueMessage.sourceCodeLocation.displayLineNumber; +let displayColumnNumber = this._issueMessage.sourceCodeLocation.displayColumnNumber; +var lineNumberLabel; +if (displayColumnNumber > 0) +lineNumberLabel = WI.UIString("Line %d:%d").format(displayLineNumber + 1, displayColumnNumber + 1); // The user visible line and column numbers are 1-based. +else +lineNumberLabel = WI.UIString("Line %d").format(displayLineNumber + 1); // The user visible line number is 1-based. -this.mainTitle = title + " " + this._issueMessage.text; +this.mainTitle = `${lineNumberLabel} ${this._issueMessage.text}`; +} else +this.mainTitle = this._issueMessage.text; } }; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [264683] trunk/LayoutTests
Title: [264683] trunk/LayoutTests Revision 264683 Author bb...@apple.com Date 2020-07-21 17:09:59 -0700 (Tue, 21 Jul 2020) Log Message Web Inspector: inspector/canvas/memory.html is failing on macOS Apple Silicon https://bugs.webkit.org/show_bug.cgi?id=214619 Reviewed by Devin Rousso. * inspector/canvas/memory-expected.txt: * inspector/canvas/memory.html: Canvas memory costs are not the same as on Intel macOS. Change the test to simply check that the memory cost increases from zero-ish to not-zero. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/inspector/canvas/memory-expected.txt trunk/LayoutTests/inspector/canvas/memory.html Diff Modified: trunk/LayoutTests/ChangeLog (264682 => 264683) --- trunk/LayoutTests/ChangeLog 2020-07-21 23:45:54 UTC (rev 264682) +++ trunk/LayoutTests/ChangeLog 2020-07-22 00:09:59 UTC (rev 264683) @@ -1,3 +1,15 @@ +2020-07-21 Brian Burg + +Web Inspector: inspector/canvas/memory.html is failing on macOS Apple Silicon +https://bugs.webkit.org/show_bug.cgi?id=214619 + +Reviewed by Devin Rousso. + +* inspector/canvas/memory-expected.txt: +* inspector/canvas/memory.html: +Canvas memory costs are not the same as on Intel macOS. Change the test to +simply check that the memory cost increases from zero-ish to not-zero. + 2020-07-21 Yusuke Suzuki Use CatchScope in microtask execution Modified: trunk/LayoutTests/inspector/canvas/memory-expected.txt (264682 => 264683) --- trunk/LayoutTests/inspector/canvas/memory-expected.txt 2020-07-21 23:45:54 UTC (rev 264682) +++ trunk/LayoutTests/inspector/canvas/memory-expected.txt 2020-07-22 00:09:59 UTC (rev 264683) @@ -7,5 +7,5 @@ -- Running test case: Canvas.memory.canvasMemoryChanged Change size of canvas to 200x200. -Memory cost of canvas updated to 166400. +PASS: Memory cost should increase upon initially resizing canvas. Modified: trunk/LayoutTests/inspector/canvas/memory.html (264682 => 264683) --- trunk/LayoutTests/inspector/canvas/memory.html 2020-07-21 23:45:54 UTC (rev 264682) +++ trunk/LayoutTests/inspector/canvas/memory.html 2020-07-22 00:09:59 UTC (rev 264683) @@ -53,9 +53,10 @@ InspectorTest.assert(canvases.length === 1, "There should only be one canvas-2d."); +let initialMemoryCost = canvases[0].memoryCost; canvases[0].awaitEvent(WI.Canvas.Event.MemoryChanged) .then((event) => { -InspectorTest.log(`Memory cost of canvas updated to ${event.target.memoryCost}.`); +InspectorTest.expectGreaterThan(event.target.memoryCost, isNaN(initialMemoryCost) ? 0 : initialMemoryCost, "Memory cost should increase upon initially resizing canvas."); }) .then(resolve, reject); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [264624] trunk/Source/WebKit
Title: [264624] trunk/Source/WebKit Revision 264624 Author bb...@apple.com Date 2020-07-20 15:20:21 -0700 (Mon, 20 Jul 2020) Log Message Web Inspector: developerExtrasEnabled should be respected when opening local Web Inspector https://bugs.webkit.org/show_bug.cgi?id=214573 Reviewed by David Kilzer. Ensure that WKPreferences.developerExtrasEnabled is true prior to opening a Web Inspector window. This matches the check in WebCore when deciding to show "Inspect Element" menu item. * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::connect): (WebKit::WebInspectorProxy::openLocalInspectorFrontend): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (264623 => 264624) --- trunk/Source/WebKit/ChangeLog 2020-07-20 22:16:41 UTC (rev 264623) +++ trunk/Source/WebKit/ChangeLog 2020-07-20 22:20:21 UTC (rev 264624) @@ -1,3 +1,18 @@ +2020-07-20 Brian Burg + +Web Inspector: developerExtrasEnabled should be respected when opening local Web Inspector +https://bugs.webkit.org/show_bug.cgi?id=214573 + + +Reviewed by David Kilzer. + +Ensure that WKPreferences.developerExtrasEnabled is true prior to opening a Web Inspector +window. This matches the check in WebCore when deciding to show "Inspect Element" menu item. + +* UIProcess/Inspector/WebInspectorProxy.cpp: +(WebKit::WebInspectorProxy::connect): +(WebKit::WebInspectorProxy::openLocalInspectorFrontend): + 2020-07-20 Adrian Perez de Castro [WPE] WebPopupItem should always be forward declared as struct Modified: trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp (264623 => 264624) --- trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2020-07-20 22:16:41 UTC (rev 264623) +++ trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp 2020-07-20 22:20:21 UTC (rev 264624) @@ -120,6 +120,9 @@ if (!m_inspectedPage) return; +if (!m_inspectedPage->preferences().developerExtrasEnabled()) +return; + if (m_showMessageSent) return; @@ -414,6 +417,9 @@ if (!m_inspectedPage) return; +if (!m_inspectedPage->preferences().developerExtrasEnabled()) +return; + if (m_inspectedPage->inspectorController().hasLocalFrontend()) { show(); return; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [264320] trunk/Source/WebInspectorUI
Title: [264320] trunk/Source/WebInspectorUI Revision 264320 Author bb...@apple.com Date 2020-07-13 15:12:59 -0700 (Mon, 13 Jul 2020) Log Message Web Inspector: wrong bundle version being used for WebInspectorUI.framework in macOS Big Sur https://bugs.webkit.org/show_bug.cgi?id=214274 Reviewed by Tim Horton. * Configurations/Version.xcconfig: Make this match other Version.xcconfig after the changes in . Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/Configurations/Version.xcconfig Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (264319 => 264320) --- trunk/Source/WebInspectorUI/ChangeLog 2020-07-13 22:10:25 UTC (rev 264319) +++ trunk/Source/WebInspectorUI/ChangeLog 2020-07-13 22:12:59 UTC (rev 264320) @@ -1,3 +1,13 @@ +2020-07-13 Brian Burg + +Web Inspector: wrong bundle version being used for WebInspectorUI.framework in macOS Big Sur +https://bugs.webkit.org/show_bug.cgi?id=214274 + +Reviewed by Tim Horton. + +* Configurations/Version.xcconfig: Make this match other Version.xcconfig after +the changes in . + 2020-07-09 Nikita Vasilyev Web Inspector: title bar of undocked inspector should be white in BigSur Modified: trunk/Source/WebInspectorUI/Configurations/Version.xcconfig (264319 => 264320) --- trunk/Source/WebInspectorUI/Configurations/Version.xcconfig 2020-07-13 22:10:25 UTC (rev 264319) +++ trunk/Source/WebInspectorUI/Configurations/Version.xcconfig 2020-07-13 22:12:59 UTC (rev 264320) @@ -12,6 +12,8 @@ SYSTEM_VERSION_PREFIX_macosx_101400 = 14; SYSTEM_VERSION_PREFIX_macosx_101500 = 15; SYSTEM_VERSION_PREFIX_macosx_101600 = 16; +SYSTEM_VERSION_PREFIX_macosx_11 = 16; +SYSTEM_VERSION_PREFIX_macosx_101700 = 17; BUNDLE_VERSION = $(SYSTEM_VERSION_PREFIX)$(FULL_VERSION); SHORT_VERSION_STRING = $(SYSTEM_VERSION_PREFIX)$(MAJOR_VERSION); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [264195] trunk/Source/WebKitLegacy/mac
Title: [264195] trunk/Source/WebKitLegacy/mac Revision 264195 Author bb...@apple.com Date 2020-07-09 14:20:24 -0700 (Thu, 09 Jul 2020) Log Message REGRESSION(r217248): ASSERT_NOT_REACHED() in toWebFrameLoadType() https://bugs.webkit.org/show_bug.cgi?id=214149 Reviewed by Joseph Pecoraro. ASSERT_NOT_REACHED() is hit when the type is FrameLoadType::ReloadExpiredOnly. This happens when remote inspection triggers a reload via InspectorPageAgent::reload() and the 'revalidateAllResources' optional argument is false or not specified. * WebView/WebFrame.mm: (toWebFrameLoadType): Remove the assert and add a note explaining why this load type that does not naturally occur in WK1 may nonetheless be triggered while remote inspecting. Modified Paths trunk/Source/WebKitLegacy/mac/ChangeLog trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm Diff Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (264194 => 264195) --- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-07-09 20:59:55 UTC (rev 264194) +++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-07-09 21:20:24 UTC (rev 264195) @@ -1,3 +1,19 @@ +2020-07-09 Brian Burg + +REGRESSION(r217248): ASSERT_NOT_REACHED() in toWebFrameLoadType() +https://bugs.webkit.org/show_bug.cgi?id=214149 + +Reviewed by Joseph Pecoraro. + +ASSERT_NOT_REACHED() is hit when the type is FrameLoadType::ReloadExpiredOnly. This happens +when remote inspection triggers a reload via InspectorPageAgent::reload() and the +'revalidateAllResources' optional argument is false or not specified. + +* WebView/WebFrame.mm: +(toWebFrameLoadType): +Remove the assert and add a note explaining why this load type that does not +naturally occur in WK1 may nonetheless be triggered while remote inspecting. + 2020-07-06 Simon Fraser BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS should not have trailing semicolons Modified: trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm (264194 => 264195) --- trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2020-07-09 20:59:55 UTC (rev 264194) +++ trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2020-07-09 21:20:24 UTC (rev 264195) @@ -1067,10 +1067,10 @@ case FrameLoadType::Replace: return WebFrameLoadTypeReplace; case FrameLoadType::ReloadFromOrigin: +case FrameLoadType::ReloadExpiredOnly: +// NOTE: reloading via remote inspection may trigger ReloadExpiredOnly, but otherwise +// it is not a supported load type as it was added after WebKit1 became WebKitLegacy. return WebFrameLoadTypeReloadFromOrigin; -case FrameLoadType::ReloadExpiredOnly: -ASSERT_NOT_REACHED(); -return WebFrameLoadTypeReload; } } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [264185] trunk/Source/JavaScriptCore
Title: [264185] trunk/Source/_javascript_Core Revision 264185 Author bb...@apple.com Date 2020-07-09 12:16:23 -0700 (Thu, 09 Jul 2020) Log Message REGRESSION(r262302): ITMLKit debuggables in listings are missing a title, use UUID instead https://bugs.webkit.org/show_bug.cgi?id=214153 Reviewed by Devin Rousso. * inspector/remote/cocoa/RemoteInspectorCocoa.mm: (Inspector::RemoteInspector::listingForInspectionTarget const): Looks like this is due to copypasta. Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorCocoa.mm Diff Modified: trunk/Source/_javascript_Core/ChangeLog (264184 => 264185) --- trunk/Source/_javascript_Core/ChangeLog 2020-07-09 18:51:47 UTC (rev 264184) +++ trunk/Source/_javascript_Core/ChangeLog 2020-07-09 19:16:23 UTC (rev 264185) @@ -1,3 +1,14 @@ +2020-07-09 Brian Burg + +REGRESSION(r262302): ITMLKit debuggables in listings are missing a title, use UUID instead +https://bugs.webkit.org/show_bug.cgi?id=214153 + +Reviewed by Devin Rousso. + +* inspector/remote/cocoa/RemoteInspectorCocoa.mm: +(Inspector::RemoteInspector::listingForInspectionTarget const): +Looks like this is due to copypasta. + 2020-07-09 Alexey Shvayka ErrorInstance::finishCreation() puts "message" twice, with different attributes Modified: trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorCocoa.mm (264184 => 264185) --- trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorCocoa.mm 2020-07-09 18:51:47 UTC (rev 264184) +++ trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorCocoa.mm 2020-07-09 19:16:23 UTC (rev 264185) @@ -380,7 +380,7 @@ switch (target.type()) { case RemoteInspectionTarget::Type::ITML: -[listing setObject:target.name() forKey:WIRTypeKey]; +[listing setObject:target.name() forKey:WIRTitleKey]; [listing setObject:WIRTypeITML forKey:WIRTypeKey]; break; case RemoteInspectionTarget::Type::_javascript_: ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [262997] trunk/Source/WebKit
Title: [262997] trunk/Source/WebKit Revision 262997 Author bb...@apple.com Date 2020-06-12 23:22:51 -0700 (Fri, 12 Jun 2020) Log Message Automation.computeElementLayout should return iframe-relative element rects (when coordinate system is 'Page') https://bugs.webkit.org/show_bug.cgi?id=213139 Reviewed by Devin Rousso. Automation.computeElementLayout has two coordinate systems it can use, LayoutViewport (used for hit testing) and Page (used for Get Element Rect). Since Get Element Rect expects coordinates relative to the current browsing context, make the mode simpler by reporting the bounds from Element::boundingClientRect() which are frame-relative. Covered by existing WPT suite. The semantics of this command are under review, as the remote end steps seem to describe a different result than what the non-normative text does. * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::WebAutomationSessionProxy::computeElementLayout): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (262996 => 262997) --- trunk/Source/WebKit/ChangeLog 2020-06-13 06:13:12 UTC (rev 262996) +++ trunk/Source/WebKit/ChangeLog 2020-06-13 06:22:51 UTC (rev 262997) @@ -1,3 +1,22 @@ +2020-06-12 Brian Burg + +Automation.computeElementLayout should return iframe-relative element rects (when coordinate system is 'Page') +https://bugs.webkit.org/show_bug.cgi?id=213139 + + +Reviewed by Devin Rousso. + +Automation.computeElementLayout has two coordinate systems it can use, LayoutViewport (used for hit testing) +and Page (used for Get Element Rect). Since Get Element Rect expects coordinates relative to the current +browsing context, make the mode simpler by reporting the bounds from Element::boundingClientRect() which +are frame-relative. + +Covered by existing WPT suite. The semantics of this command are under review, as +the remote end steps seem to describe a different result than what the non-normative text does. + +* WebProcess/Automation/WebAutomationSessionProxy.cpp: +(WebKit::WebAutomationSessionProxy::computeElementLayout): + 2020-06-12 David Kilzer [IPC hardening] Check enum values in IPC::Decoder::decodeEnum() an IPC::Encoder::encodeEnum() Modified: trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (262996 => 262997) --- trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2020-06-13 06:13:12 UTC (rev 262996) +++ trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2020-06-13 06:22:51 UTC (rev 262997) @@ -682,15 +682,16 @@ Optional resultInViewCenterPoint; bool isObscured = false; -auto elementBoundsInRootCoordinates = convertRectFromFrameClientToRootView(frameView, coreElement->boundingClientRect()); switch (coordinateSystem) { case CoordinateSystem::Page: -resultElementBounds = enclosingIntRect(mainView->absoluteToDocumentRect(mainView->rootViewToContents(elementBoundsInRootCoordinates))); +resultElementBounds = enclosingIntRect(coreElement->boundingClientRect()); break; -case CoordinateSystem::LayoutViewport: +case CoordinateSystem::LayoutViewport: { +auto elementBoundsInRootCoordinates = convertRectFromFrameClientToRootView(frameView, coreElement->boundingClientRect()); resultElementBounds = enclosingIntRect(mainView->absoluteToLayoutViewportRect(mainView->rootViewToContents(elementBoundsInRootCoordinates))); break; } +} // If an or does not have an associated or element, then give up. if (!containerElement) { @@ -739,15 +740,16 @@ // Node::isDescendantOf() is not self-inclusive, so that is explicitly checked here. isObscured = elementList[0] != containerElement && !elementList[0]->isDescendantOf(containerElement); -auto inViewCenterPointInRootCoordinates = convertPointFromFrameClientToRootView(frameView, elementInViewCenterPoint); switch (coordinateSystem) { case CoordinateSystem::Page: -resultInViewCenterPoint = roundedIntPoint(mainView->absoluteToDocumentPoint(mainView->rootViewToContents(inViewCenterPointInRootCoordinates))); +resultInViewCenterPoint = roundedIntPoint(elementInViewCenterPoint); break; -case CoordinateSystem::LayoutViewport: +case CoordinateSystem::LayoutViewport: { +auto inViewCenterPointInRootCoordinates = convertPointFromFrameClientToRootView(frameView, elementInViewCenterPoint); resultInViewCenterPoint = roundedIntPoint(mainView->absoluteToLayoutViewportPoint(mainView->rootViewToContents(inViewCenterPointInRootCoordinates))); break; } +} completionHandler(WTF::nullopt, resultElementBounds, resultInViewCenterPoint, isObscured); } ___
[webkit-changes] [262861] trunk/Source
Title: [262861] trunk/Source Revision 262861 Author bb...@apple.com Date 2020-06-10 14:44:04 -0700 (Wed, 10 Jun 2020) Log Message WebDriver on non-iOS ports cannot perform ActionChain which has scrolling down to the element and click it https://bugs.webkit.org/show_bug.cgi?id=208232 Reviewed by Devin Rousso. Source/WebCore: * platform/ScrollView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::rootViewToContents const): Create a version of this function that works with FloatPoint. Source/WebKit: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: (WebKit::WebAutomationSession::platformSimulateMouseInteraction): The provided coordinates are in LayoutViewport coordinate system, which does not take topContentInset into account. Add back in the topContentInset when translating to flipped window coordinates. * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::WebAutomationSessionProxy::computeElementLayout): The calculations of element bounds and IVCP have an incorrect handling of root coordinates as contents/absolute coordinates. Add the missing conversion. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/ScrollView.cpp trunk/Source/WebCore/platform/ScrollView.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (262860 => 262861) --- trunk/Source/WebCore/ChangeLog 2020-06-10 21:26:41 UTC (rev 262860) +++ trunk/Source/WebCore/ChangeLog 2020-06-10 21:44:04 UTC (rev 262861) @@ -1,3 +1,16 @@ +2020-06-10 Brian Burg + +WebDriver on non-iOS ports cannot perform ActionChain which has scrolling down to the element and click it +https://bugs.webkit.org/show_bug.cgi?id=208232 + + +Reviewed by Devin Rousso. + +* platform/ScrollView.h: +* platform/ScrollView.cpp: +(WebCore::ScrollView::rootViewToContents const): +Create a version of this function that works with FloatPoint. + 2020-06-10 Commit Queue Unreviewed, reverting r262718. Modified: trunk/Source/WebCore/platform/ScrollView.cpp (262860 => 262861) --- trunk/Source/WebCore/platform/ScrollView.cpp 2020-06-10 21:26:41 UTC (rev 262860) +++ trunk/Source/WebCore/platform/ScrollView.cpp 2020-06-10 21:44:04 UTC (rev 262861) @@ -944,6 +944,11 @@ return contentsToView(rect); } +FloatPoint ScrollView::rootViewToContents(const FloatPoint& rootViewPoint) const +{ +return viewToContents(convertFromRootView(rootViewPoint)); +} + IntPoint ScrollView::rootViewToContents(const IntPoint& rootViewPoint) const { return viewToContents(convertFromRootView(rootViewPoint)); Modified: trunk/Source/WebCore/platform/ScrollView.h (262860 => 262861) --- trunk/Source/WebCore/platform/ScrollView.h 2020-06-10 21:26:41 UTC (rev 262860) +++ trunk/Source/WebCore/platform/ScrollView.h 2020-06-10 21:44:04 UTC (rev 262861) @@ -279,6 +279,7 @@ WEBCORE_EXPORT void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = false); bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; } +WEBCORE_EXPORT FloatPoint rootViewToContents(const FloatPoint&) const; WEBCORE_EXPORT IntPoint rootViewToContents(const IntPoint&) const; WEBCORE_EXPORT IntPoint contentsToRootView(const IntPoint&) const; WEBCORE_EXPORT FloatPoint contentsToRootView(const FloatPoint&) const; Modified: trunk/Source/WebKit/ChangeLog (262860 => 262861) --- trunk/Source/WebKit/ChangeLog 2020-06-10 21:26:41 UTC (rev 262860) +++ trunk/Source/WebKit/ChangeLog 2020-06-10 21:44:04 UTC (rev 262861) @@ -1,3 +1,22 @@ +2020-06-10 Brian Burg + +WebDriver on non-iOS ports cannot perform ActionChain which has scrolling down to the element and click it +https://bugs.webkit.org/show_bug.cgi?id=208232 + + +Reviewed by Devin Rousso. + +* UIProcess/Automation/mac/WebAutomationSessionMac.mm: +(WebKit::WebAutomationSession::platformSimulateMouseInteraction): +The provided coordinates are in LayoutViewport coordinate system, which does +not take topContentInset into account. Add back in the topContentInset +when translating to flipped window coordinates. + +* WebProcess/Automation/WebAutomationSessionProxy.cpp: +(WebKit::WebAutomationSessionProxy::computeElementLayout): +The calculations of element bounds and IVCP have an incorrect handling of +root coordinates as contents/absolute coordinates. Add the missing conversion. + 2020-06-10 Brent Fulgham [iOS] Update sandbox rules for correct sanitizer paths in current OS releases Modified: trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm (262860 => 262861) --- trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm 2020-06-10 21:26:41 UTC (rev 262860) +++ trunk/Sour
[webkit-changes] [262815] trunk/Source/WebKit
Title: [262815] trunk/Source/WebKit Revision 262815 Author bb...@apple.com Date 2020-06-09 15:06:04 -0700 (Tue, 09 Jun 2020) Log Message [Cocoa] Element Send Keys can hang when an automation window becomes unfocused https://bugs.webkit.org/show_bug.cgi?id=212985 Reviewed by Devin Rousso. * UIProcess/Automation/mac/WebAutomationSessionMac.mm: (WebKit::WebAutomationSession::sendSynthesizedEventsToPage): Make sure to focus the window and set first responder so sending keys doesn't hang. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm Diff Modified: trunk/Source/WebKit/ChangeLog (262814 => 262815) --- trunk/Source/WebKit/ChangeLog 2020-06-09 22:04:49 UTC (rev 262814) +++ trunk/Source/WebKit/ChangeLog 2020-06-09 22:06:04 UTC (rev 262815) @@ -1,3 +1,16 @@ +2020-06-09 Brian Burg + +[Cocoa] Element Send Keys can hang when an automation window becomes unfocused +https://bugs.webkit.org/show_bug.cgi?id=212985 + + +Reviewed by Devin Rousso. + +* UIProcess/Automation/mac/WebAutomationSessionMac.mm: +(WebKit::WebAutomationSession::sendSynthesizedEventsToPage): +Make sure to focus the window and set first responder so sending keys doesn't hang. + + 2020-06-09 Jonathan Bedard WebKit: Import NSURLConnectionSPI.h instead of CFNSURLConnection.h Modified: trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm (262814 => 262815) --- trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm 2020-06-09 22:04:49 UTC (rev 262814) +++ trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm 2020-06-09 22:06:04 UTC (rev 262815) @@ -73,6 +73,8 @@ void WebAutomationSession::sendSynthesizedEventsToPage(WebPageProxy& page, NSArray *eventsToSend) { NSWindow *window = page.platformWindow(); +[window makeKeyAndOrderFront:nil]; +page.makeFirstResponder(); for (NSEvent *event in eventsToSend) { LOG(Automation, "Sending event[%p] to window[%p]: %@", event, window, event); @@ -79,7 +81,8 @@ // Take focus back in case the Inspector became focused while the prior command or // NSEvent was delivered to the window. -[window becomeKeyWindow]; +[window makeKeyAndOrderFront:nil]; +page.makeFirstResponder(); markEventAsSynthesizedForAutomation(event); [window sendEvent:event]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [260657] trunk/Tools
Title: [260657] trunk/Tools Revision 260657 Author bb...@apple.com Date 2020-04-24 11:08:12 -0700 (Fri, 24 Apr 2020) Log Message webkitpy: update autoinstalled mozprocess dependency to 1.1.0 (adds python3 support) https://bugs.webkit.org/show_bug.cgi?id=210220 Reviewed by Anders Carlsson. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_mozprocess): Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py Diff Modified: trunk/Tools/ChangeLog (260656 => 260657) --- trunk/Tools/ChangeLog 2020-04-24 17:58:55 UTC (rev 260656) +++ trunk/Tools/ChangeLog 2020-04-24 18:08:12 UTC (rev 260657) @@ -1,3 +1,14 @@ +2020-04-24 Brian Burg + +webkitpy: update autoinstalled mozprocess dependency to 1.1.0 (adds python3 support) +https://bugs.webkit.org/show_bug.cgi?id=210220 + + +Reviewed by Anders Carlsson. + +* Scripts/webkitpy/thirdparty/__init__.py: +(AutoinstallImportHook._install_mozprocess): + 2020-04-24 Philippe Normand [GTK][WPE] White-list more GStreamer environment variables in webkitpy Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py (260656 => 260657) --- trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2020-04-24 17:58:55 UTC (rev 260656) +++ trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py 2020-04-24 18:08:12 UTC (rev 260657) @@ -167,8 +167,8 @@ def _install_mozprocess(self): self._ensure_autoinstalled_dir_is_in_sys_path() -self._install("https://files.pythonhosted.org/packages/cb/26/144dbc28d1f40e392f8a0cbee771ba624a61017f016c77ad88424d84b230/mozprocess-0.25.tar.gz", - "mozprocess-0.25/mozprocess") +self._install("https://files.pythonhosted.org/packages/97/e7/7907f0bf2d0b42b154741f8ff63a199486fc67c90aac88cde5f2d1ad1ea2/mozprocess-1.1.0.tar.gz", + "mozprocess-1.1.0/mozprocess") def _install_pytest_timeout(self): self._install("https://files.pythonhosted.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz", ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [260653] trunk/Source
Title: [260653] trunk/Source Revision 260653 Author bb...@apple.com Date 2020-04-24 10:50:41 -0700 (Fri, 24 Apr 2020) Log Message Web Automation: timeout underneath Automation.evaluateJavaScriptFunction in Selenium test frame_switching_tests.py::testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs[Safari] https://bugs.webkit.org/show_bug.cgi?id=210162 Reviewed by Devin Rousso. Source/WebCore: * page/DOMWindow.h: Expose DOMWindow::{register, unregister}Observer. Source/WebKit: When an iframe is detached from the DOM, it is no longer exposed as a browsing context and it's not possible to Evaluate _javascript_ or perform other commands with it. This patch adds frame lifecycle monitoring so that pending script evaluations are cancelled with FrameNotFound as soon as the iframe is detached from the DOM. This change also avoids running more commands with the frame if it's detached from its DOMWindow and ready to be GC'd. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Automation/WebAutomationDOMWindowObserver.h: Added. * WebProcess/Automation/WebAutomationDOMWindowObserver.cpp: Added. (WebKit::WebAutomationDOMWindowObserver::WebAutomationDOMWindowObserver): (WebKit::WebAutomationDOMWindowObserver::~WebAutomationDOMWindowObserver): (WebKit::WebAutomationDOMWindowObserver::frame const): (WebKit::WebAutomationDOMWindowObserver::willDestroyGlobalObjectInCachedFrame): (WebKit::WebAutomationDOMWindowObserver::willDestroyGlobalObjectInFrame): (WebKit::WebAutomationDOMWindowObserver::willDetachGlobalObjectFromFrame): This class is a stripped-down copy of DOMWindowExtension, which is the only other client of DOMWindow::Observer interface. When a frame is detached, destroyed, or navigates (global object detached), then call the callback and unregister. * WebProcess/Automation/WebAutomationSessionProxy.h: * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::WebAutomationSessionProxy::~WebAutomationSessionProxy): (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): (WebKit::WebAutomationSessionProxy::willDestroyGlobalObjectForFrame): (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): (WebKit::WebAutomationSessionProxy::ensureObserverForFrame): For non-main frames, ensure we add a frame observer if we are about to evaluate _javascript_ upon the frame. This acts as a watchdog in case the frame becomes detached while waiting for pending JS evaluations. When a frame is detached, the JS evaluation may or may not complete. (WebKit::WebAutomationSessionProxy::selectOptionElement): Fix hilarious typo. * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp: * WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::clearNowPlayingInfo): (WebKit::WebMediaStrategy::setNowPlayingInfo): Adding a new file seems to have exposed a few missing includes and namespace qualifiers. This is due to unified sources chunking. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/DOMWindow.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Sources.txt trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp trunk/Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.cpp Added Paths trunk/Source/WebKit/WebProcess/Automation/WebAutomationDOMWindowObserver.cpp trunk/Source/WebKit/WebProcess/Automation/WebAutomationDOMWindowObserver.h Diff Modified: trunk/Source/WebCore/ChangeLog (260652 => 260653) --- trunk/Source/WebCore/ChangeLog 2020-04-24 17:25:31 UTC (rev 260652) +++ trunk/Source/WebCore/ChangeLog 2020-04-24 17:50:41 UTC (rev 260653) @@ -1,3 +1,13 @@ +2020-04-24 Brian Burg + +Web Automation: timeout underneath Automation.evaluateJavaScriptFunction in Selenium test frame_switching_tests.py::testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs[Safari] +https://bugs.webkit.org/show_bug.cgi?id=210162 + + +Reviewed by Devin Rousso. + +* page/DOMWindow.h: Expose DOMWindow::{register, unregister}Observer. + 2020-04-24 Zalan Bujtas [LFC][TFC] Take first in-flow table-row baseline into account when computing cell baseline Modified: trunk/Source/WebCore/page/DOMWindow.h (260652 => 260653) --- trunk/Source/WebCore/page/DOMWindow.h 2020-04-24 17:25:31 UTC (rev 260652) +++ trunk/Source/WebCore/page/DOMWindow.h 2020-04-24 17:50:41 UTC (rev 260653) @@ -140,8 +140,8 @@ virtual void willDetachGlobalObjectFromFrame() { } }; -void registerObserver(Observer&); -void unregisterObserver(Observer&); +WEBCORE_EXPORT void registerObserver(Observer&); +WEBCORE_EXPORT void unregisterObserver(Observer&); void resetUnlessSuspendedForDocumentSuspension(); void suspendForBackForwardCache(); Modified: tru
[webkit-changes] [259727] trunk/Source/WebKit
Title: [259727] trunk/Source/WebKit Revision 259727 Author bb...@apple.com Date 2020-04-08 10:30:21 -0700 (Wed, 08 Apr 2020) Log Message REGRESSION(r253346): some Automation commands targeted at an iframe do not return https://bugs.webkit.org/show_bug.cgi?id=210139 Reviewed by Devin Rousso. WebAutomationSession / WebAutomationSessionProxy are singletons, and only one exists at a time in the UIProcess / WebProcess respectively. A recent change was made to call Connection::sendWithAsyncReply from the WebPageProxy object rather than WebProcess. The effect of this is that the WebPage's destinationID is used for the response message rather than the WebProcess. Because WebAutomationSessionProxy registers itself as a global IPC message receiver, the page-targeted destinationID cannot find any receivers for the message at the destinationID, which causes an ASSERT in debug builds and a hang in non-debug builds. The fix is to continue sending messages via the WebProcess object, whose messages are tagged with a destinationID of 0 (eg, global message receiver). This could alternatively be accomplished by passing a destinationID of 0 to every sendWithAsyncReply, but as is this change is a straightforward partial revert of r253346. * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::switchToBrowsingContext): (WebKit::WebAutomationSession::evaluateJavaScriptFunction): (WebKit::WebAutomationSession::resolveChildFrameHandle): (WebKit::WebAutomationSession::resolveParentFrameHandle): (WebKit::WebAutomationSession::computeElementLayout): (WebKit::WebAutomationSession::selectOptionElement): (WebKit::WebAutomationSession::setFilesForInputFileUpload): (WebKit::WebAutomationSession::getAllCookies): (WebKit::WebAutomationSession::deleteSingleCookie): (WebKit::WebAutomationSession::takeScreenshot): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (259726 => 259727) --- trunk/Source/WebKit/ChangeLog 2020-04-08 17:25:25 UTC (rev 259726) +++ trunk/Source/WebKit/ChangeLog 2020-04-08 17:30:21 UTC (rev 259727) @@ -1,3 +1,38 @@ +2020-04-08 Brian Burg + +REGRESSION(r253346): some Automation commands targeted at an iframe do not return +https://bugs.webkit.org/show_bug.cgi?id=210139 + + +Reviewed by Devin Rousso. + +WebAutomationSession / WebAutomationSessionProxy are singletons, and only one +exists at a time in the UIProcess / WebProcess respectively. A recent change was +made to call Connection::sendWithAsyncReply from the WebPageProxy object rather +than WebProcess. The effect of this is that the WebPage's destinationID is +used for the response message rather than the WebProcess. + +Because WebAutomationSessionProxy registers itself as a global IPC message receiver, +the page-targeted destinationID cannot find any receivers for the message at the +destinationID, which causes an ASSERT in debug builds and a hang in non-debug builds. + +The fix is to continue sending messages via the WebProcess object, whose messages +are tagged with a destinationID of 0 (eg, global message receiver). This could alternatively +be accomplished by passing a destinationID of 0 to every sendWithAsyncReply, but +as is this change is a straightforward partial revert of r253346. + +* UIProcess/Automation/WebAutomationSession.cpp: +(WebKit::WebAutomationSession::switchToBrowsingContext): +(WebKit::WebAutomationSession::evaluateJavaScriptFunction): +(WebKit::WebAutomationSession::resolveChildFrameHandle): +(WebKit::WebAutomationSession::resolveParentFrameHandle): +(WebKit::WebAutomationSession::computeElementLayout): +(WebKit::WebAutomationSession::selectOptionElement): +(WebKit::WebAutomationSession::setFilesForInputFileUpload): +(WebKit::WebAutomationSession::getAllCookies): +(WebKit::WebAutomationSession::deleteSingleCookie): +(WebKit::WebAutomationSession::takeScreenshot): + 2020-04-08 Truitt Savell Unreviewed, reverting r259708. Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (259726 => 259727) --- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-04-08 17:25:25 UTC (rev 259726) +++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-04-08 17:30:21 UTC (rev 259727) @@ -375,7 +375,7 @@ m_client->requestSwitchToPage(*this, *page, [frameID, page = makeRef(*page), callback = WTFMove(callback)]() { page->setFocus(true); -page->send(Messages::WebAutomationSessionProxy::FocusFrame(page->webPageID(), frameID), 0); +page->process().send(Messages::WebAutomationSessionProxy::FocusFrame(page->webPageID(), frameID), 0); callback->sendSuccess(); }); @@ -947,7 +947,7 @@
[webkit-changes] [259665] trunk/Source/WebKit
Title: [259665] trunk/Source/WebKit Revision 259665 Author bb...@apple.com Date 2020-04-07 13:07:46 -0700 (Tue, 07 Apr 2020) Log Message Web Automation: Automation.inspectBrowsingContext should bring Web Inspector to front automatically https://bugs.webkit.org/show_bug.cgi?id=210137 Reviewed by Joseph Pecoraro. * UIProcess/Automation/mac/WebAutomationSessionMac.mm: (WebKit::WebAutomationSession::inspectBrowsingContext): Previously, calling connect() would preload Web Inspector but not show its window. This made it awkward to use the 'safari:automaticInspection' capability without subsequently evaluating a `debugger;` statement to bring Web Inspector to front. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm Diff Modified: trunk/Source/WebKit/ChangeLog (259664 => 259665) --- trunk/Source/WebKit/ChangeLog 2020-04-07 20:03:20 UTC (rev 259664) +++ trunk/Source/WebKit/ChangeLog 2020-04-07 20:07:46 UTC (rev 259665) @@ -1,3 +1,16 @@ +2020-04-07 Brian Burg + +Web Automation: Automation.inspectBrowsingContext should bring Web Inspector to front automatically +https://bugs.webkit.org/show_bug.cgi?id=210137 + +Reviewed by Joseph Pecoraro. + +* UIProcess/Automation/mac/WebAutomationSessionMac.mm: +(WebKit::WebAutomationSession::inspectBrowsingContext): +Previously, calling connect() would preload Web Inspector but not show its window. This +made it awkward to use the 'safari:automaticInspection' capability without subsequently +evaluating a `debugger;` statement to bring Web Inspector to front. + 2020-04-07 Kate Cheney Return app-bound sessions for instances where WKAppBoundDomains is Modified: trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm (259664 => 259665) --- trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm 2020-04-07 20:03:20 UTC (rev 259664) +++ trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm 2020-04-07 20:07:46 UTC (rev 259665) @@ -57,7 +57,7 @@ // Don't bring the inspector to front since this may be done automatically. // We just want it loaded so it can pause if a breakpoint is hit during a command. if (page->inspector()) { -page->inspector()->connect(); +page->inspector()->show(); // Start collecting profile information immediately so the entire session is captured. if (optionalEnableAutoCapturing && *optionalEnableAutoCapturing) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [258588] trunk/Source/WebKit
Title: [258588] trunk/Source/WebKit Revision 258588 Author bb...@apple.com Date 2020-03-17 14:04:20 -0700 (Tue, 17 Mar 2020) Log Message REGRESSION(r256882): WebDriver commands that run before initial navigation do not complete https://bugs.webkit.org/show_bug.cgi?id=209185 Reviewed by Brian Weinstein. No new tests, covered by w3c/webdriver/tests/back/back.py. * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::createBrowsingContext): Force eager creation of WebProcess when a browsing context is created. This allows all subsequent commands that use WebProcess IPC to proceed instead of hanging. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (258587 => 258588) --- trunk/Source/WebKit/ChangeLog 2020-03-17 20:52:00 UTC (rev 258587) +++ trunk/Source/WebKit/ChangeLog 2020-03-17 21:04:20 UTC (rev 258588) @@ -1,3 +1,18 @@ +2020-03-17 Brian Burg + +REGRESSION(r256882): WebDriver commands that run before initial navigation do not complete +https://bugs.webkit.org/show_bug.cgi?id=209185 + + +Reviewed by Brian Weinstein. + +No new tests, covered by w3c/webdriver/tests/back/back.py. + +* UIProcess/Automation/WebAutomationSession.cpp: +(WebKit::WebAutomationSession::createBrowsingContext): +Force eager creation of WebProcess when a browsing context is created. This allows +all subsequent commands that use WebProcess IPC to proceed instead of hanging. + 2020-03-17 Alex Christensen Fix GTK build. Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (258587 => 258588) --- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-03-17 20:52:00 UTC (rev 258587) +++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-03-17 21:04:20 UTC (rev 258588) @@ -346,6 +346,8 @@ if (!page) ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InternalError, "The remote session failed to create a new browsing context."); +// WebDriver allows running commands in a browsing context which has not done any loads yet. Force WebProcess to be created so it can receive messages. +page->launchInitialProcessIfNecessary(); callback->sendSuccess(protectedThis->handleForWebPageProxy(*page), toProtocol(protectedThis->m_client->currentPresentationOfPage(protectedThis.get(), *page))); }); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [258164] trunk/Tools
Title: [258164] trunk/Tools Revision 258164 Author bb...@apple.com Date 2020-03-09 14:50:24 -0700 (Mon, 09 Mar 2020) Log Message upload.py gets confused by git-svn checkouts, unable to upload test results from my desk build https://bugs.webkit.org/show_bug.cgi?id=208729 Reviewed by Jonathan Bedard. Improve upload.py to look for the svn branch and revision for the 'webkit' project and prefer those to the git equivalents (eg, prefer trunk/rN to master/). * Scripts/webkitpy/common/checkout/scm/git.py: (Git): (Git.git_svn_id_regexp): (Git._field_from_git_svn_id): (Git.svn_revision): (Git.svn_branch): (Git.svn_url): (Git.native_branch): Refactor svn revision, branch, url to use the same regexp and helper code. * Scripts/webkitpy/common/checkout/scm/stub_repository.py: (StubRepository.svn_branch): Expose a stub since this is used unconditionally by Port.commits_for_upload. * Scripts/webkitpy/common/checkout/scm/svn.py: (SVN.svn_branch): (SVN.native_revision): (SVN): (SVN.native_branch): Refactor so the actual implementation is contained in svn_revision / svn_branch. The native_* methods call out to the SVN equivalents since this is an SVN repository. * Scripts/webkitpy/port/base.py: (Port.commits_for_upload): Add special git-svn handling for the WebKit repository so that SVN branch and revision is preferred over the git equivalents. Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py trunk/Tools/Scripts/webkitpy/port/base.py Diff Modified: trunk/Tools/ChangeLog (258163 => 258164) --- trunk/Tools/ChangeLog 2020-03-09 21:48:51 UTC (rev 258163) +++ trunk/Tools/ChangeLog 2020-03-09 21:50:24 UTC (rev 258164) @@ -1,3 +1,41 @@ +2020-03-06 Brian Burg + +upload.py gets confused by git-svn checkouts, unable to upload test results from my desk build +https://bugs.webkit.org/show_bug.cgi?id=208729 + + +Reviewed by Jonathan Bedard. + +Improve upload.py to look for the svn branch and revision for the 'webkit' +project and prefer those to the git equivalents (eg, prefer trunk/rN to master/). + +* Scripts/webkitpy/common/checkout/scm/git.py: +(Git): +(Git.git_svn_id_regexp): +(Git._field_from_git_svn_id): +(Git.svn_revision): +(Git.svn_branch): +(Git.svn_url): +(Git.native_branch): +Refactor svn revision, branch, url to use the same regexp and helper code. + +* Scripts/webkitpy/common/checkout/scm/stub_repository.py: +(StubRepository.svn_branch): +Expose a stub since this is used unconditionally by Port.commits_for_upload. + +* Scripts/webkitpy/common/checkout/scm/svn.py: +(SVN.svn_branch): +(SVN.native_revision): +(SVN): +(SVN.native_branch): +Refactor so the actual implementation is contained in svn_revision / svn_branch. +The native_* methods call out to the SVN equivalents since this is an SVN repository. + +* Scripts/webkitpy/port/base.py: +(Port.commits_for_upload): +Add special git-svn handling for the WebKit repository so that SVN branch and revision +is preferred over the git equivalents. + 2020-03-09 Antoine Quint TestWebKitAPI fails to build on watchOS Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (258163 => 258164) --- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2020-03-09 21:48:51 UTC (rev 258163) +++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2020-03-09 21:50:24 UTC (rev 258164) @@ -29,6 +29,7 @@ import datetime import logging +import os import re from webkitpy.common.memoized import memoized @@ -55,6 +56,7 @@ # Git doesn't appear to document error codes, but seems to return # 1 or 128, mostly. ERROR_FILE_IS_MISSING = 128 +GIT_SVN_ID_REGEXP = r"^\s*git-svn-id:\s(?P(?P.*)/(branch)?(?P(.*)))@(?P\d+)\ (?P[a-fA-F0-9-]+)$" executable_name = 'git' @@ -281,13 +283,27 @@ def _most_recent_log_for_revision(self, revision, path): return self._run_git(['log', '-1', revision, '--date=iso', self.find_checkout_root(path)]) -def svn_revision(self, path): +def _field_from_git_svn_id(self, path, field): +# Keep this in sync with the regex from git_svn_id_regexp() above. +allowed_fields = ['svn_url', 'base_url', 'svn_branch', 'svn_revision', 'svn_uuid'] +if field not in allowed_fields: +raise ValueError("Unsupported field for git-svn-id: " + field) + git_log = self._most_recent_log_matching('git-svn-id:', path) -match = re.search("^\s*git-svn-id:.*@(?P\d+)\ ", git_log, re.MULTILINE) +match = re.search(self.GIT_SVN_ID_REGEXP, git_log, re.MULTILINE) if not
[webkit-changes] [257042] trunk/Source/WebKit
Title: [257042] trunk/Source/WebKit Revision 257042 Author bb...@apple.com Date 2020-02-19 22:11:32 -0800 (Wed, 19 Feb 2020) Log Message Web Automation: Automation.setWindowFrameOfBrowsingContext should accept negative x and y-origin values https://bugs.webkit.org/show_bug.cgi?id=207974 Reviewed by Darin Adler. According to the spec, negative origin values are supported: https://w3c.github.io/webdriver/#set-window-rect * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (257041 => 257042) --- trunk/Source/WebKit/ChangeLog 2020-02-20 06:08:12 UTC (rev 257041) +++ trunk/Source/WebKit/ChangeLog 2020-02-20 06:11:32 UTC (rev 257042) @@ -1,3 +1,18 @@ +2020-02-19 Brian Burg + +Web Automation: Automation.setWindowFrameOfBrowsingContext should accept negative x and y-origin values +https://bugs.webkit.org/show_bug.cgi?id=207974 + + +Reviewed by Darin Adler. + +According to the spec, negative origin values are supported: + +https://w3c.github.io/webdriver/#set-window-rect + +* UIProcess/Automation/WebAutomationSession.cpp: +(WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): + 2020-02-19 Chris Dumez Resources larger than 10MB are not stored in the disk cache Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (257041 => 257042) --- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-02-20 06:08:12 UTC (rev 257041) +++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2020-02-20 06:11:32 UTC (rev 257042) @@ -389,12 +389,6 @@ if (!(y = optionalOriginObject->getNumber("y"_s))) ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The 'y' parameter was not found or invalid."); - -if (x.value() < 0) -ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "The 'x' parameter had an invalid value."); - -if (y.value() < 0) -ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "The 'y' parameter had an invalid value."); } Optional width; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [256474] trunk/Source/WebCore
Title: [256474] trunk/Source/WebCore Revision 256474 Author bb...@apple.com Date 2020-02-12 13:50:49 -0800 (Wed, 12 Feb 2020) Log Message Web Inspector: inspector/cpu-profiler/threads.html is flaky crashing https://bugs.webkit.org/show_bug.cgi?id=207588 Reviewed by Yusuke Suzuki. * page/cocoa/ResourceUsageThreadCocoa.mm: (WebCore::ResourceUsageThread::platformCollectCPUData): Use a fence to force Thread to be completely ready for use by other threads prior to storing it. Otherwise, ResourceUsageThread may see it too early. * workers/WorkerThread.cpp: (WebCore::WorkerThread::start): Ignore worker threads that are not fully initialized. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm trunk/Source/WebCore/workers/WorkerThread.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (256473 => 256474) --- trunk/Source/WebCore/ChangeLog 2020-02-12 21:49:12 UTC (rev 256473) +++ trunk/Source/WebCore/ChangeLog 2020-02-12 21:50:49 UTC (rev 256474) @@ -1,3 +1,20 @@ +2020-02-12 Brian Burg + +Web Inspector: inspector/cpu-profiler/threads.html is flaky crashing +https://bugs.webkit.org/show_bug.cgi?id=207588 + + +Reviewed by Yusuke Suzuki. + +* page/cocoa/ResourceUsageThreadCocoa.mm: +(WebCore::ResourceUsageThread::platformCollectCPUData): +Use a fence to force Thread to be completely ready for use by other threads +prior to storing it. Otherwise, ResourceUsageThread may see it too early. + +* workers/WorkerThread.cpp: +(WebCore::WorkerThread::start): Ignore worker threads that are +not fully initialized. + 2020-02-12 Youenn Fablet ServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all lambda parameters by value Modified: trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm (256473 => 256474) --- trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2020-02-12 21:49:12 UTC (rev 256473) +++ trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2020-02-12 21:50:49 UTC (rev 256474) @@ -168,6 +168,9 @@ { LockHolder lock(WorkerThread::workerThreadsMutex()); for (auto* thread : WorkerThread::workerThreads(lock)) { +// Ignore worker threads that have not been fully started yet. +if (!thread->thread()) +continue; mach_port_t machThread = thread->thread()->machThread(); if (machThread != MACH_PORT_NULL) knownWorkerThreads.set(machThread, thread->identifier().isolatedCopy()); Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (256473 => 256474) --- trunk/Source/WebCore/workers/WorkerThread.cpp 2020-02-12 21:49:12 UTC (rev 256473) +++ trunk/Source/WebCore/workers/WorkerThread.cpp 2020-02-12 21:50:49 UTC (rev 256474) @@ -142,9 +142,12 @@ m_evaluateCallback = WTFMove(evaluateCallback); -m_thread = Thread::create(isServiceWorkerThread() ? "WebCore: Service Worker" : "WebCore: Worker", [this] { +Ref thread = Thread::create(isServiceWorkerThread() ? "WebCore: Service Worker" : "WebCore: Worker", [this] { workerThread(); }); +// Force the Thread object to be initialized fully before storing it to m_thread (and becoming visible to other threads). +WTF::storeStoreFence(); +m_thread = WTFMove(thread); } void WorkerThread::workerThread() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [253841] trunk/Source/WebKit
Title: [253841] trunk/Source/WebKit Revision 253841 Author bb...@apple.com Date 2019-12-20 13:36:24 -0800 (Fri, 20 Dec 2019) Log Message Unreviewed, try to fix the non-unified sources build. * UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp: (WebKit::MockAuthenticatorManager::filterTransports const): The current chunking of unified source files seems to provide a 'using namespace WebCore' for these references to AuthenticatorTransport. Add a namespace qualification so that this file compiles by itself. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (253840 => 253841) --- trunk/Source/WebKit/ChangeLog 2019-12-20 21:03:26 UTC (rev 253840) +++ trunk/Source/WebKit/ChangeLog 2019-12-20 21:36:24 UTC (rev 253841) @@ -1,3 +1,13 @@ +2019-12-20 Brian Burg + +Unreviewed, try to fix the non-unified sources build. + +* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp: +(WebKit::MockAuthenticatorManager::filterTransports const): +The current chunking of unified source files seems to provide a +'using namespace WebCore' for these references to AuthenticatorTransport. +Add a namespace qualification so that this file compiles by itself. + 2019-12-20 James Savage Include WKPDFConfiguration, WKFindConfiguration, and WKFindResult in umbrella header Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp (253840 => 253841) --- trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp 2019-12-20 21:03:26 UTC (rev 253840) +++ trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp 2019-12-20 21:36:24 UTC (rev 253841) @@ -53,9 +53,9 @@ void MockAuthenticatorManager::filterTransports(TransportSet& transports) const { if (!m_testConfiguration.nfc) -transports.remove(AuthenticatorTransport::Nfc); +transports.remove(WebCore::AuthenticatorTransport::Nfc); if (!m_testConfiguration.local) -transports.remove(AuthenticatorTransport::Internal); +transports.remove(WebCore::AuthenticatorTransport::Internal); } } // namespace WebKit ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [253837] trunk/Source
Title: [253837] trunk/Source Revision 253837 Author bb...@apple.com Date 2019-12-20 12:42:43 -0800 (Fri, 20 Dec 2019) Log Message Web Inspector: convert some InspectorFrontendHost methods to getters https://bugs.webkit.org/show_bug.cgi?id=205475 Reviewed by Devin Rousso. Source/WebCore: No reason for these to be method calls, so expose as getters / attributes instead. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::isRemote const): (WebCore::debuggableTypeToString): (WebCore::InspectorFrontendHost::localizedStringsURL): Deleted. (WebCore::InspectorFrontendHost::backendCommandsURL): Deleted. (WebCore::InspectorFrontendHost::debuggableType): Deleted. (WebCore::InspectorFrontendHost::inspectionLevel): Deleted. (WebCore::InspectorFrontendHost::platform): Deleted. (WebCore::InspectorFrontendHost::port): Deleted. * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * testing/Internals.cpp: Source/WebInspectorUI: No reason for these to be method calls, so expose as getters / attributes instead. * UserInterface/Base/LoadLocalizedStrings.js: * UserInterface/Base/Main.js: * UserInterface/Base/ObjectStore.js: (WI.ObjectStore.get _databaseName): * UserInterface/Base/Platform.js: * UserInterface/Base/Setting.js: (WI.Setting._localStorageKey): * UserInterface/Debug/Bootstrap.js: (WI.runBootstrapOperations): * UserInterface/Protocol/LoadInspectorBackendCommands.js: Source/WebKit: No reason for these to be method calls, so expose as getters / attributes instead. * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp: (WebKit::WebInspectorUI::localizedStringsURL const): (WebKit::RemoteWebInspectorUI::localizedStringsURL const): (WebKit::WebInspectorUI::localizedStringsURL): Deleted. (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted. * WebProcess/WebPage/mac/WebInspectorUIMac.mm: (WebKit::WebInspectorUI::localizedStringsURL const): (WebKit::RemoteWebInspectorUI::localizedStringsURL const): (WebKit::WebInspectorUI::localizedStringsURL): Deleted. (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted. * WebProcess/WebPage/win/WebInspectorUIWin.cpp: (WebKit::WebInspectorUI::localizedStringsURL const): (WebKit::RemoteWebInspectorUI::localizedStringsURL const): (WebKit::WebInspectorUI::localizedStringsURL): Deleted. (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted. * WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp: (WebKit::WebInspectorUI::localizedStringsURL const): (WebKit::RemoteWebInspectorUI::localizedStringsURL const): (WebKit::WebInspectorUI::localizedStringsURL): Deleted. (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted. Source/WebKitLegacy/ios: * WebCoreSupport/WebInspectorClientIOS.mm: (WebInspectorFrontendClient::localizedStringsURL const): (WebInspectorFrontendClient::localizedStringsURL): Deleted. Source/WebKitLegacy/mac: * WebCoreSupport/WebInspectorClient.h: * WebCoreSupport/WebInspectorClient.mm: (WebInspectorFrontendClient::localizedStringsURL const): (WebInspectorFrontendClient::localizedStringsURL): Deleted. Source/WebKitLegacy/win: * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorFrontendClient::localizedStringsURL const): (WebInspectorFrontendClient::localizedStringsURL): Deleted. * WebCoreSupport/WebInspectorClient.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorFrontendClient.h trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp trunk/Source/WebCore/inspector/InspectorFrontendHost.h trunk/Source/WebCore/inspector/InspectorFrontendHost.idl trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Base/ObjectStore.js trunk/Source/WebInspectorUI/UserInterface/Base/Platform.js trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js trunk/Source/WebInspectorUI/UserInterface/Protocol/LoadInspectorBackendCommands.js trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.h trunk/Source/WebKit/WebProcess/WebPage/WebInspectorUI.h trunk/Source/WebKit/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp trunk/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm trunk/Source/WebKit/WebProcess/WebPage/win/WebInspectorUIWin.cpp trunk/Source/WebKit/WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp trunk/Source/WebKitLegacy/ios/ChangeLog trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebInspectorClientIOS.mm trunk/Source/WebKitLegacy/mac/ChangeLog trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.h trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm trunk/Source/WebKitLegacy/win/ChangeLog trunk/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.cpp trunk/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.h Diff
[webkit-changes] [253591] trunk/Source/WebInspectorUI
Title: [253591] trunk/Source/WebInspectorUI Revision 253591 Author bb...@apple.com Date 2019-12-16 15:28:27 -0800 (Mon, 16 Dec 2019) Log Message Web Inspector: add TabNavigation diagnostic event and related hooks https://bugs.webkit.org/show_bug.cgi?id=205138 Reviewed by Devin Rousso. This patch adds a new recorder for the TabNavigation diagnostic event. The bulk of this patch is to find all callsites that can possibly change the active tab and annotate them with the type of interaction (tab click, link click, keyboard shortcut, inspect, and others). This patch was developed through trial and error by logging the diagnostic events and debugging any scenarios where a tab navigation is not correctly annotated with the initiating interaction. * UserInterface/Main.html: Add new file. * UserInterface/Base/Main.js: (WI.contentLoaded): Register new recorder. (WI._handleSettingsKeyboardShortcut): Annotate as keyboard shortcut. - Add options argument to most WI.show*Tab functions, and forward to the underlying TabBrowser or TabBar calls. This allows initiatorHint to be used in these cases. - Add other annotations to linkifyElement * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.showTabForContentView): (WI.TabBrowser.prototype._tabBarItemSelected): - Try to infer an initiator for the tab navigation from TabBrowser API arguments or from TabBar's event. - Add an enum with TabNavigationInitiator values. * UserInterface/Base/DOMUtilities.js: Clickable element links should be reported as link clicks. Add an annotation so that it isn't reported as "Inspect" (due to going through DOMManager.inspectElement). * UserInterface/Controllers/CallFrameTreeController.js: (WI.CallFrameTreeController): (WI.CallFrameTreeController.prototype._showSourceCodeLocation): This is mainly used by Canvas tab. Annotate call frame links as link clicks. * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.prototype.inspectElement): Accept an options argument. This is used to forward the initiatorHint to the listener of this event, WI._domNodeWasInspected, so it can forward the initiatorHint further on. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.setTimelineProfilingEnabled): (InspectorFrontendAPI.showConsole): (InspectorFrontendAPI.showResources): (InspectorFrontendAPI.showTimelines): (InspectorFrontendAPI.showMainResourceForFrame): Annotate these as FrontendAPI calls. Mainly used by Develop menu items in Safari. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): (WI.appendContextMenuItemsForURL): Annotate as context menu. * UserInterface/Views/DOMNodeTreeElement.js: (WI.DOMNodeTreeElement): (WI.DOMNodeTreeElement.prototype.populateContextMenu): Annotate as context menu. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._buildTagDOM): * UserInterface/Views/DefaultDashboardView.js: (WI.DefaultDashboardView.prototype._resourcesItemWasClicked): (WI.DefaultDashboardView.prototype._networkItemWasClicked): (WI.DefaultDashboardView.prototype._timelineItemWasClicked): (WI.DefaultDashboardView.prototype._consoleItemWasClicked): Annotate as dashboard. * UserInterface/Views/LegacyTabBar.js: (WI.LegacyTabBar.prototype.set selectedTabBarItem): Include the inferred initiator in the event that is dispatched. (WI.LegacyTabBar.prototype.selectTabBarItemWithInitiator): Added. This is a convenience method that temporarily sets the initiator before invoking the setter (which reads the initator). (WI.LegacyTabBar.prototype._handleMouseDown): (WI.LegacyTabBar.prototype._handleClick): (WI.LegacyTabBar.prototype._handleNewTabClick): Treat these as "tab clicks". * UserInterface/Views/TabBar.js: (WI.TabBar.prototype.set selectedTabBarItem): (WI.TabBar.prototype.selectTabBarItemWithInitiator): (WI.TabBar.prototype._handleMouseDown): (WI.TabBar.prototype._handleClick): Changes from LegacyTabBar have been copied to this version, as it's a drop-in replacement. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype._showConsoleTab): Treat the console chevron as a "button click". * UserInterface/Views/NewTabContentView.js: (WI.NewTabContentView.prototype._createNewTabWithType): Treat each tab button as a "button click". * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement.prototype.populateContextMenu): Annotate as context menu. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WI.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked): Annotate as link click. * UserInterface/Views/SearchResultTreeElement.js: (WI.SearchResultTreeElement): (WI.SearchResultTreeElement.prototype.populateContextMenu): Annotate as context menu. * UserInterface/Views/SourceCodeTextEditor.js: (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu): Annotate as context menu. (WI.SourceCodeTextEditor.prototype._showPopoverForObject.): (WI.SourceCodeTextEditor.prototype._showPopoverForObject):
[webkit-changes] [253211] trunk/Source/WebInspectorUI
Title: [253211] trunk/Source/WebInspectorUI Revision 253211 Author bb...@apple.com Date 2019-12-06 11:34:39 -0800 (Fri, 06 Dec 2019) Log Message Web Inspector: TabActivity diagnostic event should sample the active tab uniformly https://bugs.webkit.org/show_bug.cgi?id=204531 Reviewed by Devin Rousso. Rewrite this class to use a uniform sampling approach. Every n seconds, a timer fires and samples what the current tab is. If the last user interaction happened up to n seconds ago, report a TabActivity diagnostic event. Keeping with the previous implementation, samples are taken every n=60 seconds. To account for bias in the initial sample when Web Inspector is open, wait m seconds for the first sample. This accounts for the time between opening Web Inspector and choosing the desired tab. In my testing, m=10 is enough time to load Web Inspector and switch immediately to a different tab. In that case, the initial tab would not be sampled as the active tab even if the last user interaction (clicking tab bar) happened while the initial tab was displayed. If the recorder's setup() method is called some time after Web Inspector is opened, then the initial delay will shrink to ensure at least 10s has elapsed since the frontend finished loading. * UserInterface/Base/Main.js: (WI.contentLoaded): Keep a timestamp of when the frontend finished loading. * UserInterface/Controllers/TabActivityDiagnosticEventRecorder.js: (WI.TabActivityDiagnosticEventRecorder): (WI.TabActivityDiagnosticEventRecorder.prototype.setup): (WI.TabActivityDiagnosticEventRecorder.prototype.teardown): (WI.TabActivityDiagnosticEventRecorder.prototype._startInitialDelayBeforeSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._stopInitialDelayBeforeSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._startEventSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._stopEventSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._sampleCurrentTabActivity): (WI.TabActivityDiagnosticEventRecorder.prototype._didObserveUserInteraction): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowFocus): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowBlur): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowKeyDown): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowMouseDown): (WI.TabActivityDiagnosticEventRecorder.prototype._didInteractWithTabContent): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._clearTabActivityTimeout): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._beginTabActivityTimeout): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._stopTrackingTabActivity): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._handleTabBrowserSelectedTabContentViewDidChange): Deleted. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Base/Main.js trunk/Source/WebInspectorUI/UserInterface/Controllers/TabActivityDiagnosticEventRecorder.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (253210 => 253211) --- trunk/Source/WebInspectorUI/ChangeLog 2019-12-06 19:18:16 UTC (rev 253210) +++ trunk/Source/WebInspectorUI/ChangeLog 2019-12-06 19:34:39 UTC (rev 253211) @@ -1,3 +1,47 @@ +2019-11-25 Brian Burg + +Web Inspector: TabActivity diagnostic event should sample the active tab uniformly +https://bugs.webkit.org/show_bug.cgi?id=204531 + +Reviewed by Devin Rousso. + +Rewrite this class to use a uniform sampling approach. Every n seconds, a timer fires and +samples what the current tab is. If the last user interaction happened up to n seconds ago, +report a TabActivity diagnostic event. Keeping with the previous implementation, samples +are taken every n=60 seconds. + +To account for bias in the initial sample when Web Inspector is open, wait m seconds for +the first sample. This accounts for the time between opening Web Inspector and choosing the +desired tab. In my testing, m=10 is enough time to load Web Inspector and switch +immediately to a different tab. In that case, the initial tab would not be sampled as the +active tab even if the last user interaction (clicking tab bar) happened while the initial +tab was displayed. If the recorder's setup() method is called some time after Web Inspector is +opened, then the initial delay will shrink to ensure at least 10s has elapsed since the frontend +finished loading. + +* UserInterface/Base/Main.js: +(WI.contentLoaded): Keep a timestamp of when the frontend finished loading. + +* UserInterface/Controllers/TabActivityDiagnosticEventRecorder.js: +(WI.TabActivityDiagnosticEventRecorder): +(WI.TabActivityDiagnosticEventRecorder.prototype.setup): +(WI.TabActivityDiagnosticEventRecorder.prototype.teardown): +(WI.TabActivityDiagnosticEventRecorder.prototyp