Changeset 286141 in webkit


Ignore:
Timestamp:
Nov 23, 2021, 7:47:06 PM (4 years ago)
Author:
Lauro Moura
Message:

[GTK] GdkRGBA expects colors to be in the 0.0 to 1.0 range
https://bugs.webkit.org/show_bug.cgi?id=233452

Reviewed by Michael Catanzaro.

GTK4 debug was hitting assertInRange inside ColorTypes.h due to 255
being used as the max value, while GdkRGBA expects the value to be
between 0.0 and 1.0, per the official docs [1][2].

[1] https://docs.gtk.org/gdk3/struct.RGBA.html
[2] https://docs.gtk.org/gdk4/struct.RGBA.html

  • MiniBrowser/gtk/BrowserWindow.c:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r286130 r286141  
     12021-11-23  Lauro Moura  <lmoura@igalia.com>
     2
     3        [GTK] GdkRGBA expects colors to be in the 0.0 to 1.0 range
     4        https://bugs.webkit.org/show_bug.cgi?id=233452
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        GTK4 debug was hitting assertInRange inside ColorTypes.h due to 255
     9        being used as the max value, while GdkRGBA expects the value to be
     10        between 0.0 and 1.0, per the official docs [1][2].
     11
     12        [1] https://docs.gtk.org/gdk3/struct.RGBA.html
     13        [2] https://docs.gtk.org/gdk4/struct.RGBA.html
     14
     15        * MiniBrowser/gtk/BrowserWindow.c:
     16
    1172021-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
    218
  • trunk/Tools/MiniBrowser/gtk/BrowserWindow.c

    r280172 r286141  
    13331333static void browser_window_init(BrowserWindow *window)
    13341334{
    1335     window->backgroundColor.red = window->backgroundColor.green = window->backgroundColor.blue = 255;
    1336     window->backgroundColor.alpha = 1;
     1335    window->backgroundColor.red = window->backgroundColor.green = window->backgroundColor.blue = 1.0;
     1336    window->backgroundColor.alpha = 1.0;
    13371337
    13381338    gtk_window_set_title(GTK_WINDOW(window), defaultWindowTitle);
Note: See TracChangeset for help on using the changeset viewer.