Skip to content

Commit

Permalink
Roll protocol to r1378738
Browse files Browse the repository at this point in the history
  • Loading branch information
devtools-bot committed Nov 6, 2024
1 parent 7019b3c commit 652c02c
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 15 deletions.
45 changes: 31 additions & 14 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@


## Roll protocol to r1378738 — _2024-11-06T04:29:39.000Z_
###### Diff: [`7019b3c...51d701f`](https://github.com/ChromeDevTools/devtools-protocol/compare/7019b3c...51d701f)

```diff
@@ browser_protocol.pdl:2319 @@ experimental domain CSS
returns
array of SourceRange ranges

+ # Starts tracking the given node for the computed style updates
+ # and whenever the computed style is updated for node, it queues
+ # a `computedStyleUpdated` event with throttling.
+ experimental command trackComputedStyleUpdatesForNode
+ parameters
+ optional DOM.NodeId nodeId
+
# Starts tracking the given computed styles for updates. The specified array of properties
# replaces the one previously specified. Pass empty array to disable tracking.
# Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
@@ -2486,6 +2493,11 @@ experimental domain CSS
# Identifier of the removed stylesheet.
StyleSheetId styleSheetId

+ experimental event computedStyleUpdated
+ parameters
+ # The node id that has updated computed styles.
+ DOM.NodeId nodeId
+
experimental domain CacheStorage
depends on Storage
```

## Roll protocol to r1377232 — _2024-11-02T04:29:34.000Z_
###### Diff: [`b62e175...b1b0036`](https://github.com/ChromeDevTools/devtools-protocol/compare/b62e175...b1b0036)

Expand Down Expand Up @@ -12138,18 +12169,4 @@ index 18cf0c7..8e43695 100644
# Allows overriding user agent with the given string.
command setUserAgentOverride
parameters
```

## Roll protocol to r1005560 — _2022-05-20T01:15:18.000Z_
###### Diff: [`363a231...44eb39e`](https://github.com/ChromeDevTools/devtools-protocol/compare/363a231...44eb39e)

```diff
@@ browser_protocol.pdl:751 @@ experimental domain Audits
CrossOriginWindowAlert
CrossOriginWindowConfirm
CSSSelectorInternalMediaControlsOverlayCastButton
- CustomCursorIntersectsViewport
DeprecationExample
DocumentDomainSettingWithoutOriginAgentClusterHeader
EventPath
```
23 changes: 23 additions & 0 deletions json/browser_protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -4887,6 +4887,18 @@
}
]
},
{
"name": "trackComputedStyleUpdatesForNode",
"description": "Starts tracking the given node for the computed style updates\nand whenever the computed style is updated for node, it queues\na `computedStyleUpdated` event with throttling.",
"experimental": true,
"parameters": [
{
"name": "nodeId",
"optional": true,
"$ref": "DOM.NodeId"
}
]
},
{
"name": "trackComputedStyleUpdates",
"description": "Starts tracking the given computed styles for updates. The specified array of properties\nreplaces the one previously specified. Pass empty array to disable tracking.\nUse takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\nThe changes to computed style properties are only tracked for nodes pushed to the front-end\nby the DOM agent. If no changes to the tracked properties occur after the node has been pushed\nto the front-end, no updates will be issued for the node.",
Expand Down Expand Up @@ -5261,6 +5273,17 @@
"$ref": "StyleSheetId"
}
]
},
{
"name": "computedStyleUpdated",
"experimental": true,
"parameters": [
{
"name": "nodeId",
"description": "The node id that has updated computed styles.",
"$ref": "DOM.NodeId"
}
]
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "devtools-protocol",
"version": "0.0.1378110",
"version": "0.0.1378738",
"description": "The Chrome DevTools Protocol JSON",
"repository": "https://github.com/ChromeDevTools/devtools-protocol",
"author": "The Chromium Authors",
Expand Down
12 changes: 12 additions & 0 deletions pdl/browser_protocol.pdl
Original file line number Diff line number Diff line change
Expand Up @@ -2319,6 +2319,13 @@ experimental domain CSS
returns
array of SourceRange ranges

# Starts tracking the given node for the computed style updates
# and whenever the computed style is updated for node, it queues
# a `computedStyleUpdated` event with throttling.
experimental command trackComputedStyleUpdatesForNode
parameters
optional DOM.NodeId nodeId

# Starts tracking the given computed styles for updates. The specified array of properties
# replaces the one previously specified. Pass empty array to disable tracking.
# Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
Expand Down Expand Up @@ -2486,6 +2493,11 @@ experimental domain CSS
# Identifier of the removed stylesheet.
StyleSheetId styleSheetId

experimental event computedStyleUpdated
parameters
# The node id that has updated computed styles.
DOM.NodeId nodeId

experimental domain CacheStorage
depends on Storage

Expand Down
10 changes: 10 additions & 0 deletions types/protocol-mapping.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export namespace ProtocolMapping {
* Fired whenever an active document stylesheet is removed.
*/
'CSS.styleSheetRemoved': [Protocol.CSS.StyleSheetRemovedEvent];
'CSS.computedStyleUpdated': [Protocol.CSS.ComputedStyleUpdatedEvent];
/**
* This is fired whenever the list of available sinks changes. A sink is a
* device or a software surface that you can cast to.
Expand Down Expand Up @@ -1871,6 +1872,15 @@ export namespace ProtocolMapping {
paramsType: [Protocol.CSS.GetLocationForSelectorRequest];
returnType: Protocol.CSS.GetLocationForSelectorResponse;
};
/**
* Starts tracking the given node for the computed style updates
* and whenever the computed style is updated for node, it queues
* a `computedStyleUpdated` event with throttling.
*/
'CSS.trackComputedStyleUpdatesForNode': {
paramsType: [Protocol.CSS.TrackComputedStyleUpdatesForNodeRequest?];
returnType: void;
};
/**
* Starts tracking the given computed styles for updates. The specified array of properties
* replaces the one previously specified. Pass empty array to disable tracking.
Expand Down
9 changes: 9 additions & 0 deletions types/protocol-proxy-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,13 @@ export namespace ProtocolProxyApi {
*/
getLocationForSelector(params: Protocol.CSS.GetLocationForSelectorRequest): Promise<Protocol.CSS.GetLocationForSelectorResponse>;

/**
* Starts tracking the given node for the computed style updates
* and whenever the computed style is updated for node, it queues
* a `computedStyleUpdated` event with throttling.
*/
trackComputedStyleUpdatesForNode(params: Protocol.CSS.TrackComputedStyleUpdatesForNodeRequest): Promise<void>;

/**
* Starts tracking the given computed styles for updates. The specified array of properties
* replaces the one previously specified. Pass empty array to disable tracking.
Expand Down Expand Up @@ -1217,6 +1224,8 @@ export namespace ProtocolProxyApi {
*/
on(event: 'styleSheetRemoved', listener: (params: Protocol.CSS.StyleSheetRemovedEvent) => void): void;

on(event: 'computedStyleUpdated', listener: (params: Protocol.CSS.ComputedStyleUpdatedEvent) => void): void;

}

export interface CacheStorageApi {
Expand Down
11 changes: 11 additions & 0 deletions types/protocol-tests-proxy-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,13 @@ export namespace ProtocolTestsProxyApi {
*/
getLocationForSelector(params: Protocol.CSS.GetLocationForSelectorRequest): Promise<{id: number, result: Protocol.CSS.GetLocationForSelectorResponse, sessionId: string}>;

/**
* Starts tracking the given node for the computed style updates
* and whenever the computed style is updated for node, it queues
* a `computedStyleUpdated` event with throttling.
*/
trackComputedStyleUpdatesForNode(params: Protocol.CSS.TrackComputedStyleUpdatesForNodeRequest): Promise<{id: number, result: void, sessionId: string}>;

/**
* Starts tracking the given computed styles for updates. The specified array of properties
* replaces the one previously specified. Pass empty array to disable tracking.
Expand Down Expand Up @@ -1295,6 +1302,10 @@ export namespace ProtocolTestsProxyApi {
offStyleSheetRemoved(listener: (event: { params: Protocol.CSS.StyleSheetRemovedEvent }) => void): void;
onceStyleSheetRemoved(eventMatcher?: (event: { params: Protocol.CSS.StyleSheetRemovedEvent }) => boolean): Promise<{ params: Protocol.CSS.StyleSheetRemovedEvent }>;

onComputedStyleUpdated(listener: (event: { params: Protocol.CSS.ComputedStyleUpdatedEvent }) => void): void;
offComputedStyleUpdated(listener: (event: { params: Protocol.CSS.ComputedStyleUpdatedEvent }) => void): void;
onceComputedStyleUpdated(eventMatcher?: (event: { params: Protocol.CSS.ComputedStyleUpdatedEvent }) => boolean): Promise<{ params: Protocol.CSS.ComputedStyleUpdatedEvent }>;

}

export interface CacheStorageApi {
Expand Down
11 changes: 11 additions & 0 deletions types/protocol.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5574,6 +5574,10 @@ export namespace Protocol {
ranges: SourceRange[];
}

export interface TrackComputedStyleUpdatesForNodeRequest {
nodeId?: DOM.NodeId;
}

export interface TrackComputedStyleUpdatesRequest {
propertiesToTrack: CSSComputedStyleProperty[];
}
Expand Down Expand Up @@ -5770,6 +5774,13 @@ export namespace Protocol {
*/
styleSheetId: StyleSheetId;
}

export interface ComputedStyleUpdatedEvent {
/**
* The node id that has updated computed styles.
*/
nodeId: DOM.NodeId;
}
}

export namespace CacheStorage {
Expand Down

0 comments on commit 652c02c

Please sign in to comment.