Skip to content

Commit 322a501

Browse files
ergunshDevtools-frontend LUCI CQ
authored andcommitted
[CSSMatchedStyles] Do not bail out when getAnimatedStylesForNode errors
Previously, we were returning `null` for `CSSMatchedStyles` creation when either `getMatchedStylesForNode` or `getAnimatedStylesForNode` errored. However, native UI DevTools do not implement `getAnimatedStylesForNode` CDP method; thus it causes `CSSMatchedStyles` to be not created since this method now errors. I have updated the logic to not bail out from `matchedStyles` creation for animated styles so that UI native DevTools still works. This also makes sense for the case where somehow `getAnimatedStylesForNode` returns an error (then we don't show the animated styles until it stops erroring after computed style updates) Fixed: 395131432 Change-Id: Ic12568467d0cd34ee95a836b94f52a1182945b8b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6243807 Commit-Queue: Philip Pfaffe <[email protected]> Auto-Submit: Ergün Erdoğmuş <[email protected]> Reviewed-by: Philip Pfaffe <[email protected]>
1 parent 29c367b commit 322a501

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

front_end/core/sdk/CSSModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export class CSSModel extends SDKModel<EventTypes> {
362362
shouldGetAnimatedStyles ? this.agent.invoke_getAnimatedStylesForNode({nodeId}) : undefined,
363363
]);
364364

365-
if (matchedStylesResponse.getError() || animatedStylesResponse?.getError()) {
365+
if (matchedStylesResponse.getError()) {
366366
return null;
367367
}
368368

0 commit comments

Comments
 (0)