[webkit-changes] [WebKit/WebKit] d16890: [GTK][MiniBrowser] Amazon Luna landing page doesn'...

Carlos Bentzen noreply at github.com
Tue Aug 6 10:53:26 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d16890bc3dd257a76fbd6dc10e17bac2f95cc29b
      https://github.com/WebKit/WebKit/commit/d16890bc3dd257a76fbd6dc10e17bac2f95cc29b
  Author: Carlos Bentzen <cadubentzen at igalia.com>
  Date:   2024-08-06 (Tue, 06 Aug 2024)

  Changed paths:
    M Tools/MiniBrowser/gtk/BrowserTab.c
    M Tools/MiniBrowser/gtk/main.c

  Log Message:
  -----------
  [GTK][MiniBrowser] Amazon Luna landing page doesn't render
https://bugs.webkit.org/show_bug.cgi?id=276585

Reviewed by Michael Catanzaro.

Amazon Luna (luna.amazon.com) assumes that the user agent is on MacOS if
`window.webkit` is defined, leading to JS calls that only work in the
Apple Mac WebKit port.

`window.webkit` was defined in the GTK MiniBrowser because it registers
a script message handler "aboutData", which makes
`window.webkit.messageHandlers.aboutData.postMessage(msg)` available to
scripts. However, this is only useful for the "about:data" custom page
that is defined in the MiniBrowser.

To have MiniBrowser still working like before but also supporting Amazon
Luna, only register the script message handler when loading "about:*" pages.

* Tools/MiniBrowser/gtk/BrowserTab.c:
(toggleAboutDataScriptMessageHandler):
(loadChanged):
* Tools/MiniBrowser/gtk/main.c:
(activate):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list