Bug 212898

Summary: [GTK] MiniBrowser: stop using GtkToolbar
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 212817    
Bug Blocks: 210100, 210276    
Attachments:
Description Flags
Patch aperez: review+

Carlos Garcia Campos
Reported 2020-06-08 07:20:44 PDT
It's no longer available in GTK4. Use a GtkBox with buttons instead.
Attachments
Patch (26.97 KB, patch)
2020-06-08 07:23 PDT, Carlos Garcia Campos
aperez: review+
Carlos Garcia Campos
Comment 1 2020-06-08 07:23:35 PDT
Adrian Perez
Comment 2 2020-06-11 07:42:46 PDT
Comment on attachment 401332 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401332&action=review > Tools/MiniBrowser/gtk/BrowserWindow.c:473 > + return webkit_web_view_get_zoom_level(webView) != 1.0; Comparing floating point numbers is usually a bad idea, due to rounding errors and whatnot. Probably not much of an issue here, but the safest would be rounding to the nearest integer and comparing that: return lrint(webkit_web_view_get_zoom_level(webView)) == 1; No strong opinion, though. Feel free to leave the code as-is if you prefer.
Carlos Garcia Campos
Comment 3 2020-06-12 01:27:54 PDT
(In reply to Adrian Perez from comment #2) > Comment on attachment 401332 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=401332&action=review > > > Tools/MiniBrowser/gtk/BrowserWindow.c:473 > > + return webkit_web_view_get_zoom_level(webView) != 1.0; > > Comparing floating point numbers is usually a bad idea, due to rounding > errors > and whatnot. Probably not much of an issue here, but the safest would be > rounding > to the nearest integer and comparing that: > > return lrint(webkit_web_view_get_zoom_level(webView)) == 1; > > No strong opinion, though. Feel free to leave the code as-is if you prefer. I don't think it's a problem in this case because 1.0 is set when the load completes, which is what we want to check here.
Carlos Garcia Campos
Comment 4 2020-06-12 01:28:19 PDT
Note You need to log in before you can comment on or make changes to this bug.