Branch: refs/heads/webkitglib/2.46
  Home:   https://github.com/WebKit/WebKit
  Commit: 274d931605e2ae3a095d9b20aa86cfa32a11907a
      
https://github.com/WebKit/WebKit/commit/274d931605e2ae3a095d9b20aa86cfa32a11907a
  Author: Bartosz Moczulski <[email protected]>
  Date:   2024-11-12 (Tue, 12 Nov 2024)

  Changed paths:
    M Source/WebInspectorUI/UserInterface/Base/Utilities.js

  Log Message:
  -----------
  Cherry-pick 286475@main (6e26b0d89746). 
https://bugs.webkit.org/show_bug.cgi?id=282924

    Web Inspector: Be nice to Chromium and access Float16Array as window 
property to avoid ReferenceError
    https://bugs.webkit.org/show_bug.cgi?id=282924

    Reviewed by Devin Rousso.

    Since implementation of Float16Array in 
https://commits.webkit.org/281870@main
    isTypedArray() in Utilities.js assumes that Float16Array exists and 
constructor
    can be compared with it. This assumptions holds in WebKit but fails in 
Chromium
    leading to multiple strange errors, e.g.: DOM nodes not showing up on 
Elements
    tab without page reload, then CSS not showing up at all.

    The following error can be observed in JS console:

        Main.js:33247 ReferenceError: Float16Array is not defined
            at Function.value (Main.js:775:259)
            at isArrayLike (Main.js:776:57)
            at Function.value (Main.js:777:5)
            at Function.value (Main.js:678:22)
            at DOMStorageManager._domStorageForIdentifier (Main.js:30568:62)
            at addDOMStorage (Main.js:30575:121)
            at DOMStorageManager._addDOMStorageIfNeeded (Main.js:30576:279)
            at DOMStorageManager._securityOriginDidChange (Main.js:30587:7)
            at dispatch (Main.js:293:24)
            at Frame.dispatchEventToListeners (Main.js:295:100)

    To avoid the error bare Float16Array is refactored to `window.Float16Array`
    which returns `undefined` if the function doesn't exist and then nicely 
compares
    `false`, just as expected.

    While Chromium need not be supported officially, HTTP WebInspector used to 
work
    flawlessly in Chromium since introduction in 2.38 and it seems to make 
sense to
    retain at least best-effort support for people not fortunate enough to have 
a
    native WebKit-based browser available on their OS.

    * Source/WebInspectorUI/UserInterface/Base/Utilities.js:

    Canonical link: https://commits.webkit.org/286475@main

Canonical link: https://commits.webkit.org/282416.279@webkitglib/2.46



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to