Skip to content
Permalink
Browse files
Web Inspector: Improve rendering of GLenums in WebGL canvas recordings.
https://bugs.webkit.org/show_bug.cgi?id=239586

Patch by Dan Glastonbury <djg@apple.com> on 2022-04-27
Reviewed by Devin Rousso.

* Source/WebInspectorUI/UserInterface/Models/RecordingAction.js:
(WI.RecordingAction.constantNameForParameter):
Arrays are also objects, so checking for typeof x == "object" is
not enough to distinguish arrays from dictionaries. Since the if
above the failing check was handling arrays, turn "object" check
into an `else if` handles arrays and dictionaries correctly.

Canonical link: https://commits.webkit.org/250062@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
djg authored and webkit-commit-queue committed Apr 27, 2022
1 parent cf13aca commit fe867153a25f688616b26efd0216e9a9cbe942ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
@@ -1,3 +1,17 @@
2022-04-20 Dan Glastonbury <djg@apple.com>

Web Inspector: Improve rendering of GLenums in WebGL canvas recordings.
https://bugs.webkit.org/show_bug.cgi?id=239586

Reviewed by Devin Rousso.

* UserInterface/Models/RecordingAction.js:
(WI.RecordingAction.constantNameForParameter):
Arrays are also objects, so checking for typeof x == "object" is
not enough to distinguish arrays from dictionaries. Since the if
above the failing check was handling arrays, turn "object" check
into an `else if` handles arrays and dictionaries correctly.

2022-04-27 Ziran Sun <zsun@igalia.com>

[css-ui] Remove some unimplemented -webkit-appearance keywords
@@ -125,10 +125,10 @@ WI.RecordingAction = class RecordingAction extends WI.Object
if (!indexesForAction)
return null;

if (Array.isArray(indexesForAction) && !indexesForAction.includes(index))
return null;

if (typeof indexesForAction === "object") {
if (Array.isArray(indexesForAction)) {
if (!indexesForAction.includes(index))
return null;
} else if (typeof indexesForAction === "object") {
let indexesForActionVariant = indexesForAction[count];
if (!indexesForActionVariant)
return null;

0 comments on commit fe86715

Please sign in to comment.