Name Description Size Coverage
AsyncDBus.cpp 7279 -
AsyncDBus.h IsExclusive = 1951 -
AsyncGtkClipboardRequest.cpp 4579 -
AsyncGtkClipboardRequest.h 1967 -
compat -
components.conf 5805 -
CompositorWidgetChild.cpp 1440 -
CompositorWidgetChild.h 1530 -
CompositorWidgetParent.cpp 1421 -
CompositorWidgetParent.h 1373 -
crashtests -
DBusMenu.cpp static 2408 -
DBusMenu.h 6463 -
DBusService.cpp 11673 -
DBusService.h 2348 -
DMABufDevice.cpp 9447 -
DMABufDevice.h MOZ_LOGGING 9403 -
DMABufFormats.cpp 2x2 subsampled Cr:Cb plane 19229 -
DMABufFormats.h 4408 -
DMABufSurface.cpp C++ / C typecast macros for special EGL handle values 87596 -
DMABufSurface.h 19273 -
GfxInfo.cpp 63871 -
GfxInfo.h 5372 -
GfxInfoUtils.h WIDGET_GTK_GFXINFO_h_ 2576 -
GRefPtr.h 2278 -
GSettings.cpp 3327 -
GSettings.h 1836 -
GtkCompositorWidget.cpp MOZ_LOGGING 5976 -
GtkCompositorWidget.h = nullptr 3914 -
GtkWidgets.cpp Some GTK engines paint the first and last cell of a TreeView header with a highlight. Since we do not know where our widget will be relative to the other buttons in the TreeView header, we must paint it as a button that is between two others, thus ensuring it is neither the first or last button in the header. GTK doesn't give us a way to do this explicitly, so we must paint with a button that is between two others. 21076 -
GtkWidgets.h Returns a pointer to a style context for the specified node and state. aStateFlags is applied only to last widget in css style path, for instance GetStyleContext(MOZ_GTK_BUTTON, .., GTK_STATE_FLAG_HOVER) you get "window button:hover" css selector. The context is static. Do not unref. 2799 -
GUniquePtr.h 1048 -
IMContextWrapper.cpp 131429 -
IMContextWrapper.h KeyHandlingState is result of IMContextWrapper::OnKeyEvent(). 28297 -
InProcessGtkCompositorWidget.cpp static 1545 -
InProcessGtkCompositorWidget.h 874 -
MediaKeysEventSourceFactory.cpp 450 -
metrics.yaml 1958 -
moz.build 5264 -
MozContainer.cpp MOZ_LOGGING 9513 -
MozContainer.h MozContainer This class serves three purposes in the nsIWidget implementation. - It provides objects to receive signals from GTK for events on native windows. - It provides GdkWindow to draw content on Wayland or when Gtk+ renders client side decorations to mShell. - It provides a container parent for GtkEntry used for emoji selector. Note that the window hierarchy in Mozilla differs from conventional GtkWidget hierarchies. 2636 -
MozContainerWayland.cpp MozContainerWayland is a wrapper over MozContainer which manages WaylandSurface for nsWindow. The widget scheme looks like: --------------------------------------------------------- | mShell Gtk widget (contains wl_surface owned by Gtk+) | | | | --------------------------------------------------- | | | mContainer (contains wl_surface owned by Gtk+) | | | | | | | | --------------------------------------------- | | | | | wl_subsurface (owned by WaylandSurface) | | | | | | | | | | | | | | | | | | | | | | | --------------------------------------------- | | | --------------------------------------------------- | --------------------------------------------------------- We draw to wl_subsurface managed by WaylandSurface/MozContainerWayland. We need to wait until wl_surface of mContainer is created and then we create and attach our wl_subsurface to it. First wl_subsurface creation has these steps: 1) moz_container_wayland_size_allocate() handler is called when mContainer size/position is known. It calls moz_container_wayland_surface_create_locked(), registers a frame callback handler moz_container_wayland_frame_callback_handler(). 2) moz_container_wayland_frame_callback_handler() is called when wl_surface owned by mozContainer is ready. We call initial_draw_cbs() handler and we can create our wl_subsurface on top of wl_surface owned by mozContainer. When MozContainer hides/show again, moz_container_wayland_size_allocate() handler may not be called as MozContainer size is set. So after first show/hide sequence use moz_container_wayland_map_event() to create wl_subsurface of MozContainer. 9718 -
MozContainerWayland.h MozContainer This class serves three purposes in the nsIWidget implementation. - It provides objects to receive signals from GTK for events on native windows. - It provides GdkWindow to draw content on Wayland or when Gtk+ renders client side decorations to mShell. 1594 -
mozgtk -
mozwayland -
MPRISInterfaceDescription.h 5099 -
MPRISServiceHandler.cpp fast seek 35218 -
MPRISServiceHandler.h This class implements the "MPRIS" D-Bus Service (https://specifications.freedesktop.org/mpris-spec/2.2), which is used to communicate with the Desktop Environment about the Multimedia playing in Gecko. Note that this interface requires many methods which may not be supported by Gecko, the interface however provides CanXYZ properties for these methods, so the method is defined but won't be executed. Also note that the following defines are for parts that the MPRIS Spec defines optional. The code won't compile with any of the defines set, yet, as those aren't implemented yet and probably never will be of use for gecko. For sake of completeness, they have been added until the decision about their implementation is finally made. The constexpr'ed methods are capabilities of the user agent known at compile time, e.g. we decided at compile time whether we ever want to support closing the user agent via MPRIS (Quit() and CanQuit()). Other properties like CanPlay() might depend on the runtime state (is there media available for playback?) and thus aren't a constexpr but merely a const method. 6915 -
NativeKeyBindings.cpp 19054 -
NativeKeyBindings.h GetEditCommandsForTests() returns commands performed in native widget in typical environment. I.e., this does NOT refer customized shortcut key mappings of the environment. 1794 -
NativeMenuGtk.cpp ctrlKey = 28382 -
NativeMenuGtk.h 2500 -
NativeMenuSupport.cpp 1307 -
nsApplicationChooser.cpp static 3772 -
nsApplicationChooser.h 937 -
nsAppShell.cpp static 21048 -
nsAppShell.h nsAppShell_h_ 2928 -
nsBidiKeyboard.cpp 1364 -
nsBidiKeyboard.h 509 -
nsClipboard.cpp 49083 -
nsClipboard.h 6382 -
nsClipboardWayland.cpp 2312 -
nsClipboardWayland.h _nsClipboardWayland_h_ 907 -
nsClipboardX11.cpp 5810 -
nsClipboardX11.h _nsClipboardX11_h_ 984 -
nsColorPicker.cpp obsolete, unused 'pixel' value 7920 -
nsColorPicker.h 2084 -
nsDeviceContextSpecG.cpp for PR_GetEnv 15588 -
nsDeviceContextSpecG.h should be <limits.h>? 1817 -
nsDragService.cpp 113413 -
nsDragService.h GTK native nsIDragSession implementation 14305 -
nsFilePicker.cpp MOZ_LOGGING 30632 -
nsFilePicker.h 2970 -
nsGtkCursors.h MOZ_CURSOR_HAND_GRAB 25104 -
nsGtkHtmlUtils.cpp This function extracts the encoding label from the subset of HTML internal encoding declaration syntax that uses the old long form with double quotes and without spaces around the equals sign between the "content" attribute name and the attribute value. This was added for the sake of an ancient version of StarOffice in the pre-UTF-8 era in bug 123389. It is unclear if supporting non-UTF-8 encodings is still necessary and if this function still needs to exist. As of December 2022, both Gecko and LibreOffice emit an UTF-8 declaration that this function successfully extracts "UTF-8" from, but that's also the default that we fall back on if this function fails to extract a label. 3892 -
nsGtkHtmlUtils.h 1411 -
nsGtkKeyUtils.cpp 98345 -
nsGtkKeyUtils.h KeymapWrapper is a wrapper class of GdkKeymap. GdkKeymap doesn't support all our needs, therefore, we need to access lower level APIs. But such code is usually complex and might be slow. Against such issues, we should cache some information. This class provides only static methods. The methods is using internal singleton instance which is initialized by default GdkKeymap. When the GdkKeymap is destroyed, the singleton instance will be destroyed. 17696 -
nsGTKToolkit.h Wrapper around the thread running the message pump. The toolkit abstraction is necessary because the message pump must execute within the same thread that created the widget under Win32. 1479 -
nsGtkUtils.h 1903 -
nsImageToPixbuf.cpp 5161 -
nsImageToPixbuf.h 992 -
nsLookAndFeel.cpp MOZ_LOGGING 95951 -
nsLookAndFeel.h 8142 -
nsNativeThemeGTK.cpp aZero = 12855 -
nsNativeThemeGTK.h 2818 -
nsPrintDialogGTK.cpp 26379 -
nsPrintDialogGTK.h 766 -
nsPrintSettingsGTK.cpp --------------------------------------------------- 22185 -
nsPrintSettingsGTK.h //*** nsPrintSettingsGTK //***************************************************************************** class nsPrintSettingsGTK : public nsPrintSettings { public: NS_DECL_ISUPPORTS_INHERITED NS_INLINE_DECL_STATIC_IID(NS_PRINTSETTINGSGTK_IID) nsPrintSettingsGTK(); explicit nsPrintSettingsGTK(const PrintSettingsInitializer& aSettings); static nsPrintSettingsGTK* From(nsIPrintSettings* aPrintSettings) { return static_cast<nsPrintSettingsGTK*>(aPrintSettings); } // We're overriding these methods because we want to read/write with GTK // objects, not local variables. This allows a simpler settings implementation // between Gecko and GTK. GtkPageSetup* GetGtkPageSetup() { return mPageSetup; }; void SetGtkPageSetup(GtkPageSetup* aPageSetup); GtkPrintSettings* GetGtkPrintSettings() { return mPrintSettings; }; void SetGtkPrintSettings(GtkPrintSettings* aPrintSettings); GtkPrinter* GetGtkPrinter() { return mGTKPrinter; }; void SetGtkPrinter(GtkPrinter* aPrinter); // Reversed, color, orientation and file name are all stored in the // GtkPrintSettings. Orientation is also stored in the GtkPageSetup and its // setting takes priority when getting the orientation. NS_IMETHOD GetPrintReversed(bool* aPrintReversed) override; NS_IMETHOD SetPrintReversed(bool aPrintReversed) override; NS_IMETHOD GetPrintInColor(bool* aPrintInColor) override; NS_IMETHOD SetPrintInColor(bool aPrintInColor) override; NS_IMETHOD GetOrientation(int32_t* aOrientation) override; NS_IMETHOD SetOrientation(int32_t aOrientation) override; NS_IMETHOD GetToFileName(nsAString& aToFileName) override; NS_IMETHOD SetToFileName(const nsAString& aToFileName) override; // Gets/Sets the printer name in the GtkPrintSettings. If no printer name is // specified there, you will get back the name of the current internal // GtkPrinter. NS_IMETHOD GetPrinterName(nsAString& Printer) override; NS_IMETHOD SetPrinterName(const nsAString& aPrinter) override; // Number of copies is stored/gotten from the GtkPrintSettings. NS_IMETHOD GetNumCopies(int32_t* aNumCopies) override; NS_IMETHOD SetNumCopies(int32_t aNumCopies) override; NS_IMETHOD GetScaling(double* aScaling) override; NS_IMETHOD SetScaling(double aScaling) override; // A name recognised by GTK is strongly advised here, as this is used to // create a GtkPaperSize. NS_IMETHOD GetPaperId(nsAString& aPaperId) override; NS_IMETHOD SetPaperId(const nsAString& aPaperId) override; NS_IMETHOD SetUnwriteableMarginInTwips( nsIntMargin& aUnwriteableMargin) override; NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop) override; NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft) override; NS_IMETHOD SetUnwriteableMarginBottom( double aUnwriteableMarginBottom) override; NS_IMETHOD SetUnwriteableMarginRight(double aUnwriteableMarginRight) override; NS_IMETHOD GetPaperWidth(double* aPaperWidth) override; NS_IMETHOD SetPaperWidth(double aPaperWidth) override; NS_IMETHOD GetPaperHeight(double* aPaperHeight) override; NS_IMETHOD SetPaperHeight(double aPaperHeight) override; NS_IMETHOD SetPaperSizeUnit(int16_t aPaperSizeUnit) override; NS_IMETHOD GetEffectivePageSize(double* aWidth, double* aHeight) override; NS_IMETHOD SetPageRanges(const nsTArray<int32_t>&) override; NS_IMETHOD GetPageRanges(nsTArray<int32_t>&) override; NS_IMETHOD GetResolution(int32_t* aResolution) override; NS_IMETHOD SetResolution(int32_t aResolution) override; NS_IMETHOD GetDuplex(int32_t* aDuplex) override; NS_IMETHOD SetDuplex(int32_t aDuplex) override; NS_IMETHOD GetOutputFormat(int16_t* aOutputFormat) override; protected: virtual ~nsPrintSettingsGTK(); nsPrintSettingsGTK(const nsPrintSettingsGTK& src); nsPrintSettingsGTK& operator=(const nsPrintSettingsGTK& rhs); virtual nsresult _Clone(nsIPrintSettings** _retval) override; virtual nsresult _Assign(nsIPrintSettings* aPS) override; GtkUnit GetGTKUnit(int16_t aGeckoUnit); void SaveNewPageSize(); /** Re-initialize mUnwriteableMargin with values from mPageSetup. Should be called whenever mPageSetup is initialized or overwritten. 5180 -
nsPrintSettingsServiceGTK.cpp 2768 -
nsPrintSettingsServiceGTK.h 938 -
nsShmImage.cpp 9913 -
nsShmImage.h 1709 -
nsSound.cpp used to play sounds with libcanberra. 8376 -
nsSound.h _nsSound_h_ 545 -
nsToolkit.cpp 709 -
nsUserIdleServiceGTK.cpp 10424 -
nsUserIdleServiceGTK.h 2131 -
nsWaylandDisplay.cpp MOZ_LOGGING 44895 -
nsWaylandDisplay.h 10259 -
nsWidgetFactory.cpp 1762 -
nsWidgetFactory.h 521 -
nsWindow.cpp 267541 -
nsWindow.h MOZ_LOGGING 33541 -
nsWindowWayland.cpp Window restore session uses GetWorkspaceID()/MoveToWorkspace() differently on Wayland. MoveToWorkspace() is normally called when a window is visible/rendered and widget code moves the window to a particular workspace. That approach doesn't work on Wayland where an application can't position itself. On Wayland we need to place the window before it's shown, so we use this path instead: 1) In ConfigureToplevelWindowNative() we register an "xdg-toplevel-realized" GTK signal handler to get notified when the xdg_toplevel window is created. 2) Block NativeShow() while mWaitingToSessionRestore is set. We can't show the toplevel window until we have a window restore ID provided by a MoveToWorkspace() call. 3) In MoveToWorkspace(), save the session ID and show the window. That fires the "xdg-toplevel-realized" signal which gives us the xdg_toplevel and we restore window state according to the session ID. Likewise we use GetWorkspaceID() to create/save the xdg_toplevel session for later restore. 79155 -
nsWindowWayland.h Gkt creates popup in two incarnations - wl_subsurface and xdg_popup. Kind of popup is choosen before GdkWindow is mapped so we can change it only when GdkWindow is hidden. Relevant Gtk code is at gdkwindow-wayland.c in should_map_as_popup() and should_map_as_subsurface() wl_subsurface: - can't be positioned by move-to-rect - can stand outside popup widget hierarchy (has toplevel as parent) - don't have child popup widgets xdg_popup: - can be positioned by move-to-rect - aligned in popup widget hierarchy, first one is attached to toplevel - has child (popup) widgets Thus we need to map Firefox popup type to desired Gtk one: wl_subsurface: - pernament panels xdg_popup: - menus - autohide popups (hamburger menu) - extension popups - tooltips We set mPopupTrackInHierarchy = false for pernament panels which are always mapped to toplevel and painted as wl_surfaces. 8893 -
nsWindowX11.cpp 9042 -
nsWindowX11.h 1044 -
PCompositorWidget.ipdl 710 -
PlatformWidgetTypes.ipdlh 703 -
ScreenHelperGTK.cpp MOZ_X11 29655 -
ScreenHelperGTK.h 1279 -
TaskbarProgress.cpp TaskbarProgress **************************************************************************** 3348 -
TaskbarProgress.h 739 -
v4l2test -
va_drmcommon.h \brief DRM authentication type. 6035 -
vaapitest -
vulkantest -
WakeLockListener.cpp 37688 -
WakeLockListener.h Receives WakeLock events and simply passes it on to the right WakeLockTopic to inhibit the screensaver. 1077 -
wayland -
WaylandBuffer.cpp MOZ_LOGGING 16609 -
WaylandBuffer.h 7161 -
WaylandSurface.cpp MOZ_LOGGING 52034 -
WaylandSurface.h Workaround for bug at wayland-util.h, present in wayland-devel < 1.12 21823 -
WaylandSurfaceLock.cpp flush display 1344 -
WaylandSurfaceLock.h MOZ_WAYLAND_SURFACE_LOCK_H_ 1292 -
WaylandVsyncSource.cpp MOZ_LOGGING 12310 -
WaylandVsyncSource.h WaylandVsyncSource This class provides a per-widget VsyncSource under Wayland, emulated using frame callbacks on the widget surface with empty surface commits. Wayland does not expose vsync/vblank, as it considers that an implementation detail the clients should not concern themselves with. Instead, frame callbacks are provided whenever the compositor believes it is a good time to start drawing the next frame for a particular surface, giving us as much time as possible to do so. Note that the compositor sends frame callbacks only when it sees fit, and when that may be is entirely up to the compositor. One cannot expect a certain rate of callbacks, or any callbacks at all. Examples of common variations would be surfaces moved between outputs with different refresh rates, and surfaces that are hidden and therefore do not receieve any callbacks at all. Other hypothetical scenarios of variation could be throttling to conserve power, or because a user has requested it. 3821 -
WidgetUtilsGtk.cpp MOZ_X11 21182 -
WidgetUtilsGtk.h See WidgetUtils::IsTouchDeviceSupportPresent(). 2658 -
WindowSurface.h 1268 -
WindowSurfaceCairo.cpp 3159 -
WindowSurfaceCairo.h 1029 -
WindowSurfaceProvider.cpp MOZ_LOGGING 6106 -
WindowSurfaceProvider.h Holds the logic for creating WindowSurface's for a GTK nsWindow. The main purpose of this class is to allow sharing of logic between nsWindow and GtkCompositorWidget, for when OMTC is enabled or disabled. 3278 -
WindowSurfaceWaylandMultiBuffer.cpp MOZ_LOGGING 12906 -
WindowSurfaceWaylandMultiBuffer.h 3082 -
WindowSurfaceX11.cpp static 1436 -
WindowSurfaceX11.h 1049 -
WindowSurfaceX11Image.cpp 4102 -
WindowSurfaceX11Image.h 1142 -
WindowSurfaceX11SHM.cpp 907 -
WindowSurfaceX11SHM.h 1035 -
WlUniquePtr.h 849 -