Bug 199104

Summary: [GTK] Navigation gesture should use dark fallback bg color on dark themes
Product: WebKit Reporter: Alice Mikhaylenko <alicem>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, commit-queue, ews-watchlist, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews211 for win-future
none
Patch none

Description Alice Mikhaylenko 2019-06-21 01:55:17 PDT
See the patch.
Comment 1 Alice Mikhaylenko 2019-06-21 01:56:05 PDT
Created attachment 372621 [details]
Patch
Comment 2 EWS Watchlist 2019-06-21 05:43:25 PDT Comment hidden (spam)
Comment 3 EWS Watchlist 2019-06-21 05:43:28 PDT Comment hidden (spam)
Comment 4 Michael Catanzaro 2019-06-21 07:03:17 PDT
Comment on attachment 372621 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=372621&action=review

> Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp:322
> +        gtk_style_context_lookup_color(context, "theme_base_color", &color);

Is this an Adwaita-ism? What happens if the theme doesn't have a theme_base_color? Will the GdkRGBA contain uninitialized memory? Do we need a fallback?
Comment 5 Alice Mikhaylenko 2019-06-21 07:06:19 PDT
Good question. It is listed as a public color, and elementary also has it (I tested on that one too specifically). But worth to double-check, agree.
Comment 6 Michael Catanzaro 2019-06-21 07:22:27 PDT
Better add a fallback if there's any possibility the GdkRGBA could be uninitialized.
Comment 7 Alice Mikhaylenko 2019-06-21 07:51:53 PDT
Created attachment 372629 [details]
Patch
Comment 8 Alice Mikhaylenko 2019-06-21 07:53:09 PDT
(In reply to Michael Catanzaro from comment #6)
> Better add a fallback if there's any possibility the GdkRGBA could be
> uninitialized.

Yeah, agree. Realistically, `win32` theme may be missing it.
Comment 9 WebKit Commit Bot 2019-06-24 07:34:53 PDT
Comment on attachment 372629 [details]
Patch

Clearing flags on attachment: 372629

Committed r246732: <https://trac.webkit.org/changeset/246732>
Comment 10 WebKit Commit Bot 2019-06-24 07:34:55 PDT
All reviewed patches have been landed.  Closing bug.