Closed Bug 1612483 Opened 4 years ago Closed 4 years ago

Can we remove mozilla::dom::TabContext::IsMozBrowser()?

Categories

(Core :: DOM: Content Processes, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: tetsuharu, Assigned: tetsuharu)

Details

Attachments

(1 file)

Now, this method returns simply the result of of IsMozBrowserElement(), there are not many usages, and I feel there is no semantically difference by the comment.

I'm not sure about the historical reason which we have IsMozBrowser() and IsMozBrowserElement(), but I seem we can remove the former now by replacing all IsMozBrowser() to IsMozBrowserElement() as simply refactoring.

This suspicion is right?

Type: defect → task

How do you think about this?

Flags: needinfo?(bzbarsky)

(Sorry for the lag on this; was traveling.)

I'm not sure about the historical reason which we have IsMozBrowser() and IsMozBrowserElement()

We used to have IsMozBrowserElement and IsMozBrowserOrApp, where the latter was true if we had a mozapp or mozbrowser. With b2g removed, the app thing went away.

I am fine with eliminating one of these methods; don't much care which one. Of course I also think we should remove mozbrowser altogether...

Flags: needinfo?(bzbarsky)

(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #2)

(Sorry for the lag on this; was traveling.)

I'm not sure about the historical reason which we have IsMozBrowser() and IsMozBrowserElement()

We used to have IsMozBrowserElement and IsMozBrowserOrApp, where the latter was true if we had a mozapp or mozbrowser. With b2g removed, the app thing went away.

I am fine with eliminating one of these methods; don't much care which one. Of course I also think we should remove mozbrowser altogether...

Thank you for you response. (No problem for the lag)
I'll create a patch to replace IsMozBrowser() with IsMozBrowserElement()

Now, this method returns simply the result of of IsMozBrowserElement().

In the old days, We used to have IsMozBrowserElement and IsMozBrowserOrApp,
where the latter was true if we had a mozapp or mozbrowser.
But with b2g removed, the app thing went away.

IsMozBrowser() is less used than IsMozBrowserElement().

I think the former should be replaced by the later one.

Assignee: nobody → tetsuharu.ohzeki
Status: NEW → ASSIGNED
Pushed by tetsuharu.ohzeki@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9246a8ba73d8
Remove mozilla::dom::TabContext::IsMozBrowser(). r=bzbarsky
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: