Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload WebXR sites when settings are changed #3031

Merged
merged 1 commit into from Mar 25, 2020

Conversation

MortimerGoro
Copy link
Contributor

No description provided.

@MortimerGoro MortimerGoro self-assigned this Mar 23, 2020
@MortimerGoro MortimerGoro added this to the #10 features milestone Mar 23, 2020
@@ -323,6 +320,9 @@ private void setWebXR(boolean value, boolean doApply) {

if (doApply) {
SettingsStore.getInstance(getContext()).setWebXREnabled(value);
for (WindowWidget window: mWidgetManager.getWindows().getCurrentWindows()) {
window.getSession().reload(GeckoSession.LOAD_FLAGS_NONE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be using GeckoSession.LOAD_FLAGS_BYPASS_CACHE as it has been fixed in GV.

for (WindowWidget window: mWidgetManager.getWindows().getCurrentWindows()) {
Session session = window.getSession();
if (aHost.equalsIgnoreCase(UrlUtils.getHost(session.getCurrentUri()))) {
session.reload(GeckoSession.LOAD_FLAGS_NONE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here too should use GeckoSession.LOAD_FLAGS_BYPASS_CACHE

Copy link
Collaborator

@keianhzo keianhzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have the same site opened in two windows and Enable/Disable the WebXR status from the URL button, the other window is not refreshed.

Also related, if you have the same site opened in different windows and change the WebXR state in one of them the WebXR icon is not updated when the other window is focused.

@MortimerGoro
Copy link
Contributor Author

@keianhzo Done

@keianhzo
Copy link
Collaborator

@MortimerGoro I don't see the items from my last comment fixed, maybe it's not pushed?

@keianhzo
Copy link
Collaborator

@MortimerGoro I see this fixed in the other PR so it's ok.

@keianhzo keianhzo self-requested a review March 25, 2020 11:36
@keianhzo keianhzo merged commit d4af5a0 into master Mar 25, 2020
@keianhzo keianhzo deleted the v10/webxr_settings_reload branch March 25, 2020 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants