Skip to content

Commit c7ada36

Browse files
author
copybara-service
committed
deploy: 2cf0305
1 parent 495837e commit c7ada36

File tree

143 files changed

+5903
-2757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+5903
-2757
lines changed

expected_grd_files.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@
390390
"front_end/js_app.html",
391391
"front_end/models/ai_assistance/ai_assistance.js",
392392
"front_end/models/ai_code_completion/ai_code_completion.js",
393+
"front_end/models/ai_code_generation/ai_code_generation.js",
393394
"front_end/models/autofill_manager/autofill_manager.js",
394395
"front_end/models/badges/badges.js",
395396
"front_end/models/bindings/bindings.js",

front_end/core/i18n/locales/generated/collected-ui-strings.d

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

front_end/core/sdk/DOMModel.d.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ export declare class DOMNode {
119119
removeChild(node: DOMNode): void;
120120
setChildrenPayload(payloads: Protocol.DOM.Node[]): void;
121121
private setPseudoElements;
122+
private toAdoptedStyleSheets;
123+
setAdoptedStyleSheets(ids: Protocol.DOM.StyleSheetId[]): void;
124+
get adoptedStyleSheetsForNode(): AdoptedStyleSheet[];
122125
setDistributedNodePayloads(payloads: Protocol.DOM.BackendNode[]): void;
123126
setAssignedSlot(payload: Protocol.DOM.BackendNode): void;
124127
private renumber;
@@ -177,6 +180,11 @@ export declare class DOMDocument extends DOMNode {
177180
baseURL: Platform.DevToolsPath.UrlString;
178181
constructor(domModel: DOMModel, payload: Protocol.DOM.Node);
179182
}
183+
export declare class AdoptedStyleSheet {
184+
readonly id: Protocol.DOM.StyleSheetId;
185+
readonly cssModel: CSSModel;
186+
constructor(id: Protocol.DOM.StyleSheetId, cssModel: CSSModel);
187+
}
180188
export declare class DOMModel extends SDKModel<EventTypes> {
181189
#private;
182190
agent: ProtocolProxyApi.DOMApi;
@@ -212,6 +220,7 @@ export declare class DOMModel extends SDKModel<EventTypes> {
212220
shadowRootPushed(hostId: Protocol.DOM.NodeId, root: Protocol.DOM.Node): void;
213221
shadowRootPopped(hostId: Protocol.DOM.NodeId, rootId: Protocol.DOM.NodeId): void;
214222
pseudoElementAdded(parentId: Protocol.DOM.NodeId, pseudoElement: Protocol.DOM.Node): void;
223+
adoptedStyleSheetsModified(parentId: Protocol.DOM.NodeId, styleSheets: Protocol.DOM.StyleSheetId[]): void;
215224
scrollableFlagUpdated(nodeId: Protocol.DOM.NodeId, isScrollable: boolean): void;
216225
affectedByStartingStylesFlagUpdated(nodeId: Protocol.DOM.NodeId, affectedByStartingStyles: boolean): void;
217226
topLayerElementsUpdated(): void;
@@ -255,7 +264,8 @@ export declare enum Events {
255264
MarkersChanged = "MarkersChanged",
256265
TopLayerElementsChanged = "TopLayerElementsChanged",
257266
ScrollableFlagUpdated = "ScrollableFlagUpdated",
258-
AffectedByStartingStylesFlagUpdated = "AffectedByStartingStylesFlagUpdated"
267+
AffectedByStartingStylesFlagUpdated = "AffectedByStartingStylesFlagUpdated",
268+
AdoptedStyleSheetsModified = "AdoptedStyleSheetsModified"
259269
}
260270
export interface EventTypes {
261271
[Events.AttrModified]: {
@@ -284,6 +294,7 @@ export interface EventTypes {
284294
[Events.AffectedByStartingStylesFlagUpdated]: {
285295
node: DOMNode;
286296
};
297+
[Events.AdoptedStyleSheetsModified]: DOMNode;
287298
}
288299
export declare class DOMModelUndoStack {
289300
#private;

front_end/core/sdk/DOMModel.js

Lines changed: 33 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front_end/core/sdk/DOMModel.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front_end/core/sdk/sdk.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12296,6 +12296,7 @@ import * as Platform15 from "./../platform/platform.js";
1229612296
var DOMModel_exports = {};
1229712297
__export(DOMModel_exports, {
1229812298
ARIA_ATTRIBUTES: () => ARIA_ATTRIBUTES,
12299+
AdoptedStyleSheet: () => AdoptedStyleSheet,
1229912300
DOMDocument: () => DOMDocument,
1230012301
DOMModel: () => DOMModel,
1230112302
DOMModelUndoStack: () => DOMModelUndoStack,
@@ -24539,6 +24540,7 @@ var DOMNode = class _DOMNode {
2453924540
*/
2454024541
detached = false;
2454124542
#retainedNodes;
24543+
#adoptedStyleSheets = [];
2454224544
constructor(domModel) {
2454324545
this.#domModel = domModel;
2454424546
this.#agent = this.#domModel.getAgent();
@@ -24574,6 +24576,9 @@ var DOMNode = class _DOMNode {
2457424576
if (payload.attributes) {
2457524577
this.setAttributesPayload(payload.attributes);
2457624578
}
24579+
if (payload.adoptedStyleSheets) {
24580+
this.#adoptedStyleSheets = this.toAdoptedStyleSheets(payload.adoptedStyleSheets);
24581+
}
2457724582
this.childNodeCountInternal = payload.childNodeCount || 0;
2457824583
if (payload.shadowRoots) {
2457924584
for (let i = 0; i < payload.shadowRoots.length; ++i) {
@@ -25134,6 +25139,16 @@ var DOMNode = class _DOMNode {
2513425139
}
2513525140
}
2513625141
}
25142+
toAdoptedStyleSheets(ids) {
25143+
return ids.map((id) => new AdoptedStyleSheet(id, this.#domModel.cssModel()));
25144+
}
25145+
setAdoptedStyleSheets(ids) {
25146+
this.#adoptedStyleSheets = this.toAdoptedStyleSheets(ids);
25147+
this.#domModel.dispatchEventToListeners(Events8.AdoptedStyleSheetsModified, this);
25148+
}
25149+
get adoptedStyleSheetsForNode() {
25150+
return this.#adoptedStyleSheets;
25151+
}
2513725152
setDistributedNodePayloads(payloads) {
2513825153
this.#distributedNodes = [];
2513925154
for (const payload of payloads) {
@@ -25447,6 +25462,14 @@ var DOMDocument = class extends DOMNode {
2544725462
this.baseURL = payload.baseURL || "";
2544825463
}
2544925464
};
25465+
var AdoptedStyleSheet = class {
25466+
id;
25467+
cssModel;
25468+
constructor(id, cssModel) {
25469+
this.id = id;
25470+
this.cssModel = cssModel;
25471+
}
25472+
};
2545025473
var DOMModel = class _DOMModel extends SDKModel {
2545125474
agent;
2545225475
idToDOMNode = /* @__PURE__ */ new Map();
@@ -25754,6 +25777,13 @@ var DOMModel = class _DOMModel extends SDKModel {
2575425777
this.dispatchEventToListeners(Events8.NodeInserted, node);
2575525778
this.scheduleMutationEvent(node);
2575625779
}
25780+
adoptedStyleSheetsModified(parentId, styleSheets) {
25781+
const parent = this.idToDOMNode.get(parentId);
25782+
if (!parent) {
25783+
return;
25784+
}
25785+
parent.setAdoptedStyleSheets(styleSheets);
25786+
}
2575725787
scrollableFlagUpdated(nodeId, isScrollable) {
2575825788
const node = this.nodeForId(nodeId);
2575925789
if (!node || node.isScrollable() === isScrollable) {
@@ -25921,14 +25951,13 @@ var Events8;
2592125951
Events12["TopLayerElementsChanged"] = "TopLayerElementsChanged";
2592225952
Events12["ScrollableFlagUpdated"] = "ScrollableFlagUpdated";
2592325953
Events12["AffectedByStartingStylesFlagUpdated"] = "AffectedByStartingStylesFlagUpdated";
25954+
Events12["AdoptedStyleSheetsModified"] = "AdoptedStyleSheetsModified";
2592425955
})(Events8 || (Events8 = {}));
2592525956
var DOMDispatcher = class {
2592625957
#domModel;
2592725958
constructor(domModel) {
2592825959
this.#domModel = domModel;
2592925960
}
25930-
adoptedStyleSheetsModified(_params) {
25931-
}
2593225961
documentUpdated() {
2593325962
this.#domModel.documentUpdated();
2593425963
}
@@ -25938,6 +25967,9 @@ var DOMDispatcher = class {
2593825967
attributeRemoved({ nodeId, name }) {
2593925968
this.#domModel.attributeRemoved(nodeId, name);
2594025969
}
25970+
adoptedStyleSheetsModified({ nodeId, adoptedStyleSheets }) {
25971+
this.#domModel.adoptedStyleSheetsModified(nodeId, adoptedStyleSheets);
25972+
}
2594125973
inlineStyleInvalidated({ nodeIds }) {
2594225974
this.#domModel.inlineStyleInvalidated(nodeIds);
2594325975
}

front_end/core/sdk/sdk.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front_end/entrypoints/main/MainImpl.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front_end/entrypoints/main/MainImpl.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front_end/entrypoints/main/main.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)