[webkit-changes] [WebKit/WebKit] e1d780: Web Inspector: Deeply nested console logging can c...

2023-07-31 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e1d780dcb545a6a90b4ae0909c29b5c70d95a922
  
https://github.com/WebKit/WebKit/commit/e1d780dcb545a6a90b4ae0909c29b5c70d95a922
  Author: Patrick Angle 
  Date:   2023-07-31 (Mon, 31 Jul 2023)

  Changed paths:
M Source/JavaScriptCore/inspector/ScriptCallStack.cpp
M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp

  Log Message:
  ---
  Web Inspector: Deeply nested console logging can cause ConsoleMessage to be 
destroyed while we are still trying to log it
https://bugs.webkit.org/show_bug.cgi?id=256932
rdar://108063640

Reviewed by Mark Lam.

InspectorConsoleAgent has been incorrectly managing the lifetime of each 
ConsoleMessage by moving messages into a vector
of messages before we have passed those messages on to the frontend. This means 
that a console message that causes
another console message to be logged may eventually cause our original message 
to be dropped from the vector if this
occurs deeply enough. At that point, when we unwind back to the original 
message, it has been destroyed while we are
trying to send it to the frontend, which results in a bad time because we are 
still inside a function on the
ConsoleMessage that tries to access its own member variables like m_arguments, 
and fails because the message object
itself has been destroyed, taking its members with it.

This also fixes a subtle message inversion in the backlog of messages and what 
is logged to the console when Web
Inspector is open, since the message is sent to the frontend after all other 
processing, but we were previously adding
the message to the vector of past messages before that processing (which may in 
turn cause more logging before the
actual logging we called in to perform) to occur.

A second minor issue is that ScriptCallStack is incorrectly asserting in its 
constructor, which preventing investigation
of this issue initially. The call stack should be less than __or equal to__ the 
max call stack, not just less than.

* Source/JavaScriptCore/inspector/ConsoleMessage.cpp:
(Inspector::ConsoleMessage::addToFrontend):
* Source/JavaScriptCore/inspector/InjectedScript.cpp:
(Inspector::InjectedScript::wrapObject const):
(Inspector::InjectedScript::wrapTable const):
* Source/JavaScriptCore/inspector/ScriptCallStack.cpp:
(Inspector::ScriptCallStack::ScriptCallStack):
* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::addConsoleMessage):
* Source/WebCore/page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::messageWithTypeAndLevel):

Originally-landed-as: 259548.777@safari-7615-branch (e74d4b07ad38). 
rdar://108063640
Canonical link: https://commits.webkit.org/266438@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d6b1ac: Remote Web Inspector: [Cocoa] RemoteInspectorCocoa...

2023-06-14 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d6b1aca616b96e2cbb89eb0160ddef87ea78fbe7
  
https://github.com/WebKit/WebKit/commit/d6b1aca616b96e2cbb89eb0160ddef87ea78fbe7
  Author: Patrick Angle 
  Date:   2023-06-14 (Wed, 14 Jun 2023)

  Changed paths:
M Source/JavaScriptCore/inspector/remote/RemoteInspector.h
M Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h
M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm

  Log Message:
  ---
  Remote Web Inspector: [Cocoa] RemoteInspectorCocoa should not attempt to 
reconnect to (and thus relaunch) a relay that exited cleanly
https://bugs.webkit.org/show_bug.cgi?id=258084
rdar://109617310

Reviewed by BJ Burg and Devin Rousso.

When handling the global notification that a relay has become available, we 
always first if our current connection to
the relay is valid, in which case we don't need to do any more work. However, 
for that check to work we set
m_shouldReconnectToRelayOnFailure to true so that upon a failure, we will 
attempt a single reconnect to a new relay.
This issue exists however where that check is successful and we don't have to 
reconnect, and therefore we don't have a
chance to set m_shouldReconnectToRelayOnFailure back to false.

To solve this, we have implemented a more formal version of the existing 
"check" message that expects a success response
from the relay if it doesn't fail, which lets us set the reconnect bit back to 
false to prevent some future exit of the
relay from causing a reconnection when we don't expect it to, causing a new 
relay to be started.

* Source/JavaScriptCore/inspector/remote/RemoteInspector.h:
* Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h:
* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::xpcConnectionReceivedMessage):
(Inspector::RemoteInspector::receivedPingSuccessMessage):

Canonical link: https://commits.webkit.org/265173@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 331064: Web Inspector: Deeply nested async stack traces ar...

2023-05-22 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 33106442561e29aec6760903d306bb78c3eee2fc
  
https://github.com/WebKit/WebKit/commit/33106442561e29aec6760903d306bb78c3eee2fc
  Author: Patrick Angle 
  Date:   2023-05-22 (Mon, 22 May 2023)

  Changed paths:
M LayoutTests/inspector/debugger/async-stack-trace-truncate-expected.txt
M LayoutTests/inspector/debugger/async-stack-trace-truncate.html
M Source/JavaScriptCore/inspector/AsyncStackTrace.cpp
M Source/JavaScriptCore/inspector/ScriptCallStack.cpp
M Source/JavaScriptCore/inspector/ScriptCallStack.h

  Log Message:
  ---
  Web Inspector: Deeply nested async stack traces are not fully truncated
https://bugs.webkit.org/show_bug.cgi?id=254244
rdar://105900359

Reviewed by Yusuke Suzuki.

As of 252630@main, ScriptCallStack holds a reference to its parent 
AsyncStackTrace to enable providing async stack
traces in places where previously the async context was being lost. However 
when this was added, the truncation
functionality used to ensure that AsyncStackTrace did not create an infinitely 
nested set of objects did not take the
new reference into account. In practice, we should break that relationship any 
time we are removing the parent of the
AsyncStackTrace. This allows us to correctly release ownership of 
AsyncStackTraces as we nest deeper, then preventing us
from recursing during their deconstruction later.

* LayoutTests/inspector/debugger/async-stack-trace-truncate-expected.txt:
* LayoutTests/inspector/debugger/async-stack-trace-truncate.html:
- Add test case that creates a nested set of AsyncStackTrace/ScriptCallStack 
that will exceed the size of the stack if
not correctly truncated.

* Source/JavaScriptCore/inspector/AsyncStackTrace.cpp:
(Inspector::AsyncStackTrace::remove):
Remove the ScriptCallStack's parent at the same time we remove the 
AsyncStackTrace's parent.

* Source/JavaScriptCore/inspector/ScriptCallStack.cpp:
(Inspector::ScriptCallStack::removeParentStackTrace):
* Source/JavaScriptCore/inspector/ScriptCallStack.h:

Originally-landed-as: 259548.467@safari-7615-branch (69eae63cd374). 
rdar://105900359
Canonical link: https://commits.webkit.org/264354@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f7b354: Cherry-pick 3db5312ccb75. rdar://problem/108471471

2023-05-03 Thread Patrick Angle
/JavaScriptCore/heap/MarkedBlockInlines.h:
(JSC::MarkedBlock::Handle::specializedSweep):
* Source/JavaScriptCore/jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::jitAssertTagsInPlace):
(JSC::AssemblyHelpers::emitExceptionCheck):
(JSC::AssemblyHelpers::emitNonPatchableExceptionCheck):
(JSC::AssemblyHelpers::loadProperty):
(JSC::AssemblyHelpers::storeProperty):
(JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):
(JSC::AssemblyHelpers::emitAllocateVariableSized):
(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::emitRestoreCalleeSavesFor):

Canonical link: https://commits.webkit.org/263313@main
Identifier: 263289.4@safari-7616.1.12-branch


  Commit: 3a615cb54b30bd76b4e88953176bcc39608219bc
  
https://github.com/WebKit/WebKit/commit/3a615cb54b30bd76b4e88953176bcc39608219bc
  Author: Jer Noble 
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
M Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm

  Log Message:
  ---
  Cherry-pick afb4d354559f. rdar://problem/108531838

[Mac] Media loading causes a crash when running in the base system
https://bugs.webkit.org/show_bug.cgi?id=255964
rdar://108531838

Reviewed by Alex Christensen.

Make the AVAudioSession class optional in AVFoundationSoftLink.

* Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm:

Canonical link: https://commits.webkit.org/263414@main
Identifier: 263289.5@safari-7616.1.12-branch


  Commit: 8a51c2aba726a1ccdbc2371749107ddc7d61e2a6
  
https://github.com/WebKit/WebKit/commit/8a51c2aba726a1ccdbc2371749107ddc7d61e2a6
  Author: Commit Queue 
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h
M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm

  Log Message:
  ---
  Cherry-pick 9f898b6f9ff6. rdar://problem/108439267

Unreviewed, reverting r263269@main.
https://bugs.webkit.org/show_bug.cgi?id=255851

Speedometer2.1 regression

Reverted changeset:

"Use a RunLoop Observer for RemoteLayerTreeDrawingArea."
https://bugs.webkit.org/show_bug.cgi?id=255769
https://commits.webkit.org/263269@main

Canonical link: https://commits.webkit.org/263296@main

Identifier: 263289.6@safari-7616.1.12-branch


  Commit: fcd2cc1f2f382c3158ca0e273d1c17b03de2f233
  
https://github.com/WebKit/WebKit/commit/fcd2cc1f2f382c3158ca0e273d1c17b03de2f233
  Author: Myah Cobbs 
  Date:   2023-04-28 (Fri, 28 Apr 2023)

  Changed paths:
M Configurations/Version.xcconfig

  Log Message:
  ---
  Versioning.

WebKit-7616.1.12.1

Identifier: 263289.7@safari-7616.1.12-branch


  Commit: 67aa7aff2653885fe356fecaa7cdaead0533b8c7
  
https://github.com/WebKit/WebKit/commit/67aa7aff2653885fe356fecaa7cdaead0533b8c7
  Author: Myah Cobbs 
  Date:   2023-05-01 (Mon, 01 May 2023)

  Changed paths:
M Configurations/Version.xcconfig

  Log Message:
  ---
  Versioning.

WebKit-7616.1.12.2

Identifier: 263289.8@safari-7616.1.12-branch


  Commit: 602d0104c54abdfdb0667bf0e639f9e0d0b1905f
  
https://github.com/WebKit/WebKit/commit/602d0104c54abdfdb0667bf0e639f9e0d0b1905f
  Author: Patrick Angle 
  Date:   2023-05-01 (Mon, 01 May 2023)

  Changed paths:
M LayoutTests/inspector/dom/showFlexOverlay.html
M LayoutTests/inspector/dom/showGridOverlay.html
M Source/WebCore/inspector/InspectorOverlay.cpp

  Log Message:
  ---
  Cherry-pick 05e01b57a4ec. rdar://problem/108745762

Web Inspector: Crash when inspecting CSS Grid without defined columns or 
rows
https://bugs.webkit.org/show_bug.cgi?id=256072
rdar://108641874

Reviewed by Devin Rousso.

262869@main fixed issues with determining the authored grid track sizes, 
but in the process introduced a potential null
pointer deref due to us erroneously trying to get a reference to a RefPtr's 
value instead of getting its pointer for use
in a dynamic downcast.

* LayoutTests/inspector/dom/showFlexOverlay.html:
- Drive-by ensure we enable all options for flex overlays too so that those 
paths are exercises.

* LayoutTests/inspector/dom/showGridOverlay.html:
* Source/WebCore/inspector/InspectorOverlay.cpp:
(WebCore::authoredGridTrackSizes):

Canonical link: https://commits.webkit.org/263517@main
Identifier: 263289.9@safari-7616.1.12-branch


Compare: https://github.com/WebKit/WebKit/compare/f7b3549c3497%5E...602d0104c54a
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 05e01b: Web Inspector: Crash when inspecting CSS Grid with...

2023-04-28 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 05e01b57a4ecfed9f298898ed78f32bfd2456b94
  
https://github.com/WebKit/WebKit/commit/05e01b57a4ecfed9f298898ed78f32bfd2456b94
  Author: Patrick Angle 
  Date:   2023-04-28 (Fri, 28 Apr 2023)

  Changed paths:
M LayoutTests/inspector/dom/showFlexOverlay.html
M LayoutTests/inspector/dom/showGridOverlay.html
M Source/WebCore/inspector/InspectorOverlay.cpp

  Log Message:
  ---
  Web Inspector: Crash when inspecting CSS Grid without defined columns or rows
https://bugs.webkit.org/show_bug.cgi?id=256072
rdar://108641874

Reviewed by Devin Rousso.

262869@main fixed issues with determining the authored grid track sizes, but in 
the process introduced a potential null
pointer deref due to us erroneously trying to get a reference to a RefPtr's 
value instead of getting its pointer for use
in a dynamic downcast.

* LayoutTests/inspector/dom/showFlexOverlay.html:
- Drive-by ensure we enable all options for flex overlays too so that those 
paths are exercises.

* LayoutTests/inspector/dom/showGridOverlay.html:
* Source/WebCore/inspector/InspectorOverlay.cpp:
(WebCore::authoredGridTrackSizes):

Canonical link: https://commits.webkit.org/263517@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 91a1d2: Web Inspector: Upstream Safari 16.4 user agents

2023-04-24 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 91a1d200f87587153d1c94cf589e58bde38afc8c
  
https://github.com/WebKit/WebKit/commit/91a1d200f87587153d1c94cf589e58bde38afc8c
  Author: Patrick Angle 
  Date:   2023-04-24 (Mon, 24 Apr 2023)

  Changed paths:
M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
M Source/WebInspectorUI/UserInterface/Views/OverrideDeviceSettingsPopover.js

  Log Message:
  ---
  Web Inspector: Upstream Safari 16.4 user agents
https://bugs.webkit.org/show_bug.cgi?id=255636
rdar://105254961

Reviewed by Devin Rousso.

* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebInspectorUI/UserInterface/Views/OverrideDeviceSettingsPopover.js:
(WI.OverrideDeviceSettingsPopover.prototype._createUserAgentSection):

Canonical link: https://commits.webkit.org/263319@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 5d57d9: Web Inspector: WebRTC "Disable encryption" setting...

2023-04-24 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d57d9a6c9a4dfc390cea6e225f6a7159c4f774d
  
https://github.com/WebKit/WebKit/commit/5d57d9a6c9a4dfc390cea6e225f6a7159c4f774d
  Author: Patrick Angle 
  Date:   2023-04-24 (Mon, 24 Apr 2023)

  Changed paths:
M Source/JavaScriptCore/inspector/protocol/Page.json
M Source/WebCore/inspector/agents/InspectorPageAgent.cpp
M Source/WebCore/page/Settings.yaml
M Source/WebInspectorUI/UserInterface/Views/OverrideDeviceSettingsPopover.js

  Log Message:
  ---
  Web Inspector: WebRTC "Disable encryption" setting should be removed from 
remote inspection, it already isn't present for local inspection
https://bugs.webkit.org/show_bug.cgi?id=250336
rdar://104042073

Reviewed by Devin Rousso.

This setting already isn't present on macOS, and we already tried to remove it 
once earlier this year, but failed due to
what I believe to have been unrelated testing failures. We are attempting to 
reland it here with an update to make the
patch work with the changes to the Device menu that have since occurred.

* Source/JavaScriptCore/inspector/protocol/Page.json:
* Source/WebCore/inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::overrideSetting):
* Source/WebCore/page/Settings.yaml:
* Source/WebInspectorUI/UserInterface/Views/OverrideDeviceSettingsPopover.js:
(WI.OverrideDeviceSettingsPopover.prototype._createSettingsSection):

Canonical link: https://commits.webkit.org/263316@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c79345: MiniBrowser: Web Inspector is partially obscured b...

2023-04-12 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c7934509b31e58a4b6082f230385a566fa90e234
  
https://github.com/WebKit/WebKit/commit/c7934509b31e58a4b6082f230385a566fa90e234
  Author: Patrick Angle 
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
M Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm

  Log Message:
  ---
  MiniBrowser: Web Inspector is partially obscured by web view’s layer hosting 
view
https://bugs.webkit.org/show_bug.cgi?id=255312
rdar://problem/107911224

Reviewed by Myles C. Maxfield.

When Web Inspector is attached within a WKWebView, the m_layerHostingView of 
the WebViewImpl overlaps with web inspector
because it is not clipping to bounds. When clipping to bounds we still content 
under the toolbar in MiniBrowser, and can
now also see the top of Web Inspector again.

* Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):

Canonical link: https://commits.webkit.org/262887@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a465a8: Web Inspector: Regression(260175@main) Grid overla...

2023-04-12 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a465a8a38ab52cfd57d2c2e710d72ea6f53d9c81
  
https://github.com/WebKit/WebKit/commit/a465a8a38ab52cfd57d2c2e710d72ea6f53d9c81
  Author: Patrick Angle 
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
M LayoutTests/inspector/dom/showGridOverlay.html
M Source/WebCore/inspector/InspectorOverlay.cpp

  Log Message:
  ---
  Web Inspector: Regression(260175@main) Grid overlay for grids using repeat 
syntax triggers assert performing downcast
https://bugs.webkit.org/show_bug.cgi?id=255311
rdar://107764654

Reviewed by Devin Rousso.

After 260175@main, CSSGridIntegerRepeatValue and CSSGridAutoRepeatValue no 
longer inherit from CSSValueList, and instead
inherit from CSSValueContainingVector. The inspector overlay code was written 
in such a way that we were checking if the
class was one of the repeat types, but then downcasting to CSSValueList making 
that relation less apparent. Converting
the downcasts to dynamicDowncasts where we previously had the `is` checks fixes 
the issue and guards against this
mistake in the future.

* LayoutTests/inspector/dom/showGridOverlay.html:
* Source/WebCore/inspector/InspectorOverlay.cpp:
(WebCore::authoredGridTrackSizes):

Canonical link: https://commits.webkit.org/262869@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d5d5bd: Remote Web Inspector: Send the `presentingApplicat...

2023-04-05 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d5d5bd30a02deea1a39d7235f31a0bf3fee5cdd4
  
https://github.com/WebKit/WebKit/commit/d5d5bd30a02deea1a39d7235f31a0bf3fee5cdd4
  Author: Patrick Angle 
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h
M Source/JavaScriptCore/inspector/remote/RemoteInspector.h
M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  ---
  Remote Web Inspector: Send the `presentingApplicationPID` to the relay 
process for WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=254537
rdar://105636143

Reviewed by BJ Burg.

In some cases, a process may create WKWebViews on behalf of another process to 
be served remotely. WKWebViews
inspectability is managed in the UI process, and those does not currently use 
the `presentingApplicationPID` to
associate a target with a specific parent process (a process may represent 
multiple parent processes at a time). We thus
need to provide target-specific PIDs for the presenting application so that 
WKWebViews are correctly related back to the
application that is showing the web content via the intermediate remote service 
that actually created the WKWebView.

* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp:
(Inspector::RemoteInspectionTarget::setPresentingApplicationPID):
* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h:
- Allow setting a per-target `presentingApplicationPID` as an alternative to 
having a single PID the entire process
proxies its inspectable content to.

* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::identifierForPID):
(Inspector::RemoteInspector::listingForInspectionTarget const):
- Provide a per-target presenting application PID so that individual web views 
can be associated the appropriate process.
Relays should use this value in place of the application-wide parent process 
PID when it is present. For WKWebView,
those values will be equal by default unless explicitly set.

(Inspector::RemoteInspector::receivedProxyApplicationSetupMessage):
- Proxy apps don't need to respond to the proxy setup message, since all the 
necessary information will be provided with
the application's listing of targets.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
- Use the `presentingApplicationPID` of the web content process pool to inform 
associate the inspectable page with the
correct parent application, since that is the pool that the content to be 
inspected will actually exist in. Unless it
has been overriden, this will be the PID of the UI process.

Canonical link: https://commits.webkit.org/262620@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 63cd09: Web Inspector: Regression(261966@main) Popovers ar...

2023-04-03 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 63cd0995822b54b725b9746dbd3c7e23f2ce81fb
  
https://github.com/WebKit/WebKit/commit/63cd0995822b54b725b9746dbd3c7e23f2ce81fb
  Author: Patrick Angle 
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Views/Popover.css

  Log Message:
  ---
  Web Inspector: Regression(261966@main) Popovers are 2x the correct size on 2x 
displays
https://bugs.webkit.org/show_bug.cgi?id=254899
rdar://107539887

Reviewed by Devin Rousso.

The popover's background must explicitly be told to size itself to match the 
popover, otherwise it will be laid out at
the size defined by its width and height attribute which are used to determine 
the number of actual pixels the canvas
should have, while the number of screen points those pixels should fit in may 
be less than the number of pixels if a
display scale factor is present, like on a Retina display.

* Source/WebInspectorUI/UserInterface/Views/Popover.css:
(.popover > .background-canvas):

Canonical link: https://commits.webkit.org/262510@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ed99b9: Web Inspector: (Regression: 254636@main) Mini cons...

2023-03-24 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ed99b93877dd9c47942db5a0f56a82acc4adeebd
  
https://github.com/WebKit/WebKit/commit/ed99b93877dd9c47942db5a0f56a82acc4adeebd
  Author: Patrick Angle 
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
M 
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js
M Source/WebInspectorUI/UserInterface/Models/ConsoleCommandResultMessage.js
M Source/WebInspectorUI/UserInterface/Views/AnimationContentView.js
M Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js
M Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js
M Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js
M Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js
M Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js
M Source/WebInspectorUI/UserInterface/Views/QuickConsole.js
M Source/WebInspectorUI/UserInterface/Views/WebSocketResourceTreeElement.js

  Log Message:
  ---
  Web Inspector: (Regression: 254636@main) Mini console always opens when 
choosing "Inspect Element", even if it was previously closed
https://bugs.webkit.org/show_bug.cgi?id=253273
rdar://106260652

Reviewed by Devin Rousso.

When console snippets were introduced, the function signature of 
`appendImmediateExecutionWithResult` was updated so
that optional values were part of an options object. However, in changing that 
it appears it was assumed that the
default would be flipped to `false`, but that never happened. The parameter was 
no longer being provided by DOMManger
when inspecting an element, and therefor we fell back to the default of showing 
the quick console.

To fix this, we correct the `shouldRevealConsole` to be `false` by default, 
matching other option objects, and then
clean up other places where we were assuming it would still be true (mostly 
anywhere that a "Log [thing]" option was
present).

* 
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js:
(WI.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult.saveResultCallback):
(WI.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
- Use the new options object of the ConsoleCommandResultMessage constructor.

* Source/WebInspectorUI/UserInterface/Models/ConsoleCommandResultMessage.js:
- Make `shouldRevealConsole` part of an options object, and make it default to 
false instead.

* Source/WebInspectorUI/UserInterface/Views/AnimationContentView.js:
(WI.AnimationContentView.prototype._populateAnimationTargetButtonContextMenu):
(WI.AnimationContentView):
* Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu):
* Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js:
(WI.CanvasTreeElement.prototype.populateContextMenu):
* Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js:
* Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js:
(WI.ObjectPreviewView.prototype._contextMenuHandler):
(WI.ObjectPreviewView):
* Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WI.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
(WI.ObjectTreeBaseTreeElement.prototype._logValue):
* Source/WebInspectorUI/UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._handleDrop):
* Source/WebInspectorUI/UserInterface/Views/WebSocketResourceTreeElement.js:
(WI.WebSocketResourceTreeElement.prototype.populateContextMenu):

Canonical link: https://commits.webkit.org/262106@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 2c7d4e: Web Inspector: Adopt esprima-next fork of esprima ...

2023-03-16 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2c7d4e7fbcc5794d397898df5de15f8d9faebd29
  
https://github.com/WebKit/WebKit/commit/2c7d4e7fbcc5794d397898df5de15f8d9faebd29
  Author: Patrick Angle 
  Date:   2023-03-16 (Thu, 16 Mar 2023)

  Changed paths:
M LayoutTests/inspector/formatting/formatting-javascript-expected.txt
M LayoutTests/inspector/formatting/formatting-javascript.html
M 
LayoutTests/inspector/formatting/resources/javascript-tests/classes-expected.js
M LayoutTests/inspector/formatting/resources/javascript-tests/classes.js
M 
LayoutTests/inspector/formatting/resources/javascript-tests/modules-expected.js
M LayoutTests/inspector/formatting/resources/javascript-tests/modules.js
A 
LayoutTests/inspector/formatting/resources/javascript-tests/optional-chaining-expected.js
A 
LayoutTests/inspector/formatting/resources/javascript-tests/optional-chaining.js
A 
LayoutTests/inspector/formatting/resources/javascript-tests/private-classes-expected.js
A 
LayoutTests/inspector/formatting/resources/javascript-tests/private-classes.js
M 
LayoutTests/inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js
M 
LayoutTests/inspector/formatting/resources/javascript-tests/unary-binary-expressions.js
M LayoutTests/inspector/model/parse-script-syntax-tree-expected.txt
M LayoutTests/inspector/model/parse-script-syntax-tree.html
M Source/WebInspectorUI/Tools/JSFormatter/JSFormatterDebug.js
M Source/WebInspectorUI/Tools/JSFormatter/index.html
M Source/WebInspectorUI/UserInterface/External/Esprima/esprima.js
M Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js
M Source/WebInspectorUI/UserInterface/Workers/Formatter/CSSFormatter.js
M Source/WebInspectorUI/UserInterface/Workers/Formatter/ESTreeWalker.js
M 
Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterContentBuilder.js
M Source/WebInspectorUI/UserInterface/Workers/Formatter/JSFormatter.js

  Log Message:
  ---
  Web Inspector: Adopt esprima-next fork of esprima to support ES2022 syntax
https://bugs.webkit.org/show_bug.cgi?id=253856
rdar://89097522

Reviewed by Devin Rousso.

Adopt a fork of esprima, esprima-next, which has been updated with ES2022 
features, and also includes our previously
up-streamed changes, as well as equivalent fixes for patches that had not been 
up-streamed. This commit includes commit
a002247e9cb92768ea91ef838b223012fe4fee9f of 
https://github.com/node-projects/esprima-next/.

Some adoption on JSFormatter/ESTreeWalker is necessary to handle a renamed 
piece of syntax, as well as support both
public and private class-level variable declarations.

* LayoutTests/inspector/formatting/formatting-javascript-expected.txt:
* LayoutTests/inspector/formatting/formatting-javascript.html:
- Fix simple class test case to extend some superclass to allow super to 
legally be used.
- Add cases to verify ImportExpression, ChainExpression, PrivateIdentifier, 
ImportAttribute, and StaticBlock types.

* LayoutTests/inspector/formatting/formatting-javascript-expected.txt:
* LayoutTests/inspector/formatting/formatting-javascript.html:

* 
LayoutTests/inspector/formatting/resources/javascript-tests/classes-expected.js:
* LayoutTests/inspector/formatting/resources/javascript-tests/classes.js:
- Add new test case for static blocks.

* 
LayoutTests/inspector/formatting/resources/javascript-tests/modules-expected.js:
* LayoutTests/inspector/formatting/resources/javascript-tests/modules.js:
- Add new test cases for conditional assignments.

* 
LayoutTests/inspector/formatting/resources/javascript-tests/optional-chaining-expected.js:
 Added.
* 
LayoutTests/inspector/formatting/resources/javascript-tests/optional-chaining.js:
 Added.
* 
LayoutTests/inspector/formatting/resources/javascript-tests/private-classes-expected.js:
 Added.
* 
LayoutTests/inspector/formatting/resources/javascript-tests/private-classes.js: 
Added.
- Add new test cases for optional chaining and private class members.

* 
LayoutTests/inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js:
* 
LayoutTests/inspector/formatting/resources/javascript-tests/unary-binary-expressions.js:
- Add new test cases import assertions.

* Source/WebInspectorUI/Tools/JSFormatter/index.html:

* Source/WebInspectorUI/UserInterface/External/Esprima/esprima.js:
- Updated to 
https://github.com/node-projects/esprima-next/commit/a002247e9cb92768ea91ef838b223012fe4fee9f

* Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.prototype._recurse):
- Handle new types from esprima and convert them into our AST tree, based on 
the estree spec: https://github.com/estree/estree

* Source/WebInspectorUI/UserInterface/Workers/Formatter/ESTreeWalker.js:
(ESTreeWalker.prototype._walkChildren):
(ESTreeWalker):
- Add pass-through cases for optional chaining and private identifiers.
- Adopt

[webkit-changes] [WebKit/WebKit] 77830d: Web Inspector: Console messages may be lost on mai...

2023-03-10 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 77830d12bea6680bcd70a3f2c48fe58b6c24a74f
  
https://github.com/WebKit/WebKit/commit/77830d12bea6680bcd70a3f2c48fe58b6c24a74f
  Author: Patrick Angle 
  Date:   2023-03-10 (Fri, 10 Mar 2023)

  Changed paths:
M LayoutTests/inspector/console/messagesCleared-expected.txt
M LayoutTests/inspector/console/messagesCleared.html
M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h
M Source/JavaScriptCore/inspector/protocol/Console.json
M Source/WebCore/inspector/InspectorInstrumentation.cpp
M Source/WebInspectorUI/UserInterface/Controllers/ConsoleManager.js
M Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js

  Log Message:
  ---
  Web Inspector: Console messages may be lost on main frame navigation 
depending on timing
https://bugs.webkit.org/show_bug.cgi?id=251659
rdar://104303833

Reviewed by Devin Rousso.

The existing heuristic to determine if console messages are being cleared as 
the result of a main frame navigation made
the assumption that console messages won't be received between the call to 
clear messages and the next tick in Web
Inspector. This isn't a safe assumption, and can be observed when logging 
immediately after a navigation on some
computers/under certain types of loads. Instead of inferring why the console is 
being cleared, introduce a `reason`
parameter that tells us if the request to clear is the result of a main frame 
navigation, removing any doubt. For
compatibility with older remote ends, we keep the existing heuristic, since its 
better than nothing.

* LayoutTests/inspector/console/messagesCleared-expected.txt:
* LayoutTests/inspector/console/messagesCleared.html:
- Ensure that a new session was signalled due to a refresh when the console is 
cleared.

* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::clearMessages):
(Inspector::InspectorConsoleAgent::mainFrameNavigated):
(Inspector::InspectorConsoleAgent::clearMessages):
(Inspector::InspectorConsoleAgent::reset): Deleted.
- Provide a reason for the clearing of the console.

* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h:
* Source/JavaScriptCore/inspector/protocol/Console.json:
* Source/WebCore/inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):

* Source/WebInspectorUI/UserInterface/Controllers/ConsoleManager.js:
(WI.ConsoleManager):
(WI.ConsoleManager.prototype.messagesCleared):
- Use the reason to immediately determine how to handle clearing the console, 
instead of waiting until the next tick.

(WI.ConsoleManager.prototype._clearMessages):
- Extract the common logic that actually clears the console so we can reuse it 
for both the new reason-based path as
well as the compatibility path.

(WI.ConsoleManager.prototype._delayedMessagesCleared):
* Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js:
(WI.ConsoleObserver.prototype.messagesCleared):

Canonical link: https://commits.webkit.org/261512@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b1dd65: Web Inspector: Implicitly nested property declarat...

2023-03-07 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b1dd655b710e45f59c91ef803255a8dbc4fc94e1
  
https://github.com/WebKit/WebKit/commit/b1dd655b710e45f59c91ef803255a8dbc4fc94e1
  Author: Patrick Angle 
  Date:   2023-03-07 (Tue, 07 Mar 2023)

  Changed paths:
M LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt
M 
LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html
M LayoutTests/inspector/css/modify-css-property-expected.txt
M LayoutTests/inspector/css/modify-css-property.html
M LayoutTests/inspector/css/resources/modify-css-property.css
M Source/JavaScriptCore/inspector/protocol/CSS.json
M Source/WebCore/css/CSSPropertySourceData.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/css/parser/CSSParserObserver.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/inspector/InspectorStyleSheet.h
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
M Source/WebInspectorUI/UserInterface/Models/CSSRule.js
M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
M Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js

  Log Message:
  ---
  Web Inspector: Implicitly nested property declarations inside non-style rules 
results in nested content being deleted during editing or displaying incorrect 
matched styles for elements
https://bugs.webkit.org/show_bug.cgi?id=251565
rdar://104821946

Reviewed by Devin Rousso.

InspectorStyleSheet was built with the assumption that Style rules contained 
property declarations, and nothing else.
CSS nesting has proven this assumption wrong in significant ways by allowing 
properties and other rules to be declared,
interleaved inside a rule. This includes inside @ rules, which previously could 
not contain property delcarations
directly.

This means during editing, we only want to replace the property declarations, 
not the full body of a rule, since the
rule may contain other rules. Luckily, canonically all property declarations 
occur before all nested rules, so we can
safely move nested rules below to make our lives a bit easier with no harm to 
the meaning of the style sheet.

This fix adds instrumentation to the CSS parser so we can be informed of the 
new "implicit" nested rule that contains
properties inside of non-style rules. It also overhauls how rule body text is 
edited, much like we had to last year for
rule header text.

* LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt:
- Account for new property of CSSRule.

* 
LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt:
* LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html:
* LayoutTests/inspector/css/modify-css-property-expected.txt:
* LayoutTests/inspector/css/modify-css-property.html:
* LayoutTests/inspector/css/resources/modify-css-property.css:
- Add test cases for implicitly nested rules and their siblings, children, and 
parents.

* Source/JavaScriptCore/inspector/protocol/CSS.json:
- Mark implicitly nested rules so that the frontend can prevent the editing of 
their selector.

* Source/WebCore/css/CSSPropertySourceData.h:
(WebCore::CSSRuleSourceData::CSSRuleSourceData):
- The container rule types can now contain properties, so we always need to 
have the buffer for that information ready,
since we won't be informed by the parser that an implicit nested context was 
created until after we have observed the
properties themselves.

* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeRegularRuleList):
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper):
(WebCore::CSSParserImpl::consumeStyleBlock):
* Source/WebCore/css/parser/CSSParserImpl.h:
- Don't send duplicate bodyStart/bodyEnd messages to the observer.
- Notify the observer when the engine has created an implict nested rule inside 
a body.

* Source/WebCore/css/parser/CSSParserObserver.h:

* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::atRuleIdentifierForType):
(WebCore::isValidRuleHeaderText):
- Pull the mapping of types to their keyword text for reuse in setting new 
style text.

(WebCore::StyleSheetHandler::endRuleBody):
- In order to maintain parity with CSSOM's representation of styles, we need to 
create an implictly nested rule to
match against the CSSOM's implicitly nested rule. This also allows us to inform 
the frontend that said CSSOM rule was
implicitly nested, since the OM itself doesn't carry this information.

(WebCore::StyleSheetHandler::markRuleBodyContainsImplicitlyNestedProperties):
- Observe to mark the style rule data as containing implicitly nested 
properties, which will then trigger us to take those properties and mvoe them 
to a special implicit style rule data object.

[webkit-changes] [WebKit/WebKit] 9d6e0d: Web Inspector: Add versioned protocol for iOS 16.4...

2023-02-17 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d6e0deaf8d68843dcbbe5287615e56abfde31a9
  
https://github.com/WebKit/WebKit/commit/9d6e0deaf8d68843dcbbe5287615e56abfde31a9
  Author: Patrick Angle 
  Date:   2023-02-17 (Fri, 17 Feb 2023)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Models/DOMNode.js
A 
Source/WebInspectorUI/UserInterface/Protocol/Legacy/iOS/16.4/InspectorBackendCommands.js
A 
Source/WebInspectorUI/UserInterface/Protocol/Legacy/macOS/13.3/InspectorBackendCommands.js
A Source/WebInspectorUI/Versions/Inspector-iOS-16.4.json
A Source/WebInspectorUI/Versions/Inspector-macOS-13.3.json

  Log Message:
  ---
  Web Inspector: Add versioned protocol for iOS 16.4 and macOS 13.3
https://bugs.webkit.org/show_bug.cgi?id=252443
rdar://96976739

Reviewed by Devin Rousso.

Add legacy protocol definitions used while inspecting iOS 16.4 and macOS 13.3.

* Source/WebInspectorUI/UserInterface/Models/DOMNode.js:
(WI.DOMNode.prototype.showLayoutOverlay):
* 
Source/WebInspectorUI/UserInterface/Protocol/Legacy/iOS/16.4/InspectorBackendCommands.js:
 Added.
* 
Source/WebInspectorUI/UserInterface/Protocol/Legacy/macOS/13.3/InspectorBackendCommands.js:
 Added.
* Source/WebInspectorUI/Versions/Inspector-iOS-16.4.json: Added.
* Source/WebInspectorUI/Versions/Inspector-macOS-13.3.json: Added.

Canonical link: https://commits.webkit.org/260474@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d25915: Web Inspector: Add support for getting user agents...

2023-02-15 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d25915a5a0c5cc5c2a0b1e2b38f4010a309b0419
  
https://github.com/WebKit/WebKit/commit/d25915a5a0c5cc5c2a0b1e2b38f4010a309b0419
  Author: Patrick Angle 
  Date:   2023-02-15 (Wed, 15 Feb 2023)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Main.js
M Source/WebInspectorUI/UserInterface/Base/WebInspector.js

  Log Message:
  ---
  Web Inspector: Add support for getting user agents from WebKitAdditions if 
present
https://bugs.webkit.org/show_bug.cgi?id=252030
rdar://96018617

Reviewed by Devin Rousso and Tim Horton.

Ports may desire to provide their own set of User Agents for Web Inspector to 
display for remote inspection via
WebKitAdditions.

* Source/WebInspectorUI/UserInterface/Base/Main.js:
(WI.loaded):
- Place an empty WebKitAdditions in the global scope if one doesn't already 
exist, since optional chaining can't be used
to check for a non-declared root object.
- Also some drive-by indentation fixes for the UAs.

Canonical link: https://commits.webkit.org/260335@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f6173b: Web Inspector: Add initial support for color-mix C...

2023-02-15 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f6173b46292f4fda92346060b35d6a78bf7eb650
  
https://github.com/WebKit/WebKit/commit/f6173b46292f4fda92346060b35d6a78bf7eb650
  Author: Patrick Angle 
  Date:   2023-02-15 (Wed, 15 Feb 2023)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Models/Color.js
M Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

  Log Message:
  ---
  Web Inspector: Add initial support for color-mix CSS values
https://bugs.webkit.org/show_bug.cgi?id=252031
rdar://105254118

Reviewed by Tim Nguyen.

Correct the display of `color-mix` to not truncate itself when not being 
edited, and to correctly show nested color
swatches within itself. This is achieved by sending tokens within a function's 
parentheses back through _addColorTokens
so that they in turn can be parsed for functions and color keywords. We also 
now enforce that a function keyword is
followed by a parenthesis to form a function, since some keywords like `rgb` 
and `hsl` are now also used to denote the
color space in which mixing should occur.

* Source/WebInspectorUI/UserInterface/Models/Color.js:
* Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):

Canonical link: https://commits.webkit.org/260332@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 80669e: Web Inspector: Regression(258675@main) "Selected e...

2023-02-10 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 80669e5b296b01c3b7c2b737632263c0f3fb16be
  
https://github.com/WebKit/WebKit/commit/80669e5b296b01c3b7c2b737632263c0f3fb16be
  Author: Patrick Angle 
  Date:   2023-02-10 (Fri, 10 Feb 2023)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css
M Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js

  Log Message:
  ---
  Web Inspector: Regression(258675@main) "Selected element" console entry fills 
entire row
https://bugs.webkit.org/show_bug.cgi?id=252081
rdar://105298123

Reviewed by Devin Rousso.

Fix up some console-related styling after 258675@main. The key change is to not 
set display: flex; on the console
message body and to return to using `span` for a few elements, undoing that 
change from the regression point and instead
making sure the timestamp itself is a span.

* Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css:
(.console-message-body):
(.console-message .timestamp):
* Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.render):
(WI.ConsoleMessageView.prototype.renderTimestamp):

Canonical link: https://commits.webkit.org/260139@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 364e72: WebDriver: Regression(STP 163) Many keyboard-relat...

2023-02-10 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 364e72b3d3f5001aa3f8523254f0f872488fde23
  
https://github.com/WebKit/WebKit/commit/364e72b3d3f5001aa3f8523254f0f872488fde23
  Author: Patrick Angle 
  Date:   2023-02-10 (Fri, 10 Feb 2023)

  Changed paths:
M Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

  Log Message:
  ---
  WebDriver: Regression(STP 163) Many keyboard-related WPT tests fail/error
https://bugs.webkit.org/show_bug.cgi?id=251957
rdar://105218538

Reviewed by Ryosuke Niwa and Chris Dumez.

Correct local variables to be initialized to nil since not all paths may do so.

* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):

Canonical link: https://commits.webkit.org/260110@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 095b8c: Add SPI to toggle the Private Click Measurement de...

2023-02-06 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 095b8c66495be019cca27f5c5e02491095f00e77
  
https://github.com/WebKit/WebKit/commit/095b8c66495be019cca27f5c5e02491095f00e77
  Author: Patrick Angle 
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
M Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm

  Log Message:
  ---
  Add SPI to toggle the Private Click Measurement debug mode so that it can be 
toggled in the same way that ITP Debug Mode can
https://bugs.webkit.org/show_bug.cgi?id=250289
rdar://103996503

Reviewed by John Wilander.

* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _privateClickMeasurementDebugModeEnabled]):
(-[WKPreferences _setPrivateClickMeasurementDebugModeEnabled:]):
* Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _setPrivateClickMeasurementDebugModeEnabled:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
- Rename setter to reflect that it is used for more than testing. The only 
usage of this SPI currently is in WebKit tests.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
(TestWebKitAPI::setupSKAdNetworkTest):
- Adopt the renamed `_setPrivateClickMeasurementDebugModeEnabled`.

Canonical link: https://commits.webkit.org/259899@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c5064e: Web Inspector: Don't show `::backdrop` rules for e...

2023-02-06 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c5064e5e284d10414bb3d55f3603729687f99260
  
https://github.com/WebKit/WebKit/commit/c5064e5e284d10414bb3d55f3603729687f99260
  Author: Patrick Angle 
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
M LayoutTests/inspector/css/getMatchedStylesForNode.html
A 
LayoutTests/inspector/css/getMatchedStylesForNodeBackdropPseudoId-expected.txt
A LayoutTests/inspector/css/getMatchedStylesForNodeBackdropPseudoId.html
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp

  Log Message:
  ---
  Web Inspector: Don't show `::backdrop` rules for elements without a backdrop
https://bugs.webkit.org/show_bug.cgi?id=251466
rdar://104889944

Reviewed by Tim Nguyen.

`::backdrop` only applies to elements in the top layer. Like `::marker`, we 
should not display this selector for elements it can't apply to.

* LayoutTests/inspector/css/getMatchedStylesForNode.html:
* 
LayoutTests/inspector/css/getMatchedStylesForNodeBackdropPseudoId-expected.txt: 
Added.
* LayoutTests/inspector/css/getMatchedStylesForNodeBackdropPseudoId.html: Added.
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):

Canonical link: https://commits.webkit.org/259894@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c07695: Web Inspector: `inspectable` API doesn't have a co...

2023-02-03 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c0769577c02dff910bc63e154e78be226bcf43cc
  
https://github.com/WebKit/WebKit/commit/c0769577c02dff910bc63e154e78be226bcf43cc
  Author: Patrick Angle 
  Date:   2023-02-03 (Fri, 03 Feb 2023)

  Changed paths:
M Source/JavaScriptCore/API/JSContext.h
M Source/JavaScriptCore/API/JSContext.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

  Log Message:
  ---
  Web Inspector: `inspectable` API doesn't have a correct Objective-C getter
https://bugs.webkit.org/show_bug.cgi?id=251702
rdar://105012093

Reviewed by Tim Horton.

Boolean getters should have an `is` prefix. Currently `inspectable` is not 
adhering to this rule. The current getter
also doesn't match the approved API design. This API has not yet shipped, and 
there is no internal usage of
`[webView inspectable]`, so this change will not break existing clients. 
`webView.inspectable` remains correct and
unchanged.

* Source/JavaScriptCore/API/JSContext.h:
* Source/JavaScriptCore/API/JSContext.mm:
(-[JSContext isInspectable]):
(-[JSContext inspectable]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView isInspectable]):
(-[WKWebView inspectable]): Deleted.

Canonical link: https://commits.webkit.org/259840@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f8d110: Web Inspector: Add missing localizable strings aft...

2023-01-31 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f8d110a5fec4228aebb10d57af7f3a7e4faf89c2
  
https://github.com/WebKit/WebKit/commit/f8d110a5fec4228aebb10d57af7f3a7e4faf89c2
  Author: Patrick Angle 
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

  Log Message:
  ---
  Web Inspector: Add missing localizable strings after 259603@main
https://bugs.webkit.org/show_bug.cgi?id=251468
rdar://104891316

Unreviewed localization fix.

* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:

Canonical link: https://commits.webkit.org/259650@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b79f16: Web Inspector: Add experimental feature to enable ...

2023-01-30 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b79f1636634fa4631caf970168c2bbe763edb3b7
  
https://github.com/WebKit/WebKit/commit/b79f1636634fa4631caf970168c2bbe763edb3b7
  Author: Patrick Angle 
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Setting.js
M 
Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js
M Source/WebInspectorUI/UserInterface/Views/CodeMirrorEditor.js
M Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

  Log Message:
  ---
  Web Inspector: Add experimental feature to enable aggressive limits on the 
length of lines we let CodeMirror process/format
https://bugs.webkit.org/show_bug.cgi?id=251401
rdar://104840214

Reviewed by Devin Rousso and Justin Michaud.

In select cases, we are finding that Web Inspector is effectively unusable on 
some sites with many source files with
very longs lines of source code. The highlighting of very longs lines of code 
accounts for upwards of 30 seconds of
delay for very long lines of code. While we investigate further improvements we 
can make to solve this problem, we
are adding an experimental setting that enforces very low line limits for 
highlight, as well as for determining the
hovered token. These two changes will unblock developers encountering this 
issue when they enable the added experimental
setting.

* Source/WebInspectorUI/UserInterface/Base/Setting.js:
* 
Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WI.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
* Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* Source/WebInspectorUI/UserInterface/Views/TextEditor.js:
(WI.TextEditor):

Canonical link: https://commits.webkit.org/259603@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a670e7: WebDriver: [iPadOS] Synthetic tap events are not d...

2023-01-30 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a670e7900b4af016dcd0871284712c9dea1e7d60
  
https://github.com/WebKit/WebKit/commit/a670e7900b4af016dcd0871284712c9dea1e7d60
  Author: Patrick Angle 
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
M Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm
M Source/WebKit/UIProcess/_WKTouchEventGenerator.h
M Source/WebKit/UIProcess/_WKTouchEventGenerator.mm

  Log Message:
  ---
  WebDriver: [iPadOS] Synthetic tap events are not dispatched to the window
https://bugs.webkit.org/show_bug.cgi?id=251299
rdar://102439701

Reviewed by BJ Burg.

On iPadOS, the UIApplication.sharedApplication.keyWindow does not take Scenes 
into account, and can therefore result in
unexpected behavior when used to determine the frontmost window, namely that 
the returned window may not even be visible
on screen, but instead might be the "key" window from another Scene that the 
application has. This causes us to be
unable to get the `contextId` of the correct window, which means touch events 
were not being dispatched to the window
under automation. Instead of relying on the window under automation being 
implicitly the key window, clients should
instead provide the window in which they expect an event to take place so that 
_WKTouchEventGenerator can use that
window's `contextId` for created events, ensuring they are dispatched to the 
correct window.

iOS was unaffected because Safari does not spawn multiple scenes on that 
platform, which means the key window was
already accurate for that platform.

* Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
- Provide the window that is the target for the touch events.

(WebKit::WebAutomationSession::platformSimulateTouchInteraction):
* Source/WebKit/UIProcess/_WKTouchEventGenerator.h:
* Source/WebKit/UIProcess/_WKTouchEventGenerator.mm:
(-[_WKTouchEventGenerator _sendHIDEvent:window:]):
(-[_WKTouchEventGenerator _sendMarkerHIDEventInWindow:completionBlock:]):
- Get the `contextId` from the provided window, instead of always using the 
`keyWindow`.

(-[_WKTouchEventGenerator _updateTouchPoints:count:window:]):
(-[_WKTouchEventGenerator touchDownAtPoints:touchCount:window:]):
(-[_WKTouchEventGenerator touchDown:touchCount:window:]):
(-[_WKTouchEventGenerator liftUpAtPoints:touchCount:window:]):
(-[_WKTouchEventGenerator liftUp:touchCount:window:]):
(-[_WKTouchEventGenerator moveToPoints:touchCount:duration:window:]):
(-[_WKTouchEventGenerator touchDown:window:completionBlock:]):
(-[_WKTouchEventGenerator liftUp:window:completionBlock:]):
(-[_WKTouchEventGenerator moveToPoint:duration:window:completionBlock:]):
- Plumb the window through.

(-[_WKTouchEventGenerator touchDown:]): Deleted.
(-[_WKTouchEventGenerator liftUp:]): Deleted.
- Remove unused methods.

Canonical link: https://commits.webkit.org/259576@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 8a7cdf: Web Inspector: Backend fails to bind WebAnimation ...

2023-01-26 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a7cdf98234b35d9d4e5a1b2eb6daf449bef8258
  
https://github.com/WebKit/WebKit/commit/8a7cdf98234b35d9d4e5a1b2eb6daf449bef8258
  Author: Patrick Angle 
  Date:   2023-01-26 (Thu, 26 Jan 2023)

  Changed paths:
M LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt
M LayoutTests/inspector/animation/lifecycle-web-animation.html
M LayoutTests/inspector/animation/resources/lifecycle-utilities.js
M Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp
M Source/WebCore/inspector/agents/InspectorAnimationAgent.h

  Log Message:
  ---
  Web Inspector: Backend fails to bind WebAnimation with custom properties in 
keyframes
https://bugs.webkit.org/show_bug.cgi?id=251173
rdar://104555265

Reviewed by Antti Koivisto.

InspectorAnimationAgent::didCreateAnimation is called during 
WebCore::Document::updateStyleIfNeeded, but in order to
resolve custom properties of animations, we may have to again enter 
WebCore::Document::updateStyleIfNeeded via
WebCore::ComputedStyleExtractor::updateStyleIfNeededForProperty. Instead, we 
should wait until after styles have been
updated which will prevent us from reentering 
WebCore::Document::updateStyleIfNeeded in order to resolve custom
properties.

This also has the benefit that the frontend will no longer receive a 
WebAnimation immediately followed by an update to
its name, since the name is set later. This allows us to capture the animation 
after it has been fully set up via the
updating of styles.

* LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt:
* LayoutTests/inspector/animation/lifecycle-web-animation.html:
- Add test case to exercise the creation/deletion of animations with custom 
properties.

* LayoutTests/inspector/animation/resources/lifecycle-utilities.js:
- As a result of defering animation binding until later, the name no longer 
changes immediately after binding.

* Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp:
(WebCore::InspectorAnimationAgent::InspectorAnimationAgent):
(WebCore::InspectorAnimationAgent::enable):
(WebCore::InspectorAnimationAgent::didCreateWebAnimation):
(WebCore::InspectorAnimationAgent::animationBindingTimerFired):
(WebCore::InspectorAnimationAgent::bindAnimation):
(WebCore::InspectorAnimationAgent::reset):
* Source/WebCore/inspector/agents/InspectorAnimationAgent.h:

Canonical link: https://commits.webkit.org/259446@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 212955: Web Inspector: Screenshots timeline is unsupported...

2023-01-24 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2129556ec693c9909c60b6576f8a1c08c9f03a4d
  
https://github.com/WebKit/WebKit/commit/2129556ec693c9909c60b6576f8a1c08c9f03a4d
  Author: Patrick Angle 
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebInspectorUI/UserInterface/Models/ScreenshotsInstrument.js

  Log Message:
  ---
  Web Inspector: Screenshots timeline is unsupported in WebKitLegacy, we should 
disable it when inspect such targets
https://bugs.webkit.org/show_bug.cgi?id=244301
rdar://problem/99094864

Reviewed by Devin Rousso and BJ Burg.

Screenshots are taken when a composite occurs to populate the screenshots 
timeline. Composites do not occurs for
the same types of updates in WebKitLegacy as they do in WebKit2. Due to this, 
the timeline currently appears
broken on WebKitLegacy targets. Until we can do the work in webkit.org/b/251113 
to support WebKitLegacy, we
instead will disable the Screenshots timeline when inspecting WebKitLegacy 
targets (the "Page" debuggable type,
as opposed to the WK2 "Web Page" debuggable type).

* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebInspectorUI/UserInterface/Models/ScreenshotsInstrument.js:
(WI.ScreenshotsInstrument.supported):

Canonical link: https://commits.webkit.org/259326@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 827706: Web Inspector: Embedder settings are not being per...

2023-01-24 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 827706a34ae74ff5f6b0b6dcb0bcd017860c4d48
  
https://github.com/WebKit/WebKit/commit/827706a34ae74ff5f6b0b6dcb0bcd017860c4d48
  Author: Patrick Angle 
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
M Source/WTF/Scripts/GeneratePreferences.rb

  Log Message:
  ---
  Web Inspector: Embedder settings are not being persisted, preventing Web 
Inspector from remembering which side of the window it was attached to
https://bugs.webkit.org/show_bug.cgi?id=251110
rdar://104603328

Reviewed by Brent Fulgham and Elliott Williams.

Embedder settings should persist to restore behavior prior to 258448@main. This 
allows Web Inspector to load
its width/height/attached side/window state from defaults like before.

* Source/WTF/Scripts/GeneratePreferences.rb:

Canonical link: https://commits.webkit.org/259320@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6ca671: Web Inspector: `extensionHostWebView` and `webView...

2023-01-23 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6ca671233e2e274c939d425fab3318c712a79a5b
  
https://github.com/WebKit/WebKit/commit/6ca671233e2e274c939d425fab3318c712a79a5b
  Author: Patrick Angle 
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h
M Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h
M Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm

  Log Message:
  ---
  Web Inspector: `extensionHostWebView` and `webView` for 
_WKRemoteWebInspectorViewController be nil, but is not marked as nullable
https://bugs.webkit.org/show_bug.cgi?id=250874
rdar://92478255

Reviewed by Brian Weinstein.

The web view for an inspector may be nil if we have already torn down the 
window, as can the inspector.

* Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
- Add `_Nullable` annotations.

* Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
(-[_WKRemoteWebInspectorViewController _setDiagnosticLoggingDelegate:]):
(-[_WKRemoteWebInspectorViewController 
registerExtensionWithID:extensionBundleIdentifier:displayName:completionHandler:]):
(-[_WKRemoteWebInspectorViewController 
showExtensionTabWithIdentifier:completionHandler:]):
(-[_WKRemoteWebInspectorViewController 
navigateExtensionTabWithIdentifier:toURL:completionHandler:]):
- Remove nullability annotations from implementation file to match other files 
where we only annotate headers. Otherwise
we'd have to mark the return types as nullable here as well.

Canonical link: https://commits.webkit.org/259258@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] bd0b58: WebDriver: [Cocoa] [Actions] [Key] Single grapheme...

2023-01-19 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd0b584ba9075b8afc8865692d29542efc051bad
  
https://github.com/WebKit/WebKit/commit/bd0b584ba9075b8afc8865692d29542efc051bad
  Author: Patrick Angle 
  Date:   2023-01-19 (Thu, 19 Jan 2023)

  Changed paths:
M Source/WTF/wtf/PlatformEnableCocoa.h
M Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp
M Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h
M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
M Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm
M Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm
M Source/cmake/WebKitFeatures.cmake

  Log Message:
  ---
  WebDriver: [Cocoa] [Actions] [Key] Single grapheme clusters return an 
exception indicating the key is not valid
https://bugs.webkit.org/show_bug.cgi?id=248909
rdar://100588599

Reviewed by BJ Burg.

Input handling was previously making the assumption that every character could 
be represented by a single unicode code
point. That assumption does not hold true, and has already been worked around 
for getting a supplementary code point
value (U+1..U+10) from its lead and trail surrogates. That solution 
does not scale however beyond two
codepoints, or for characters outside that range. Instead we should think of 
characters in terms of grapheme clusters
and allow a single grapheme cluster to be virtually "pressed" or "released" at 
a time. This allows for expressing many
more characters from many languages via keyboard actions to WebDriver.

Additionally, there was an issue where characters not representable by a 
virtual key in Carbon were appearing with the
key code of `KeyA` in Javascript, since on macOS `KeyA` has a value of 0.

Supporting full grapheme cluster keyboard actions is only enabled on Cocoa 
ports in the patch. Additionally,
`safaridriver` also needs to be updated to send more than a single codepoint to 
WebKit for these characters.

This progresses the following WPT test cases:
webdriver/tests/perform_actions/key_events.py::test_printable_key_sends_correct_events[\xe0-]
webdriver/tests/perform_actions/key_events.py::test_printable_key_sends_correct_events[\u0416-]
webdriver/tests/perform_actions/key_events.py::test_printable_key_sends_correct_events[\u2603-]
webdriver/tests/perform_actions/key_events.py::test_printable_key_sends_correct_events[\uf6c2-]
webdriver/tests/perform_actions/key_special_keys.py::test_codepoint_keys_behave_correctly[\U0001f604]
webdriver/tests/perform_actions/key_special_keys.py::test_codepoint_keys_behave_correctly[\U0001f60d]
webdriver/tests/perform_actions/key_special_keys.py::test_codepoint_keys_behave_correctly[\u0ba8\u0bbf]
webdriver/tests/perform_actions/key_special_keys.py::test_codepoint_keys_behave_correctly[\u1100\u1161\u11a8]

* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp:
(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
* Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h:
- Make "KeyChar" represent more than one unicode code point (with the assertion 
that it continue to only represent a single grapheme cluster).

* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::performInteractionSequence):
- On supported platforms, simply ensure that the key character string is a 
single grapheme cluster and set the code appropriately.

* Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::keyCodeForCharKey):
(WebKit::keyCodeForVirtualKey):
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
- Support the new String version of KeyChar.
- Don't map unknown keys to 0, as that is the same as mapping them to the `A` 
keycode on macOS.

* Source/cmake/WebKitFeatures.cmake:

Canonical link: https://commits.webkit.org/259092@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d08492: Web Inspector: WebKit-internal JSContexts should n...

2023-01-18 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d08492cc7b9e0114af0a6aac4606f75864d5e763
  
https://github.com/WebKit/WebKit/commit/d08492cc7b9e0114af0a6aac4606f75864d5e763
  Author: Patrick Angle 
  Date:   2023-01-18 (Wed, 18 Jan 2023)

  Changed paths:
M Source/JavaScriptCore/API/JSRemoteInspector.cpp
M Source/JavaScriptCore/API/JSRemoteInspector.h
M Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h
M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm
M Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp
M Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.cpp
M Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
M Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm

  Log Message:
  ---
  Web Inspector: WebKit-internal JSContexts should not be inspectable, even if 
internal policies would override `inspectable`
https://bugs.webkit.org/show_bug.cgi?id=250633
rdar://103312497

Reviewed by Saam Barati.

Relanding with availability annotation fix. Originally review in 
github.com/WebKit/WebKit/pull/8666.

On configurations where `inspectable` can be overriden, there are still some 
WebKit-internal contexts that should not be
inspectable. The first are JSDOMGlobalObjects, which are already inspectable 
via the WKWebView they exist for by using
the context picker in Web Inspector, making these JSContexts redundant and 
noisy. The second case is
APISerializedScriptValueCocoa which creates JSContexts to help serialize values 
to/from JS/Cocoa.

This problem did not exist before the introduction of the `inspectable` API 
because the default state of `inspectable`
was false, which would not be overriden because the decision by the platform as 
to whether an application was inspectable
occurred in a system daemon, which would not override the per-context 
`inspectable` setting. When unifying the decision
logic for what is inspectable into JSC/WebKit, this use case was initially 
overlooked as the only platform that implements
an internal policy for inspection doesn't have any symptoms of this that a user 
could observe due to the specific policy.
However, in use for those working on machines where this policy is applied, the 
noise of so many JSContexts is making it
difficult to sort through usefully inspectable contexts in Safari's Develop 
menu.

This patch also fixes a minor bug where `inspectable` would return `true` for 
JSContexts and WKWebViews, even if
inspection was disabled, when an internal policy is overriding inspection.

* Source/JavaScriptCore/API/JSRemoteInspector.cpp:
(JSRemoteInspectorGetInspectionFollowsInternalPolicies):
(JSRemoteInspectorSetInspectionFollowsInternalPolicies):
* Source/JavaScriptCore/API/JSRemoteInspector.h:
- Add methods to set and get the new "followsInternalPolicies" state to be 
applied to new contexts as well as those that
change their `inspectable` setting.

* Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::developerExtrasEnabled const):
* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::listingForInspectionTarget const):
* Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp:
(Inspector::RemoteInspector::listingForInspectionTarget const):
* Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.cpp:
(Inspector::RemoteInspector::listingForInspectionTarget const):
- Use new `allowsInspectionByPolicy` which takes into account internal policies.

* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp:
(Inspector::RemoteInspectionTarget::remoteControlAllowed const):
(Inspector::RemoteInspectionTarget::allowsInspectionByPolicy const):
(Inspector::RemoteInspectionTarget::inspectable const):
(Inspector::RemoteInspectionTarget::setInspectable):
(Inspector::RemoteInspectionTarget::pauseWaitingForAutomaticInspection):
* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h:
- Use the new `followsInternalPolicies` state to keep track of when a target 
should be exempt from internal policies for
contexts that never make sense to be inspectable.
- Introduce `allowsInspectionByPolicy` which takes into account internal policy 
when determining the inspectability of
a target. Previously this was baked into `inspectable`, but that inadvertently 
leaks the internal policy implementation
detail to clients of JSContext and WKWebView.

* Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::finishCreation):
* Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SharedJSContext::ensureContext):
- Adopt new methods to mark the contexts created here as never inspectable 
sin

[webkit-changes] [WebKit/WebKit] 7bee9f: WebDriver: [macOS] [Actions] [Key] Shift modifier ...

2023-01-18 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7bee9f5b488f917b7dae4b36c77e029505a747c1
  
https://github.com/WebKit/WebKit/commit/7bee9f5b488f917b7dae4b36c77e029505a747c1
  Author: Patrick Angle 
  Date:   2023-01-18 (Wed, 18 Jan 2023)

  Changed paths:
M Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

  Log Message:
  ---
  WebDriver: [macOS] [Actions] [Key] Shift modifier not applying to typed text
https://bugs.webkit.org/show_bug.cgi?id=248770
rdar://100588610

Reviewed by BJ Burg.

AppKit expects the `characters` for an NSEvent to be pre-transformed to the 
actual character that will be typed, which
means for a capital letter, sending the key code for a letter with the shift 
modifier held should result in the capital
form of that letter being the `characters`. This also add support for composed 
characters, like Shift+Option+K resulting
in the Apple logo, or Shift+Option+8 resulting in the degree symbol.

The clearest way to obtain the OS-defined mapping for a letter and its 
modifiers is to create a temporary NSEvent and
call `-[NSEvent characterTransformingModifiers:]`, which applies the provided 
modifiers to an existing event's
`characters`, which we can then use to create the actual NSEvents we will 
dispatch to the system. Alternatively, we
could hardcode WebDriver's list of "shifted" characters, but that only covers 
keys on a US-English keyboard, and does
not provide any allowance for macOS's various Option/Shift modified key chords 
to produce special characters.

This progresses the following WPT test cases:
webdriver/tests/perform_actions/key_modifiers.py::test_shift_modifier_generates_capital_letters[\ue008]
webdriver/tests/perform_actions/key_modifiers.py::test_shift_modifier_generates_capital_letters[\ue050]

* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):

Canonical link: https://commits.webkit.org/259039@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 11aafb: Web Inspector: WebKit-internal JSContexts should n...

2023-01-17 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 11aafb6ec00b2661ade8f516aacbcc0e805d727a
  
https://github.com/WebKit/WebKit/commit/11aafb6ec00b2661ade8f516aacbcc0e805d727a
  Author: Patrick Angle 
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  Changed paths:
M Source/JavaScriptCore/API/JSRemoteInspector.cpp
M Source/JavaScriptCore/API/JSRemoteInspector.h
M Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h
M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm
M Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp
M Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.cpp
M Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
M Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm

  Log Message:
  ---
  Web Inspector: WebKit-internal JSContexts should not be inspectable, even if 
internal policies would override `inspectable`
https://bugs.webkit.org/show_bug.cgi?id=250633
rdar://103312497

Reviewed by Saam Barati.

On configurations where `inspectable` can be overriden, there are still some 
WebKit-internal contexts that should not be
inspectable. The first are JSDOMGlobalObjects, which are already inspectable 
via the WKWebView they exist for by using
the context picker in Web Inspector, making these JSContexts redundant and 
noisy. The second case is
APISerializedScriptValueCocoa which creates JSContexts to help serialize values 
to/from JS/Cocoa.

This problem did not exist before the introduction of the `inspectable` API 
because the default state of `inspectable`
was false, which would not be overriden because the decision by the platform as 
to whether an application was inspectable
occurred in a system daemon, which would not override the per-context 
`inspectable` setting. When unifying the decision
logic for what is inspectable into JSC/WebKit, this use case was initially 
overlooked as the only platform that implements
an internal policy for inspection doesn't have any symptoms of this that a user 
could observe due to the specific policy.
However, in use for those working on machines where this policy is applied, the 
noise of so many JSContexts is making it
difficult to sort through usefully inspectable contexts in Safari's Develop 
menu.

This patch also fixes a minor bug where `inspectable` would return `true` for 
JSContexts and WKWebViews, even if
inspection was disabled, when an internal policy is overriding inspection.

* Source/JavaScriptCore/API/JSRemoteInspector.cpp:
(JSRemoteInspectorGetInspectionFollowsInternalPolicies):
(JSRemoteInspectorSetInspectionFollowsInternalPolicies):
* Source/JavaScriptCore/API/JSRemoteInspector.h:
- Add methods to set and get the new "followsInternalPolicies" state to be 
applied to new contexts as well as those that
change their `inspectable` setting.

* Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::developerExtrasEnabled const):
* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::listingForInspectionTarget const):
* Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp:
(Inspector::RemoteInspector::listingForInspectionTarget const):
* Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.cpp:
(Inspector::RemoteInspector::listingForInspectionTarget const):
- Use new `allowsInspectionByPolicy` which takes into account internal policies.

* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp:
(Inspector::RemoteInspectionTarget::remoteControlAllowed const):
(Inspector::RemoteInspectionTarget::allowsInspectionByPolicy const):
(Inspector::RemoteInspectionTarget::inspectable const):
(Inspector::RemoteInspectionTarget::setInspectable):
(Inspector::RemoteInspectionTarget::pauseWaitingForAutomaticInspection):
* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h:
- Use the new `followsInternalPolicies` state to keep track of when a target 
should be exempt from internal policies for
contexts that never make sense to be inspectable.
- Introduce `allowsInspectionByPolicy` which takes into account internal policy 
when determining the inspectability of
a target. Previously this was baked into `inspectable`, but that inadvertently 
leaks the internal policy implementation
detail to clients of JSContext and WKWebView.

* Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::finishCreation):
* Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SharedJSContext::ensureContext):
- Adopt new methods to mark the contexts created here as never inspectable 
since they do not expose any useful information.

Canonical link: https://commits.webkit.org/2

[webkit-changes] [WebKit/WebKit] 33d4b1: REGRESSION(253727@main): [ macOS wk2 ] inspector/c...

2023-01-12 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 33d4b1c48279e35925acc9a0351e480975499feb
  
https://github.com/WebKit/WebKit/commit/33d4b1c48279e35925acc9a0351e480975499feb
  Author: Patrick Angle 
  Date:   2023-01-12 (Thu, 12 Jan 2023)

  Changed paths:
M LayoutTests/inspector/css/setLayoutContextTypeChangedMode.html
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp

  Log Message:
  ---
  REGRESSION(253727@main): [ macOS wk2 ] 
inspector/css/setLayoutContextTypeChangedMode.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=244846
rdar://99599308

Reviewed by Devin Rousso.

Two issues exist making this test flakey. The first was that we incorrectly 
would send a layout information twice for
previously unobserved nodes, once with the new node and then again. This meant 
the test would wait for the first
"change" when the node was added, and the next await for a change could 
sometimes happen quickly enough that it would be
satisfied by the errant second notifcation of changed layout context.

The second issue is the result of other new flags causing all nodes to have a 
layout flags, including the output element
for the test. We can't explicitly add an event listener to the node we want to 
observe though because that would cause
the node to be sent to the frontend, which is the behavior we are trying to 
test. To combat this, we now use a special
observer that looks at the ID of elements with layout flag changes to ensure we 
are observing the change for the node we
actually care about.

* LayoutTests/inspector/css/setLayoutContextTypeChangedMode.html:
- Ensure we observe flags changing only for the node we care about, even if we 
can't yet know if we have a WI.DOMNode.

* LayoutTests/platform/mac-wk2/TestExpectations:

* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::nodesWithPendingLayoutFlagsChangeDispatchTimerFired):
- If we get a nodeId back for a node that didn't previously have a nodeId, we 
know that the latest layout flags have
just been sent to the frontend.

Canonical link: https://commits.webkit.org/258858@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 93e932: Web Inspector: “Inspect Element” doesn’t reveal el...

2023-01-11 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 93e932263fc0a5a9483af9d6e0ba2199365be54d
  
https://github.com/WebKit/WebKit/commit/93e932263fc0a5a9483af9d6e0ba2199365be54d
  Author: Patrick Angle 
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
M Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js
M Source/WebInspectorUI/UserInterface/Views/TreeElement.js

  Log Message:
  ---
  Web Inspector: “Inspect Element” doesn’t reveal element in DOM tree if the 
element is hidden behind the "Show All Nodes" button
https://bugs.webkit.org/show_bug.cgi?id=250430
rdar://102669246

Reviewed by Devin Rousso.

Revealing a TreeElement currently makes sure to traverse up through parent 
elements to expand each element to make sure
the element is visible. This doesn't necessilary work for DOMTreeElements, 
though, since they may additionally have
hidden elements behind a "Show All Nodes" button. This means we need to provide 
each parent element an opportunity to
fill in these hidden elements so that the entire chain of tree elements is 
actually loaded, otherwise we won't actually
reveal the element we wanted to.

* Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.reveal):
- Tree elements should call to each ancestor to make sure the entire chain of 
elements is actually revealed by providing
the parent elements an opportunity to fill in missing elements that they are 
not currently displaying.

(WI.DOMTreeElement.prototype.onexpand):
* Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype._onmousemove):
- Related fixes: The element will not always be a DOMTreeElement (namely the 
button for showing more elements).

* Source/WebInspectorUI/UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.reveal):
- Provide a way for to bypass expanding the ancestor tree. This is used by 
DOMTreeElement which overrides this method,
and expands the tree itself before calling here.

Canonical link: https://commits.webkit.org/258805@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ad6591: Web Inspector: WebRTC "Disable encryption" setting...

2023-01-11 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ad6591f07720fb5aa2f679530819685b380e05a6
  
https://github.com/WebKit/WebKit/commit/ad6591f07720fb5aa2f679530819685b380e05a6
  Author: Patrick Angle 
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
M Source/JavaScriptCore/inspector/protocol/Page.json
M Source/WebCore/inspector/agents/InspectorPageAgent.cpp
M Source/WebCore/page/Settings.yaml
M Source/WebInspectorUI/UserInterface/Base/Main.js

  Log Message:
  ---
  Web Inspector: WebRTC "Disable encryption" setting should be removed from 
remote inspection, it already isn't present for local inspection
https://bugs.webkit.org/show_bug.cgi?id=250336
rdar://104042073

Reviewed by Devin Rousso.

* Source/JavaScriptCore/inspector/protocol/Page.json:
* Source/WebCore/inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::overrideSetting):
* Source/WebCore/page/Settings.yaml:
* Source/WebInspectorUI/UserInterface/Base/Main.js:

Canonical link: https://commits.webkit.org/258804@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c0b736: Web Inspector: Undocked window should remain in th...

2023-01-09 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c0b73633fcd709435720048531b381867b30946a
  
https://github.com/WebKit/WebKit/commit/c0b73633fcd709435720048531b381867b30946a
  Author: Patrick Angle 
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm
M Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm

  Log Message:
  ---
  Web Inspector: Undocked window should remain in the same window set as the 
inspected content's window when using Stage Manager
https://bugs.webkit.org/show_bug.cgi?id=250218
rdar://94829409

Reviewed by Wenson Hsieh.

Adopt proper API for making a window an "auxiliary" window, instead of the 
previous workaround to get the behavior.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
(WebKit::WebInspectorUIProxy::createFrontendWindow):
* Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController window]):

Canonical link: https://commits.webkit.org/258672@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b5cf19: Web Inspector: Show parent style rules for nested ...

2023-01-06 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b5cf192b43bc91e0a18cf1399fd5f64d152e969c
  
https://github.com/WebKit/WebKit/commit/b5cf192b43bc91e0a18cf1399fd5f64d152e969c
  Author: Patrick Angle 
  Date:   2023-01-06 (Fri, 06 Jan 2023)

  Changed paths:
A 
LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt
A LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html
M LayoutTests/inspector/css/setGroupingHeaderText-expected.txt
M LayoutTests/inspector/css/setGroupingHeaderText.html
M Source/JavaScriptCore/inspector/protocol/CSS.json
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSStyleRule.cpp
M Source/WebCore/css/CSSStyleRule.h
M Source/WebCore/css/StyleRule.cpp
M Source/WebCore/css/StyleRule.h
M Source/WebCore/css/parser/CSSParser.cpp
M Source/WebCore/css/parser/CSSParser.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
M Source/WebCore/style/InspectorCSSOMWrappers.cpp
M Source/WebInspectorUI/UserInterface/Models/CSSGrouping.js
M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
M 
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js

  Log Message:
  ---
  Web Inspector: Show parent style rules for nested style rules in Styles 
sidebar
https://bugs.webkit.org/show_bug.cgi?id=250088
rdar://100522930

Reviewed by Antti Koivisto.

Add basic support for viewing and editing parent style rule selectors for 
nested style rules. This uses the same
mechanism we already use for showing parent `@rule`s, including support for 
editing.

* 
LayoutTests/inspector/css/getMatchesStylesForNodeNestingStyleGrouping-expected.txt:
 Added.
* LayoutTests/inspector/css/getMatchesStylesForNodeNestingStyleGrouping.html: 
Added.

* LayoutTests/inspector/css/setGroupingHeaderText-expected.txt:
* LayoutTests/inspector/css/setGroupingHeaderText.html:
- Add test cases for modifying a parent Style rule's selector via a Grouping on 
a child nested rule.

* Source/JavaScriptCore/inspector/protocol/CSS.json:
- Add new "StyleRule" grouping type to represent parent style rules.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

* Source/WebCore/css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::CSSStyleRule):
(WebCore::CSSStyleRule::length const):
(WebCore::CSSStyleRule::item const):
(WebCore::CSSStyleRule::cssRules const):
* Source/WebCore/css/CSSStyleRule.h:
- Add support for getting the nested rules inside a CSSStyleRule.

* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper const):
* Source/WebCore/css/StyleRule.h:
- Support creating a wrapper with a CSSStyleRule as a parent.

* Source/WebCore/css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseSelector):
* Source/WebCore/css/parser/CSSParser.h:
- Allow callers to enable nesting syntax for parsing a selector, which is done 
to verify a selector is valid by Web
Inspector when editing a nested rule's selector.

* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):
- Style rules can now contain rules, so get rid of the `Commit` strategy and 
use the existing `CommitSelfThenChildren`
for style rules instead.

(WebCore::isValidRuleHeaderText):
- Pass through the nesting mode for parsing selectors.

(WebCore::protocolGroupingTypeForStyleRuleType):
(WebCore::flattenSourceData):
- Get rid of `Commit` strategy.

(WebCore::StyleSheetHandler::startRuleHeader):
- It is no longer invalid to encounter the start of a style rule before 
encountering the end of the previous style rule.

(WebCore::asCSSRuleList):

(WebCore::InspectorStyleSheet::buildArrayForGroupings):
- Start with the parent of the passed CSSRule, otherwise every style rule will 
include itself as a grouping.

(WebCore::isNestedContext):
(WebCore::InspectorStyleSheet::setRuleHeaderText):
- Nested rules should allow relevant syntax for selectors.

(WebCore::InspectorStyleSheet::collectFlatRules):

* Source/WebCore/style/InspectorCSSOMWrappers.cpp:
(WebCore::Style::InspectorCSSOMWrappers::collect):
- Eagerly create CSSOM wrappers for nested rules.

* Source/WebInspectorUI/UserInterface/Models/CSSGrouping.js:
(WI.CSSGrouping.prototype.get isStyle):
(WI.CSSGrouping.prototype.get prefix):
(WI.CSSGrouping):
- Nested rules don't have a prefix like `@rule`s do, so provide a null prefix.

* 
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderGroupings):
- Support groupings without a prefix by not prepending the prefix.

Canonical link: https://commits.webkit.org/258555@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a6b192: Web Inspector: Remove unused `WIRSimulatorTCPPortN...

2023-01-06 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a6b192937a3ff85553f1c1c071ac3a31eb15da64
  
https://github.com/WebKit/WebKit/commit/a6b192937a3ff85553f1c1c071ac3a31eb15da64
  Author: Patrick Angle 
  Date:   2023-01-06 (Fri, 06 Jan 2023)

  Changed paths:
M Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h

  Log Message:
  ---
  Web Inspector: Remove unused `WIRSimulatorTCPPortNumber` constant from 
RemoteInspectorConstants.h
https://bugs.webkit.org/show_bug.cgi?id=249670
rdar://10892127

Reviewed by Devin Rousso.

* Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h:

Canonical link: https://commits.webkit.org/258547@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ac88ff: WebDriver: Get Element Rect should not round to in...

2022-12-07 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ac88ff2a875c5707cb4219de247d20a0192d576a
  
https://github.com/WebKit/WebKit/commit/ac88ff2a875c5707cb4219de247d20a0192d576a
  Author: Patrick Angle 
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
M Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
M Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h
M Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in

  Log Message:
  ---
  WebDriver: Get Element Rect should not round to integer values
https://bugs.webkit.org/show_bug.cgi?id=248556
rdar://100588620

Reviewed by BJ Burg.

The x/y/width/height of the element rect is specified to be in "CSS Pixels", 
which is a decimal number of pixels. We
should as such not round to the nearest containing IntRect.

This progresses the following WPT tests:
webdriver/tests/get_element_rect/get.py::test_basic
webdriver/tests/get_element_rect/user_prompts.py::test_accept[capabilities0-alert-None]
webdriver/tests/get_element_rect/user_prompts.py::test_accept[capabilities0-confirm-True]
webdriver/tests/get_element_rect/user_prompts.py::test_accept[capabilities0-prompt-]
webdriver/tests/get_element_rect/user_prompts.py::test_dismiss[capabilities0-alert-None]
webdriver/tests/get_element_rect/user_prompts.py::test_dismiss[capabilities0-confirm-False]
webdriver/tests/get_element_rect/user_prompts.py::test_dismiss[capabilities0-prompt-None]

* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::computeElementLayout):
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:

Canonical link: https://commits.webkit.org/257498@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 93eafb: Web Inspector: Show "Device" menu for all sessions

2022-12-06 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 93eafbf907d4c798d27490949b762d826870dab8
  
https://github.com/WebKit/WebKit/commit/93eafbf907d4c798d27490949b762d826870dab8
  Author: Patrick Angle 
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Main.js
A Source/WebInspectorUI/UserInterface/Images/Computer.svg

  Log Message:
  ---
  Web Inspector: Show "Device" menu for all sessions
https://bugs.webkit.org/show_bug.cgi?id=247808
rdar://102241043

Reviewed by Timothy Hatcher.

The device menu allows for applying an array of options that can negatively 
affect other tabs/windows if those settings
are applied globally. We currently already show the Device menu for remote 
inspection (like iOS), and with this patch we
will do so for local inspection (like macOS) as well, allowing developers to 
continue to use the rest of the browser for
normal browsing tasks, instead of using the browser's global settings for 
disabling core features which will break other
pages, like documentation, they are viewing.

For now we hide the User Agent dropdown, as it is not currently correctly 
tracking the state of the view, causing some
browser features like Safari's Responsive Design Mode to change the UA without 
updating this UI at the same time.

* Source/WebInspectorUI/UserInterface/Base/Main.js:
* Source/WebInspectorUI/UserInterface/Images/Computer.svg: Added.

Canonical link: https://commits.webkit.org/257426@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9aaabd: WebDriver: [Cocoa] [Actions] [Key] Right-hand modi...

2022-12-06 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9aaabd386a2fd8d1c1689cae9c4d3716ec8cc71a
  
https://github.com/WebKit/WebKit/commit/9aaabd386a2fd8d1c1689cae9c4d3716ec8cc71a
  Author: Patrick Angle 
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
M Source/WebKit/UIProcess/Automation/Automation.json
M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
M Source/WebKit/UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm
M Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp
M Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm
M Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp
M Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

  Log Message:
  ---
  WebDriver: [Cocoa] [Actions] [Key] Right-hand modifier keys report as their 
left-hand counterpart
https://bugs.webkit.org/show_bug.cgi?id=248674
rdar://100588604

Reviewed by BJ Burg.

Add support to the Cocoa ports for properly handling right-hand modifiers 
which, when paired with safaridriver changes,
will allow the left and right modifier keys to be distiguished from one 
another. Most of the support is already done,
this just adds the missing `CommandRight` virtual key to the automation 
protocol and adds handling so that these keys
are properly considered to be a modifier key when combined with other 
subsequent actions.

This progresses the following WPT test cases:
webdriver/tests/perform_actions/key_events.py::test_modifier_key_sends_correct_events[\ue052-R_ALT]
webdriver/tests/perform_actions/key_events.py::test_modifier_key_sends_correct_events[\ue051-R_CONTROL]
webdriver/tests/perform_actions/key_events.py::test_modifier_key_sends_correct_events[\ue050-R_SHIFT]
webdriver/tests/perform_actions/key_events.py::test_special_key_sends_keydown[R_ALT-expected48]
webdriver/tests/perform_actions/key_events.py::test_special_key_sends_keydown[R_CONTROL-expected53]
webdriver/tests/perform_actions/key_events.py::test_special_key_sends_keydown[R_SHIFT-expected61]

* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::normalizedVirtualKey):
* Source/WebKit/UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::charCodeForVirtualKey const):
* Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::virtualKeyHasStickyModifier):
(WebKit::keyCodeForVirtualKey):
(WebKit::eventModifierFlagsForVirtualKey):
* Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
(WebKit::keyCodeForVirtualKey):
* Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp:
(WebKit::keyCodeForVirtualKey):

Canonical link: https://commits.webkit.org/257406@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] fb4340: Cherry-pick c46be5c1183b. rdar://problem/102218310

2022-11-15 Thread Patrick Angle
  Branch: refs/heads/safari-7615.1.12.110-branch
  Home:   https://github.com/WebKit/WebKit
  Commit: fb4340875878fb1d8010bc5151999336ec2a1a30
  
https://github.com/WebKit/WebKit/commit/fb4340875878fb1d8010bc5151999336ec2a1a30
  Author: Patrick Angle 
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm

  Log Message:
  ---
  Cherry-pick c46be5c1183b. rdar://problem/102218310

WebDriver: [Cocoa] Regression(255359@main) Exception when deleting remote 
automation session
https://bugs.webkit.org/show_bug.cgi?id=247384
rdar://101872145

Reviewed by Wenson Hsieh.

Revert the changes in 255359@main and instead apply a more targeted 
approach to fixing that specific issue. Previous
attempts to fix this with more state management in 
`WKWindowVisibilityObserver` created more issues, so a more targeted
fix it is!

* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(WebKit::WebViewImpl::viewWillMoveToWindowImpl):
(WebKit::WebViewImpl::viewWillMoveToWindow):
(WebKit::WebViewImpl::prepareForMoveToWindow):
(-[WKWindowVisibilityObserver _observeWindow:]): Deleted.

Canonical link: https://commits.webkit.org/256334@main

Canonical link: https://commits.webkit.org/256138.29@safari-7615.1.12.110-branch


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6cf49c: Web Inspector: Cookies for extensions show UUID in...

2022-11-15 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6cf49cf97d1f72b2a52b05827a552b179d125e90
  
https://github.com/WebKit/WebKit/commit/6cf49cf97d1f72b2a52b05827a552b179d125e90
  Author: Patrick Angle 
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Views/CookieStorageTreeElement.js

  Log Message:
  ---
  Web Inspector: Cookies for extensions show UUID instead of extension name in 
Storage tab
https://bugs.webkit.org/show_bug.cgi?id=247903
rdar://101966366

Reviewed by Timothy Hatcher.

`CookieStorageTreeElement` was the only subclass of `StorageTreeElement` not 
using `WI.displayNameForHost` to generate a
display name, which exists to convert extension UUIDs into a friendly name. 
Non-extension cookies will still just use
the host for its name.

* Source/WebInspectorUI/UserInterface/Views/CookieStorageTreeElement.js:
(WI.CookieStorageTreeElement.prototype.get name):

Canonical link: https://commits.webkit.org/256695@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] cf442d: [Cocoa] Mac Catalyst builds don't correctly replac...

2022-11-07 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cf442de8dfd0db8743997344098054ddd962157b
  
https://github.com/WebKit/WebKit/commit/cf442de8dfd0db8743997344098054ddd962157b
  Author: Patrick Angle 
  Date:   2022-11-07 (Mon, 07 Nov 2022)

  Changed paths:
M Source/JavaScriptCore/Scripts/postprocess-header-rule
M Source/WebKit/Scripts/postprocess-header-rule

  Log Message:
  ---
  [Cocoa] Mac Catalyst builds don't correctly replace JS_IOS_TBA/WK_IOS_TBA in 
headers
https://bugs.webkit.org/show_bug.cgi?id=247516
rdar://101889288

Reviewed by Elliott Williams.

Currently on Mac Catalyst we replace JS_IOS_TBA/WK_IOS_TBA with "NA" instead of 
a real version number. For Catalyst
builds `LLVM_TARGET_TRIPLE_OS_VERSION` will contain the iOS version number we 
need. We also need to use the
`PLATFORM_NAME` and not the `WK_PLATFORM_NAME` for WebKit in order to replace 
the macOS version placeholder correctly,
since `WK_PLATFORM_NAME` will be `maccatalyst` for Catalyst, but we want to 
replace the Mac placeholder for all Mac
build styles, even Catalyst. We can then use the `WK_PLATFORM_NAME` as part of 
determining if we are building for
Catalyst.

* Source/JavaScriptCore/Scripts/postprocess-header-rule:
* Source/WebKit/Scripts/postprocess-header-rule:

Canonical link: https://commits.webkit.org/256419@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 0d990d: Web Inspector: Adding a new style property to a ru...

2022-11-07 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0d990da3c01519907a83cfdee71283f2ef4f
  
https://github.com/WebKit/WebKit/commit/0d990da3c01519907a83cfdee71283f2ef4f
  Author: Patrick Angle 
  Date:   2022-11-07 (Mon, 07 Nov 2022)

  Changed paths:
M LayoutTests/inspector/css/add-css-property-expected.txt
M LayoutTests/inspector/css/add-css-property.html
M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
M Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js

  Log Message:
  ---
  Web Inspector: Adding a new style property to a rule after a commented out 
property results in incorrect style text/bad frontend state
https://bugs.webkit.org/show_bug.cgi?id=247139
rdar://88824802

Reviewed by Devin Rousso.

Two problems existed that together caused us to incorrectly associate incoming 
edits to properties following a
commented-out property with that commented out property, or to create a new 
WI.CSSProperty instead of using the existing
one that is being edited, resulting in various garbage text being written to 
the style sheet.

The first issue is in how we handle `pendingProperties` in 
WI.CSSStyleDeclaration. We currently consider a pending
property to be one that is not enabled (e.g. commented out), which does not 
match the intent of the comments in the
code and nor does it match its usage. The intended use for `pendingProperties` 
is to house properties that are no
longer part of the CSSStyleDeclaration after an update, presumedly to allow us 
to reuse `WI.CSSProperty`s during
undo/redo operations. It is also imaginable that this is where properties being 
edited should briefly exist if after
their creation, we receive an update from the backend before we have received 
the update that commits the property under
edit.

The misclassification of what belongs in `pendingProperties` is was not enough 
by itself to cause the issue however. The
issues arose when DOMNodeStyles._parseStylePropertyPayload attempted to 
associate incoming property payloads with existing
WI.CSSProperty objects. For pending properties, we only have the property name 
as a point of verification, which is ripe
for collision when looking at the array of "Pending Properties" that includes 
commented-out properties.

In addition to properly classifying a "pending" property we need to consider 
all existing properties for an earlier
comparison between payload properties and WI.CSSProperty objects in 
WI.DOMNodeStyles.prototype._parseStylePropertyPayload.
We currently are only considering enabled properties for direct matches, even 
though a commented-out property could
still be a direct match by name and index to an existing property. Failing to 
make this association results in us
unnecessarily creating a new WI.CSSProperty for the commented out rule, which 
is turn grows the number of "Pending
Properties" as we toss objects out of the main set of properties for a 
CSSStyleDeclaration and into the "Pending
Properties", where they then can end up colliding by name inside 
WI.DOMNodeStyles.prototype._parseStylePropertyPayload.

We instead need to use all of the existing properties to check for a direct 
name+index match to catch all possible
properties for reuse.

It seems likely that this regressed sometime during the bringup of the 
Spreadsheet* editor.
https://commits.webkit.org/208214@main, while likely not the cause, renamed the 
trinity of property arrays as follows:
`properties` -> `enabledProperties`
`allProperties` -> `properties`
`allVisibleProperties` -> `visibleProperties`

It seems ripe for misunderstanding that previously we had both an 
`allProperties` and a `properties` and I suspect that
the root misunderstanding of this issue stems from that. A quick audit of other 
uses of `enabledProperties` in our
current code shows generally reasonable usage as far as I can tell.

* LayoutTests/inspector/css/add-css-property-expected.txt:
* LayoutTests/inspector/css/add-css-property.html:

* Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js:
* Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseStylePropertyPayload):

Canonical link: https://commits.webkit.org/256410@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c46be5: WebDriver: [Cocoa] Regression(255359@main) Excepti...

2022-11-04 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c46be5c1183bb2076c4996fd4528e6c638fc5a91
  
https://github.com/WebKit/WebKit/commit/c46be5c1183bb2076c4996fd4528e6c638fc5a91
  Author: Patrick Angle 
  Date:   2022-11-04 (Fri, 04 Nov 2022)

  Changed paths:
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm

  Log Message:
  ---
  WebDriver: [Cocoa] Regression(255359@main) Exception when deleting remote 
automation session
https://bugs.webkit.org/show_bug.cgi?id=247384
rdar://101872145

Reviewed by Wenson Hsieh.

Revert the changes in 255359@main and instead apply a more targeted approach to 
fixing that specific issue. Previous
attempts to fix this with more state management in `WKWindowVisibilityObserver` 
created more issues, so a more targeted
fix it is!

* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(WebKit::WebViewImpl::viewWillMoveToWindowImpl):
(WebKit::WebViewImpl::viewWillMoveToWindow):
(WebKit::WebViewImpl::prepareForMoveToWindow):
(-[WKWindowVisibilityObserver _observeWindow:]): Deleted.

Canonical link: https://commits.webkit.org/256334@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 49637d: Web Inspector: Regression(256223@main) Assertion i...

2022-11-03 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49637d036739186b6fbfe3838091c4b61b3fc7da
  
https://github.com/WebKit/WebKit/commit/49637d036739186b6fbfe3838091c4b61b3fc7da
  Author: Patrick Angle 
  Date:   2022-11-03 (Thu, 03 Nov 2022)

  Changed paths:
M Source/WebCore/css/makeprop.pl

  Log Message:
  ---
  Web Inspector: Regression(256223@main) Assertion in 
LayoutTests/inspector/css/getSupportedCSSProperties.html at 
WebCore::CSSProperty::isInheritedProperty
https://bugs.webkit.org/show_bug.cgi?id=247398
rdar://101876145

Reviewed by Sam Weinig.

Known CSSPropertyID values are actually 0 thru `firstCSSProperty` + 
`numCSSProperties`. `firstCSSProperty` has a value
of 2, and `numCSSProperties` is 512, but the last property has an ID of 513.

* Source/WebCore/css/makeprop.pl:

Canonical link: https://commits.webkit.org/256275@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e5ee29: Cherry pick ebefbab, rdar://101872145

2022-11-02 Thread Patrick Angle
  Branch: refs/heads/safari-7615.1.11-branch
  Home:   https://github.com/WebKit/WebKit
  Commit: e5ee29f54fedbefad76b7ff5bf4555389829c694
  
https://github.com/WebKit/WebKit/commit/e5ee29f54fedbefad76b7ff5bf4555389829c694
  Author: Patrick Angle 
  Date:   2022-11-02 (Wed, 02 Nov 2022)

  Changed paths:
M Source/WebKit/UIProcess/mac/WebViewImpl.mm

  Log Message:
  ---
  Cherry pick ebefbab, rdar://101872145

WebDriver: [Cocoa] Regression(255359@main) Exception when deleting remote 
automation session
https://bugs.webkit.org/show_bug.cgi?id=247384
rdar://101872145

When running a WebDriver session on macOS Monterey, we are failing to stop 
observing listeners on the window, resulting
in an exception. This occurs because we no longer strongly hold a reference to 
the window anywhere when moving from
`-[WKWindowVisibilityObserver stopObserving:]` to `-[WKWindowVisibilityObserver 
_observeWindow:]`, which instead only
uses the weak reference to the window for removing the observers. Instead, we 
should keep the removing of the observers
in the scope where we know we still have a window.

This is observable on macOS Monterey when attempting to close a remote 
automation session (WebDriver).

* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(-[WKWindowVisibilityObserver _observeWindow:]): Deleted.

Canonical link: https://commits.webkit.org/255891.10@safari-7615.1.11-branch


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 33803c: Web Inspector: Support editing @rules in the Style...

2022-10-26 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 33803c89a12929f179cf29e76afc037e6c5fdf85
  
https://github.com/WebKit/WebKit/commit/33803c89a12929f179cf29e76afc037e6c5fdf85
  Author: Patrick Angle 
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
M LayoutTests/inspector/css/generateFormattedText-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt
A LayoutTests/inspector/css/setGroupingHeaderText-expected.txt
A LayoutTests/inspector/css/setGroupingHeaderText.html
M Source/JavaScriptCore/inspector/protocol/CSS.json
M Source/WebCore/css/parser/CSSParser.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/inspector/InspectorStyleSheet.h
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
M Source/WebCore/inspector/agents/InspectorCSSAgent.h
M Source/WebInspectorUI/UserInterface/Main.html
M Source/WebInspectorUI/UserInterface/Models/CSSGrouping.js
M Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
M 
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css
M 
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js
A Source/WebInspectorUI/UserInterface/Views/SpreadsheetRuleHeaderField.js
M 
Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js
R Source/WebInspectorUI/UserInterface/Views/SpreadsheetSelectorField.js
M Source/WebInspectorUI/UserInterface/Views/StyleOriginView.js

  Log Message:
  ---
  Web Inspector: Support editing @rules in the Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=246768
rdar://99871652

Reviewed by Devin Rousso.

This work is best thought of in three interlocking pieces:
- Rework chunks of InspectorStyleSheet to allow us to determine source data for 
@rules, including the header range,
which is the range of the text between `@media` (and friends) and the opening 
curly bracket for the rule set.
- Generalizing setting a rule's selector to just be setting its header text so 
we can do so with non-style rules.
- Implement frontend support for editing these rules in the same way selectors 
are currently editable.

* LayoutTests/inspector/css/setGroupingHeaderText-expected.txt: Added.
* LayoutTests/inspector/css/setGroupingHeaderText.html: Added.

* LayoutTests/inspector/css/generateFormattedText-expected.txt:
* LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt:
- Rebaseline expectations for new CSS.Grouping properties.

* Source/JavaScriptCore/inspector/protocol/CSS.json:
- Add rule ID to CSS.Grouping so that we can use it later to edit the header 
text of the grouping.
- Add method CSS.setGroupingHeaderText to change a CSS.Grouping's header text.

* Source/WebCore/css/parser/CSSParser.h:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeContainerRule):
- Provide a correct header range by keeping a copy of the original prelude 
before consumption to use for informing the
observer.

* Source/WebCore/css/parser/CSSParserImpl.h:
- Expose `consumeAtRule` publicly for use in InspectorStyleSheet

* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):
- Move the logic for determining how we unflatten rules to a shared static 
method so that the source data and flat CSSOM
rule lists always consider the same set of rules in the same way.

(WebCore::parserContextForDocument):
(WebCore::isValidRuleHeaderText):
(WebCore::protocolGroupingTypeForStyleRuleType):
- Abstract logic that relies on rule type into static methods so that the 
various bits that need implemented when adding
an editable rule type are in close proximity to each other.

(WebCore::flattenSourceData):
(WebCore::ParsedStyleSheet::setSourceData):
- Use `flatteningStrategyForStyleRuleType` to determine how we should handle 
each piece of source data.

(WebCore::StyleSheetHandler::startRuleHeader):
(WebCore::StyleSheetHandler::setRuleHeaderEnd):
- Fix to never produce a range end that occurs before the range's start.

(WebCore::sourceURLForCSSRule):
(WebCore::InspectorStyleSheet::buildObjectForGrouping):
(WebCore::InspectorStyleSheet::buildArrayForGroupings):
- Split building the grouping array into a few discrete, reusable pieces. For 
the four types of rules we are making
editable, we will use `buildObjectForGrouping` to build those rule objects. For 
other real that are currently turned
into fake groupings, we leave the logic mostly intact (which means they are not 
editable).

(WebCore::InspectorStyleSheet::ruleHeaderText):
(WebCore::InspectorStyleSheet::setRuleHeaderText):
(WebCore::InspectorStyleSheet::ruleSelector): Deleted.
(WebCore::isValidSelectorListString): Deleted.
(WebCore::InspectorStyleSheet::setRuleSelector): Deleted.
- Setting a rule's header text and setting a rule's

[webkit-changes] [WebKit/WebKit] 8fc38a: WebDriver: [Cocoa] Enable basic touch events on iO...

2022-10-21 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8fc38a332dc4756f46ae31a9df1d292dbe477ae8
  
https://github.com/WebKit/WebKit/commit/8fc38a332dc4756f46ae31a9df1d292dbe477ae8
  Author: Patrick Angle 
  Date:   2022-10-21 (Fri, 21 Oct 2022)

  Changed paths:
M Source/WTF/wtf/PlatformEnableCocoa.h

  Log Message:
  ---
  WebDriver: [Cocoa] Enable basic touch events on iOS (and also aliasing mouse 
events to touch events)
https://bugs.webkit.org/show_bug.cgi?id=246810
rdar://100402480

Reviewed by Devin Rousso.

Enable touch events for WebDriver on iOS, which in turn also allows us to alias 
basic mouse events to touch event, since
mouse events are not currently supported in Cocoa for WebDriver. Basic actions 
like tapping behave as intended. WPT test
pass rate isn't much worse than our other action types (so there is room for 
improvement) but without this drivers can
not even click on elements without resorting to JS to do the work instead.

* Source/WTF/wtf/PlatformEnableCocoa.h:

Canonical link: https://commits.webkit.org/255831@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 3d99c5: Remote Web Inspector: [Cocoa] `inspectable` API

2022-10-14 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3d99c5a137548afb19025ccd16979e9357a8cde7
  
https://github.com/WebKit/WebKit/commit/3d99c5a137548afb19025ccd16979e9357a8cde7
  Author: Patrick Angle 
  Date:   2022-10-14 (Fri, 14 Oct 2022)

  Changed paths:
M Source/JavaScriptCore/API/JSContext.h
M Source/JavaScriptCore/API/JSContext.mm
M Source/JavaScriptCore/API/JSContextPrivate.h
M Source/JavaScriptCore/API/JSContextRef.cpp
M Source/JavaScriptCore/API/JSContextRef.h
M Source/JavaScriptCore/API/JSContextRefPrivate.h
M Source/JavaScriptCore/API/JSRemoteInspector.cpp
M Source/JavaScriptCore/API/JSRemoteInspector.h
M Source/JavaScriptCore/API/WebKitAvailability.h
M Source/JavaScriptCore/API/tests/testIncludes.m
M Source/JavaScriptCore/config.h
M Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h
M Source/JavaScriptCore/inspector/remote/RemoteInspector.h
M Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h
M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm
M Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp
M Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.cpp
M Source/JavaScriptCore/jsc.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.h
M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
M Source/WebCore/config.h
M Source/WebCore/inspector/InspectorController.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp
M Source/WebKit/UIProcess/API/C/WKPage.cpp
M Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebKit2Prefix.h
M Source/WebKitLegacy/mac/WebView/WebView.mm
M Tools/MiniBrowser/mac/WK2BrowserWindowController.m
M Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m
M Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm

  Log Message:
  ---
  Remote Web Inspector: [Cocoa] `inspectable` API
https://bugs.webkit.org/show_bug.cgi?id=245986
rdar://100736163

Reviewed by Devin Rousso.

Add API to allow applications to explicitly mark a WKWebView or JSContext as 
inspectable. This flips assumptions about
inspectability of content. Previously the default state for inspectability was 
`true`, with a platform-specific deamon
making decisions about which applications would actually be inspectable on a 
system. This patch moves that decision into
WebKit/WebCore/JavaScriptCore instead, and flips the default for inspectability 
to be `false` unless an application
would have previously been always-inspectable. Those cases include:
- Applications with the `get-task-allow`/`com.apple.security.get-task-allow` 
development entitlements when linked
against an SDK without the API.
- Applications with the 
`com.apple.webinspector.allow`/`com.apple.private.webinspector.allow-remote-inspection`
entitlements.

These entitlements will no longer be necessary to enable inspection, and 
instead the new `inspectable` API should be
used.

* Source/JavaScriptCore/API/JSContext.h:
* Source/JavaScriptCore/API/JSContext.mm:
(-[JSContext inspectable]):
(-[JSContext setInspectable:]):
(-[JSContext _remoteInspectionEnabled]):
(-[JSContext _setRemoteInspectionEnabled:]):
* Source/JavaScriptCore/API/JSContextPrivate.h:
* Source/JavaScriptCore/API/JSContextRef.cpp:
(JSGlobalContextCreateInGroup):
(JSGlobalContextIsInspectable):
(JSGlobalContextSetInspectable):
(JSGlobalContextGetRemoteInspectionEnabled):
(JSGlobalContextSetRemoteInspectionEnabled):
* Source/JavaScriptCore/API/JSContextRef.h:
* Source/JavaScriptCore/API/JSContextRefPrivate.h:
* Source/JavaScriptCore/API/JSRemoteInspector.cpp:
(mainProcessHasEntitlement):
(defaultStateForRemoteInspectionEnabledByDefault):
(JSRemoteInspectorGetInspectionEnabledByDefault):
* Source/JavaScriptCore/API/JSRemoteInspector.h:
* Source/JavaScriptCore/API/WebKitAvailability.h:
* Source/JavaScriptCore/API/tests/testIncludes.m:
* Source/JavaScriptCore/config.h:
* Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::developerExtrasEnabled const):
* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp:
(Inspector::RemoteInspectionTarget::remoteControlAllowed const):
(Inspector::RemoteInspectionTarget::inspectable const

[webkit-changes] [WebKit/WebKit] b23f23: WebDriver: Regression(255346@main) Session hangs a...

2022-10-10 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b23f2360ae6ccc5abb6834f2a364f519e65d47df
  
https://github.com/WebKit/WebKit/commit/b23f2360ae6ccc5abb6834f2a364f519e65d47df
  Author: Patrick Angle 
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
M Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.js

  Log Message:
  ---
  WebDriver: Regression(255346@main) Session hangs after evaluating JavaScript 
instead of returning evaluation result
https://bugs.webkit.org/show_bug.cgi?id=246298
rdar://100995005

Reviewed by Brent Fulgham and Alex Christensen.

Add missing passthrough of the process identifier inside the relevent 
JavaScript.

* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.js:
(let.AutomationSessionProxy.prototype.evaluateJavaScriptFunction):

Canonical link: https://commits.webkit.org/255367@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a0a263: Remote Web Inspector: [Cocoa] `inspectable` API

2022-10-10 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a0a26311c18df6a6b7aa596ee06ee0b4257f765a
  
https://github.com/WebKit/WebKit/commit/a0a26311c18df6a6b7aa596ee06ee0b4257f765a
  Author: Patrick Angle 
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
M Source/JavaScriptCore/API/JSContext.h
M Source/JavaScriptCore/API/JSContext.mm
M Source/JavaScriptCore/API/JSContextPrivate.h
M Source/JavaScriptCore/API/JSContextRef.cpp
M Source/JavaScriptCore/API/JSContextRef.h
M Source/JavaScriptCore/API/JSContextRefPrivate.h
M Source/JavaScriptCore/API/JSRemoteInspector.cpp
M Source/JavaScriptCore/API/JSRemoteInspector.h
M Source/JavaScriptCore/API/WebKitAvailability.h
M Source/JavaScriptCore/API/tests/testIncludes.m
M Source/JavaScriptCore/config.h
M Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp
M Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h
M Source/JavaScriptCore/inspector/remote/RemoteInspector.h
M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm
M Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp
M Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.cpp
M Source/JavaScriptCore/jsc.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.h
M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
M Source/WebCore/config.h
M Source/WebCore/inspector/InspectorController.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp
M Source/WebKit/UIProcess/API/C/WKPage.cpp
M Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebKit2Prefix.h
M Source/WebKitLegacy/mac/WebView/WebView.mm
M Tools/MiniBrowser/mac/WK2BrowserWindowController.m
M Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m
M Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm

  Log Message:
  ---
  Remote Web Inspector: [Cocoa] `inspectable` API
https://bugs.webkit.org/show_bug.cgi?id=245986
rdar://100736163

Reviewed by Devin Rousso.

Add API to allow applications to explicitly mark a WKWebView or JSContext as 
inspectable. This flips assumptions about
inspectability of content. Previously the default state for inspectability was 
`true`, with a platform-specific deamon
making decisions about which applications would actually be inspectable on a 
system. This patch moves that decision into
WebKit/WebCore/JavaScriptCore instead, and flips the default for inspectability 
to be `false` unless an application
would have previously been always-inspectable. Those cases include:
- Applications with the `get-task-allow`/`com.apple.security.get-task-allow` 
development entitlements when linked
against an SDK without the API.
- Applications with the 
`com.apple.webinspector.allow`/`com.apple.private.webinspector.allow-remote-inspection`
entitlements.

These entitlements will no longer be necessary to enable inspection, and 
instead the new `inspectable` API should be
used.

* Source/JavaScriptCore/API/JSContext.h:
* Source/JavaScriptCore/API/JSContext.mm:
(-[JSContext inspectable]):
(-[JSContext setInspectable:]):
(-[JSContext _remoteInspectionEnabled]):
(-[JSContext _setRemoteInspectionEnabled:]):
* Source/JavaScriptCore/API/JSContextPrivate.h:
* Source/JavaScriptCore/API/JSContextRef.cpp:
(JSGlobalContextCreateInGroup):
(JSGlobalContextIsInspectable):
(JSGlobalContextSetInspectable):
(JSGlobalContextGetRemoteInspectionEnabled):
(JSGlobalContextSetRemoteInspectionEnabled):
* Source/JavaScriptCore/API/JSContextRef.h:
* Source/JavaScriptCore/API/JSContextRefPrivate.h:
* Source/JavaScriptCore/API/JSRemoteInspector.cpp:
(mainProcessHasEntitlement):
(defaultStateForRemoteInspectionEnabledByDefault):
(JSRemoteInspectorGetInspectionEnabledByDefault):
* Source/JavaScriptCore/API/JSRemoteInspector.h:
* Source/JavaScriptCore/API/tests/testIncludes.m:
* Source/JavaScriptCore/config.h:
* Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::developerExtrasEnabled const):
* Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp:
(Inspector::RemoteInspectionTarget::remoteControlAllowed const):
(Inspector::RemoteInspectionTarget::inspectable const):
(Inspector::RemoteInspectionTarget::setInspectable):
(Inspector::RemoteInspectionTarget::pauseWaitingForAutomaticInspection

[webkit-changes] [WebKit/WebKit] 74f3f2: Web Inspector: Use curly quotes and apostrophe for...

2022-09-22 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 74f3f24683b97d13fe31e3ae316dd19f5fcc74d5
  
https://github.com/WebKit/WebKit/commit/74f3f24683b97d13fe31e3ae316dd19f5fcc74d5
  Author: Patrick Angle 
  Date:   2022-09-22 (Thu, 22 Sep 2022)

  Changed paths:
M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
M Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js
M Source/WebInspectorUI/UserInterface/Views/BlackboxSettingsView.js
M Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js

  Log Message:
  ---
  Web Inspector: Use curly quotes and apostrophe for non-monospace UI copy
https://bugs.webkit.org/show_bug.cgi?id=245526
rdar://99974412

Reviewed by Devin Rousso.

* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):
* Source/WebInspectorUI/UserInterface/Views/BlackboxSettingsView.js:
(WI.BlackboxSettingsView.prototype.initialLayout):
* Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype._contentChanged):

Canonical link: https://commits.webkit.org/254765@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 467145: Web Inspector: DOM tree is missing parts of the DO...

2022-09-21 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 46714502452254ee3d032e00b070d267fb6823ea
  
https://github.com/WebKit/WebKit/commit/46714502452254ee3d032e00b070d267fb6823ea
  Author: Patrick Angle 
  Date:   2022-09-21 (Wed, 21 Sep 2022)

  Changed paths:
M Source/WebInspectorUI/UserInterface/Models/DOMNode.js

  Log Message:
  ---
  Web Inspector: DOM tree is missing parts of the DOM tree when remotely 
inspecting iOS devices
https://bugs.webkit.org/show_bug.cgi?id=245314
rdar://100203923

Reviewed by Alexey Proskuryakov.

A typo in our compatibility handling for older protocol versions caused us to 
not actually add all the DOMNodes to our
frontend representation of the DOM tree.

* Source/WebInspectorUI/UserInterface/Models/DOMNode.js:
(WI.DOMNode):

Canonical link: https://commits.webkit.org/254744@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ba43b9: Regression(242214) ViewSnapshotStore's snapshots a...

2022-09-21 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ba43b95d6427f9b488bbc19b33099c2b1a2db659
  
https://github.com/WebKit/WebKit/commit/ba43b95d6427f9b488bbc19b33099c2b1a2db659
  Author: Patrick Angle 
  Date:   2022-09-21 (Wed, 21 Sep 2022)

  Changed paths:
M Source/WebKit/UIProcess/ViewSnapshotStore.cpp

  Log Message:
  ---
  Regression(242214) ViewSnapshotStore's snapshots are no longer volatile
https://bugs.webkit.org/show_bug.cgi?id=245490

Reviewed by Tim Horton.

Bug 242214 stopped marking view snapshots as volatile by default in order for 
WebDriver to guarantee their lifetime
until it is able to convert it to base64. This causes the ViewSnapshotStore to 
grow to it's limit of 400mb, instead of
being able to have snapshots disposed of sooner. The ViewSnapshotStore should 
explicitly mark the snapshots it takes as
volatile to satisfy that requirement.

* Source/WebKit/UIProcess/ViewSnapshotStore.cpp:
(WebKit::ViewSnapshotStore::recordSnapshot):

Canonical link: https://commits.webkit.org/254734@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 2326b1: Web Inspector: Make frontend engineering settings ...

2022-09-20 Thread Patrick Angle
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2326b1146886546de0d44f6aa85415b2e1257b8a
  
https://github.com/WebKit/WebKit/commit/2326b1146886546de0d44f6aa85415b2e1257b8a
  Author: Patrick Angle 
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
M Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml
M Source/WebCore/inspector/InspectorFrontendHost.cpp
M Source/WebCore/inspector/InspectorFrontendHost.h
M Source/WebCore/inspector/InspectorFrontendHost.idl
M Source/WebInspectorUI/UserInterface/Base/Main.js
M Source/WebInspectorUI/UserInterface/Base/Setting.js
M Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js
M Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js
M Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js
M Source/WebInspectorUI/UserInterface/Test/Test.js
M Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

  Log Message:
  ---
  Web Inspector: Make frontend engineering settings available behind a debug 
runtime flag
https://bugs.webkit.org/show_bug.cgi?id=244819
rdar://98957031

Reviewed by Devin Rousso.

Make it slightly easier to use the engineering settings by allowing platforms 
to define various additional circumstances
under which engineering settings are available.

This is not done as additional functionality behind `DeveloperExtrasEnabled`, 
as that setting is currently used in some
applications to enable the "Inspect Element" context menu item, but these 
settings are not generally useful for the
users of those applications.

"Debug" settings and functionality remain limited to local engineering builds.

* Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml:
- Add a runtime preference to control engineering setting availability.

* Source/WebCore/inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::engineeringSettingsAllowed):
* Source/WebCore/inspector/InspectorFrontendHost.h:
* Source/WebCore/inspector/InspectorFrontendHost.idl:

* Source/WebInspectorUI/UserInterface/Base/Main.js:
* Source/WebInspectorUI/UserInterface/Test/Test.js:
* Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.initializeTarget):
* Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.async initializeTarget):
- Add helper to determine if engineering settings should be available based on 
both the preference and the actual build.

* Source/WebInspectorUI/UserInterface/Base/Setting.js:
(WI.EngineeringSetting.prototype.get value):
(WI.EngineeringSetting.prototype.set value):
(WI.EngineeringSetting):
* Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype.initialLayout):
(WI.SettingsTabContentView.prototype._createEngineeringSettingsView):
(WI.SettingsTabContentView.prototype._createDebugSettingsView):
* Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js:
(updateMockWebExtensionTab):
(WI.runBootstrapOperations):
- Move the mock inspector extension tab setting to the Debug section, since it 
relies on Debug/Bootstrap.js being in the
build.

Canonical link: https://commits.webkit.org/254676@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes