Closed Bug 1517074 Opened 5 years ago Closed 5 years ago

Cannot save "HTML Only"

Categories

(Core :: Widget: Gtk, defect)

64 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla66
Tracking Status
firefox-esr60 --- unaffected
firefox64 --- wontfix
firefox65 --- verified
firefox66 --- verified

People

(Reporter: jidanni, Assigned: stransky)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

1. CTRL+S Save Page As
2. Choose HTML only
3. Push Save


Actual results:

The choice is switched to "Webpage Complete" before the action begins.
(But that is too fast for the user to see.)
As is evidenced by what is saved on disk,
and as is evidenced by "Webpage Complete" being the default chosen the
next time the user hits CTRL+S.

So try as he may, "HTML Only" cannot really be chosen.
There always will be a directory created "..._files" anyway.
I can reproduce this with Firefox64 on Ubuntu18.04LTS and this is a regression.

>17:20.11 INFO: No more inbound revisions, bisection finished.
>17:20.11 INFO: Last good revision: 1119f9458b5d76cef62577b526c508f7908f4710
>17:20.11 INFO: First bad revision: 2fd7d3ae070e853281fa49408996ecc9308990a9
>17:20.11 INFO: Pushlog:
>https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=1119f9458b5d76cef62577b526c508f7908f4710&tochange=2fd7d3ae070e853281fa49408996ecc9308990a9
> 
> Nathan Moos — Bug 1490186 - Add GtkFileChooserNative support to Firefox. r=stransky
Blocks: 1490186
Status: UNCONFIRMED → NEW
Component: File Handling → Widget: Gtk
Ever confirmed: true
Flags: needinfo?(moosingin3space)
Keywords: regression
Product: Firefox → Core

Martin, could you look in to this as you reviewed the regressing patch?

Flags: needinfo?(stransky)

Sure.

Assignee: nobody → stransky
Flags: needinfo?(stransky)

Unfortunately there's no fix available for it. I tried to get the filter as a property from the dialog but it's saves as a property of an inner widget (GtkFileChooserWidget) and only when GtkFileChooserDialog fallback is used - so it's really hacky approach which may lead to even more failures.

I suggest to switch back to GtkFileChooserDialog and use GtkFileChooserNative under a pref which makes sense for KDE users and/or enable it for KDE only by default. When https://gitlab.gnome.org/GNOME/gtk/issues/1492 is fixed we can enable it for the appropriate Gtk+ version only.

Flags: needinfo?(moosingin3space)
Also add widget.allow-gtk-native-file-chooser preference value to force enable on all systems.

Pushed by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8604d1a709c
[Linux/Gtk] Enable native (xdg-desktop based) file dialog on KDE only due to Gtk+ regression, r=jhorak

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

Please nominate this for Beta approval when you get a chance.

Flags: needinfo?(stransky)

Comment on attachment 9035609 [details]
Bug 1517074 - [Linux/Gtk] Enable native (xdg-desktop based) file dialog on KDE only due to Gtk+ regression, r=jhorak

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1490186

User impact if declined: Only "Webpage Complete" can be saved. "HTML Only" or Text can't be saved by "Save As" dialog.

Is this code covered by automated tests?: No

Has the fix been verified in Nightly?: No

Needs manual test from QE?: Yes

If yes, steps to reproduce: 1) Go to any Web page
2) Select Menu -> File -> Save Page As.
3) In the Save As dialog select "Text" or "HTML Only" in bottom left corner.
4) Save the page to disk
5) Check that saved page is correct.

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Linux only. Reverts Bug 1490186 for non-flatpak environment.

String changes made/needed: none

Flags: needinfo?(stransky)
Attachment #9035609 - Flags: approval-mozilla-beta?
Flags: in-testsuite+
Flags: in-testsuite+ → qe-verify+

Comment on attachment 9035609 [details]
Bug 1517074 - [Linux/Gtk] Enable native (xdg-desktop based) file dialog on KDE only due to Gtk+ regression, r=jhorak

[Triage Comment]
Works around a Linux-only GTK bug which causes "HTML Only" webpage saving to not work. Approved for 65.0b11.

Attachment #9035609 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I successfully reproduced the issue on Firefox Beta 64.0b4 under Ubuntu 18.04 (x64) using the STR from Comment 0.

The issue is no longer reproducible on Firefox Beta 65.0b11 and latest Nightly 66.0a1 (2019-01-15) under Ubuntu 18.04 (x64).

Status: RESOLVED → VERIFIED
Flags: qe-verify+

I see this with FF 74.0 from Fedora repos and Qt file dialog (GTK_USE_PORTAL=1).
Saving web page with "html only" - getting directory created also (while it shall not).

This still doesn't work despite https://gitlab.gnome.org/GNOME/gtk/issues/1492 having been fixed in the meantime. From my analysis, the problem is that 'gtk_file_chooser_get_filter' still does not work for 'GtkFileChooserNative', only 'gtk_file_chooser_set_filter' (i.e. the function to set preselect a specific filter, not to get the one that is finally selected) was implemented.

For 'gtk_file_chooser_get_filter', there is another upstream GNOME bug report that is still open: https://gitlab.gnome.org/GNOME/gtk/-/issues/1820

(In reply to Michael Weghorn from comment #17)

This still doesn't work despite https://gitlab.gnome.org/GNOME/gtk/issues/1492 having been fixed in the meantime. From my analysis, the problem is that 'gtk_file_chooser_get_filter' still does not work for 'GtkFileChooserNative', only 'gtk_file_chooser_set_filter' (i.e. the function to set preselect a specific filter, not to get the one that is finally selected) was implemented.

For 'gtk_file_chooser_get_filter', there is another upstream GNOME bug report that is still open: https://gitlab.gnome.org/GNOME/gtk/-/issues/1820

As a clarification, this does not work when using a portal (e.g. with 'GTK_USE_PORTAL=1' set).

(In reply to Michael Weghorn from comment #17)

This still doesn't work despite https://gitlab.gnome.org/GNOME/gtk/issues/1492 having been fixed in the meantime. From my analysis, the problem is that 'gtk_file_chooser_get_filter' still does not work for 'GtkFileChooserNative', only 'gtk_file_chooser_set_filter' (i.e. the function to set preselect a specific filter, not to get the one that is finally selected) was implemented.

For 'gtk_file_chooser_get_filter', there is another upstream GNOME bug report that is still open: https://gitlab.gnome.org/GNOME/gtk/-/issues/1820

That issue has been fixed now, so this also works now with 'GTK_USE_PORTAL=1' set when using the current development versions of gtk, xdg-desktop-portal and xdg-desktop-portal-gtk. For xdg-desktop-portal-kde (i.e. the KF5/KDE Plasma native file choosers), there is a pending merge request to fix it there as well at https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/5/ .

See https://gitlab.gnome.org/GNOME/gtk/-/issues/1820 for more details.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: