Closed
Bug 932208
Opened 12 years ago
Closed 12 years ago
BrowserToolbar and HomeFragment context menu 'Share' option should be disabled for these protocols: about:// chrome:// file://
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox26 affected, firefox27 affected, firefox28 affected, firefox29 affected, firefox30 affected, firefox31 affected, firefox32 affected)
VERIFIED
FIXED
Firefox 33
People
(Reporter: AdrianT, Assigned: mcomella)
References
Details
Attachments
(4 files, 5 obsolete files)
|
4.59 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
|
7.17 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
|
4.86 KB,
patch
|
mcomella
:
review+
|
Details | Diff | Splinter Review |
|
1.06 KB,
patch
|
mcomella
:
review+
|
Details | Diff | Splinter Review |
Firefox Mobile 26 beta 1
Samsung Galaxy Tab 2 7.0(Android 4.1)
Steps to reproduce:
1) Load any unsupported share protocols (e.g. about pages, local files etc)
2) Long tap on the url bar and from the context menu choose share
Expected results:
Just like for the Custom menu the share option is grayed out
Actual results:
The url can be shared
Comment 1•12 years ago
|
||
Probably need a new updated patch akin to bug 703630, but I sense a Finkle wontfix.
Summary: Unsupported share protocols can be shared from url bar content menu → Share option should be disabled for these protocols: about:// chrome:// file://
Since the bug 958517 , the share option has been removed from the URL context menu. However, I'm still able to reproduce this from the context menu triggered in top sites/bookmarks panels. Should we keep tracking this issue?
status-firefox29:
--- → affected
status-firefox30:
--- → affected
status-firefox31:
--- → affected
status-firefox32:
--- → affected
Comment 3•12 years ago
|
||
Looks like BrowserToolbar and HomeFragment need access to a allowShare style method:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/toolbar/BrowserToolbar.java#275
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/HomeFragment.java#106
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java#2234
Assignee: nobody → michael.l.comella
Flags: needinfo?(mark.finkle)
Summary: Share option should be disabled for these protocols: about:// chrome:// file:// → BrowserToolbar and HomeFragment context menu 'Share' option should be disabled for these protocols: about:// chrome:// file://
Updated•12 years ago
|
Flags: needinfo?(aaron.train)
| Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Mihai Pop from comment #2)
> Since the bug 958517 , the share option has been removed from the URL
> context menu. However, I'm still able to reproduce this from the context
> menu triggered in top sites/bookmarks panels.
Which context menu is this? When you long-click a top sites item or a bookmark? That seems correct to me.
Status: NEW → ASSIGNED
Flags: needinfo?(mihai.g.pop)
(In reply to Michael Comella (:mcomella) from comment #4)
> (In reply to Mihai Pop from comment #2)
> > Since the bug 958517 , the share option has been removed from the URL
> > context menu. However, I'm still able to reproduce this from the context
> > menu triggered in top sites/bookmarks panels.
>
> Which context menu is this? When you long-click a top sites item or a
> bookmark? That seems correct to me.
I think I was not clear enough in my previous comment. I was referring to about:pages in bookmark panel, and pinned top sites such as "about:firefox" or "about:config".
Flags: needinfo?(mihai.g.pop)
| Assignee | ||
Comment 6•12 years ago
|
||
As per discussion with Ian via IRC.
Attachment #8417697 -
Flags: review?(mark.finkle)
| Assignee | ||
Comment 7•12 years ago
|
||
Attachment #8417698 -
Flags: review?(mark.finkle)
Comment 8•12 years ago
|
||
Comment on attachment 8417698 [details] [diff] [review]
Part 2: Do not allow non-shareable links to be shared.
We should be able to remove the contextmenu handler too:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java#783
The mainmenu could still be using this one:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java#2385
I'd like to see a new patch just we we verify the code is dead now.
Attachment #8417698 -
Flags: review?(mark.finkle) → feedback+
Comment 9•12 years ago
|
||
Comment on attachment 8417697 [details] [diff] [review]
Part 1: Remove Share from url bar context menu on pre-ICS.
Damn. Added comment to wrong patch.
Attachment #8417697 -
Flags: review?(mark.finkle) → feedback+
Comment 10•12 years ago
|
||
Comment on attachment 8417698 [details] [diff] [review]
Part 2: Do not allow non-shareable links to be shared.
>- menu.findItem(R.id.home_share).setVisible(!GeckoProfile.get(getActivity()).inGuestMode());
>+ if (!StringUtils.isShareableUrl(info.url, GeckoProfile.get(getActivity()).inGuestMode())) {
>+ menu.findItem(R.id.home_share).setVisible(false);
>+ }
I am not a fan of this pattern. I'd rather separate the shareable URL concept and the guestmode concept. Can you switch to use this style:
if (!StringUtils.isShareableUrl(info.url) || GeckoProfile.get(getActivity()).inGuestMode()) {
Attachment #8417698 -
Flags: feedback+ → review-
| Assignee | ||
Comment 11•12 years ago
|
||
Removed the contextmenu handler as per comment 8.
Attachment #8434466 -
Flags: review?(mark.finkle)
| Assignee | ||
Updated•12 years ago
|
Attachment #8417697 -
Attachment is obsolete: true
| Assignee | ||
Comment 12•12 years ago
|
||
Adjusted for comment 10.
Attachment #8434475 -
Flags: review?(mark.finkle)
| Assignee | ||
Updated•12 years ago
|
Attachment #8417698 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #8434466 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #8434475 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 13•12 years ago
|
||
| Assignee | ||
Comment 14•12 years ago
|
||
Fixing fx-team bustage: https://tbpl.mozilla.org/?tree=Fx-Team&rev=aa4dc866e852
Comment 15•12 years ago
|
||
Comment on attachment 8438055 [details] [diff] [review]
Part 3: Fix testBookmarksPanel.
Review of attachment 8438055 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/tests/testBookmarksPanel.java
@@ +18,5 @@
> for (String url : StringHelper.DEFAULT_BOOKMARKS_URLS) {
> isBookmarkDisplayed(url);
> }
>
> + assertAllContextMenuOptionsArePresent(StringHelper.DEFAULT_BOOKMARKS_URLS[1],
I would add a comment either here or above the method, about checking both shareable and unshareable links.
@@ +55,5 @@
>
> + private void assertAllContextMenuOptionsArePresent(final String shareableURL,
> + final String nonShareableURL) {
> + mAsserter.ok(StringUtils.isShareableUrl(shareableURL), "Ensuring url is shareable", "");
> + mAsserter.ok(!StringUtils.isShareableUrl(nonShareableURL), "Ensuring url is shareable", "");
(you mentioned this already) "not shareable".
@@ +69,5 @@
> + mActions.sendSpecialKey(Actions.SpecialKey.BACK);
> +
> + openBookmarkContextMenu(nonShareableURL);
> + for (String contextMenuOption : StringHelper.BOOKMARK_CONTEXT_MENU_ITEMS) {
> + if ("Share".equals(contextMenuOption)) {
Add a comment here about skipping this item.
Attachment #8438055 -
Flags: review+
| Assignee | ||
Comment 16•12 years ago
|
||
Fixed nits.
| Assignee | ||
Updated•12 years ago
|
Attachment #8438055 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8438067 -
Flags: review+
| Assignee | ||
Comment 17•12 years ago
|
||
I'll save you, fx-team! https://hg.mozilla.org/integration/fx-team/rev/d1e57e3cbba1
Well, about that...
Backed out in https://hg.mozilla.org/integration/fx-team/rev/b72560289748 for further failures in robocop-1: https://tbpl.mozilla.org/php/getParsedLog.php?id=41489414&tree=Fx-Team
Flags: needinfo?(michael.l.comella)
Comment 19•12 years ago
|
||
It would be kinda neat to actually make these just "share" Firefox. i.e. send a link to the marketplace with some sort of "Firefox for Android rocks!" message :)
| Assignee | ||
Comment 20•12 years ago
|
||
Oh, it was a real bug. :D
try: https://tbpl.mozilla.org/?tree=Try&rev=ddb416f9cf5c
Later rebased part 3 (not in this try run); will upload.
Attachment #8439611 -
Flags: review?(mark.finkle)
| Assignee | ||
Comment 21•12 years ago
|
||
Rebase.
| Assignee | ||
Updated•12 years ago
|
Attachment #8439613 -
Flags: review+
Flags: needinfo?(michael.l.comella)
Updated•12 years ago
|
Attachment #8439611 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 22•12 years ago
|
||
Updated description.
| Assignee | ||
Updated•12 years ago
|
Attachment #8439611 -
Attachment is obsolete: true
| Assignee | ||
Comment 23•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Attachment #8439639 -
Flags: review+
| Assignee | ||
Updated•12 years ago
|
Attachment #8439613 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8439613 -
Attachment is obsolete: false
| Assignee | ||
Updated•12 years ago
|
Attachment #8438067 -
Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/74efce73d13e
https://hg.mozilla.org/mozilla-central/rev/afe2fb8b3c92
https://hg.mozilla.org/mozilla-central/rev/baf23870f2ea
https://hg.mozilla.org/mozilla-central/rev/963ce9889301
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•