Changeset 293541 in webkit


Ignore:
Timestamp:
Apr 27, 2022 3:38:00 PM (3 months ago)
Author:
commit-queue@webkit.org
Message:

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

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r293511 r293541  
     12022-04-20  Dan Glastonbury  <djg@apple.com>
     2
     3        Web Inspector: Improve rendering of GLenums in WebGL canvas recordings.
     4        https://bugs.webkit.org/show_bug.cgi?id=239586
     5
     6        Reviewed by Devin Rousso.
     7
     8        * UserInterface/Models/RecordingAction.js:
     9        (WI.RecordingAction.constantNameForParameter):
     10        Arrays are also objects, so checking for typeof x == "object" is
     11        not enough to distinguish arrays from dictionaries. Since the if
     12        above the failing check was handling arrays, turn "object" check
     13        into an `else if` handles arrays and dictionaries correctly.
     14
    1152022-04-27  Ziran Sun  <zsun@igalia.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js

    r273865 r293541  
    126126            return null;
    127127
    128         if (Array.isArray(indexesForAction) && !indexesForAction.includes(index))
    129             return null;
    130 
    131         if (typeof indexesForAction === "object") {
     128        if (Array.isArray(indexesForAction)) {
     129            if (!indexesForAction.includes(index))
     130                return null;
     131        } else if (typeof indexesForAction === "object") {
    132132            let indexesForActionVariant = indexesForAction[count];
    133133            if (!indexesForActionVariant)
Note: See TracChangeset for help on using the changeset viewer.