| Summary: | [GTK] Propagate GtkSettings to web process | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alice Mikhaylenko <alicem> | ||||||||||||
| Component: | WebKitGTK | Assignee: | Alice Mikhaylenko <alicem> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | annulen, berto, bugs-noreply, cgarcia, clopez, ews-watchlist, gustavo, gyuyoung.kim, hi, mcatanzaro, mkwst, ryuan.choi, sergio | ||||||||||||
| Priority: | P2 | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=228153 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Alice Mikhaylenko
2021-07-10 15:00:31 PDT
Created attachment 433275 [details]
Patch
The amount of settings here makes me wonder if they should all be contained in a separate struct instead of passing each and every one separately.
And the reason I made scrollSettingsDidChange() even though it only contains one property is, it will contain another one in future - gtk-overlay-scrolling. Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API Created attachment 433276 [details]
Patch
Looks like the style checker took the list of properties as a list of changed files.
This fails with PSON. Ok, so we need to do the same thing in reinitializeWebPage(). Created attachment 433662 [details]
Patch
The code duplication in WebPage.cpp makes me wonder if we should pass the parameters into platformInitialize() and platformReinitialize(), and contain this all in WebPageGtk.cpp in a shared function instead.
Created attachment 433788 [details]
Patch
Reworked as discussed in Matrix. Comment on attachment 433788 [details]
Patch
LGTM
Ah yeah, back to the forgetting `--request-commit` in `webkit-patch upload`. :) Fixed. Comment on attachment 433788 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433788&action=review Looks great, thank you! > Source/WebKit/Shared/gtk/GtkSettingsState.h:38 > + GtkSettingsState(); I guess you can do = default here and remove the empty implementation from the cpp? > Source/WebKit/UIProcess/gtk/GtkSettingsManager.cpp:171 > + , m_settingsState(GtkSettingsState()) This is not needed, right? > Source/WebKit/WebProcess/WebPage/WebPage.cpp:736 > - themeDidChange(WTFMove(parameters.themeName)); > + GtkSettingsManagerProxy::singleton().applySettings(parameters.gtkSettings); You can WTFMove here. > Source/WebKit/WebProcess/WebPage/WebPage.cpp:973 > +#if PLATFORM(GTK) > + GtkSettingsManagerProxy::singleton().applySettings(parameters.gtkSettings); > +#endif And here > Source/WebKit/WebProcess/gtk/GtkSettingsManagerProxy.cpp:50 > + applySettings(state); And move here as well > Source/WebKit/WebProcess/gtk/GtkSettingsManagerProxy.cpp:53 > +void GtkSettingsManagerProxy::applySettings(GtkSettingsState& state) And make this receive a GtkSettingsState&& Created attachment 433860 [details]
Patch
Committed r280077 (239803@main): <https://commits.webkit.org/239803@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433860 [details]. (In reply to EWS from comment #14) > Committed r280077 (239803@main): <https://commits.webkit.org/239803@main> > > All reviewed patches have been landed. Closing bug and clearing flags on > attachment 433860 [details]. This caused 155 new unexpected test failures on GTK, see bug 228153 |