Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ab92977c20e72bb7166a19c9d61b01a967d0507
      
https://github.com/WebKit/WebKit/commit/5ab92977c20e72bb7166a19c9d61b01a967d0507
  Author: Qianlang Chen <[email protected]>
  Date:   2026-06-10 (Wed, 10 Jun 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/inspector/css/css-stylesheet-commands-frame-target-expected.txt
    A 
LayoutTests/http/tests/site-isolation/inspector/css/css-stylesheet-commands-frame-target.html
    A 
LayoutTests/http/tests/site-isolation/inspector/css/resources/frame-with-stylesheet.html
    M Source/JavaScriptCore/inspector/protocol/CSS.json
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/inspector/FrameInspectorController.cpp
    M Source/WebCore/inspector/InstrumentingAgents.h
    A Source/WebCore/inspector/agents/frame/FrameCSSAgent.cpp
    A Source/WebCore/inspector/agents/frame/FrameCSSAgent.h

  Log Message:
  -----------
  [Site Isolation] Web Inspector: Introduce a CSS agent for the frame target
https://bugs.webkit.org/show_bug.cgi?id=314144

Reviewed by BJ Burg.

As the first step to supporting the CSS functionalities in Web Inspector
under site isolation, following the frame target paradigm and prior
completed domains like Console and Runtime, introduce a FrameCSSAgent.

The FrameCSSAgent does not inherit from InspectorCSSAgent. This is
because InspectorCSSAgent is dedicated to work with the page target,
unlike in the case of Console or Runtime where it's a super class for
page and workers' agents. Rather than trying to make the target-specific
CSS agents have a similar inheritance relationship to those agents, make
a standalone agent for minimal changes needed and also for an easier
time later when we decide to deprecate the page's InspectorCSSAgent.

- Trying to inherit FrameCSSAgent from InspectorCSSAgent also ran into a
  design limitation in our agent registry. Filed https://webkit.org/b/314248

Test: 
http/tests/site-isolation/inspector/css/css-stylesheet-commands-frame-target.html

Add a simple test case to ensure the frame target can enable its new
CSS agent.

* 
LayoutTests/http/tests/site-isolation/inspector/css/css-stylesheet-commands-frame-target-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/inspector/css/css-stylesheet-commands-frame-target.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/inspector/css/resources/frame-with-stylesheet.html:
 Added.
* Source/JavaScriptCore/inspector/protocol/CSS.json:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/inspector/FrameInspectorController.cpp:
(WebCore::FrameInspectorController::createLazyAgents):
* Source/WebCore/inspector/InstrumentingAgents.h:
* Source/WebCore/inspector/agents/frame/FrameCSSAgent.cpp: Added.
(WebCore::FrameCSSAgent::FrameCSSAgent):
(WebCore::m_inspectedFrame):
(WebCore::FrameCSSAgent::didCreateFrontendAndBackend):
(WebCore::FrameCSSAgent::willDestroyFrontendAndBackend):
(WebCore::FrameCSSAgent::enable):
(WebCore::FrameCSSAgent::disable):
(WebCore::FrameCSSAgent::getComputedStyleForNode):
(WebCore::FrameCSSAgent::getFontDataForNode):
(WebCore::FrameCSSAgent::getInlineStylesForNode):
(WebCore::FrameCSSAgent::getMatchedStylesForNode):
(WebCore::FrameCSSAgent::getAllStyleSheets):
(WebCore::FrameCSSAgent::getStyleSheet):
(WebCore::FrameCSSAgent::getStyleSheetText):
(WebCore::FrameCSSAgent::setStyleSheetText):
(WebCore::FrameCSSAgent::setStyleText):
(WebCore::FrameCSSAgent::setRuleSelector):
(WebCore::FrameCSSAgent::setGroupingHeaderText):
(WebCore::FrameCSSAgent::createStyleSheet):
(WebCore::FrameCSSAgent::addRule):
(WebCore::FrameCSSAgent::getSupportedCSSProperties):
(WebCore::FrameCSSAgent::getSupportedSystemFontFamilyNames):
(WebCore::FrameCSSAgent::forcePseudoState):
(WebCore::FrameCSSAgent::setLayoutContextTypeChangedMode):
* Source/WebCore/inspector/agents/frame/FrameCSSAgent.h: Added.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to